OneM2M_Templates.ttcn 68.4 KB
Newer Older
1 2 3 4 5 6 7 8
/**
 *  Copyright Notification
 *  No part of this document may be reproduced, in an electronic retrieval system or otherwise, except as authorized by written permission.
 *  The copyright and the foregoing restriction extend to reproduction in all media.
 *  © 2016, oneM2M Partners Type 1 (ARIB, ATIS, CCSA, ETSI, TIA, TSDSI, TTA, TTC).
 *  All rights reserved.
 *  
 *  @author     ETSI
9
 *  @version    $URL: https://forge.etsi.org/svn/oneM2M/branches/Release1/ttcn/LibOneM2M/OneM2M_Templates.ttcn $
10
 *              $Id: OneM2M_Templates.ttcn 183 2016-11-25 13:31:34Z reinaortega $
11 12 13 14 15 16 17 18 19 20 21
 *  @desc       Module containing templates for oneM2M
 *
 */
module OneM2M_Templates {

	import from XSD all;
	import from OneM2M_Types all;
	import from OneM2M_TestSystem all;
	import from OneM2M_TypesAndValues all;
	//import from OneM2M_AdditionalTypes all;
	import from OneM2M_Pixits all;
22
	//import from OneM2M_Functions all;
23

24
		
25 26 27 28 29 30
	/**
	 * @desc Get a converted to string random number 
	 * @param p_lower Lower limit 
	 * @param p_upper Upper limit
	 * @return Random number converted to string
	 * @verdict 
31
	 */
32 33 34 35 36
	function f_rnd(in integer p_lower, in integer p_upper) return charstring {
		
		return int2str(float2int(rnd() * int2float(p_upper - p_lower + 1)) + p_lower);	
	}

37 38

	/* Templates */
39 40
	
	group primitives {
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
		/** 
		 * @desc Base template for request sending operations
		 * @param p_requestPrimitive
		 */
		template (value) MsgOut m_request(in template (value) RequestPrimitive p_requestPrimitive, in template (omit) AttributeList_1 p_nullFields := omit ) := {
			primitive := { requestPrimitive := p_requestPrimitive},
			host := PX_SUT_ADDRESS,
			xmlNamespace := PX_XML_NAMESPACE,
			protocolBinding := PX_PROTOCOL_BINDING,
			serialization := PX_SERIALIZATION, 
			nullFields := p_nullFields
		};
    	
		/** 
		 * @desc Base template for response sending operations
		 * @param p_responsePrimitive
		 */
		template (value) MsgOut m_response(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeList_1 p_nullFields := omit ) := {
			primitive := { responsePrimitive := p_responsePrimitive},
			host := PX_SUT_ADDRESS,
			xmlNamespace := PX_XML_NAMESPACE,
			protocolBinding := PX_PROTOCOL_BINDING,
			serialization := PX_SERIALIZATION, 
			nullFields := p_nullFields
		};
		//Added by @Naum
		template MsgIn mw_request(in template (present) RequestPrimitive p_requestPrimitive) := {
			primitive := { requestPrimitive := p_requestPrimitive}
		};
70 71 72 73 74 75 76 77 78
    	
		/** 
		 * @desc Base template for response receiving operations
		 * @param p_responsePrimitive
		 */
		template MsgIn mw_response(in template (present) ResponsePrimitive p_responsePrimitive) := {
			primitive := { responsePrimitive := p_responsePrimitive}
		};
    	
79
	}//end of group primitives
80 81 82 83 84
	
	group RequestPrimitives { 
		
		group Retrieve {
	
85
			/**
86 87
			 * @desc 
			 */
88 89 90 91 92 93
			template (value) RequestPrimitive m_retrieveCseBase := {
				operation := int2,
				to_ := PX_URI_CSE,//c_uri_cse,//@Martin
				from_ := "admin:admin",
				requestIdentifier := "m_retrieveCseBase" & f_rnd(1, 1000000),
				resourceType := omit,
94 95
				primitiveContent := omit,
				role := omit,
96 97 98 99 100 101 102 103 104 105 106
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
107 108
				discoveryResultType := omit
			};
109

110 111 112 113
			/**
			 * @desc Base RETRIEVE request primitive
			 * @param p_targetResourceAddress Target resource address
			 * @param p_originator Originator (from)
114
			 */
115
			template (value) RequestPrimitive m_retrieveResource(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) := {
116
				operation := int2,
117
				to_ := p_targetResourceAddress,
118
				from_ := p_originator,
119 120
				requestIdentifier := "m_retrieveResource" & f_rnd(1, 1000000),
				resourceType := omit,
121 122
				primitiveContent := omit,
				role := omit,
123 124 125 126 127 128 129 130 131 132 133
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
134
				discoveryResultType := omit
135 136
			};
        	
137 138 139 140 141
			/**
			 * @desc RETRIEVE request primitive for a single attribute in To field ("targetResourceAddress#AttributeName")
			 * @param p_targetResourceAddress Target resource address (including "#AttributeName")
			 * @param p_originator Originator (from)
			 */
142 143 144 145 146 147 148
			template (value) RequestPrimitive m_retrieveResourceAttributeToOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) := {
				operation := int2,
				to_ := p_targetResourceAddress,
				from_ := p_originator,
				requestIdentifier := "m_retrieveResourceAttributeOptionTo" & f_rnd(1, 1000000),
				resourceType := omit,
				primitiveContent := omit,
149
				role := omit,
150 151 152 153 154 155 156 157 158 159 160
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
161 162
				discoveryResultType := omit
			};
163
        	
164 165 166 167 168
			/**
			 * @desc RETRIEVE request primtive containing the target attributes in the primitiveContent field
			 * @param p_targetResourceAddress Target resource address 
			 * @param p_attributeList Target attribute list
			 * @param p_originator Originator (from)
169
			 */
170
			template (value) RequestPrimitive m_retrieveResourceAttributeContentOption(XSD.ID p_targetResourceAddress, in template (value) AttributeList_1 p_attributeList, in XSD.ID p_originator) := {
171
				operation := int2,
172
				to_ := p_targetResourceAddress,
173
				from_ := p_originator,
174 175
				requestIdentifier := "m_retrieveResourceAttributeContentOption" & f_rnd(1, 1000000),
				resourceType := omit,
176 177
				primitiveContent := {
					any_1 := {{AttributeList := p_attributeList}}
178
				},
179
				role := omit,
180 181 182 183 184 185 186 187 188 189 190
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
191
				discoveryResultType := omit
192
			};
193
		}//end group Retrieve
194

195 196 197
		group Update {
    		
			template (value) RequestPrimitive m_update := {
198 199
				operation := int3,
				to_ := "NotInitialized",
200 201
				from_ := "NotInitialized",
				requestIdentifier := "m_update" & f_rnd(1, 1000000),
202
				resourceType := omit,
203
				primitiveContent:= omit,
204
				role := omit,
205 206 207 208 209 210 211 212 213 214 215
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238
				discoveryResultType := omit
			};
        	
			/**
			 * @desc Base UPDATE request primitive for Ae resource
			 */
			template (value) RequestPrimitive m_updateAeBase modifies m_update:= {
				from_ := PX_AE_ID_STEM,
				requestIdentifier := "m_updateAe" & f_rnd(1, 1000000),
				primitiveContent:= {
							any_1 := {{AE_optional := m_contentUpdateAe}}
				}
			};
        	
			/**
			 * @desc Base UPDATE request primitive for Container resource
			 */
			template (value) RequestPrimitive m_updateContainerBase modifies m_update:= {
				from_ := PX_AE_ID_STEM,
				requestIdentifier := "m_updateContainer" & f_rnd(1, 1000000),
				primitiveContent:= {
							any_1 := {{Container_optional := m_contentUpdateContainer}}
				}
239 240
			};
			
241 242 243
			/**
			 * @desc Base UPDATE request primitive for AccessControlPolicy resource
			 */        				
244
			template (value) RequestPrimitive m_updateAcpBase modifies m_update := {
245
				from_ := PX_AE_ID_STEM,
246
				requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000),
247
				primitiveContent:= {
248
							any_1 := {{AccessControlPolicy_optional := m_contentUpdateAcp}}
249 250 251 252 253 254 255 256 257
				}
			};
			
			template (value) RequestPrimitive m_updateAcpPrivileges(in template(omit) SetOfAcrs p_privileges := omit, in template(omit) SetOfAcrs p_selfPrivileges := omit) modifies m_update := {
				from_ := PX_AE_ID_STEM,
				requestIdentifier := "m_updateAcp" & f_rnd(1, 1000000),
				primitiveContent:= {
							any_1 := {{AccessControlPolicy_optional := m_contentUpdateAcpPrivileges(p_privileges, p_selfPrivileges)}}
				}
258 259
			};
			
260 261 262
			/**
			 * @desc Base UPDATE request primitive for Group resource
			 */
263
			template (value) RequestPrimitive m_updateGroupBase modifies m_update := {
264
				from_ := PX_AE_ID_STEM,
265
				requestIdentifier := "m_updateGroup" & f_rnd(1, 1000000),
266
				primitiveContent:= {
267
							any_1 := {{Group_optional := m_contentUpdateGroup}}
268
				}
269 270
			};
			
271 272 273
			/**
			 * @desc Base UPDATE request primitive for Schedule resource
			 */
274
			template (value) RequestPrimitive m_updateScheduleBase modifies m_update := {
275
				from_ := PX_AE_ID_STEM,
276
				requestIdentifier := "m_updateSchedule" & f_rnd(1, 1000000),
277
				primitiveContent:= {
278
							any_1 := {{Schedule_optional := m_contentUpdateSchedule}}
279
				}
280 281
			};
			
282 283 284
			/**
			 * @desc Base UPDATE request primitive for PollingChannel resource
			 */
285
			template (value) RequestPrimitive m_updatePollingChannelBase modifies m_update := {
286
				from_ := PX_AE_ID_STEM,
287
				requestIdentifier := "m_updatePollingChannel" & f_rnd(1, 1000000),
288
				primitiveContent:= {
289
							any_1 := {{PollingChannel_optional := m_contentUpdatePollingChannel}}
290
				}
291 292
			};
			
293 294 295
			/**
			 * @desc Base UPDATE request primitive for Subscription resource
			 */
296
			template (value) RequestPrimitive m_updateSubscriptionBase modifies m_update := {
297
				from_ := PX_AE_ID_STEM,
298
				requestIdentifier := "m_updateSubscription" & f_rnd(1, 1000000),
299
				primitiveContent:= {
300
							any_1 := {{Subscription_optional := m_contentUpdateSubscription}}
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324
				}
			};
			
			//@Martin
			template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod) modifies m_update := {
				to_ 				:= p_locResourceAddress,
				from_				:= PX_AE_ID_STEM, //AE originator id e.g.
				requestIdentifier	:= "m_updateLocationPolicy",
				primitiveContent	:= {        	    
							any_1 := {{ LocationPolicy_optional := m_contentUpdateLocationPolicy(p_accessControlPolicyIDs, locationUpdatePeriod) }}
				}
			  };
        	
		}//end group Update
    	
		group Create {

			template (value) RequestPrimitive m_create := {
				operation := int1,
				to_ := "NotInitialized",
				from_ := "NotInitialized",
				requestIdentifier := "m_create" & f_rnd(1, 1000000),
				resourceType := omit,
				primitiveContent := omit,
325
				role := omit,
326 327 328 329 330 331 332 333 334 335 336
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
337
				discoveryResultType := omit
338 339
			};
        	
340 341 342
			/**
			 * @desc Base CREATE request primitive for AE resource (AUX)
			 */
343
			//Added by @Naum
344 345 346 347 348 349 350 351 352
			template RequestPrimitive mw_createAEannc(template (omit) AcpType p_accessControlPolicyIDs := omit,template (omit) XSD.ID p_from := omit, XSD.ID p_appId) := {
				operation := int1,
				to_ := ?,
				from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
				requestIdentifier := ?,
				resourceType := int10002,
				primitiveContent := {
					any_1 := {{AEAnnc_optional := mw_contentCreateAEannc(c_aeAuxName, p_accessControlPolicyIDs, p_appId)}}	
				},
353 354 355 356 357 358 359 360 361 362 363 364 365
				role := *,
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				discoveryResultType := *
366
			};
367 368

			//Added by @Naum
369
			template (value) RequestPrimitive m_createAe(XSD.ID p_appId, template (omit) AcpType p_accessControlPolicyIDs := omit,template (omit) XSD.ID p_from := omit, template (omit) ResourceName p_resourceName :=  c_aeAuxName, in template (omit) PoaList p_poaList := omit) modifies m_create := {
370 371 372 373
				from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
				requestIdentifier := "m_createAe" & f_rnd(1, 1000000),
				resourceType := int2,
				primitiveContent := {
374 375
					any_1 := {{AE_optional := m_contentCreateAe(p_accessControlPolicyIDs,p_resourceName, p_appId, p_poaList)}}	
				}
376
			};
377
        	
378 379 380 381 382 383 384 385
			template (value) RequestPrimitive m_createAeAux(template (omit) AcpType p_accessControlPolicyIDs := omit, in template (omit) PoaList p_poaList) modifies m_create := {
				from_ := PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"//@Martin
				requestIdentifier := "m_createAe" & f_rnd(1, 1000000),
				resourceType := int2,
				primitiveContent := {
					any_1 := {{AE_optional := m_contentCreateAe(p_accessControlPolicyIDs, c_aeAuxName, -, p_poaList)}}	
				}
			};
386
        	
387 388 389
			/**
			 * @desc Base CREATE request primitive for AccessControlPolicy resource
			 */
390
			template (value) RequestPrimitive m_createAcpBase modifies m_create := {
391
				requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
392
				resourceType := int1,
393
				primitiveContent := {
394
					any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp ()}}
395
				}
396 397
			};
				
398 399 400 401 402 403
			template (value) RequestPrimitive m_createAcp(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) modifies m_create := {
				to_ := p_parentResourceAddress,
				from_ := PX_AE_ID_STEM,
				requestIdentifier := "m_createAcp" & f_rnd(1, 1000000),
				resourceType := int1,
				primitiveContent := {
404
					any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_name, p_acor, p_allowedOperations)}}
405 406
				}
			};
407
        	
408 409 410 411
       	
			/**
			 * @desc Base CREATE request primitive for AccessControlPolicy resource (AUX)
			 */
412 413 414 415 416 417 418 419
			template (value) RequestPrimitive m_createAcpAux(in template (value) XSD.String p_acpName := c_acpAuxName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) modifies m_create := {
				from_ := PX_SUPER_USER,
				requestIdentifier := "m_createAcpAux" & f_rnd(1, 1000000),
				resourceType := int1,
				primitiveContent := {
					any_1 := {{AccessControlPolicy_optional := m_contentCreateAcp (p_acpName, p_acor, p_allowedOperations)}}	
				}
			};
420
        	
421
			//Added by @Naum
422
			template (value) RequestPrimitive m_createCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) modifies m_create := {
423 424
				from_ := PX_AE_ID_STEM,
				requestIdentifier := "m_createCSE" & f_rnd(1, 1000000),
425
				resourceType := int1,//FIXME Is this the value for CSEBase? In any case, this template is not used at all
426 427
				primitiveContent := {
					any_1 := {{CSEBase_optional := m_contentCreateCSEBase (p_serviceSubscribedAppRule)}}
428
				}
429 430
			};
        	
431 432 433 434
       	
			/**
			 * @desc Base CREATE request primitive for Container resource
			 */
435
			template (value) RequestPrimitive m_createContainerBase modifies m_create := {
436
				requestIdentifier := "m_createContainer" & f_rnd(1, 1000000),
437
				resourceType := int3,
438 439
				primitiveContent := {
					
440
					any_1 := {{Container_optional := m_contentCreateContainer}}
441
				}
442 443
			};
	
444 445 446 447 448 449 450 451 452
			template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName) modifies m_create := {
				to_ := p_parentResourceAddress,
				from_ := PX_AE_ID_STEM,
				requestIdentifier := "m_createContainer" & f_rnd(1, 1000000),
				resourceType := int3,
				primitiveContent := {
					any_1 := {{Container_optional := m_contentCreateContainer}}
				}
			};
453
        	
454 455 456 457 458 459 460 461 462
			template (value) RequestPrimitive m_createContentInstance(XSD.ID p_parentResourceAddress, XSD.String p_primitiveContent) modifies m_create := {
				to_ := p_parentResourceAddress,
				from_ := "admin:admin",
				requestIdentifier := "m_createContentInstance" & f_rnd(1, 1000000),
				resourceType := int4,
				primitiveContent := {
					any_1 := {{ContentInstance_optional := m_contentCreateContentInstance(p_primitiveContent)}}	
				}
			};
463
    		
464 465 466 467
       	
			/**
			 * @desc Base CREATE request primitive for Group resource
			 */
468
			template (value) RequestPrimitive m_createGroupBase modifies m_create := {
469
				requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
470 471
				resourceType := int9,
				primitiveContent := {
472
					any_1 := {{Group_optional := m_contentCreateGroup (1, {"/" & PX_CSE_NAME & "/" & "NotInitialized"}, omit)}}	//TODO: p_resourceId
473 474
				}
			};
475
        	
476 477 478 479 480 481 482 483 484 485 486 487 488
			template (value) RequestPrimitive m_createGroup(in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
												in template (value) ListOfURIs p_memberIds := {"Not Initialized"},
												in template (omit) AcpType p_accessControlPolicyIDs,
												in template (omit) MemberType p_memberType := omit,
												in template (omit) ConsistencyStrategy p_consistencyStrategy := omit,
												in template (omit) ListOfURIs p_membersAccessControlPolicyIDs := omit,
												in template (omit) XSD.String p_name := "MyGroup") modifies m_create := {
            	requestIdentifier := "m_createGroup" & f_rnd(1, 1000000),
            	resourceType := int9,
            	primitiveContent := {
            		any_1 := {{Group_optional := m_contentCreateGroup (p_maxNrOfMembers, p_memberIds, p_accessControlPolicyIDs, p_memberType, p_consistencyStrategy, p_membersAccessControlPolicyIDs, p_name)}}	//TODO: p_resourceId
            	}
            };
489
        	
490 491 492 493
       	
			/**
			 * @desc Base CREATE request primitive for PollingChannel resource
			 */
494
			template (value) RequestPrimitive m_createPollingChannelBase modifies m_create := {
495
				requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000),
496 497
				resourceType := int15,
				primitiveContent := {
498 499 500
					any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel (-)}}	
				}
			};
501
        	
502 503 504 505 506 507 508 509 510
			template (value) RequestPrimitive m_createPollingChannel(XSD.ID p_parentResourceAddress, in template (value)XSD.ID p_originatorId, in template (omit) AcpType p_accessControlPolicyIDs ) modifies m_create := {
				to_ := p_parentResourceAddress,
				from_ := p_originatorId,
				requestIdentifier := "m_createPollingChannel" & f_rnd(1, 1000000),
				resourceType := int15,
				primitiveContent := {
					any_1 := {{PollingChannel_optional := m_contentCreatePollingChannel ()}}	
				}
			};
511
        	
512 513 514
			/**
			 * @desc Base CREATE request primitive for Schedule resource
			 */
515 516 517 518 519 520 521
			template (value) RequestPrimitive m_createScheduleBase modifies m_create := {
				requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000),
				resourceType := int18,
				primitiveContent := {
					any_1 := {{Schedule_optional := m_contentCreateSchedule ({{"0,0,0 1 2,1,1,*"}})}}	
				}
			};
522
        	
523 524 525 526 527 528 529 530 531
			template (value) RequestPrimitive m_createSchedule(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name, in template (value) ScheduleEntries p_scheduleElement ) modifies m_create := {
				to_ := p_parentResourceAddress,
				from_ := PX_AE_ID_STEM,
				requestIdentifier := "m_createSchedule" & f_rnd(1, 1000000),
				resourceType := int18,
				primitiveContent := {
					any_1 := {{Schedule_optional := m_contentCreateSchedule (p_scheduleElement)}}	
				}
			};
532
        	
533
			//Added by @Naum
534
			template (value) RequestPrimitive m_createServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedApp_IDs, in ListOfM2MID p_allowedAEs) modifies m_create := {
535
				from_ := PX_AE_ID_STEM,
536 537
				requestIdentifier := "m_createServiceSubscribedAppRule" & f_rnd(1, 1000000),
				resourceType := int19,//FIXME Is this the correct value?
538
				primitiveContent := {
539
					any_1 := {{ServiceSubscribedAppRule_optional := m_contentCreateServiceSubscribedAppRule (p_applicableCredIDs, p_allowedApp_IDs, p_allowedAEs)}}
540
				}
541
			};
542
        	
543 544 545 546
       	
			/**
			 * @desc Base CREATE request primitive for Subscription resource
			 */
547
			template (value) RequestPrimitive m_createSubscriptionBase modifies m_create := {
548
				requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000),
549
				resourceType := int23,
550
				primitiveContent := {
551
					any_1 := {{Subscription_optional := m_contentCreateSubscription ({"Not Initialized"})}}	
552
				}
553 554
			};
        	
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596
			template (value) RequestPrimitive m_createSubscription(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name, in template (value) ListOfURIs p_notificationURI := {"NotInitialized"}) modifies m_create := {
				to_ := p_parentResourceAddress,
				from_ := PX_AE_ID_STEM,
				requestIdentifier := "m_createSubscription" & f_rnd(1, 1000000),
				resourceType := int23,
				primitiveContent := {
					any_1 := {{Subscription_optional := m_contentCreateSubscription (p_notificationURI, p_name)}}	
				}
			};
        	
			template (value) RequestPrimitive m_createSubscriptionAdvanced(	XSD.ID p_parentResourceAddress, 
																		   in template (omit)  XSD.String p_name := omit,
																		   in template (value) ListOfURIs p_notificationURI,
																		   in template (omit) EventNotificationCriteria p_eventNotificationCriteria := omit,
																		   in template (omit) XSD.PositiveInteger p_expirationCounter := omit,
																		   in template (omit) BatchNotify p_batchNotify := omit,
																		   in template (omit) XSD.Boolean p_latestNotify := omit,
																		   in template (omit) XSD.AnyURI p_subscriberURI := omit,
																		   in template (omit) NotificationContentType p_notificationContentType := int1) modifies m_createSubscription := {
				primitiveContent := {
					any_1 := {{Subscription_optional := m_contentCreateSubscriptionAdvanced (p_notificationURI, p_name, p_eventNotificationCriteria, p_expirationCounter, p_batchNotify, p_latestNotify, p_subscriberURI, p_notificationContentType)}}	
				}
			};
        	
			//@Martin
			template (value) RequestPrimitive m_createLocationPolicy(in template (value) LocationSource locationSource, in template (omit) AcpType p_accessControlPolicyIDs, in template (omit) XSD.Duration locationUpdatePeriod, in template (omit) NodeID locationTargetID, in template (omit) XSD.AnyURI locationServerAddress) modifies m_create := {
				requestIdentifier	:= "m_createLocationPolicy" & f_rnd(1, 1000000), //the requestIdentifier is supposed to be set similar as "C190XX7T/001"  by prepending the AE-ID-Stem and slash(‘/’) in front of it
				resourceType		:= int10,
				primitiveContent	:= {        	    
							any_1 := {{ LocationPolicy_optional := m_contentCreateLocationPolicy(locationSource, p_accessControlPolicyIDs, locationUpdatePeriod, locationTargetID, locationServerAddress) }}
				},
				resultContent := int1//default
			};
			//@Martin
			template (value) RequestPrimitive m_createNotification(in template (value) Representation resourcePresentation, in template (omit)NotificationEventType notifEventType, in template (omit) XSD.AnyURI subscriptionReference, in template (omit) XSD.AnyURI notifForwardingURI) modifies m_create := {
			  requestIdentifier	:= "m_createNotification" & f_rnd(1, 1000000),
			  primitiveContent	:= {	
							any_1 :=	{{ Notification := m_contentCreateNotification(resourcePresentation, notifEventType, subscriptionReference, notifForwardingURI)}}        	    
			  },
			  resultContent		:= int1 //default
        	  
			};
597 598
        	
        	
599
		}//end group Create
600
    	
601
		group Delete {
602
    	
603 604 605 606 607 608 609 610
			template (value) RequestPrimitive m_deleteRequest(XSD.ID p_resourceAddress) := {
				operation := int4,
				to_ := p_resourceAddress,
				from_ := PX_SUPER_USER,
				requestIdentifier := "m_deleteResource" & f_rnd(1, 1000000),
				resourceType := omit,
				primitiveContent := omit, 
				role := omit, 
611 612 613 614 615 616 617 618 619 620 621
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
622 623
				discoveryResultType := omit
			};
624
        	
625 626 627 628 629 630 631
			template (value) RequestPrimitive m_delete(XSD.ID p_resourceAddress) := {
				operation := int4,
				to_ := p_resourceAddress,
				from_ := PX_AE_ID_STEM,
				requestIdentifier := "m_deleteAe" & f_rnd(1, 1000000),
				resourceType := omit,
				primitiveContent := omit, 
632
				role := omit, 
633 634 635 636 637 638 639 640 641 642 643
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
644
				discoveryResultType := omit
645

646 647
			};
        	
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715
		}//end group Delete
    	
		group Notify {
    		
			/**
			 * @desc Base NOTIFY request primitive
			 */
			template RequestPrimitive mw_notifyBase := {
				operation := int5,
				to_ := ?,
				from_ := *,
				requestIdentifier := ?,
				resourceType := *,
				primitiveContent := { any_1 := {{ Notification := mw_contentNotificationBase}} },
				role := *,
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				discoveryResultType := *
			};
			
			/**
			 * @desc Base NOTIFY request primitive
			 */
			template RequestPrimitive mw_aggregatedNotifyBase := {
				operation := int5,
				to_ := ?,
				from_ := *,
				requestIdentifier := ?,
				resourceType := *,
				primitiveContent := { any_1 := {{ AggregatedNotification := ?}} },
				role := *,
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				discoveryResultType := *
			};
			
			/**
			 * @desc Base NOTIFY request primitive
			 */
			
			template RequestPrimitive mw_notify(in template Notification p_notification) modifies mw_notifyBase := {
				primitiveContent := { 
					any_1 := {{ Notification := p_notification}}
				}
			};
			

			
    		
		}//end of group Notify
716 717 718 719
	}//end group RequestPrimitives
	
	group ContentCreate {
		
Miguel Angel Reina Ortega's avatar
Miguel Angel Reina Ortega committed
720

721
			template (value) AEAnnc_optional mw_contentCreateAEannc (in template (omit)  XSD.String p_name, in template (omit) AcpType p_accessControlPolicyIDs, XSD.ID p_appId := PX_APP_ID) := {
722 723 724 725 726 727 728 729 730
			resourceName := p_name,//O
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			accessControlPolicyIDs := p_accessControlPolicyIDs,//O
			expirationTime := omit,//O
731 732 733 734 735 736 737 738 739 740 741
			link := omit,//O
			appName := omit,//O
			app_ID := p_appId,//M
			aE_ID := omit,//NP
			pointOfAccess := omit, //{"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
			ontologyRef := omit,//O
			nodeLink := omit,//NP
			requestReachability := true,//M
			contentSerialization := omit,//O
			choice := omit//NP
		};	
742
		
743 744 745 746 747 748
		/**
		 * @desc Base primitiveContent for CREATE operation for AE resource
		 * @param p_name Resource name
		 * @param p_accessControlPolicyIDs ACP IDs for the AE
		 */
		template (value) AE_optional m_contentCreateAe (in template (omit) AcpType p_accessControlPolicyIDs, in template (omit)  XSD.String p_name := c_defaultResourceName, in template (omit) XSD.ID p_appId := PX_APP_ID, in template (omit) PoaList p_poaList) := {
Miguel Angel Reina Ortega's avatar
Miguel Angel Reina Ortega committed
749

750 751 752 753 754 755 756 757 758
			resourceName := p_name,//O
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			accessControlPolicyIDs := p_accessControlPolicyIDs,//O
			expirationTime := omit,//O
759 760 761
			announceTo := omit,//O
			announcedAttribute := omit,//O
			appName := omit,//O
762
			app_ID := p_appId,//M
763 764 765 766 767 768 769 770
			aE_ID := omit,//NP
			pointOfAccess := p_poaList, //O {"http://127.0.0.1:1400/monitor"},//{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
			ontologyRef := omit,//O
			nodeLink := omit,//NP
			requestReachability := true,//M
			contentSerialization := omit,//O
			choice := omit//NP
		};	
771
    	
772 773 774 775 776 777 778
		/**
		 * @desc Base primitiveContent for CREATE operation for AccessControlPolicy resource
		 * @param p_name Resource name
		 * @param p_acor Allowed originators
		 * @param p_allowedOperations Allowed operations
		 */
		template (value) AccessControlPolicy_optional m_contentCreateAcp (in template (omit) XSD.String p_name := c_defaultResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
779 780 781 782 783 784 785 786 787 788
			resourceName := p_name,//O
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			expirationTime := omit,//O
			announceTo := omit,//O
			announcedAttribute := omit,//O
789
			privileges := {
790
				accessControlRule_list := {valueof(m_createAcr(p_acor, p_allowedOperations))}
791
			},//M
792
			selfPrivileges := {
793
				accessControlRule_list := {valueof(m_createAcr(p_acor, int63))}
794 795
			},//M
			choice := omit //NP
796
		};
797 798 799 800 801 802
		
		template (value) AccessControlRule m_createAcr (in template (value) ListOfURIs p_acor, in template (value) AccessControlOperations p_allowedOperations) := {
			accessControlOriginators := p_acor,//{"*"},//{PX_AE_ID_STEM}, //{"admin:admin"},
			accessControlOperations := p_allowedOperations,
			accessControlContexts_list := {}
		}
803
    	
804 805
		//added by @Naum
		template (value) CSEBase_optional m_contentCreateCSEBase (in ServiceSubscribedAppRule p_serviceSubscribedAppRule) := {
806
			resourceName := omit,
807
			resourceType := omit,
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822
			resourceID := omit,
			parentID := omit,
			creationTime := omit,
			lastModifiedTime := omit,
			labels := omit,
			accessControlPolicyIDs := omit,
			cseType := omit,
			cSE_ID := omit,
			supportedResourceType := omit,
			pointOfAccess := omit,
			nodeLink := omit,
			choice := {
				choice_list := {{
				  serviceSubscribedAppRule := p_serviceSubscribedAppRule
				}}
823 824
			}
		}
825
    	
826
		/**
827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861
			 * @desc Base primitiveContent for CREATE operation for Group resource
			 * @param p_maxNrOfMembers Max number of members
			 * @param p_memberIds Member IDs
			 * @param p_accessControlPolicyIDs ACP IDs for the Group
			 * @param p_name Resource name
			 */
			template (value) Group_optional m_contentCreateGroup (	in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
																	in template (value) ListOfURIs p_memberIds,
																	in template (omit) AcpType p_accessControlPolicyIDs,
																	in template (omit) MemberType p_memberType := omit,
																	in template (omit) ConsistencyStrategy p_consistencyStrategy := omit,
																	in template (omit) ListOfURIs p_membersAccessControlPolicyIDs := omit,
																	in template (omit) XSD.String p_name := c_defaultResourceName) := {
				resourceName := p_name,//O
				resourceType := omit,//NP
				resourceID := omit,//NP
				parentID := omit,//NP
				creationTime := omit,//NP
				lastModifiedTime := omit,//NP
				labels := omit,//O
				accessControlPolicyIDs := p_accessControlPolicyIDs,//O
				expirationTime := omit,//O
				announceTo := omit,//O
				announcedAttribute := omit,//O
				creator := omit,//O
				memberType := p_memberType,//O
				currentNrOfMembers := omit,//NP
				maxNrOfMembers := p_maxNrOfMembers,//M
				memberIDs := p_memberIds,//M
				membersAccessControlPolicyIDs := p_membersAccessControlPolicyIDs,//O
				memberTypeValidated := omit,//NP
				consistencyStrategy := p_consistencyStrategy,//O
				groupName := omit,//O
				choice := omit//NP
			};    	
862
    	
863 864 865 866 867 868
		/**
		 * @desc Base primitiveContent for CREATE operation for PollingChannel resource
		 * @param p_accessControlPolicyIDs ACP IDs for the PollingChannel
		 * @param p_name Resource name
		 */
		template (value) PollingChannel_optional m_contentCreatePollingChannel (in template (omit) XSD.String p_name := c_defaultResourceName) := {
869
			resourceName := p_name,//O
870 871 872 873 874 875 876 877
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			expirationTime := omit//O
		};    	
878
    	
879 880 881 882 883 884
		/**
		 * @desc Base primitiveContent for CREATE operation for Schedule resource
		 * @param p_scheduleElement Schedule
		 * @param p_name Resource name
		 */
		template (value) Schedule_optional m_contentCreateSchedule (in template (value) ScheduleEntries p_scheduleElement,
885 886
																	in template (omit) XSD.String p_name := c_defaultResourceName) := {
			resourceName := p_name,//O
887 888 889 890 891 892 893 894 895 896 897
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			expirationTime := omit,//O
			announceTo := omit,//O
			announcedAttribute := omit,//O
			scheduleElement := p_scheduleElement,//M
			choice := omit//NP
898
		};    	
899
    	
900
		template (value) ServiceSubscribedAppRule_optional m_contentCreateServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedApp_IDs, in ListOfM2MID p_allowedAEs) := {
901 902 903 904 905 906 907 908 909 910 911 912 913
			resourceName := omit,//TODO TS-0004 7.4.29.1 2 Missing attribute
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			accessControlPolicyIDs := omit,//O
			expirationTime := omit,//O
			applicableCredIDs := p_applicableCredIDs,//O
			allowedApp_IDs := p_allowedApp_IDs,//O
			allowedAEs := p_allowedAEs,//O
			choice := omit //O
914
		}
915
    	
Miguel Angel Reina Ortega's avatar
Miguel Angel Reina Ortega committed
916

917 918 919 920 921 922
		/**
		 * @desc Base primitiveContent for CREATE operation for Subscription resource
		 * @param p_notificationURI Notification URI
		 * @param p_name Resource name
		 */
		template (value) Subscription_optional m_contentCreateSubscription (in template (value) ListOfURIs p_notificationURI,
923
																			in template (omit) XSD.String p_name := c_defaultResourceName) := {
924
			resourceName := p_name,//O
925 926 927 928 929 930 931 932 933 934 935 936 937 938
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			accessControlPolicyIDs := omit,//O
			expirationTime := omit,//O
			eventNotificationCriteria := omit,//O
			expirationCounter := omit,//O
			notificationURI := p_notificationURI,//M
			groupID := omit,//O
			notificationForwardingURI := omit,//O
			batchNotify := omit,//O
939
			
940 941 942 943 944
			rateLimit := omit,//O
			preSubscriptionNotify := omit,//O
			pendingNotification := omit,//O
			notificationStoragePriority := omit,//O
			latestNotify := omit,//O
945
			notificationContentType := omit, //O
946 947 948 949
			notificationEventCat := omit,//O
			creator := omit,//O
			subscriberURI := omit,//O
			choice := omit//NP
950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991
		};   	
    	
		template (value) Subscription_optional m_contentCreateSubscriptionAdvanced (in template (value) ListOfURIs p_notificationURI,
																					in template (omit)  XSD.String p_name := c_defaultResourceName,
																					in template (omit) EventNotificationCriteria p_eventNotificationCriteria,
																					in template (omit) XSD.PositiveInteger p_expirationCounter,
																					in template (omit) BatchNotify p_batchNotify,
																					in template (omit) XSD.Boolean p_latestNotify,
																					in template (omit) XSD.AnyURI p_subscriberURI,
																					in template (omit) NotificationContentType p_notificationContentType) modifies m_contentCreateSubscription := {
			eventNotificationCriteria := p_eventNotificationCriteria,//O
			expirationCounter := p_expirationCounter,//O
			batchNotify := p_batchNotify,//O
			latestNotify := p_latestNotify,//O
			notificationContentType := p_notificationContentType, //TODO Set to omit once xsd is fixed,//O
			subscriberURI := p_subscriberURI//O
		}; 
		
		template (value) EventNotificationCriteria m_eventNotificationCriteria ( in EventNotificationCriteria.notificationEventType_list p_notificationEventType_list := {}, in EventNotificationCriteria.attribute p_attribute_list := {}) := { //the parameter should be a list of NotificationEventTypeEventType
			createdBefore := omit,
			createdAfter := omit,
			modifiedSince := omit,
			unmodifiedSince := omit,
			stateTagSmaller := omit,
			stateTagBigger := omit,
			expireBefore := omit,
			expireAfter := omit,
			sizeAbove := omit,
			sizeBelow := omit,
			operationMonitor_list := {},
			attribute := p_attribute_list, // TODO this list should be able to be omited see 9.6.8 
			notificationEventType_list := p_notificationEventType_list// TODO this list should be able to be omited see 9.6.8 (TS0001)
		};
        
		template (value) BatchNotify m_batchNotifyNumber3Duration1 (in XSD.NonNegativeInteger p_number) := {
			number := p_number,
			duration := "PT1S" //TODO duration has to be set to 1s and match to the Duration regex 
		};
		//normaly duration can be omited
		
		
         	
992
    	
993 994 995 996 997
		/**
		 * @desc Base primitiveContent for CREATE operation for ContentInstance resource
		 * @param p_primitiveContent Content for the ContentInstance
		 */
		template (value) ContentInstance_optional m_contentCreateContentInstance(XSD.String p_primitiveContent) := {
998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016
			resourceName := c_defaultResourceName,//O
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			expirationTime := omit,//O
			announceTo := omit,//O
			announcedAttribute := omit,//O
			stateTag := omit,//NP
			creator := omit,//O
			contentInfo := "a",//O
			contentSize := omit,//NP
			ontologyRef := omit,//O
			content := { 
				embed_values := {p_primitiveContent},
				attr := omit,
				elem_list := {}  
1017
			} //M
1018 1019
		};
		
1020 1021 1022 1023 1024
		/**
		 * @desc Base primitiveContent for CREATE operation for Container resource
		 * @param p_name Resource name
		 */
		template (value) Container_optional m_contentCreateContainer (in template (omit) XSD.String p_name := c_defaultResourceName):= {
1025
			resourceName := p_name,//O
1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			accessControlPolicyIDs := omit,//O
			expirationTime := omit,//O
			announceTo := omit,//O
			announcedAttribute := omit,//O
			stateTag := omit,//NP
			creator := omit,//O
			maxNrOfInstances := omit,//O
			maxByteSize := omit,//O
			maxInstanceAge := omit,//O
			currentNrOfInstances := omit,//NP
			currentByteSize := omit,//NP
			locationID := omit,//O
			ontologyRef := omit,//O
			choice := omit//NP
1046
		};
1047
    	
1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068
		//@Martin
		template (value) LocationPolicy_optional m_contentCreateLocationPolicy (in template (value) LocationSource locationSource, in template (omit) AcpType p_accessControlPolicyIDs, in template (value) XSD.Duration locationUpdatePeriod, in template (value) NodeID locationTargetID, in template (value) XSD.AnyURI locationServerAddress) := {
			resourceName 				:= c_defaultResourceName, //O
			resourceType				:= omit, //NP
			resourceID					:= omit, //NP
			parentID					:= omit, //NP
			creationTime				:= omit, //NP
			lastModifiedTime			:= omit, //NP
			labels 						:= LABELS,//O
			accessControlPolicyIDs 	:= p_accessControlPolicyIDs, //O
			expirationTime 			:= omit, //O
			announceTo 				:= omit, 				   //O
			announcedAttribute		:= omit, 			      //O
			locationSource 			:= locationSource, //M
			locationUpdatePeriod 		:= locationUpdatePeriod, //O
			locationTargetID 			:= locationTargetID, 	//O
			locationServer 			:= locationServerAddress,//O
			locationContainerID		:= omit,    		   //NP
			locationContainerName 	:= PX_LOCATION_CONTAINER_NAME,//O    		
			locationStatus				:= omit,              //NP
			choice 					:= omit  	         //NP
1069
    	   	  	
1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090
		};
    	
		//@Martin
		template (value) Notification m_contentCreateNotification (in template (value) Representation p_resourcePresentation, 
																	in template (omit) NotificationEventType p_notifEventType, 
																	in template (omit) XSD.AnyURI p_subReference, 
																	in template (omit) XSD.AnyURI p_notifForwardingURI) := {
		  notificationEvent := {
			representation := p_resourcePresentation,
			operationMonitor := {
				operation := omit,
				originator := omit
			},
			notificationEventType := p_notifEventType    	    
		  },
		  verificationRequest := omit,
		  subscriptionDeletion := omit,
		  subscriptionReference := p_subReference,
		  creator := omit,
		  notificationForwardingURI := p_notifForwardingURI
		};
1091
    	
1092 1093 1094 1095
	}//end group ContentCreate
	
	group ContentUpdate {
		
1096 1097
		/**
		 * @desc Base primitiveContent for UPDATE operation for AE resource
1098
		 */
1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120
		template (value) AE_optional m_contentUpdateAe := {
			resourceName := omit,//NP
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			accessControlPolicyIDs := omit,//O
			expirationTime := omit,//O
			announceTo := omit,//O
			announcedAttribute := omit,//O
			appName := omit,//O
			app_ID := omit,//NP
			aE_ID := omit,//NP
			pointOfAccess := omit,//O
			ontologyRef := omit,//O
			nodeLink := omit,//NP
			requestReachability := omit,//O
			contentSerialization := omit,//O
			choice := omit//NP
		};	
1121
    	
1122 1123 1124
		/**
		 * @desc Base primitiveContent for UPDATE operation for AccessControlPolicy resource
		 */
1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138
		template (value) AccessControlPolicy_optional m_contentUpdateAcp := {
			resourceName := omit,//NP
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			expirationTime := omit,//O
			announceTo := omit,//O
			announcedAttribute := omit,//O
			privileges := omit,//O
			selfPrivileges := omit,//O
			choice := omit //NP
1139
		};
1140 1141 1142 1143 1144
		
		template (value) AccessControlPolicy_optional m_contentUpdateAcpPrivileges(in template(omit) SetOfAcrs p_privileges, in template(omit) SetOfAcrs p_selfPrivileges) modifies m_contentUpdateAcp := {
			privileges := p_privileges,//O
			selfPrivileges := p_selfPrivileges//O
		};
1145
    	
1146 1147 1148
		/**
		 * @desc Base primitiveContent for UPDATE operation for Group resource
		 */
1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171
		template (value) Group_optional m_contentUpdateGroup := {
			resourceName := omit,//NP
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := omit,//O
			accessControlPolicyIDs := omit,//O
			expirationTime := omit,//O
			announceTo := omit,//O
			announcedAttribute := omit,//O
			creator := omit,//NP
			memberType := omit,//NP
			currentNrOfMembers := omit,//NP
			maxNrOfMembers := omit,//O
			memberIDs := omit,//O
			membersAccessControlPolicyIDs := omit,//O
			memberTypeValidated := omit,//NP
			consistencyStrategy := omit,//NP
			groupName := omit,//O
			choice := omit//NP

1172 1173
		};
    	
1174 1175 1176
		/**
		 * @desc Base primitiveContent for UPDATE operation for PollingChannel resource
		 */