/* SGP22 Templates in TTCN-3
 *
 * Author: Philipp Maier <pmaier@sysmocom.de> / sysmocom - s.f.m.c. GmbH
 *
 * Released under the terms of GNU General Public License, Version 2 or
 * (at your option) any later version.
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

module RSPDefinitions_Templates {

import from PEDefinitions all;
import from RSPDefinitions all;
import from RSPDefinitions_Types all;

import from PKIX1Explicit88 all;
import from PKIX1Explicit88_Templates all;
import from PKIX1Explicit88_Types all;

import from PKIX1Implicit88 all;

/* GSMA SGP.22, section 2.5.4 */
template (present) BoundProfilePackage
tr_boundProfilePackage := {
	initialiseSecureChannelRequest := {
		remoteOpId := ?,
		transactionId := ?,
		controlRefTemplate := {
			keyType := ?,
			keyLen := ?,
			hostId := ?
		},
		smdpOtpk := ?,
		smdpSign := ?
	},
	/* ES8+.ConfigureISDP */
	firstSequenceOf87 := ?,
	/* ES8+.StoreMetadata */
	sequenceOf88 := ?,
	/* ES8+.ReplaceSessionKeys (optional) */
	secondSequenceOf87 := *,
	/* ES8+.LoadProfileElements */
	sequenceOf86 := ?
}
template (value) BoundProfilePackage
ts_boundProfilePackage := {
	initialiseSecureChannelRequest := {
		remoteOpId := 1,
		transactionId := 'AABBCC'O,
		controlRefTemplate := {
			keyType := '88'O, /* AES */
			keyLen := '10'O, /* 16 byte key-length */
			hostId := '01020304050607080910111213141516'O
		},
		smdpOtpk := '1122334455667788'O,
		smdpSign := 'AABBCCDDEEFF0000'O
	},
	/* ES8+.ConfigureISDP */
	firstSequenceOf87 := {'41414141414141414141414141414141414141414141414141414141414141'O,
			      '42424242424242424242424242424242424242424242424242424242424242'O,
			      '43434343434343434343434343434343434343434343434343434343434343'O},
	/* ES8+.StoreMetadata */
	sequenceOf88 := {'444444444444444444444444444444444444444444'O,
			 '454545454545454545454545454545454545454545'O,
			 '464646464646464646464646464646464646464646'O},
	/* ES8+.ReplaceSessionKeys (optional) */
	secondSequenceOf87 := omit,
	/* ES8+.LoadProfileElements */
	sequenceOf86 := {'474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747474747'O,
			 '484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848484848'O,
			 '494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949494949'O,
			 '505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050'O,
			 '515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151'O}
}

template (present) ServerSigned1 tr_serverSigned1(template (present) octetstring transactionId := ?,
						  template (present) octetstring euiccChallenge := ?,
						  template (present) universal charstring serverAddress := ?,
						  template (present) octetstring serverChallenge := ?) := {
	 transactionId := transactionId,
	 euiccChallenge := euiccChallenge,
	 serverAddress := serverAddress,
	 serverChallenge := serverChallenge
}
template (value) ServerSigned1 ts_serverSigned1(template (value) octetstring transactionId := 'ABCDEF'O,
						template (value) octetstring euiccChallenge := '00112233445566778899AABBCCDDEEFF'O,
						template (value) universal charstring serverAddress := "smdp.example.com",
						template (value) octetstring serverChallenge := '01020304050607080910111213141516'O) := {
	 transactionId := transactionId,
	 euiccChallenge := euiccChallenge,
	 serverAddress := serverAddress,
	 serverChallenge := serverChallenge
}

template (present) CtxParams1 tr_ctxParams1 := {
	 ctxParamsForCommonAuthentication := {
		matchingId := *,
		deviceInfo := {
			tac := ?,
			deviceCapabilities := {
				gsmSupportedRelease := *,
				utranSupportedRelease := *,
				cdma2000onexSupportedRelease := *,
				cdma2000hrpdSupportedRelease := *,
				cdma2000ehrpdSupportedRelease := *,
				eutranEpcSupportedRelease := *,
				contactlessSupportedRelease := *,
				rspCrlSupportedVersion := *,
				nrEpcSupportedRelease := *,
				nr5gcSupportedRelease := *,
				eutran5gcSupportedRelease := *,
				lpaSvn := *,
				catSupportedClasses := *,
				euiccFormFactorType := *,
				deviceAdditionalFeatureSupport := *
			},
			imei := *
		}
	}
}
template (value) CtxParams1 ts_ctxParams1 := {
	ctxParamsForCommonAuthentication := {
		matchingId := omit,
		deviceInfo := {
			tac := '12345678'O,
			deviceCapabilities := {
				gsmSupportedRelease := omit,
				utranSupportedRelease := omit,
				cdma2000onexSupportedRelease := omit,
				cdma2000hrpdSupportedRelease := omit,
				cdma2000ehrpdSupportedRelease := omit,
				eutranEpcSupportedRelease := omit,
				contactlessSupportedRelease := omit,
				rspCrlSupportedVersion := omit,
				nrEpcSupportedRelease := omit,
				nr5gcSupportedRelease := omit,
				eutran5gcSupportedRelease := omit,
				lpaSvn := omit,
				catSupportedClasses := omit,
				euiccFormFactorType := omit,
				deviceAdditionalFeatureSupport := omit
			},
			imei := omit
		}
	}
}

template (present) EuiccSigned1 tr_euiccSigned1(template (present) octetstring transactionId := ?,
						template (present) universal charstring serverAddress := ?,
						template (present) octetstring serverChallenge := ?,
						template (present) EUICCInfo2 euiccInfo2 := ?,
						template (present) CtxParams1 ctxParams1 := ?) := {
	 transactionId := transactionId,
	 serverAddress := serverAddress,
	 serverChallenge := serverChallenge,
	 euiccInfo2 := euiccInfo2,
	 ctxParams1 := ctxParams1
}
template (value) EuiccSigned1 ts_euiccSigned1(template (value) octetstring transactionId := 'ABCDEF'O,
					      template (value) universal charstring serverAddress := "smdp.example.com",
					      template (value) octetstring serverChallenge := '01020304050607080910111213141516'O,
					      template (value) EUICCInfo2 euiccInfo2 := ts_EUICCInfo2,
					      template (value) CtxParams1 ctxParams1 := ts_ctxParams1) := {
	 transactionId := transactionId,
	 serverAddress := serverAddress,
	 serverChallenge := serverChallenge,
	 euiccInfo2 := euiccInfo2,
	 ctxParams1 := ctxParams1
}

template (present) StoreMetadataRequest tr_storeMetadataRequest := {
	iccid := ?,
	serviceProviderName := ?,
	profileName := ?,
	iconType := *,
	icon := *,
	profileClass := ?,
	notificationConfigurationInfo := *,
	profileOwner := *,
	profilePolicyRules := *,
	serviceSpecificDataStoredInEuicc := *,
	serviceSpecificDataNotStoredInEuicc := *
}
template (value) StoreMetadataRequest ts_storeMetadataRequest := {
	iccid := '123456789ABCDEFFAAAA'O,
	serviceProviderName := "testsuite",
	profileName := "testprofile",
	iconType := omit,
	icon := omit,
	profileClass := 2, /* operational */
	notificationConfigurationInfo := omit,
	profileOwner := omit,
	profilePolicyRules := omit,
	serviceSpecificDataStoredInEuicc := omit,
	serviceSpecificDataNotStoredInEuicc := omit
}

template (present) SmdpSigned2 tr_smdpSigned2(template (present) octetstring transactionId := ?,
					      template (present) boolean ccRequiredFlag := ?) := {
	 transactionId := transactionId,
	 ccRequiredFlag := ccRequiredFlag,
	 bppEuiccOtpk := ?
}
template (value) SmdpSigned2 ts_smdpSigned2(template (value) octetstring transactionId := 'ABCDEF'O,
					    template (value) boolean ccRequiredFlag := false) := {
	 transactionId := transactionId,
	 ccRequiredFlag := ccRequiredFlag,
	 bppEuiccOtpk := omit
}

template (present) PendingNotification tr_pendingNotification(template (present) ProfileInstallationResult profileInstallationResult := ?) := {
	 profileInstallationResult := profileInstallationResult
}
template (value) PendingNotification ts_pendingNotification(template (value) ProfileInstallationResult profileInstallationResult := ts_profileInstallationResult) := {
	 profileInstallationResult := profileInstallationResult
}

/* GSMA SGP.22, section 2.5.6 */
template (present) ProfileInstallationResultData
tr_profileInstallationResultData(template (present) charstring notificationAddress := ?) := {
	transactionId := ?,
	notificationMetadata := {
		seqNumber := ?,
		profileManagementOperation := ?,
		notificationAddress := notificationAddress,
		iccid := *
	},
	smdpOid := ?,
	finalResult := ?
}
template (value) ProfileInstallationResultData
ts_profileInstallationResultData(template (value) charstring notificationAddress := "smdp.example.com") := {
	transactionId := 'AABBCC'O,
	notificationMetadata := {
		seqNumber := 1234,
		profileManagementOperation := '01'B, /* is this correct? (notificationInstall) */
		notificationAddress := notificationAddress,
		iccid := '123456789ABCDEFFAAAA'O
	},
	smdpOid := id_rsp, /* random OBJECT IDENTIFIER for testing */
	finalResult := {
		successResult := {
			aid := '0102030405'O,
			simaResponse := '4141414141414141414141414141414141414141414141414141'O
		}
	}
}
template (present) ProfileInstallationResult
tr_profileInstallationResult := {
	profileInstallationResultData := tr_profileInstallationResultData,
	euiccSignPIR := ?
}
template (value) ProfileInstallationResult
ts_profileInstallationResult := {
	profileInstallationResultData := ts_profileInstallationResultData,
	euiccSignPIR := '00112233445566778899AABBCCDDEEFF'O
}

/* GSMA SGP.22, section 5.6.1 (ES9+) */
template (present) RemoteProfileProvisioningRequest
tr_initiateAuthenticationRequest(template (present) octetstring euiccChallenge := ?,
				 template (present) charstring smdpAddress := ?,
				 template (present) EUICCInfo1 euiccInfo1 := ?) := {
	initiateAuthenticationRequest := {
		euiccChallenge := euiccChallenge,
		smdpAddress := smdpAddress,
		euiccInfo1 := euiccInfo1
	}
}
template (value) RemoteProfileProvisioningRequest
ts_initiateAuthenticationRequest(template (value) octetstring euiccChallenge := '00112233445566778899aabbccddeeff'O,
				 template (value) charstring smdpAddress := "smdp.example.com",
				 template (value) EUICCInfo1 euiccInfo1 := ts_EUICCInfo1) := {
	initiateAuthenticationRequest := {
		euiccChallenge := euiccChallenge,
		smdpAddress := smdpAddress,
		euiccInfo1 := euiccInfo1
	}
}
template (present) RemoteProfileProvisioningResponse
tr_initiateAuthenticationResponse(template (present) octetstring transactionId := ?,
				  template (present) ServerSigned1 serverSigned1 := ?,
				  template (present) octetstring serverSignature1 := ?,
				  template (present) SubjectKeyIdentifier euiccCiPKIdToBeUsed := ?,
				  template (present) Certificate serverCertificate := ?) := {
	initiateAuthenticationResponse := {
		initiateAuthenticationOk := {
			transactionId := transactionId,
			serverSigned1 := serverSigned1,
			serverSignature1 := serverSignature1,
			euiccCiPKIdToBeUsed := euiccCiPKIdToBeUsed,
			serverCertificate := serverCertificate
		}
	}
}
template (value) RemoteProfileProvisioningResponse
ts_initiateAuthenticationResponse(template (value) octetstring transactionId := 'ABCDEF'O,
				  template (value) ServerSigned1 serverSigned1 := ts_serverSigned1,
				  template (value) octetstring serverSignature1 := '01020304'O,
				  template (value) SubjectKeyIdentifier euiccCiPKIdToBeUsed := 'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O, /* NIST */
				  template (value) Certificate serverCertificate := ts_cert_s_sm_dpauth_nist) := {
	initiateAuthenticationResponse := {
		initiateAuthenticationOk := {
			transactionId := transactionId,
			serverSigned1 := serverSigned1,
			serverSignature1 := serverSignature1,
			euiccCiPKIdToBeUsed := euiccCiPKIdToBeUsed,
			serverCertificate := serverCertificate
		}
	}
}

/* GSMA SGP.22, section 5.6.2 (ES9+) */
template (present) RemoteProfileProvisioningRequest
tr_getBoundProfilePackageRequest(template (present) octetstring transactionId := ?,
				 template (present) PrepareDownloadResponse prepareDownloadResponse := ?) := {
	getBoundProfilePackageRequest := {
		transactionId := transactionId,
		prepareDownloadResponse := prepareDownloadResponse
	}
}
template (value) RemoteProfileProvisioningRequest
ts_getBoundProfilePackageRequest(template (value) octetstring transactionId := 'AABBCC'O,
				 template (value) PrepareDownloadResponse prepareDownloadResponse := ts_prepareDownloadResponse) := {
	getBoundProfilePackageRequest := {
		transactionId := transactionId,
		prepareDownloadResponse := prepareDownloadResponse
	}
}
template (present) RemoteProfileProvisioningResponse
tr_getBoundProfilePackageResponse(template (present) octetstring transactionId := ?,
				  template (present) BoundProfilePackage boundProfilePackage := ?) := {
	getBoundProfilePackageResponse := {
		getBoundProfilePackageOk := {
			transactionId := transactionId,
			boundProfilePackage := boundProfilePackage
		}
	}
}
template (value) RemoteProfileProvisioningResponse
ts_getBoundProfilePackageResponse(template (value) octetstring transactionId := 'AABBCC'O,
				  template (value) BoundProfilePackage boundProfilePackage := ts_boundProfilePackage) := {
	getBoundProfilePackageResponse := {
		getBoundProfilePackageOk := {
			transactionId := transactionId,
			boundProfilePackage := boundProfilePackage
		}
	}
}

/* GSMA SGP.22, section 5.6.3 (ES9+) */
template (present) RemoteProfileProvisioningRequest
tr_authenticateClientRequest(template (present) octetstring transactionId := ?,
			     template (present) AuthenticateServerResponse authenticateServerResponse := ?) := {
	authenticateClientRequest := {
		transactionId := transactionId,
		authenticateServerResponse := authenticateServerResponse
	}
}
template (value) RemoteProfileProvisioningRequest
ts_authenticateClientRequest(template (value) octetstring transactionId := 'AABBCC'O,
			     template (value) AuthenticateServerResponse authenticateServerResponse := ts_authenticateServerResponse) := {
	authenticateClientRequest := {
		transactionId := transactionId,
		authenticateServerResponse := authenticateServerResponse
	}
}
template (present) RemoteProfileProvisioningResponse
tr_authenticateClientResponseEs9(template (present) octetstring transactionId := ?,
				 template (present) StoreMetadataRequest profileMetaData := ?,
				 template (present) SmdpSigned2 smdpSigned2 := ?,
				 template (present) octetstring smdpSignature2 := ?,
				 template (present) Certificate smdpCertificate := ?) := {
	authenticateClientResponseEs9 := {
		authenticateClientOk := {
			transactionId := transactionId,
			profileMetaData := profileMetaData,
			smdpSigned2 := smdpSigned2,
			smdpSignature2 := smdpSignature2,
			smdpCertificate := smdpCertificate
		}
	}
}
template (value) RemoteProfileProvisioningResponse
ts_authenticateClientResponseEs9(template (value) octetstring transactionId := 'ABCDEF'O,
				 template (value) StoreMetadataRequest profileMetaData := ts_storeMetadataRequest,
				 template (value) SmdpSigned2 smdpSigned2 := ts_smdpSigned2,
				 template (value) octetstring smdpSignature2 := 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'O,
				 template (value) Certificate smdpCertificate := ts_cert_s_sm_dpauth_nist) := {
	authenticateClientResponseEs9 := {
		authenticateClientOk := {
			transactionId := transactionId,
			profileMetaData := profileMetaData,
			smdpSigned2 := smdpSigned2,
			smdpSignature2 := smdpSignature2,
			smdpCertificate := smdpCertificate
		}
	}
}

/* GSMA SGP.22, section 5.6.4 (ES9+) */
template (present) RemoteProfileProvisioningRequest
tr_handleNotification(template (present) PendingNotification pendingNotification := ?) := {
	handleNotification := {
		pendingNotification := pendingNotification
	}
}
template (value) RemoteProfileProvisioningRequest
ts_handleNotification(template (value) PendingNotification pendingNotification := ts_pendingNotification) := {
	handleNotification := {
		pendingNotification := pendingNotification
	}
}

/* GSMA SGP.22, section 5.6.5 (ES9+) */
template (present) RemoteProfileProvisioningRequest
tr_cancelSessionRequestEs9(template (present) octetstring transactionId := ?,
			     template (present) CancelSessionResponse cancelSessionResponse := ?) := {
	cancelSessionRequestEs9 := {
		transactionId := transactionId,
		cancelSessionResponse := cancelSessionResponse
	}
}
template (value) RemoteProfileProvisioningRequest
ts_cancelSessionRequestEs9(template (value) octetstring transactionId := 'ABCDEF'O,
			   template (value) CancelSessionResponse cancelSessionResponse := ts_cancelSessionResponse) := {
	cancelSessionRequestEs9 := {
		transactionId := transactionId,
		cancelSessionResponse := cancelSessionResponse
	}
}
template (present) RemoteProfileProvisioningResponse
tr_cancelSessionResponseEs9 := {
	cancelSessionResponseEs9 := {
		cancelSessionOk := { } /* This function has no output data */
	}
}
template (value) RemoteProfileProvisioningResponse
ts_cancelSessionResponseEs9 := {
	cancelSessionResponseEs9 := {
		cancelSessionOk := { } /* This function has no output data */
	}
}


/* GSMA SGP.22, section 5.7.3 (ES10x) */
template (present) EuiccConfiguredAddressesResponse
tr_euiccConfiguredAddressesResponse := {
	defaultDpAddress := *,
	rootDsAddress := ?
}
template (value) EuiccConfiguredAddressesResponse
ts_euiccConfiguredAddressesResponse := {
	defaultDpAddress := "smdp.example.com",
	rootDsAddress := "smds.example.com"
}

/* GSMA SGP.22, section 5.7.5 (ES10x) */
template (present) PrepareDownloadResponseOk
tr_prepareDownloadResponseOk := {
	euiccSigned2 := {
		transactionId := ?,
		euiccOtpk := ?,
		hashCc := *
	},
	euiccSignature2 := ?
}
template (value) PrepareDownloadResponseOk
ts_prepareDownloadResponseOk := {
	euiccSigned2 := {
		transactionId := 'ABCDEF'O,
		euiccOtpk := 'AABBCCDDEEFF'O,
		hashCc := omit
	},
	euiccSignature2 := 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'O
}
template (present) PrepareDownloadResponse
tr_prepareDownloadResponse := {
	downloadResponseOk := tr_prepareDownloadResponseOk
}
template (value) PrepareDownloadResponse
ts_prepareDownloadResponse := {
	downloadResponseOk := ts_prepareDownloadResponseOk
}

/* GSMA SGP.22, section 5.7.7 (ES10x) */
template (present) GetEuiccChallengeResponse
tr_GetEuiccChallengeResponse := {
	euiccChallenge := ?
}
template (value) GetEuiccChallengeResponse
ts_GetEuiccChallengeResponse(template (value) octetstring euiccChallenge := '00112233445566778899AABBCCDDEEFF'O) := {
	euiccChallenge := euiccChallenge
}

/* GSMA SGP.22, section 5.7.8 (ES10x) */
template (present) EUICCInfo1
tr_EUICCInfo1 := {
	svn := ?,
	euiccCiPKIdListForVerification := ?,
	euiccCiPKIdListForSigning := ?
}
template (value) EUICCInfo1
ts_EUICCInfo1 := {
	svn := '020200'O,
	euiccCiPKIdListForVerification := {
	       'C0BC70BA36929D43B467FF57570530E57AB8FCD8'O,
	       'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O
	},
	euiccCiPKIdListForSigning := {
	       'C0BC70BA36929D43B467FF57570530E57AB8FCD8'O,
	       'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O
	}
}

/* GSMA SGP.22, section 5.7.8 (ES10x) */
template (present) EUICCInfo2
tr_EUICCInfo2 := {
	profileVersion := ?,
	svn := ?,
	euiccFirmwareVer := ?,
	extCardResource := ?,
	uiccCapability := ?,
	ts102241Version := *,
	globalplatformVersion := *,
	rspCapability := ?,
	euiccCiPKIdListForVerification := ?,
	euiccCiPKIdListForSigning := ?,
	euiccCategory := *,
	forbiddenProfilePolicyRules := *,
	ppVersion := ?,
	sasAcreditationNumber := ?,
	certificationDataObject := *,
	treProperties := *,
	treProductReference := *,
	additionalEuiccProfilePackageVersions := *
}
template (value) EUICCInfo2
ts_EUICCInfo2 := {
	profileVersion := '414243'O,
	svn := '02000C'O,
	euiccFirmwareVer := '414243'O,
	extCardResource := '414243'O,
	uiccCapability := '1111111111111111111'B,
	ts102241Version := omit,
	globalplatformVersion := omit,
	rspCapability := '1111'B,
	euiccCiPKIdListForVerification := {
	       'C0BC70BA36929D43B467FF57570530E57AB8FCD8'O,
	       'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O
	},
	euiccCiPKIdListForSigning := {
	       'C0BC70BA36929D43B467FF57570530E57AB8FCD8'O,
	       'F54172BDF98A95D65CBEB88A38A1C11D800A85C3'O
	},
	euiccCategory := omit,
	forbiddenProfilePolicyRules := omit,
	ppVersion := '414243'O,
	sasAcreditationNumber := "123456",
	certificationDataObject := omit,
	treProperties := omit,
	treProductReference := omit,
	additionalEuiccProfilePackageVersions := omit
}

/* GSMA SGP.22, section 5.7.10 (ES10x) */
template (value) RetrieveNotificationsListResponse
ts_retrieveNotificationsListResponse_prfleInstRes := {
	notificationList := {
		{
			profileInstallationResult := {
				profileInstallationResultData := ts_profileInstallationResultData,
				euiccSignPIR := 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB'O
			}
		}
	}
}
template (value) RetrieveNotificationsListResponse
ts_retrieveNotificationsListResponse_empty := {
	notificationList := {
	}
}

/* GSMA SGP.22, section 5.7.11 (ES10x) */
template (present) NotificationSentResponse
tr_notificationSentResponse := {
	deleteNotificationStatus := ?
}
template (value) NotificationSentResponse
ts_notificationSentResponse := {
	deleteNotificationStatus := 0 /* 0k */
}

/* GSMA SGP.22, section 5.7.13 (ES10x) */
template (present) AuthenticateServerResponse
tr_authenticateServerResponse := {
	authenticateResponseOk := {
		euiccSigned1 := {
			transactionId := ?,
			serverAddress := ?,
			serverChallenge := ?,
			euiccInfo2 := ?,
			ctxParams1 := tr_ctxParams1
		},
		euiccSignature1 := ?,
		euiccCertificate := ?,
		eumCertificate := ?
	}
}
template (value) AuthenticateServerResponse
ts_authenticateServerResponse := {
	authenticateResponseOk := {
		euiccSigned1 := {
			transactionId := 'ABCDEF'O,
			serverAddress := "smdp.example.com",
			serverChallenge := '01020304050607080910111213141516'O,
			euiccInfo2 := ts_EUICCInfo2,
			ctxParams1 := ts_ctxParams1
		},
		euiccSignature1 := '12345678'O,
		euiccCertificate := ts_cert_euicc_nist,
//		euiccCertificate := ts_cert_euicc_brp,
		eumCertificate := ts_cert_eum_nist
//		eumCertificate := ts_cert_eum_brp

	}
}

/* GSMA SGP.22, section 5.7.13 (ES10x) */
template (present) CancelSessionResponseOk
tr_cancelSessionResponseOk := {
	euiccCancelSessionSigned := {
		 transactionId := ?,
		 smdpOid := ?,
		 reason := ?
	},
	euiccCancelSessionSignature := ?
}
template (value) CancelSessionResponseOk
ts_cancelSessionResponseOk := {
	euiccCancelSessionSigned := {
		 transactionId := 'AABBCC'O,
		 smdpOid := id_rspRole_euicc,
		 reason := 5
	},
	euiccCancelSessionSignature := '1234567890'O
}
template (present) CancelSessionResponse
tr_cancelSessionResponse := {
	cancelSessionResponseOk := tr_cancelSessionResponseOk
}
template (value) CancelSessionResponse
ts_cancelSessionResponse := {
	cancelSessionResponseOk := ts_cancelSessionResponseOk
}

/* GSMA SGP.22, section 5.7.20 (ES10x) */
template (present) GetEuiccDataResponse
tr_getEuiccDataResponse := {
	eidValue := ?
}
template (value) GetEuiccDataResponse
ts_getEuiccDataResponse(template (value) octetstring eidValue := '000102030405060708090A0B0C0D0E0F'O) := {
	eidValue := eidValue
}

/* NotificationMetadata templates */
template (present) NotificationMetadata
tr_notificationMetadata(template (present) integer seqNumber := ?,
			template (present) NotificationEvent profileManagementOperation := ?,
			template (present) charstring notificationAddress := ?,
			template octetstring iccid := *) := {
	seqNumber := seqNumber,
	profileManagementOperation := profileManagementOperation,
	notificationAddress := notificationAddress,
	iccid := iccid
}
template (value) NotificationMetadata
ts_notificationMetadata(template (value) integer seqNumber := 1,
			template (value) NotificationEvent profileManagementOperation := '1000'B,
			template (value) charstring notificationAddress := "smdp.example.com",
			template (omit) octetstring iccid := omit) := {
	seqNumber := seqNumber,
	profileManagementOperation := profileManagementOperation,
	notificationAddress := notificationAddress,
	iccid := iccid
}

/* OtherSignedNotification templates */
template (present) OtherSignedNotification
tr_otherSignedNotification(template (present) NotificationMetadata tbsOtherNotification := ?,
			   template (present) octetstring euiccNotificationSignature := ?,
			   template (present) Certificate euiccCertificate := ?,
			   template (present) Certificate eumCertificate := ?) := {
	tbsOtherNotification := tbsOtherNotification,
	euiccNotificationSignature := euiccNotificationSignature,
	euiccCertificate := euiccCertificate,
	eumCertificate := eumCertificate
}
template (value) OtherSignedNotification
ts_otherSignedNotification(template (value) NotificationMetadata tbsOtherNotification := ts_notificationMetadata,
			   template (value) octetstring euiccNotificationSignature := '0123456789ABCDEF'O,
			   template (value) Certificate euiccCertificate,
			   template (value) Certificate eumCertificate) := {
	tbsOtherNotification := tbsOtherNotification,
	euiccNotificationSignature := euiccNotificationSignature,
	euiccCertificate := euiccCertificate,
	eumCertificate := eumCertificate
}

}
