OneM2M_Templates.ttcn 195 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 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 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 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 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800
/**
 *  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     oneM2M/ETSI
 *  @desc       Module containing templates for oneM2M
 *
 */
module OneM2M_Templates {

	import from XSD all;
	import from OneM2M_Types all;
	import from OneM2M_TypesAndValues all;
	import from OneM2M_Pixits all;
    import from OneM2M_Functions all;

		
	/**
	 * @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 
	 */
	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);	
	}


	/* Templates */
	
	group Primitives {
    	/** 
    	 * @desc Base template for request sending operations
    	 * @param p_requestPrimitive
    	 */
    	template (value) MsgOut m_request(in template (value) RequestPrimitive p_requestPrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := {
    		primitive := { requestPrimitive := p_requestPrimitive},
    		host := "",
    		xmlNamespace := PX_XML_NAMESPACE,
    		protocolBinding := "",
    		serialization := "", 
    		forcedFields := p_forcedFields
    	};
    	
		/** 
		 * @desc Base template for response sending operations
		 * @param p_responsePrimitive
		 */
		template (value) MsgOut m_response(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := {
			primitive := { responsePrimitive := p_responsePrimitive},
			host := "",
			xmlNamespace := PX_XML_NAMESPACE,
			protocolBinding := "",
			serialization := "", 
			forcedFields := p_forcedFields
		};
		
		/** 
		 * @desc Base template for response sending operations
		 * @param p_responsePrimitive
		 */
		template (value) MsgOut m_httpResponse(in template (value) ResponsePrimitive p_responsePrimitive, in template (omit) AttributeAux_list p_forcedFields := omit) := {
			primitive := { responsePrimitive := p_responsePrimitive},
			host := "",
			xmlNamespace := PX_XML_NAMESPACE,
			protocolBinding := "",
			serialization := "", 
			forcedFields := p_forcedFields
		};
		
		template MsgIn mw_request(in template  RequestPrimitive p_requestPrimitive, template AttributeList_1 p_nullFields := *) := {
			primitive := { requestPrimitive := p_requestPrimitive}, 
			nullFields := p_nullFields
		};
    	
		/** 
		 * @desc Base template for response receiving operations
		 * @param p_responsePrimitive
		 */
		template MsgIn mw_response(in template  ResponsePrimitive p_responsePrimitive := ?, template AttributeList_1 p_nullFields := *) := {
			primitive := { responsePrimitive := p_responsePrimitive}, 
			nullFields := p_nullFields
		};
    	
	}//end of group primitives
	
	group RequestPrimitives { 
		
		group Retrieve {

			/**
			 * @desc Base RETRIEVE request primitive
			 * @param p_targetResourceAddress Target resource address
			 * @param p_originator Originator (from)
			 */
			template (value) RequestPrimitive m_retrieve(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) := {
				operation := int2,
				to_ := p_targetResourceAddress,
				from_ := p_originator,
				requestIdentifier := "m_retrieve" & f_rnd(1, 1000000),
				resourceType := omit,
				primitiveContent := omit,
				roleIDs := omit, 
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
				desiredIdentifierResultType := omit,
				tokens := omit,
				tokenIDs := omit,
				localTokenIDs := omit,
				tokenRequestIndicator := omit,
				releaseVersionIndicator := "2a",
				vendorInformation := omit
			};
        	
			/**
			 * @desc RETRIEVE request primitive for child references
			 * @param p_targetResourceAddress Target resource address
			 * @param p_originator Originator (from)
			 */
			template (value) RequestPrimitive m_retrieveChildResourceRefs(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, template (omit) ResourceTypeList p_resourceTypeList := omit) modifies m_retrieve := {
				filterCriteria := {
					createdBefore := omit,
					createdAfter := omit,
					modifiedSince := omit,
					unmodifiedSince := omit,
					stateTagSmaller := omit,
					stateTagBigger := omit,
					expireBefore := omit,
					expireAfter := omit,
					labels := omit,
					resourceType := p_resourceTypeList,
					sizeAbove := omit,
					sizeBelow := omit,
					contentType_list := {},
					attribute_list := {},
					filterUsage := int1,
					limit := omit,
					semanticsFilter_list := {},
					filterOperation := omit,
					contentFilterSyntax := omit,
					contentFilterQuery := omit,
					level := omit,
					offset := omit
				}
			};

			/**
			 * @desc Base Receive RETRIEVE request primitive
			 * @param p_targetResourceAddress Target resource address
			 */
			template RequestPrimitive mw_retrieve(template XSD.ID p_targetResourceAddress) := {
				operation := int2,
				to_ := p_targetResourceAddress,
				from_ := ?,
				requestIdentifier := ?,
				resourceType := omit,
				primitiveContent := *,
				roleIDs := *, 
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				desiredIdentifierResultType := *,
				tokens := *,
				tokenIDs := *,
				localTokenIDs := *,
				tokenRequestIndicator := *,
				releaseVersionIndicator := ?,
				vendorInformation := *
			};
        	
			/**
			 * @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)
			 */
			template (value) RequestPrimitive m_retrieveAttributeToOption(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, 
				roleIDs := omit,
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
				desiredIdentifierResultType := omit,
				tokens := omit,
				tokenIDs := omit,
				localTokenIDs := omit,
				tokenRequestIndicator := omit,
				releaseVersionIndicator := "2a",
				vendorInformation := omit
        	};
        	
			/**
			 * @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)
			 */
			template (value) RequestPrimitive m_retrieveAttributeContentOption(XSD.ID p_targetResourceAddress, in template (value) AttributeList_1 p_attributeList, in XSD.ID p_originator) := {
				operation := int2,
				to_ := p_targetResourceAddress,
				from_ := p_originator,
				requestIdentifier := "m_retrieveResourceAttributeContentOption" & f_rnd(1, 1000000),
				resourceType := omit,
				primitiveContent := {attributeList := p_attributeList},
				roleIDs := omit,
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
				desiredIdentifierResultType := omit,
				tokens := omit,
				tokenIDs := omit,
				localTokenIDs := omit,
				tokenRequestIndicator := omit,
				releaseVersionIndicator := "2a",
				vendorInformation := omit
			};
			
			/**
			  * @desc RETRIEVE request primtive containing the Filter Criteria in the filterCriteria field
			  * @param p_targetResourceAddress Target resource address 
			  * @param p_filterCriteria FilterCriteria
			  * @param p_originator Originator (from)
		     */
			template (value) RequestPrimitive m_retrieveFilterUsageOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) FilterUsage p_filterUsage) modifies m_retrieve := {
				requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
				filterCriteria := {
					createdBefore := omit,
					createdAfter := omit,
					modifiedSince := omit,
					unmodifiedSince := omit,
					stateTagSmaller := omit,
					stateTagBigger := omit,
					expireBefore := omit,
					expireAfter := omit,
					labels := omit,
					resourceType := omit,
					sizeAbove := omit,
					sizeBelow := omit,
					contentType_list := {},
					attribute_list := {},
					filterUsage := p_filterUsage,
					limit := omit,
					semanticsFilter_list := {},
					filterOperation := omit,
					contentFilterSyntax := omit,
					contentFilterQuery := omit,
					level := omit,
					offset := omit
				}
			};
			
			/**
			  * @desc RETRIEVE request primtive containing the Filter Criteria in the filterCriteria field
			  * @param p_targetResourceAddress Target resource address 
			  * @param p_filterCriteria FilterCriteria
			  * @param p_originator Originator (from)
			 */
			template (value) RequestPrimitive m_retrieveFilterCriteria(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) FilterCriteria p_filterCriteria) modifies m_retrieve := {
				requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
				filterCriteria := p_filterCriteria
			};
			
			/**
			  * @desc RETRIEVE request primtive containing the Filter Criteria in the filterCriteria field
			  * @param p_targetResourceAddress Target resource address 
			  * @param p_originator Originator (from)
			  * @param p_filterUsage FilterUsage
			  * @param p_labels Labels
			 */
			template (value) RequestPrimitive m_retrieveFilterUsageOptionLabel(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) FilterUsage p_filterUsage, in Labels p_labels) modifies m_retrieve := {
				requestIdentifier := "m_retrieveResourceFilterUsageOptionLabel" & f_rnd(1, 1000000),
				filterCriteria := {
					createdBefore := omit,
					createdAfter := omit,
					modifiedSince := omit,
					unmodifiedSince := omit,
					stateTagSmaller := omit,
					stateTagBigger := omit,
					expireBefore := omit,
					expireAfter := omit,
					labels := p_labels,
					resourceType := omit,
					sizeAbove := omit,
					sizeBelow := omit,
					contentType_list := {},
					attribute_list := {},
					filterUsage := p_filterUsage, 
					limit := omit,
					semanticsFilter_list := {},
					filterOperation := omit,
					contentFilterSyntax := omit,
					contentFilterQuery := omit,
					level := omit,
					offset := omit
				}
			};
			/**
			  * @desc RETRIEVE request primtive containing the Desired Identifier Result Type in the desiredIdentifierResultType field and Filter Criteria in the filterCriteria field
			  * @param p_targetResourceAddress Target resource address 
			  * @param p_filterCriteria FilterCriteria
			  * @param p_originator Originator (from)
			 */
			template (value) RequestPrimitive m_retrieveDiscResTypeFilterUsageOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator, in template (value) DesIdResType p_desIdResType, in template (value) FilterUsage p_filterUsage) modifies m_retrieve := {
				requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
				filterCriteria := {
					createdBefore := omit,
					createdAfter := omit,
					modifiedSince := omit,
					unmodifiedSince := omit,
					stateTagSmaller := omit,
					stateTagBigger := omit,
					expireBefore := omit,
					expireAfter := omit,
					labels := omit,
					resourceType := omit,
					sizeAbove := omit,
					sizeBelow := omit,
					contentType_list := {},
					attribute_list := {},
					filterUsage := p_filterUsage,
					limit := omit,
					semanticsFilter_list := {},
					filterOperation := omit,
					contentFilterSyntax := omit,
					contentFilterQuery := omit,
					level := omit,
					offset := omit
				},
				desiredIdentifierResultType := p_desIdResType
			};
			
			/**
			  * @desc RETRIEVE request primtive containing the Discovery Type in the discoveryResultType field and Filter Criteria in the filterCriteria field
			  * @param p_targetResourceAddress Target resource address 
			  * @param p_filterCriteria FilterCriteria
			  * @param p_originator Originator (from)
			 */
			template (value) RequestPrimitive m_retrieveInvalidFormatOption(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) modifies m_retrieve := {
				requestIdentifier := "m_retrieveResourceFilterUsageOption" & f_rnd(1, 1000000),
				filterCriteria := {
					createdBefore := omit,
					createdAfter := omit,
					modifiedSince := omit,
					unmodifiedSince := omit,
					stateTagSmaller := omit,
					stateTagBigger := omit,
					expireBefore := omit,
					expireAfter := omit,
					labels := omit,
					resourceType := omit,
					sizeAbove := omit,
					sizeBelow := omit,
					contentType_list := {},
					attribute_list := {},
					filterUsage := omit,
					limit := omit,
					semanticsFilter_list := {},
					filterOperation := omit,
					contentFilterSyntax := omit,
					contentFilterQuery := omit,
					level := omit,
					offset := omit
				}
			};
			
			/**
			  * @desc RETRIEVE request primtive for polling request
			  * @param p_targetResourceAddress Target resource address 
			  * @param p_filterCriteria FilterCriteria
			  * @param p_originator Originator (from)
			 */
			template (value) RequestPrimitive m_retrievePollingRequest(XSD.ID p_targetResourceAddress, in XSD.ID p_originator) modifies m_retrieve := {
				to_ := p_targetResourceAddress & "/pcu"
			};
			
			/**
			  * @desc FilterCriteria empty template
			 */
			template (value) FilterCriteria m_filterCriteria := {
				createdBefore := omit,
				createdAfter := omit,
				modifiedSince := omit,
				unmodifiedSince := omit,
				stateTagSmaller := omit,
				stateTagBigger := omit,
				expireBefore := omit,
				expireAfter := omit,
				labels := omit,
				resourceType := omit,
				sizeAbove := omit,
				sizeBelow := omit,
				contentType_list := {},
				attribute_list := {},
				filterUsage := int1,
				limit := omit,
				semanticsFilter_list := {},
				filterOperation := omit,
				contentFilterSyntax := omit,
				contentFilterQuery := omit,
				level := omit,
				offset := omit
				
			}
			
			
			
    	}//end group Retrieve

    	group Update {
    		template (value) RequestPrimitive m_update := {
				operation := int3,
				to_ := "NotInitialized",
				from_ := "NotInitialized",
				requestIdentifier := "m_update",
				resourceType := omit,
				primitiveContent:= omit,
				roleIDs := omit, 
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
				desiredIdentifierResultType := omit,
				tokens := omit,
				tokenIDs := omit,
				localTokenIDs := omit,
				tokenRequestIndicator := omit,
				releaseVersionIndicator := "2a",
				vendorInformation := omit
			};
        	
						
			template RequestPrimitive mw_update(template XSD.ID p_from := *, template XSD.ID p_to := ?) := {
				operation := int3,
				to_ := p_to,
				from_ := p_from,
				requestIdentifier := ?,
				resourceType := omit,
				primitiveContent:= ?,
				roleIDs := *, 
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				desiredIdentifierResultType := *, 
				tokens := *,
				tokenIDs := *,
				localTokenIDs := *,
				tokenRequestIndicator := *,
				releaseVersionIndicator := ?,
				vendorInformation := *
			};
        	
			/**
			 * @desc Base UPDATE request primitive for Ae resource
			 */
			template (value) RequestPrimitive m_updateAeBase modifies m_update:= {
				requestIdentifier := "m_updateAe",
				primitiveContent:= {aE := m_contentUpdateAe}
			};
        	
			/**
			 * @desc Reception template for update Ae resource
			 */
			template  RequestPrimitive mw_updateAe(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {
				resourceType := int2,
				primitiveContent:= {aE := ?}
			};
			 
        	
			/**
			 * @desc Base UPDATE request primitive for Container resource
			 */
			template (value) RequestPrimitive m_updateContainerBase modifies m_update:= {
				requestIdentifier := "m_updateContainer",
				primitiveContent:= {container := m_contentUpdateContainer}
			};
			
			/**
			 * @desc Base Reception template for update Container
			 */
			template RequestPrimitive mw_updateContainer(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {
				primitiveContent := {container := ?}
			}; 
			
			/**
			 * @desc Base UPDATE request primitive for ContentInstance resource
			 */
			template (value) RequestPrimitive m_updateContentInstanceBase modifies m_update:= {
				requestIdentifier := "m_updateContentInstance",
				primitiveContent:= {contentInstance := m_contentUpdateContentInstance}
			};
			
			/**
			 * @desc Base UPDATE request primitive for AccessControlPolicy resource
			 */        				
			template (value) RequestPrimitive m_updateAcpBase modifies m_update := {
				requestIdentifier := "m_updateAcp",
				primitiveContent:= {accessControlPolicy := m_contentUpdateAcp}
			};
			
			template (value) RequestPrimitive m_updateAcpPrivileges(in template(omit) SetOfAcrs p_privileges := omit, in template(omit) SetOfAcrs p_selfPrivileges := omit) modifies m_update := {
				requestIdentifier := "m_updateAcp",
				primitiveContent:= {accessControlPolicy := m_contentUpdateAcpPrivileges(p_privileges, p_selfPrivileges)}
			};

			/**
			 * @desc Base UPDATE request primitive for GenericInterworkingService resource
			 */
			template (value) RequestPrimitive m_updateGenericInterworkingServiceBase modifies m_update:= {
				requestIdentifier := "m_updateGenericInterworkingService",
				primitiveContent:= {genericInterworkingService := m_contentUpdateGenericInterworkingService}
			};

			/**
			 * @desc Base UPDATE request primitive for GenericInterworkingService_invalid resource
			 */
			template (value) RequestPrimitive m_updateGenericInterworkingServiceBase_invalid modifies m_update:= {
				requestIdentifier := "m_updateGenericInterworkingServiceInvalid",
				primitiveContent:= {genericInterworkingService_invalid := m_contentUpdateGenericInterworkingService_invalid}
			};
				
			/**
			 * @desc Base UPDATE request primitive for Group resource
			 */
			template (value) RequestPrimitive m_updateGroupBase modifies m_update := {
				requestIdentifier := "m_updateGroup",
				primitiveContent:= {group_ := m_contentUpdateGroup}
			};
			
			/**
			 * @desc Base UPDATE request primitive for CSEBase resource
			 */
			template (value) RequestPrimitive m_updateCSEBaseBase modifies m_update := {
				requestIdentifier := "m_updateGroup",
				primitiveContent:= {cSEBase := m_contentUpdateCSEBase}
			};
			
			/**
			 * @desc Base UPDATE request primitive for Schedule resource
			 */
			template (value) RequestPrimitive m_updateScheduleBase modifies m_update := {
				requestIdentifier := "m_updateSchedule",
				primitiveContent:= {schedule := m_contentUpdateSchedule}
			};
			
			/**
			 * @desc Base UPDATE request primitive for PollingChannel resource
			 */
			template (value) RequestPrimitive m_updatePollingChannelBase modifies m_update := {
				requestIdentifier := "m_updatePollingChannel",
				primitiveContent:= {pollingChannel := m_contentUpdatePollingChannel}
			};
			
			/**
			 * @desc Base UPDATE request primitive for Subscription resource
			 */
			template (value) RequestPrimitive m_updateSubscriptionBase modifies m_update := {
				requestIdentifier := "m_updateSubscription",
				primitiveContent:= {subscription := m_contentUpdateSubscription}
			};
			
			template (value) RequestPrimitive m_updateLocationPolicy(XSD.ID p_locResourceAddress, in template (omit) AcpType p_accessControlPolicyIds, in template (value) XSD.Duration p_locationUpdatePeriod) modifies m_update := {
        	  	to_ 				:= p_locResourceAddress,
        	  	requestIdentifier	:= "m_updateLocationPolicy",
        	  	primitiveContent	:= {locationPolicy := m_contentUpdateLocationPolicy(p_accessControlPolicyIds, p_locationUpdatePeriod)}
			  };
        	
        	template (value) RequestPrimitive m_updateNodeBase modifies m_update := {
				requestIdentifier := "m_updateNode",
				primitiveContent:= {node := m_contentUpdateNode}
        	}
        	
        	template (value) RequestPrimitive m_updateRemoteCSEBase modifies m_update := {
			   requestIdentifier := "m_updateRemoteCSEBase",
        	   primitiveContent := {remoteCSE := m_contentUpdateRemoteCSE}
        	}

			/**
			 * @desc Reception template for update remoteCSE resource
			 */
			template RequestPrimitive mw_updateRemoteCSE(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {
				primitiveContent:= {remoteCSE := ?}
			};
			       	
			template (value) RequestPrimitive m_updateAEAnncBase modifies m_update:= {
				requestIdentifier := testcasename() & "-m_updateAEAnnc",
				resourceType := int10002,
				primitiveContent := {aEAnnc := m_contentUpdateAEAnnc}
			};
			
			template RequestPrimitive mw_updateAEAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update:= {
				primitiveContent := {aEAnnc := ?}
			};
			
			/**
			 * @desc Base Reception template for update ContainerAnnc
			 */
			template RequestPrimitive mw_updateContainerAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {

				primitiveContent := {containerAnnc := ?}
			}; 
			
			/**
			 * @desc Base Reception template for update GroupAnnc
			 */
			template RequestPrimitive mw_updateGroupAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {
				primitiveContent := {groupAnnc := ?}
			}; 
			
			/**
			 * @desc Base Reception template for update AccessControlPolicyAnnc
			 */
			template RequestPrimitive mw_updateAccessControlPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {
				primitiveContent := {accessControlPolicyAnnc := ?}
			}; 	
			
			/**
			 * @desc Base UPDATE request primitive for TimeSeries resource
			 */
			template (value) RequestPrimitive m_updateTimeSeriesBase modifies m_update := {
				requestIdentifier := "m_updateTimeSeries",
				primitiveContent:= {timeSeries := m_contentUpdateTimeSeries}
			};
			
			/**
			 * @desc Base UPDATE request primitive for TimeSeriesInstance resource
			 */
			template (value) RequestPrimitive m_updateTimeSeriesInstanceBase modifies m_update:= {
				requestIdentifier := "m_updateTimeSeriesInstance",
				primitiveContent:= {timeSeriesInstance := m_contentUpdateTimeSeriesInstance}
			};		
			
			/**
			 * @desc Base Reception template for update TimeSeriesAnnc
			 */
			template RequestPrimitive mw_updateTimeSeriesAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_update := {
				primitiveContent := {timeSeriesAnnc := ?}
			}; 
			
			
    	}//end group Update
    	
    	group Create {

			template (value) RequestPrimitive m_create := {
				operation := int1,
				to_ := "NotInitialized",
				from_ := "NotInitialized",
				requestIdentifier := testcasename() & "-m_create",
				resourceType := omit,
				primitiveContent := omit,
				roleIDs := omit,
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
				desiredIdentifierResultType := omit,
				tokens := omit,
				tokenIDs := omit,
				localTokenIDs := omit,
				tokenRequestIndicator := omit,
				releaseVersionIndicator := "2a",
				vendorInformation := omit

			};
        	
			/**
			 * @desc Base Reception template for create operation
			 */
			template  RequestPrimitive mw_create(template XSD.ID p_from := *, template XSD.ID p_to := ?) := {
				operation := int1,
				to_ := p_to,
				from_ := p_from,
				requestIdentifier := ?,
				resourceType := ?,
				primitiveContent := ?,
				roleIDs := *,
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				desiredIdentifierResultType := *,
				tokens := *,
				tokenIDs := *,
				localTokenIDs := *,
				tokenRequestIndicator := *,
				releaseVersionIndicator := ?,
				vendorInformation := *
			}
			
			/**
			 * @desc Base Reception template for create operation for announced resources
			 */
			template RequestPrimitive mw_createAnnc(template XSD.ID p_from := ?, template XSD.ID p_to := ?) := {
				operation := int1,
				to_ := p_to,
				from_ := p_from,
				requestIdentifier := ?,
				resourceType := ?,
				primitiveContent := ?,
				roleIDs := *,
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				desiredIdentifierResultType := *,
				tokens := *,
				tokenIDs := *,
				localTokenIDs := *,
				tokenRequestIndicator := *,
				releaseVersionIndicator := ?,
				vendorInformation := *
			}
			
			
			/**
			 * @desc Base CREATE request primitive for AEAnnc resource
			 * @param p_accessControlPolicyIds
			 * @param p_to
			 * @param p_from
			 * @param p_appId
			 * @param p_stemId
			 */
801
			template (value) RequestPrimitive m_createAEAnnc(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) XSD.ID p_to := omit, template (omit) XSD.ID p_from := omit, template (omit) XSD.ID p_appId, XSD.AnyURI p_link) modifies m_create:= {
802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822
				to_ := p_to,
				from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
				requestIdentifier := testcasename() & "-m_createAEAnnc",
				resourceType := int10002,
				primitiveContent := {aEAnnc := m_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds, p_appId, p_link)}
			};
			
			/**
			 * @desc Reception template for CREATE AEAnnc for registration when AE-ID-Stem starts with S
			 */
			template RequestPrimitive mw_createAEAnnc_s_ae_id(template XSD.ID p_from := ?, template XSD.ID p_to := ?, template AcpType p_accessControlPolicyIds := ?, template XSD.AnyURI p_link := ?) modifies mw_create := {				
				primitiveContent := {aEAnnc := mw_contentCreateAEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds, p_link)}
			};

			/**
			 * @desc Reception template for CREATE AEAnnc as announced resource
			 */
			template RequestPrimitive mw_createAEAnnc(template XSD.ID p_from := ?, template XSD.ID p_to := ?, template AcpType p_accessControlPolicyIds := ?, template XSD.AnyURI p_link := ?) modifies mw_create := {				
				primitiveContent := {aEAnnc := mw_contentCreateAEAnnc(-, p_accessControlPolicyIds)}
			};
			
823
			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_defaultAe1ResourceName, in template (omit) PoaList p_poaList := omit) modifies m_create := {
824 825 826 827 828 829 830 831 832 833 834 835 836
				from_ := p_from,//PX_AE_ID_STEM,//TODO We should use omit, "s", or "c"
				requestIdentifier := testcasename() & "-m_createAe",
				resourceType := int2,
				primitiveContent := {aE := m_contentCreateAe(p_accessControlPolicyIds,p_resourceName, p_appId, p_poaList)}
			};
        	
			/**
			 * @desc Reception template for AE registration
			 */
			template  RequestPrimitive mw_createAe(template XSD.ID p_from := *, template XSD.ID p_to := ?, template AE_optional p_ae := mw_contentCreateAeBase) modifies mw_create := {
				resourceType := int2,
				primitiveContent := {aE := p_ae}
			};  
837
			        	        	
838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855
			/**
			 * @desc Base CREATE request primitive for AccessControlPolicy resource
			 */
			template (value) RequestPrimitive m_createAcpBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createAcp",
				resourceType := int1,
				primitiveContent := {accessControlPolicy := m_contentCreateAcp ()}
			};
			
			/**
			 * @desc Base CREATE request primitive for AccessControlPolicyAnnc resource
			 */
			template (value) RequestPrimitive m_createAcpAnncBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createAcpAnnc",
				resourceType := int10001,
				primitiveContent := {accessControlPolicyAnnc := m_contentCreateAcpAnnc ()}
			};
				
856
        	template (value) RequestPrimitive m_createAcp(in template (omit)  XSD.String p_name := c_defaultAccessControlPolicyResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63) modifies m_create := {
857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878
				requestIdentifier := testcasename() & "-m_createAcp",
        		resourceType := int1,
        		primitiveContent := {accessControlPolicy := m_contentCreateAcp (p_name, p_acor, p_allowedOperations)}
        	};
        	
			/**
			 * @desc Reception template for CREATE AcpAnnc
			 */
			template RequestPrimitive mw_createAccessControlPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				to_ := p_to,
				from_ := p_from,
				resourceType := int10001,
				primitiveContent := {accessControlPolicyAnnc := mw_contentCreateAcpAnncBase(-)}
			};
        	
			/**
			  * @desc Reception template for CREATE AcpAnnc
			  */
			template RequestPrimitive mw_createRemoteCSEAnnc(template XSD.ID p_from := ?, template XSD.ID p_to := ?, template AcpType p_accessControlPolicyIds := ?) modifies mw_create := {
				resourceType := int10016,
				primitiveContent := {remoteCSEAnnc := mw_contentCreateRemoteCSEAnnc({"Credential-ID:None"}, p_accessControlPolicyIds)}
			};
879
       				
880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 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 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645
			/**
			 * @desc Base CREATE request primitive for CSEBase resource
			 */
			template (value) RequestPrimitive m_createCSEBaseBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createCSEBase",
				resourceType := int5,
				primitiveContent := {cSEBase := m_contentCreateCSEBase}
			};
        	
       	
			/**
			 * @desc Base CREATE request primitive for Container resource
			 */
			template (value) RequestPrimitive m_createContainerBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createContainer",
				resourceType := int3,
				primitiveContent := {container := m_contentCreateContainer}
			};
			
			/**
			 * @desc Base CREATE request primitive for ContainerAnnc resource
			 */
			template (value) RequestPrimitive m_createContainerAnncBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createContainerAnnc",
				resourceType := int10003,
				primitiveContent := {containerAnnc := m_contentCreateContainerAnnc}
			};
			       	
			/**
			 * @desc Base CREATE request primitive for Container resource using Container_update_invalid
			 */
			template (value) RequestPrimitive m_createContainerBaseInvalid modifies m_create := {
				requestIdentifier := testcasename() & "-m_createContainer",
				resourceType := int3,
				primitiveContent := {container_invalid := m_contentCreateContainerInvalid}
			};
			
			/**
			 * @desc Base CREATE request primitive for remoteCSE resource
			 */
			template (value) RequestPrimitive m_createRemoteCSEBase(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName :=  c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_TS_CSE1.cseId, in template (omit) XSD.ID p_cSE_ID := PX_TS_CSE1.cseId) modifies m_create := {
				requestIdentifier := testcasename() & "-m_createRemoteCSE",
				resourceType := int16,
				primitiveContent := {remoteCSE := m_contentCreateRemoteCSE(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID)}
			};
			
			/**
			 * @desc CREATE request primitive for remoteCSE resource with poa
			 */
			template (value) RequestPrimitive m_createRemoteCSE_poa(template (omit) AcpType p_accessControlPolicyIds := omit, template (omit) ResourceName p_resourceName :=  c_defaultRemoteCSEResourceName, in template (omit) XSD.AnyURI p_cSEBase := PX_TS_CSE1.cseId & "/" & PX_TS_CSE1.cseName, in template (omit) XSD.ID p_cSE_ID := PX_TS_CSE1.cseId, in PoaList p_poaList) modifies m_createRemoteCSEBase := {
				primitiveContent := {remoteCSE := m_contentCreateRemoteCSE_poa(p_resourceName, p_accessControlPolicyIds,p_cSEBase, p_cSE_ID, p_poaList)}
			};
			
			/**
			 * @desc Base reception template for CREATE RemoteCSE
			 */
			template RequestPrimitive mw_createRemoteCSE(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int16,
				primitiveContent := {remoteCSE := mw_contentCreateRemoteCSEBase}
			};
			
			/**
			 * @desc CREATE request primitive for Container resource wiht no resourceName provided
			 */
			template (value) RequestPrimitive m_createContainer_noResourceName modifies m_createContainerBase := {
				primitiveContent := {container := m_contentCreateContainer(omit)}
			};
	
    		template (value) RequestPrimitive m_createContainer(XSD.ID p_parentResourceAddress, in template (omit) XSD.String p_resourceName := c_defaultContainerResourceName) modifies m_create := {
    			to_ := p_parentResourceAddress,
				requestIdentifier := testcasename() & "-m_createContainer",
    			resourceType := int3,
    			primitiveContent := {container := m_contentCreateContainer(p_resourceName)}
    		};
        	
			/**
			 * @desc Reception template for CREATE Container
			 */
			template  RequestPrimitive mw_createContainer(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int3,
				primitiveContent := {container := mw_contentCreateContainerBase}
			};  
			
			/**
			 * @desc Base Reception template for CREATE ContainerAnnc
			 */
			template RequestPrimitive mw_createContainerAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10003,
				primitiveContent := {containerAnnc := mw_contentCreateContainerAnncBase}
			};
			
			/**
			 * @desc Reception template for CREATE FlexContainer
			 */
			template RequestPrimitive mw_createFlexContainer(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int28, 
				primitiveContent := {flexContainer := ?}
			};  

			/**
			 * @desc Base CREATE request primitive for GenericInterworkingService resource
			 */
			template (value) RequestPrimitive m_createGenericInterworkingServiceBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createGenericInterworkingService",
				resourceType := int28,
				primitiveContent := {genericInterworkingService := m_contentCreateGenericInterworkingService()}
			};
						
			/**
			 * @desc Reception template for CREATE GenericInterworkingOperationInstance
			 */
			template RequestPrimitive mw_createGenericIwkOpInstance(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int28,  // FIXME: not found in TS004
				primitiveContent := {genericInterworkingOperationInstance := ?}
			}; 
        	
			/**
			 * @desc Base CREATE request primitive for Content Instance resource
			 */
			template (value) RequestPrimitive m_createContentInstanceBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createContentInstance",
				resourceType := int4,
				primitiveContent := {contentInstance := m_contentCreateContentInstance}
			};
				
			/**
			 * @desc CREATE request primitive for Content Instance resource with no resourceName provided
			 */
			template (value) RequestPrimitive m_createContentInstance_noResourceName modifies m_createContentInstanceBase := {
				primitiveContent := {contentInstance := m_contentCreateContentInstance(omit)}
			};
    		
    		template (value) RequestPrimitive m_createContentInstance(XSD.ID p_parentResourceAddress, XSD.String p_primitiveContent) modifies m_create := {
    			to_ := p_parentResourceAddress,
    			from_ := "admin:admin",
				requestIdentifier := testcasename() & "-m_createContentInstance",
    			resourceType := int4,
    			primitiveContent := {contentInstance := m_contentCreateContentInstance(-, p_primitiveContent)}
    		};
    		
			/**
			 * @desc Reception template for CREATE ContentInstanceAnnc
			 */
			template RequestPrimitive mw_createContentInstanceAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10004,
				primitiveContent := {contentInstanceAnnc := mw_contentCreateContentInstanceAnncBase}
			};  
			
			/**
			 * @desc Reception template for CREATE ContentInstance
			 */
			template RequestPrimitive mw_createContentInstance(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int4,
				primitiveContent := {contentInstance := mw_contentCreateContentInstanceBase}
			}; 
			
			/**
			 * @desc Base CREATE request primitive for Delivery resource
			 */
			/*template (value) RequestPrimitive m_createDeliveryBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createDelivery" & f_rnd(1, 1000000),
				resourceType := int6,
				primitiveContent := {delivery := m_contentCreateDelivery()}
			};*/
        	    		
       	
			/**
			 * @desc Base CREATE request primitive for Group resource
			 */
			template (value) RequestPrimitive m_createGroupBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createGroup",
				resourceType := int9,
				primitiveContent := {group_ := m_contentCreateGroup (1, {"NotInitialized"}, omit, omit)}	//TODO: p_resourceId
			};
			
			/**
			 * @desc Base CREATE request primitive for GroupAnnc resource
			 */
			template (value) RequestPrimitive m_createGroupAnncBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createGroupAnnc",
				resourceType := int10009,
				primitiveContent := {groupAnnc := m_contentCreateGroupAnnc (1, {"NotInitialized"}, omit, omit)}	//TODO: p_resourceId
			};
        	
        	template (value) RequestPrimitive m_createGroup(in template (value) XSD.NonNegativeInteger p_maxNrOfMembers,
															in template (value) ListOfURIs p_memberIds := {"NotInitialized"},
															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 := testcasename() & "-m_createGroup",
        		resourceType := int9,
        		primitiveContent := {group_ := m_contentCreateGroup (p_maxNrOfMembers, p_memberIds, p_accessControlPolicyIds, p_memberType, p_consistencyStrategy, p_membersAccessControlPolicyIDs, p_name)}	//TODO: p_resourceId
        	};
     
        	/**
			 * @desc Reception template for CREATE Group
			 */
			template  RequestPrimitive mw_createGroup(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int9,
				primitiveContent := {group_ := mw_contentCreateGroupBase}
			};  
			  	
			/**
			 * @desc Reception template for CREATE GroupAnnc
			 */
			template RequestPrimitive mw_createGroupAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10009,
				primitiveContent := {groupAnnc := mw_contentCreateGroupAnncBase}
			};  
			
			/**
			 * @desc Base CREATE request primitive for MgmtCmd resource
			 */
			template (value) RequestPrimitive m_createMgmtCmdBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createMgmtCmd",
				resourceType := int12,
				primitiveContent := {mgmtResource := m_contentCreateMgmtCmd (-,-)}
			};
			
			/**
			 * @desc Base CREATE request primitive for MgmtObj resource
			 */
			template (value) RequestPrimitive m_createMgmtObjBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createMgmtObj",
				resourceType := int13,
				primitiveContent := {mgmtResource := m_contentCreateMgmtObj (-,-)}
			};
        	
			/**
			 * @desc CREATE request primitive for MgmtObj resource
			 */
			template (value) RequestPrimitive m_createMgmtObj modifies m_create := {
				requestIdentifier := testcasename() & "-m_createMgmtObj",
				resourceType := int13,
				primitiveContent := {mgmtResource := m_contentCreateMgmtObj (-, -)}
			};
        	
			/**
			 * @desc Reception template for CREATE MgmtObjAnnc
			 */
			template RequestPrimitive mw_createMgmtObjAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10013,
				primitiveContent := {announcedMgmtResource := mw_contentCreateMgmtObjAnncBase}
			};  
			
			/**
			 * @desc Base CREATE request primitive for Node resource
			 */
			template (value) RequestPrimitive m_createNodeBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createNode",
				resourceType := int14,
				primitiveContent := {node := m_contentCreateNode(-, -, -) }
			};
        	
			/**
			 * @desc CREATE request primitive for Node resource
			 */
			template (value) RequestPrimitive m_createNode modifies m_create := {
				requestIdentifier := testcasename() & "-m_createNode",
				resourceType := int14,
				primitiveContent := {node := m_contentCreateNode(-,-,-) }
			};
        	
			/**
			 * @desc Reception template for CREATE NodeAnnc
			 */
			template RequestPrimitive mw_createNodeAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10014,
				primitiveContent := {nodeAnnc := mw_contentCreateNodeAnncBase}
			};  
       	
			/**
			 * @desc Base CREATE request primitive for PollingChannel resource
			 */
			template (value) RequestPrimitive m_createPollingChannelBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createPollingChannel",
				resourceType := int15,
				primitiveContent := {pollingChannel := m_contentCreatePollingChannel (-)}
			};
        	
        	template (value) RequestPrimitive m_createPollingChannel(XSD.ID p_parentResourceAddress, in template (value)XSD.ID p_originatorId) modifies m_create := {
        		to_ := p_parentResourceAddress,
        		from_ := p_originatorId,
				requestIdentifier := testcasename() & "-m_createPollingChannel",
        		resourceType := int15,
        		primitiveContent := {pollingChannel := m_contentCreatePollingChannel ()}
        	};
        	
			template  RequestPrimitive mw_createPollingChannel(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				to_ := p_to,
				from_ := p_from,
				primitiveContent := {pollingChannel := mw_contentCreatePollingChannel}
			};
        	
			/**
			 * @desc Base CREATE request primitive for Schedule resource
			 */
        	template (value) RequestPrimitive m_createScheduleBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createSchedule",
        		resourceType := int18,
				primitiveContent := {schedule := m_contentCreateSchedule ({{"* * * * * * *"}})}
        	};
        	
        	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,
				requestIdentifier := testcasename() & "-m_createSchedule",
        		resourceType := int18,
        		primitiveContent := {schedule := m_contentCreateSchedule (p_scheduleElement, p_name)}
        	};
        	
			/**
			 * @desc Reception template for CREATE ScheduleAnnc
			 */
			template RequestPrimitive mw_createScheduleAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10018,
				primitiveContent := {scheduleAnnc := mw_contentCreateScheduleAnncBase}
			};  
			
			template (value) RequestPrimitive m_createServiceSubscribedAppRule (in ListOfM2MID p_applicableCredIDs, in ListOfM2MID p_allowedAppIDs, in ListOfM2MID p_allowedAEs) modifies m_create := {
				requestIdentifier := testcasename() & "-m_createServiceSubscribedAppRule",
				resourceType := int19,//FIXME Is this the correct value?
				primitiveContent := {serviceSubscribedAppRule := m_contentCreateServiceSubscribedAppRule (p_applicableCredIDs, p_allowedAppIDs, p_allowedAEs)}
			};
        	
			/**
			 * @desc Base CREATE request primitive for ServiceSubscribedAppRule Resource
			 */
			template (value) RequestPrimitive m_createServiceSubscribedAppRuleBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createServiceSubscribedAppRuleBase",
				resourceType := int19,
				primitiveContent := {serviceSubscribedAppRule := m_contentCreateServiceSubscribedAppRuleBase}
			};
       	
			/**
			 * @desc Base CREATE request primitive for Subscription resource
			 */
			template (value) RequestPrimitive m_createSubscriptionBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createSubscription",
				resourceType := int23,
				primitiveContent := {subscription := m_contentCreateSubscription ({"NotInitialized"})}
			};
        	
        	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,
				requestIdentifier := testcasename() & "-m_createSubscription",
        		resourceType := int23,
        		primitiveContent := {subscription := m_contentCreateSubscription (p_notificationURI, p_name)}
        	};
        	
        	/**
			 * @desc Reception template for CREATE Subscription
			 */
			template RequestPrimitive mw_createSubscription(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int23,
				primitiveContent := {subscription := mw_contentCreateSubscriptionBase}
			};
        	
			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,
			                                                               in template (omit) PendingNotification p_pendingNotification) modifies m_createSubscription := {
				primitiveContent := {subscription := m_contentCreateSubscriptionAdvanced (p_notificationURI, p_name, p_eventNotificationCriteria, p_expirationCounter, p_batchNotify, p_latestNotify, p_subscriberURI, p_notificationContentType, p_pendingNotification)}
			};
        	
        	/**
			 * @desc Base CREATE request primitive for Location Policy resource
			 */
			template (value) RequestPrimitive m_createLocationPolicyBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createLocationPolicy",
				resourceType := int10,
				primitiveContent := {locationPolicy := m_contentCreateLocationPolicyBase}
			};
        	
			template (value) RequestPrimitive m_createLocationPolicy(in template (value) LocationSource p_locationSource, in template (omit) AcpType p_accessControlPolicyIds, in template (omit) XSD.Duration p_locationUpdatePeriod, in template (omit) LocationTargetID p_locationTargetID, in template (omit) XSD.AnyURI p_locationServerAddress) modifies m_create := {
        		
				requestIdentifier	:= testcasename() & "-m_createLocationPolicy", //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	:= {locationPolicy := m_contentCreateLocationPolicy(p_locationSource, p_accessControlPolicyIds, p_locationUpdatePeriod, p_locationTargetID, p_locationServerAddress) },
			  	resultContent := int1//default
        	};
        	
			/**
			 * @desc Reception template for CREATE LocationPolicyAnnc
			 */
			template RequestPrimitive mw_createLocationPolicyAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10010,
				primitiveContent := {locationPolicyAnnc := mw_contentCreateLocationPolicyAnncBase}
			}; 
			
        	template (value) RequestPrimitive m_createNotification(in template (value) Representation p_resourcePresentation, in template (omit)NotificationEventType p_notifEventType, in template (omit) XSD.AnyURI p_subscriptionReference, in template (omit) XSD.AnyURI p_notifForwardingURI) modifies m_create := {
			  requestIdentifier	:= testcasename() & "-m_createNotification",
        	  primitiveContent	:= {notification := m_contentCreateNotification(p_resourcePresentation, p_notifEventType, p_subscriptionReference, p_notifForwardingURI)},
        	  resultContent		:= int1 //default
        	  
        	};
        	
			/**
			 * @desc Reception template for SemanticDescriptor creation
			 */
			template RequestPrimitive mw_createSemanticDescriptor(template XSD.ID p_from := *, template XSD.ID p_to := ?, template SemanticDescriptor_optional p_semanticDescriptor := mw_contentCreateSemanticDescriptor) modifies mw_create := {
				resourceType := int24,
				primitiveContent := {semanticDescriptor := p_semanticDescriptor}
			};
			
			/**
			 * @desc Base CREATE request primitive for Stats Config resource
			 */
			template (value) RequestPrimitive m_createStatsConfigBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createStatsConfig",
				resourceType := int22,
				primitiveContent := {statsConfig := m_contentCreateStatsConfigBase}
			};
			
			/**
			 * @desc Base CREATE request primitive for Stats Config resource
			 */
			template (value) RequestPrimitive m_createStatsCollectBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createStatsCollect",
				resourceType := int21,
				primitiveContent := {statsCollect := m_contentCreateStatCollectBase}
			};
			
			/**
			 * @desc Base CREATE request primitive for M2mServiceSubscriptionProfile resource
			 */
			template (value) RequestPrimitive m_createM2mServiceSubscriptionProfileBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createM2mServiceSubscriptionProfile",
				resourceType := int11,
				primitiveContent := {m2mServiceSubscriptionProfile := m_contentCreatem2mServiceSubscriptionProfileBase}
			};
			
			/**
			 * @desc Base CREATE request primitive for timeSeries resource
			 */
			template (value) RequestPrimitive m_createTimeSeriesBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createTimeSeries",
				resourceType := int29,
				primitiveContent := {timeSeries := m_contentCreateTimeSeries ()}
			};
			
			/**
			 * @desc Base CREATE request primitive for timeSeriesAnnc resource
			 */
			template (value) RequestPrimitive m_createTimeSeriesAnncBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createTimeSeriesAnnc",
				resourceType := int10029,
				primitiveContent := {timeSeriesAnnc := m_contentCreateTimeSeriesAnnc()}
			};
        	
			template (value) RequestPrimitive m_createTimeSeries(in template (omit)  XSD.String p_name := c_defaultTimeSeriesResourceName,
																 in XSD.Boolean p_missingDataDetect := true,
																 in XSD.NonNegativeInteger p_periodicInterval := 5,
																 in XSD.NonNegativeInteger p_missingDataMaxNr := 5, 
																 in XSD.NonNegativeInteger p_missingDataDetectTimer := 2000) modifies m_createTimeSeriesBase := {
				primitiveContent := {timeSeries := m_contentCreateTimeSeriesAttributes (p_name, p_missingDataDetect, p_periodicInterval, p_missingDataMaxNr, p_missingDataDetectTimer)}
			};
        	
			/**
			 * @desc Reception template for CREATE timeSeries
			 */
			template RequestPrimitive mw_createTimeSeries(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int29,
				primitiveContent := {timeSeries := ?}
			};
			
			/**
			 * @desc Base CREATE request primitive for timeSeriesInstance resource
			 */
			template (value) RequestPrimitive m_createTimeSeriesInstanceBase modifies m_create := {
				requestIdentifier := testcasename() & "-m_createTimeSeriesInstance",
				resourceType := int30,
				primitiveContent := {timeSeriesInstance := m_contentCreateTimeSeriesInstance()}
			};
        	
			template (value) RequestPrimitive m_createTimeSeriesInstance(XSD.ID p_parentResourceAddress, in template (omit)  XSD.String p_name := c_defaultTimeSeriesInstanceResourceName) modifies m_create := {
				to_ := p_parentResourceAddress,
				requestIdentifier := testcasename() & "-m_createTimeSeriesInstance",
				resourceType := int30,
				primitiveContent := {timeSeriesInstance := m_contentCreateTimeSeriesInstance (p_name)}
			};
			
			/**
			 * @desc Reception template for CREATE timeSeriesInstance
			 */
			template RequestPrimitive mw_createTimeSeriesInstance(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int30,
				primitiveContent := {timeSeriesInstance := mw_contentCreateTimeSeriesInstanceBase}
			};
			
			/**
			 * @desc Base Reception template for CREATE TimeSeriesAnnc
			 */
			template RequestPrimitive mw_createTimeSeriesAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10029,
				primitiveContent := {timeSeriesAnnc := mw_contentCreateTimeSeriesAnncBase}
			};  
			
			/**
			 * @desc Base Reception template for CREATE TimeSeriesInstanceAnnc
			 */
			template RequestPrimitive mw_createTimeSeriesInstanceAnnc(template XSD.ID p_from := *, template XSD.ID p_to := ?) modifies mw_create := {
				resourceType := int10030,
				primitiveContent := {timeSeriesInstanceAnnc := mw_contentCreateTimeSeriesInstanceAnncBase}
			};  
			
    	}//end group Create
    	
    	group Delete {
    	
			template (value) RequestPrimitive m_delete(XSD.ID p_resourceAddress, in XSD.ID p_originator := PX_SUPER_AE_ID) := {
        		operation := int4,
        		to_ := p_resourceAddress,
        		from_ := p_originator,
				requestIdentifier := testcasename() & "-m_delete" & f_rnd(1, 1000000),
        		resourceType := omit,
        		primitiveContent := omit, 
				roleIDs := omit, 
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
				desiredIdentifierResultType := omit,
				tokens := omit,
				tokenIDs := omit,
				localTokenIDs := omit, 
				tokenRequestIndicator := omit,
				releaseVersionIndicator := "2a",
				vendorInformation := omit
			};

			template  RequestPrimitive mw_delete(template XSD.ID p_resourceAddress := ?, template XSD.ID p_from := *) := {
				operation := int4,
				to_ := p_resourceAddress,
				from_ := ?,
				requestIdentifier := ?,
				resourceType := omit,
				primitiveContent := omit, 
				roleIDs := *, 
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := *,
				resultContent := *,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				desiredIdentifierResultType := *, 
				tokens := *,
				tokenIDs := *,
				localTokenIDs := *,
				tokenRequestIndicator := *,
				releaseVersionIndicator := ?,
				vendorInformation := *
        	};
        	
			/**
			  * @desc Base UPDATE request primitive for PollingChannel resource
			 */
			 template (value) RequestPrimitive m_deletePollingChannelBase(XSD.ID p_resourceAddress, in XSD.ID p_originator := PX_SUPER_AE_ID) modifies m_delete := {
				requestIdentifier := "m_deletePollingChannel",
				primitiveContent:= {pollingChannel := m_contentDeletePollingChannel}
			 };
        	
    	}//end group Delete
    	
    	group Notify {
    		
			/**
			 * @desc Base NOTIFY request primitive
			 */
			template (value) RequestPrimitive m_notify(XSD.ID p_resourceAddress) := {
				operation := int5,
				to_ := p_resourceAddress,
				from_ := "NotInitialized",
				requestIdentifier := testcasename() & "-m_notify" & f_rnd(1, 1000000),
				resourceType := omit,
				primitiveContent := {notification := m_contentNotification_allOmit},
				roleIDs := omit,
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
				desiredIdentifierResultType := omit,
				tokens := omit,
				tokenIDs := omit,
				localTokenIDs := omit,
				tokenRequestIndicator := omit,
				releaseVersionIndicator := "2a",
				vendorInformation := omit
			};
			

			/**
			 * @desc Base NOTIFY request primitive
			 */
			template (value) RequestPrimitive m_notifyNotification(XSD.ID p_resourceAddress, template (value) Notification p_notification, template (omit) AbsRelTimestamp p_requestExpirationTimestamp := omit) modifies m_notify := {
				primitiveContent := {notification := p_notification},
				requestExpirationTimestamp := p_requestExpirationTimestamp//Needed for polling
			};
			
			/**
			 * @desc Base NOTIFY request primitive carrying a responsePrimitive
			 */
			template (value) RequestPrimitive m_notifyResponsePrimitive(XSD.ID p_resourceAddress, ResponsePrimitive p_responsePrimitive) modifies m_notify := {
				primitiveContent := {responsePrimitive := p_responsePrimitive}
			};
			
			/**
			 * @desc Base NOTIFY Aggregated request primitive
			 */
			template (value) RequestPrimitive m_notifyAggregatedNotification := {
				operation := int5,
				to_ := "NotInitialized",
				from_ := omit,
				requestIdentifier := testcasename() & "-m_notifyAggregatedNotification" & f_rnd(1, 1000000),
				resourceType := omit,
				primitiveContent := {aggregatedNotification := {notification_list := {m_contentNotification_allOmit,m_contentNotification_allOmit}}},
				roleIDs := omit,
				originatingTimestamp := omit,
				requestExpirationTimestamp := omit,
				resultExpirationTimestamp := omit,
				operationExecutionTime := omit,
				responseType := omit,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := omit,
				deliveryAggregation := omit,
				groupRequestIdentifier := omit,
				filterCriteria := omit,
				desiredIdentifierResultType := omit,
				tokens := omit,
				tokenIDs := omit,
				localTokenIDs := omit,
				tokenRequestIndicator := omit,
				releaseVersionIndicator := "2a",
				vendorInformation := omit
			};
    		
    		/**
			* @desc Base NOTIFY request primitive
			*/
			template RequestPrimitive mw_notify := {
				operation := int5,
				to_ := ?,
				from_ := *,
				requestIdentifier := ?,
				resourceType := omit,
				primitiveContent := {notification := mw_contentNotificationBase},
				roleIDs := *,
				originatingTimestamp := *,
				requestExpirationTimestamp := *,
				resultExpirationTimestamp := *,
				operationExecutionTime := *,
				responseType := *,
				resultPersistence := omit,
				resultContent := omit,
				eventCategory := *,
				deliveryAggregation := *,
				groupRequestIdentifier := *,
				filterCriteria := *,
				desiredIdentifierResultType := *,
				tokens := *,
				tokenIDs := *,
				localTokenIDs := *,
				tokenRequestIndicator := *,
				releaseVersionIndicator := ?,
				vendorInformation := *
			};
			
			/**
			 * @desc Base NOTIFY request primitive
			 */
			template  RequestPrimitive mw_notifyAggregatedNotification (in template  AggregatedNotification p_aggregatedNotification := ?) modifies mw_notify := {
				primitiveContent := { aggregatedNotification := p_aggregatedNotification}
			};
			
			/**
			 * @desc Base NOTIFY request primitive
			 */
			
			template  RequestPrimitive mw_notifyNotification(in template  Notification p_notification) modifies mw_notify := {
				primitiveContent := {notification := p_notification}
			};
			
			/**
			 * @desc Base NOTIFY request primitive for ResponsePrimitive
			 */

			template  RequestPrimitive mw_notifyResponsePrimitive(in template  ResponsePrimitive p_responsePrimitive) modifies mw_notify := {
				primitiveContent := {responsePrimitive := p_responsePrimitive}
			};		

			
    		
    	}//end of group Notify
	}//end group RequestPrimitives
	
	group ContentCreate {
		
		template (value) PrimitiveContent m_primitiveContentAe(template AE_optional p_ae) := {
			aE := valueof(p_ae)
		}
		
		template (value) PrimitiveContent m_primitiveContentContainer(template Container_optional p_container) := {
			container := valueof(p_container)
		}
		
		template (value) PrimitiveContent m_primitiveContentContentInstance(template ContentInstance_optional p_contentInstance) := {
			contentInstance := valueof(p_contentInstance)
		}
		            
        template (value) PrimitiveContent m_primitiveContentCSEBase(template CSEBase_optional p_cSEBase) := {
	        cSEBase := valueof(p_cSEBase)
		}

		template (value) PrimitiveContent m_primitiveContentRemoteCSE(template RemoteCSE_optional p_remoteCSE) := {
			remoteCSE := valueof(p_remoteCSE)
		}
		
		template (value) PrimitiveContent m_primitiveContentResponsePrimitive(template ResponsePrimitive p_responsePrimitive) := {
			responsePrimitive := valueof(p_responsePrimitive)
		}		
		
		template (value) PrimitiveContent m_primitiveContentGroup(template Group_optional p_group) := {
			group_ := valueof(p_group)
		}
				
		template PrimitiveContent mw_primitiveContent := ?;
		
		template PrimitiveContent mw_primitiveContentNotification (template Notification p_notification) := {
			notification := p_notification
		};
		
		 
		/**
		 * @desc Base primitiveContent for CREATE operation for AEAnnc resource
		 * @param p_labels Labels
		 * @param p_accessControlPolicyIds AcpIDs
		 * @param p_appId App ID
		 * @param p_nodeLink Node link
		 */
1646 1647 1648 1649 1650 1651 1652 1653 1654 1655
		template (value) AEAnnc_optional m_contentCreateAEAnnc (in template (omit)  Labels p_labels, in template (omit) AcpType p_accessControlPolicyIds, template (omit) XSD.ID p_appId := PX_TS_AE1.appId, in template (omit) XSD.AnyURI p_link := omit) := {
			resourceName := omit,//NA 
			resourceType := omit,//NA
			resourceID := omit,//NA
			parentID := omit,//NA
			creationTime := omit,//NA
			lastModifiedTime := omit,//NA
			labels := p_labels,//MA
			accessControlPolicyIDs := p_accessControlPolicyIds,//MA Special case, mandatory for announced resources
			expirationTime := "20301231T012345",//MA
1656 1657
			link := p_link,//M
			dynamicAuthorizationConsultationIDs := omit, //TODO Check whether it is optional or mandatory for create operation			
1658 1659 1660
			appName := omit,//OA
			app_ID := p_appId,//OA
			aE_ID := omit,//OA
1661
			pointOfAccess := omit, //{"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
1662 1663 1664 1665 1666 1667
			ontologyRef := omit,//OA
			nodeLink := omit,//OA
			requestReachability := omit,//OA
			contentSerialization := omit,//OA
			e2eSecInfo := omit, //MA TODO Check whether it is optional or mandatory for create operation
			supportedReleaseVersions := omit, //MA
1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688
			choice := omit//NP
		};	

		/**
		 * @desc Base reception template of primitiveContent for CREATE operation for AEAnnc resource
		 * @param p_labels Labels
		 * @param p_accessControlPolicyIds AcpIDs
		 * @param p_appId App ID
		 * @param p_nodeLink Node link
		 */
		template AEAnnc_optional mw_contentCreateAEAnnc (in template  Labels p_labels := *, in template AcpType p_accessControlPolicyIds := ?, template XSD.AnyURI p_link := ?) := {
    		resourceName := omit,//NA M
    		resourceType := omit,//NA M
    		resourceID := omit,//NA M
    		parentID := omit,//NA M
    		creationTime := omit,//NA M
    		lastModifiedTime := omit,//NA M
    		labels := p_labels,//MA
    		accessControlPolicyIDs := p_accessControlPolicyIds,//MA
    		expirationTime := ?,//MA M
			link := p_link,//M
1689
    		dynamicAuthorizationConsultationIDs := *, //OA			
1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737
			appName := *,//OA
			app_ID := *,//OA
			aE_ID := *,//OA
			pointOfAccess := *, //OA {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
			ontologyRef := *,//OA
			nodeLink := *,//OA
			requestReachability := *,//OA
			contentSerialization := *,//OA
			e2eSecInfo := *, //MA
			supportedReleaseVersions := *, //MA//TODO It should be mandatory for AEAnnc
			choice := omit//NA
		};	
		
		/**
		 * @desc Base reception template of primitiveContent for CREATE operation for RemoteCSEAnnc resource
		 * @param p_labels Labels
		 * @param p_accessControlPolicyIds AcpIDs
		 * @param p_appId App ID
		 * @param p_nodeLink Node link
		 */
		template RemoteCSEAnnc_optional mw_contentCreateRemoteCSEAnnc (in template  Labels p_labels := *, in template AcpType p_accessControlPolicyIds := ?, template XSD.AnyURI p_link := ?) := {
			resourceName := omit,//NA M
			resourceType := omit,//NA M
			resourceID := omit,//NA M
			parentID := omit,//NA M
			creationTime := omit,//NA M
			lastModifiedTime := omit,//NA M
			labels := p_labels,//MA
			accessControlPolicyIDs := p_accessControlPolicyIds,//MA
			expirationTime := ?,//MA M
			link := p_link,//M
			dynamicAuthorizationConsultationIDs := omit, //OA			
			cseType := *,//OA
			pointOfAccess := *,//OA
			cSEBase := *,//
			cSE_ID := *,//OA
			requestReachability := *, //OA {"http://127.0.0.1:1400/monitor"},//O //{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
			nodeLink := *,//OA
			e2eSecInfo := ?,//OA
			supportedReleaseVersions := *, //OA
			choice := omit//NA
		};
		
    	/**
    	 * @desc Base primitiveContent for CREATE operation for AE resource
    	 * @param p_name Resource name
    	 * @param p_accessControlPolicyIds ACP IDs for the AE
    	 */
1738
    	template (value) AE_optional m_contentCreateAe (in template (omit) AcpType p_accessControlPolicyIds, in template (omit)  XSD.String p_name := c_defaultAe1ResourceName, in XSD.ID p_appId := PX_TS_AE1.appId, in template (omit) PoaList p_poaList) := {
1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973

			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
    		dynamicAuthorizationConsultationIDs := omit, //O
    		announceTo := omit,//O
    		announcedAttribute := omit,//O
    		appName := omit,//O
			app_ID := p_appId,//M
    		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 := false,//M
    		contentSerialization := omit,//O
			e2eSecInfo := omit, //O
			supportedReleaseVersions := {"2a"}, //M
    		choice := omit//NP
    	};	

    	/**
    	 * @desc Base reception template of primitiveContent for CREATE operation for AE resource
    	 */
    	template AE_optional mw_contentCreateAeBase := {

			resourceName := *,//O
			resourceType := omit,//NP
			resourceID := omit,//NP
			parentID := omit,//NP
			creationTime := omit,//NP
			lastModifiedTime := omit,//NP
			labels := *,//O
			accessControlPolicyIDs := *,//O
			expirationTime := *,//O
    		dynamicAuthorizationConsultationIDs := *, //O
    		announceTo := *,//O
    		announcedAttribute := *,//O
    		appName := *,//O
			app_ID := ?,//M
    		aE_ID := omit,//NP
    		pointOfAccess := *, //O {"http://127.0.0.1:1400/monitor"},//{"http://192.168.1.92:18080/notifications/AE"}, // TODO: Check this => AE PoA
    		ontologyRef := *,//O
    		nodeLink := *,//NP
    		requestReachability := ?,//M
    		contentSerialization := *,//O
			e2eSecInfo := *, //O
			supportedReleaseVersions := ?, //M
    		choice := *//NP
    	};	
    	
    	/**
    	 * @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_defaultAccessControlPolicyResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
			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
			privileges := {
				accessControlRule_list := {valueof(m_createAcr(p_acor, p_allowedOperations))}
			},//M
			selfPrivileges := {
				accessControlRule_list := {valueof(m_createAcr({"all"}, int63))}
			},//M
			choice := omit //NP
		};
		
		/**
		 * @desc Base primitiveContent for CREATE operation for AccessControlPolicyAnnc resource
		 * @param p_name Resource name
		 * @param p_acor Allowed originators
		 * @param p_allowedOperations Allowed operations
		 */
		template (value) AccessControlPolicyAnnc_optional m_contentCreateAcpAnnc (in template (omit) XSD.String p_name := c_defaultAccessControlPolicyAnncResourceName, in template (value) ListOfURIs p_acor := PX_ACOR, in template (value) AccessControlOperations p_allowedOperations := int63 ) := {
			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
			link := omit,//M TODO Put the right value
			privileges := {
				accessControlRule_list := {valueof(m_createAcr(p_acor, p_allowedOperations))}
			},//M
			selfPrivileges := {
				accessControlRule_list := {valueof(m_createAcr({"all"}, int63))}
			},//M
			choice := omit //NP
		};
		
		/**
		 * @desc Base reception template of primitiveContent for CREATE operation for AccessControlPolicyAnnc resource
		 * @param p_labels Labels
		 */
		template AccessControlPolicyAnnc_optional mw_contentCreateAcpAnncBase (in template (omit)  Labels p_labels := omit) := {
			resourceName := omit,//NA M
			resourceType := omit,//NA M
			resourceID := omit,//NA M
			parentID := omit,//NA M
			creationTime := omit,//NA M
			lastModifiedTime := omit,//NA M
			labels := p_labels,//MA
			expirationTime := ?,//MA M
			link := ?,//M
			privileges := ?,//MA
			selfPrivileges := ?,//MA
			choice := omit//NA
		};	
		
		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 := {},
			accessControlAuthenticationFlag := omit, 
			accessControlObjectDetails_list := {}
		}
    	
		/*template (value) CSEBase_optional m_contentCreateCSEBase (in template (value) ServiceSubscribedAppRule p_serviceSubscribedAppRule) := {
			resourceName := omit,
			resourceType := omit,
			resourceID := omit,
			parentID := omit,
			creationTime := omit,
			lastModifiedTime := omit,
			labels := omit,
			accessControlPolicyIDs := omit,
			cseType := omit,
			cSE_ID := omit,
			supportedResourceType := omit,
			pointOfAccess := omit,
			nodeLink := omit,
			e2eSecInfo := omit, 
			choice := {
				choice_list := {{
				  serviceSubscribedAppRule := p_serviceSubscribedAppRule
				}}
			}
		}*/
		
		/**
		 * @desc Base primitiveContent for CREATE operation for CSEBase resource
		 * @param p_name Resource name
		 */
		template (value) CSEBase_optional m_contentCreateCSEBase (in template (omit) XSD.String p_name := c_defaultResourceName):= {
			resourceName := p_name,//O
			resourceType := omit,
			resourceID := omit,
			parentID := omit,
			creationTime := omit,
			lastModifiedTime := omit,
			labels := omit,
			accessControlPolicyIDs := omit,
			cseType := omit,
			cSE_ID := omit,
			supportedResourceType := omit,
			pointOfAccess := omit,
			nodeLink := omit,
			dynamicAuthorizationConsultationIDs := omit,
			e2eSecInfo := omit, 
			supportedReleaseVersions := {"2a"},
			choice := omit
		};
		
		/**
		 * @desc Base primitiveContent for CREATE operation for PollingChannel resource
		 * @param p_accessControlPolicyIds ACP IDs for the PollingChannel
		 * @param p_name Resource name
		 */
		template (value) Delivery_optional m_contentCreateDelivery (in template (omit) XSD.String p_name := c_defaultDeliveryResourceName, 
																	in template (omit) AcpType p_accessControlPolicyIds,
																	in template (value) XSD.ID p_source,
																	in template (value) XSD.ID p_target,
																	in template (value) Timestamp p_lifespan,
																	in template (value) EventCat p_eventCat,
																	in template (value) DeliveryMetaData p_deliveryMetaData) := {
			
			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
			dynamicAuthorizationConsultationIDs := omit,//O
			source := p_source,//M
			target := p_target,//M
			lifespan := p_lifespan,//M
			eventCat := p_eventCat,//M
			deliveryMetaData := p_deliveryMetaData,//M
			aggregatedRequest := omit,//O
			choice := omit//NP
			
		};   
    	
		/**
		 * @desc Base primitiveContent for CREATE operation for GenericInterworkingService resource
		 * @param p_accessControlPolicyIds ACP IDs for the PollingChannel
		 * @param p_name Resource name
		 */
		template (value) GenericInterworkingService_optional m_contentCreateGenericInterworkingService (in template (omit) XSD.String p_name := c_defaultGenericInterworkingServiceResourceName, 
																	in template (omit) AcpType p_accessControlPolicyIds := omit) := {
			
			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
			dynamicAuthorizationConsultationIDs := omit,//O
			announceTo := omit,//O
			announcedAttribute := omit,//O
			stateTag := omit,//NP
			creator := omit,//O
1974
			containerDefinition := PX_CND_GENERIC_INTERWORKING_SERVICE,//M
1975 1976 1977 1978