diff --git a/102232-1/LI-PS-PDU.asn b/102232-1/LI-PS-PDU.asn index 39b445be62bb778c6173c08dc7f323b816f16aa2..910729a3afa38b63037ea151c061377c38234eef 100644 --- a/102232-1/LI-PS-PDU.asn +++ b/102232-1/LI-PS-PDU.asn @@ -1,5 +1,5 @@ LI-PS-PDU -{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version35(35)} +{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version36(36)} DEFINITIONS IMPLICIT TAGS ::= @@ -41,7 +41,7 @@ IMPORTS IPIRI, IPIRIOnly FROM IPAccessPDU - {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version15(15)} + {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version16(16)} -- from ETSI TS 102 232-4 [32] L2CC, @@ -205,7 +205,7 @@ IMPORTS lawfulInterceptDomainId OBJECT IDENTIFIER ::= {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2)} -li-psDomainId OBJECT IDENTIFIER ::= {lawfulInterceptDomainId li-ps(5) genHeader(1) version35(35)} +li-psDomainId OBJECT IDENTIFIER ::= {lawfulInterceptDomainId li-ps(5) genHeader(1) version36(36)} -- ==================== -- Top-level definition @@ -708,11 +708,14 @@ IPAddress ::= SEQUENCE -- Indicates the length of the prefix delegated by the CSP to the subscriber -- example: 60 if IP address is "2001:db8:0:85a3::ac1f:8001/60" -- Mandatory in case where the iP-value contains an IPv6 binary value - iPv4SubnetMask [5] OCTET STRING (SIZE(4)) OPTIONAL + iPv4SubnetMask [5] OCTET STRING (SIZE(4)) OPTIONAL, -- For IPv4 addresses, this indicates the subnet mask to be applied to the iP-value field. -- The subnet mask is intended to be presented as a binary value, e.g. "ff ff ff f8" to -- represent the dotted-decimal subnet mask of "255.255.255.248" corresponding to -- a /29 CIDR-format subnet mask + iP-NAT-translated [6] BOOLEAN OPTIONAL + -- If TRUE then NAT translated, if FALSE then not NAT translated. + -- If absent, IPAddress may or may not be NAT translated. } IP-value ::= CHOICE diff --git a/102232-3/IPAccessPDU.asn b/102232-3/IPAccessPDU.asn index 980614a759a870a3604780dcd4d7be92aede744b..8080b90b6318fd1f0abb2e26d34852d60a46fa28 100644 --- a/102232-3/IPAccessPDU.asn +++ b/102232-3/IPAccessPDU.asn @@ -1,5 +1,5 @@ IPAccessPDU -{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version15(15)} +{itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) iPAccess(3) version16(16)} DEFINITIONS IMPLICIT TAGS ::= BEGIN @@ -9,14 +9,14 @@ IMPORTS IPAddress, Location FROM LI-PS-PDU - {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version35(35)}; + {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) lawfulIntercept(2) li-ps(5) genHeader(1) version36(36)}; -- ============================ -- Object Identifier Definition -- ============================ -iPAccessPDUObjId RELATIVE-OID ::= {li-ps(5) iPAccess(3) version15(15)} +iPAccessPDUObjId RELATIVE-OID ::= {li-ps(5) iPAccess(3) version16(16)} iPIRIObjId RELATIVE-OID ::= {iPAccessPDUObjId iRI(1)} iPCCObjId RELATIVE-OID ::= {iPAccessPDUObjId cC(2)} iPIRIOnlyObjId RELATIVE-OID ::= {iPAccessPDUObjId iRIOnly(3)} diff --git a/102657/RDMessage.asn b/102657/RDMessage.asn index aee41ff102358e8fb2b2206ae809ae2b08e2907b..227664276ee7f7d577144240694c4d91424e047f 100644 --- a/102657/RDMessage.asn +++ b/102657/RDMessage.asn @@ -1,4 +1,4 @@ -RDMessage {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) retainedData(3) rdHeader(0) version27(27)} +RDMessage {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) retainedData(3) rdHeader(0) version28(28)} DEFINITIONS IMPLICIT TAGS ::= @@ -12,7 +12,7 @@ BEGIN retainedDataDomainId OBJECT IDENTIFIER ::= {itu-t(0) identified-organization(4) etsi(0) securityDomain(2) retainedData(3)} -- rdHeader -rdHeaderId OBJECT IDENTIFIER ::= {retainedDataDomainId rdHeader(0) version27(27)} +rdHeaderId OBJECT IDENTIFIER ::= {retainedDataDomainId rdHeader(0) version28(28)} -- ====================================== -- Top level definitions for RDHI wrapper @@ -43,7 +43,6 @@ RetainedDataHeader ::= SEQUENCE requestType [5] RequestType OPTIONAL, requestFlag [6] RequestFlag OPTIONAL -- Optional parameter specifying additional information associated with the request. - } CSPID ::= UTF8String @@ -1512,7 +1511,8 @@ GA-Point ::= SEQUENCE GA-PointWithUnCertainty ::=SEQUENCE { geographicalCoordinates [1] GeographicalCoordinates, - uncertaintyCode [2] INTEGER (0..127) + uncertaintyCode [2] INTEGER (0..127), + ... } maxNrOfPoints INTEGER ::= 15 @@ -2269,13 +2269,13 @@ NetworkAccessRecord::= CHOICE ... } - EdgeComputingRecord ::= CHOICE { edgeComputingSubscriber [1] EdgeComputingSubscriber, edgeComputingApplicationBillingDetails [2] EdgeComputingApplicationBillingDetails, edgeComputingApplicationUsage [3] EdgeComputingApplicationUsage, - edgeComputingDevice [4] EdgeComputingDevice + edgeComputingDevice [4] EdgeComputingDevice, + ... } -- ============================== @@ -2289,8 +2289,9 @@ EdgeComputingSubscriber ::= SEQUENCE genericSubscriberInfo [2] GenericSubscriberInfo OPTIONAL, -- generic personal information about this subscriber edgeComputingSubscriberInfo [3] UTF8String OPTIONAL, - subscribedEdgeComputingApplications [4] SEQUENCE OF SubscribedEdgeComputingApplications OPTIONAL + subscribedEdgeComputingApplications [4] SEQUENCE OF SubscribedEdgeComputingApplications OPTIONAL, -- a subscriber may have more than one edge computing applications listed against them + ... } EdgeComputingSubscriberID ::= UTF8String @@ -2327,10 +2328,10 @@ SubscribedEdgeComputingApplications ::= SEQUENCE orderTime [17] GeneralizedTime OPTIONAL, -- Time when the subscribed edge computing application was ordered by the user allocatedDeviceIDs [18] SEQUENCE OF EdgeComputingDeviceID OPTIONAL, - paymentTransactions [19] SEQUENCE OF EdgeComputingApplicationBillingRecords OPTIONAL + paymentTransactions [19] SEQUENCE OF EdgeComputingApplicationBillingRecords OPTIONAL, + ... } - -- ================================= -- Definitions of Edge Computing Application Usage Data -- ================================= @@ -2349,7 +2350,8 @@ EdgeComputingApplicationUsage ::= SEQUENCE providerID [8] UTF8String OPTIONAL, cdrNumber [9] UTF8String OPTIONAL, -- as per ASP defined format clientIP [10] IPAddress OPTIONAL, - edgeApplicationServersInfo [11] SEQUENCE OF EdgeApplicationServerInfo + edgeApplicationServersInfo [11] SEQUENCE OF EdgeApplicationServerInfo, + ... } EdgeApplicationServerInfo ::= SEQUENCE @@ -2358,7 +2360,8 @@ EdgeApplicationServerInfo ::= SEQUENCE edgeApplicationServerIP [2] IPAddress OPTIONAL, edgeApplicationServerLocation [3] Location OPTIONAL, edgeApplicationServerVirtualResources [4] EdgeApplicationServerVirtualResources OPTIONAL, - serviceContinuity [5] BOOLEAN OPTIONAL + serviceContinuity [5] BOOLEAN OPTIONAL, + ... } EdgeApplicationServerVirtualResources ::= SEQUENCE @@ -2367,7 +2370,8 @@ EdgeApplicationServerVirtualResources ::= SEQUENCE meanVirtualMemoryUsage [2] REAL OPTIONAL, meanVirtualDiskUsage [3] REAL OPTIONAL, durationStartTime [4] GeneralizedTime OPTIONAL, - durationEndTime [5] GeneralizedTime OPTIONAL + durationEndTime [5] GeneralizedTime OPTIONAL, + ... } -- ============================== @@ -2382,14 +2386,16 @@ EdgeComputingApplicationBillingDetails ::= SEQUENCE billingIdentifier [4] EdgeComputingBillingIdentifier OPTIONAL, billingRecords [5] SEQUENCE OF EdgeComputingApplicationBillingRecords OPTIONAL, edgeComputingBillingAddress [6] EdgeComputingBillingAddress OPTIONAL, - copyOfBill [7] SEQUENCE OF File OPTIONAL + copyOfBill [7] SEQUENCE OF File OPTIONAL, + ... } EdgeComputingBillingAddress ::= SEQUENCE { addressSuppliedTime [1] GeneralizedTime OPTIONAL, name [2] PersonName OPTIONAL, - address [3] AddressInformation OPTIONAL + address [3] AddressInformation OPTIONAL, + ... } EdgeComputingBillingIdentifier ::= OCTET STRING @@ -2408,9 +2414,102 @@ EdgeComputingApplicationBillingRecords ::= SEQUENCE edgeComputingTransactionID [6] UTF8String OPTIONAL, -- Unique reference for this transaction/billing record -- Details to be defined on a national basis - edgeComputingTransactionStatus [7] UTF8String OPTIONAL + edgeComputingTransactionStatus [7] UTF8String OPTIONAL, -- Status of the transaction (i.e. "declined", "succeeded", etc.) -- Details to be defined on a national bases + cryptocurrency [8] DigitalTokenIdentifier OPTIONAL, + ... +} + +DigitalTokenIdentifier ::= SEQUENCE +{ + baseRecord [1] BaseRecord, + forkRecord [2] ForkRecord, + informativeDataElements [3] InformativeDataElements, + ... +} + +BaseRecord ::= OCTET STRING + +ForkRecord ::= OCTET STRING + +InformativeDataElements ::= SEQUENCE +{ + digitalTokenName [1] DigitalTokenName, + tokenIdentifierType [2] TokenIdentifierType, + dTIRegistrationAuthorityIdentifier [3] DTIRegistrationAuthorityIdentifier, + otherDataElements [4] OtherDataElements, + ... +} + +DigitalTokenName::= SEQUENCE +{ + digitalTokenLongName [1] DigitalTokenLongName, + digitalTokenShortName [2] DigitalTokenShortName, + ... +} + +DigitalTokenLongName::= SEQUENCE +{ + digitalTokenLongName [1] UTF8String OPTIONAL, + originalLanguageDigitalTokenLongName [2] UTF8String OPTIONAL, + -- based on ISO/IEC 10646 [58] + ... +} + +DigitalTokenShortName ::= SEQUENCE +{ + digitalTokenShortName [1] UTF8String OPTIONAL, + originalLanguageDigitalTokenShortName [2] UTF8String OPTIONAL, + -- based on ISO/IEC 10646 [58] + ... +} + +TokenIdentifierType ::= SEQUENCE +{ + digitalTokenIdentifierType [1] DigitalTokenIdentifierType, + digitalLedgerTechnologyType [2] DigitalLedgerTechnologyType, + ... +} + +DigitalTokenIdentifierType::= ENUMERATED + -- Type defined by clause a of 5.3 of ISO 24165-2 [57] +{ + auxiliaryDigitalToken(0), + nativeDigitalToken(1), + distributedLedgerWithoutANativeDigitalToken(2), + functionallyFungibleGroupOfDigitalTokens(3), + ... +} + +DigitalLedgerTechnologyType::= ENUMERATED + -- Type defined by clause b of 5.3 of ISO 24165-2 [57] +{ + blockchain(0), + other(1), + ... +} + +DTIRegistrationAuthorityIdentifier ::= UTF8String + +OtherDataElements ::= SEQUENCE +{ + underlyingAssetExternalIdentifiersType [1] UTF8String OPTIONAL, + underlyingAssetExternalIdentifiersValue [2] UTF8String OPTIONAL, + digitalTokenExternalIdentifiersType [3] UTF8String OPTIONAL, + digitalTokenExternalIdentifiersValue [4] UTF8String OPTIONAL, + digitalTokenReferenceImplementationURL [5] UTF8String OPTIONAL, + digitalTokenUnitMultiplier [6] UTF8String OPTIONAL, + auxiliaryDigitalToken [7] UTF8String OPTIONAL, + publicDistributedLedgerIndicator [8] PublicDistributedLedgerIndicator OPTIONAL, + ... +} + +PublicDistributedLedgerIndicator ::= ENUMERATED +{ + public(0), + private(1), + ... } -- ======================= @@ -2429,10 +2528,10 @@ EdgeComputingDevice ::= SEQUENCE } OPTIONAL, edgeComputingDeviceID [2] EdgeComputingDeviceID OPTIONAL, -- Unique identifier for this device according to type of identifier - subscriberID [3] EdgeComputingSubscriberID OPTIONAL + subscriberID [3] EdgeComputingSubscriberID OPTIONAL, -- Identifier for a known user of this equipment. -- Usage of this parameter is subject to national legislation. - + ... } EdgeComputingDeviceID ::= OCTET STRING @@ -3030,21 +3129,24 @@ IPAddressSetOrRangeOrMask ::= CHOICE { set [0] SEQUENCE OF IPAddress, range [1] IPRange, - mask [2] IPMask + mask [2] IPMask, + ... } IPRange ::= SEQUENCE -- Things like 172.16.10.0/26 { prefix [0] IPAddress, - subnetlength [1] INTEGER (1..128) + subnetlength [1] INTEGER (1..128), + ... } IPMask ::= SEQUENCE -- Things like 172.16.10.0/255.255.255.240 { base [0] IPAddress, - mask [1] IPAddress + mask [1] IPAddress, + ... } TimedIPAddress ::= SEQUENCE @@ -3052,8 +3154,7 @@ TimedIPAddress ::= SEQUENCE iPAddressSetOrRangeOrMask [0] IPAddressSetOrRangeOrMask, validity [1] TimeSpan, -- Time period during which the information given in this structure is or was valid. - ... - + ... } NABillingDetails ::= SEQUENCE diff --git a/102657/RDMessage.xsd b/102657/RDMessage.xsd index 4bd6ce85eb3fa626b1053679ed226a9878c67255..f5bd974a75032027c43dc2ded32a34689afa74ad 100644 --- a/102657/RDMessage.xsd +++ b/102657/RDMessage.xsd @@ -1,8 +1,8 @@ - + - XSD translated from ASN.1 derived from outcome of TS 102 657 v1.29.1 + XSD translated from ASN.1 derived from outcome of TS 102 657 v2.1.1 @@ -3472,6 +3472,7 @@ + @@ -3492,4 +3493,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml b/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml index 6b59456a68179501b699e1c76f0eb4c0a576dfc9..33fd4f3d746d09034f69b25777bc2b0f53f22ea8 100644 --- a/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml +++ b/103120/dictionaries/ts_103120_ETSIDictionaryDefinitions.xml @@ -25,6 +25,10 @@ LDTask An LD Task Object as defined in section 8.3 + + LPTask + An LP Task Object as defined in section 8.4 + Delivery A Delivery Object as defined in section 10 @@ -346,6 +350,10 @@ NotDelivered Traffic that matches this policy is not delivered + + Delivered + Traffic that matches the policy is delivered + @@ -513,35 +521,35 @@ AwaitingApproval - The Task is still waiting approval from one or more relevant authorities + The Task is still awaiting approval from one or more relevant authorities. AwaitingDisclosure - The Task is approved, but is not yet processed by the LD system + The Task is approved by the relevant authorities, but is not yet approved and/or processed by the LD system. Disclosed - The Task has been processed and the product has been disclosed by the LD system + The Task has been processed and the product has been disclosed by the LD system. DisclosureNotAvailable - The Task has been processed and the CSP has determined there is no product available to disclosure + The Task has been processed and the CSP has determined there is no product available to disclose. Rejected - The Task has been explicitly denied or rejected by one or more relevant authorities. + The Task has been explicitly denied or rejected by one or more relevant authorities or by the CSP. Cancelled - The Task has been permanently cancelled + The Task has been permanently cancelled. Error - The Task has not been processed due to a problem with the underlying LD system + The Task has not been processed due to a problem with the underlying LD system. Invalid - The Task is not active due to a problem with the current information populated in the Task Object + The Task is not active due to a problem with the current information populated in the Task Object. @@ -552,23 +560,23 @@ AwaitingApproval - The Task is still waiting approval from one or more relevant authorities + The Task is still awaiting approval from one or more relevant authorities. AwaitingDisclosure - The Task is approved, but is not yet processed by the LD system + The Task is approved by the relevant authorities, but is not yet approved and/or processed by the LD system. Disclosed - The Task has been processed and the product has been disclosed by the LD system + The Task has been processed and the product has been disclosed by the LD system. Rejected - The Task has been explicitly denied or rejected by one or more relevant authorities. + The Task has been explicitly denied or rejected by one or more relevant authorities or by the CSP. Cancelled - The Task has been permanently cancelled + The Task has been permanently cancelled. @@ -645,6 +653,64 @@ + + + ETSI + LPTaskStatus + + + AwaitingPreservation + The Task is approved, but is not yet processed by the LD system. + + + Preserved + The Task has been processed and the data has been preserved by the LP system. + + + PreservationNotAvailable + The Task has been processed and the CSP has determined there is no data available to preserve. + + + Rejected + The Task has been explicitly denied or rejected by one or more relevant authorities or by the CSP. + + + Cancelled + The Task has been permanently cancelled. + + + Expired + The retention period of the preserved data has expired. + + + Error + The Task has not been processed due to a problem with the underlying LP system. + + + Invalid + The Task has not been processed due to a problem with the current information populated in the Task Object. + + + + + + ETSI + LPTaskDesiredStatus + + + AwaitingPreservation + The Task is approved by the relevant authorities, but the Task has not yet been approved and/or actioned by the CSP. + + + Preserved + The Task has been processed and the data has been preserved by the LP system. + + + Cancelled + The Task has been permanently cancelled. + + + ETSI @@ -652,11 +718,15 @@ TS102657-ASN.1 - Delievery according to ETSI TS 102 657 using ASN.1 encoding + Delivery according to ETSI TS 102 657 using ASN.1 encoding TS102657-XML - Delievery according to ETSI TS 102 657 using XML encoding + Delivery according to ETSI TS 102 657 using XML encoding + + + TS103707 + Delivery according to ETSI TS 103 707 diff --git a/103120/examples/json/request1.json b/103120/examples/json/request1.json new file mode 100644 index 0000000000000000000000000000000000000000..71e5fa3eeaa27eaa677c9190235b23ce02b9cd68 --- /dev/null +++ b/103120/examples/json/request1.json @@ -0,0 +1,96 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "c02358b2-76cf-4ba4-a8eb-f6436ccaea2e", + "Timestamp": "2015-09-01T12:00:00.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "RequestPayload": { + "ActionRequests": { + "ActionRequest": [ + { + "ActionIdentifier": 0, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject", + "ObjectIdentifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "auth:AuthorisationReference": "W000001", + "auth:AuthorisationTimespan": { + "auth:StartTime": "2015-09-01T12:00:00Z", + "auth:EndTime": "2015-12-01T12:00:00Z" + } + } + } + }, + { + "ActionIdentifier": 1, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Task}LITaskObject", + "ObjectIdentifier": "2b36a78b-b628-416d-bd22-404e68a0cd36", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "AssociatedObjects": { + "AssociatedObject": [ + "7dbbc880-8750-4d3c-abe7-ea4a17646045" + ] + }, + "task:Reference": "LIID1", + "task:TargetIdentifier": { + "task:TargetIdentifierValues": { + "task:TargetIdentifierValue": [ + { + "task:FormatType": { + "task:FormatOwner": "ETSI", + "task:FormatName": "InternationalE164" + }, + "task:Value": "442079460223" + } + ] + } + }, + "task:DeliveryType": { + "common:Owner": "ETSI", + "common:Name": "TaskDeliveryType", + "common:Value": "IRIandCC" + }, + "task:DeliveryDetails": { + "task:DeliveryDestination": [ + { + "task:DeliveryAddress": { + "task:IPv4Address": "192.0.2.0" + } + } + ] + }, + "task:CSPID": { + "CountryCode": "XX", + "UniqueIdentifier": "RECVER01" + } + } + } + } + ] + } + } + } +} diff --git a/103120/examples/json/request2.json b/103120/examples/json/request2.json new file mode 100644 index 0000000000000000000000000000000000000000..476c15fa437343844d94b174b63c896756724fe6 --- /dev/null +++ b/103120/examples/json/request2.json @@ -0,0 +1,44 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "45002c1e-dc4a-470a-9152-8e752638c86c", + "Timestamp": "2015-09-01T12:01:00.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "RequestPayload": { + "ActionRequests": { + "ActionRequest": [ + { + "ActionIdentifier": 0, + "GET": { + "Identifier": "2b36a78b-b628-416d-bd22-404e68a0cd36" + } + }, + { + "ActionIdentifier": 1, + "GET": { + "Identifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045" + } + } + ] + } + } + } +} diff --git a/103120/examples/json/request3.json b/103120/examples/json/request3.json new file mode 100644 index 0000000000000000000000000000000000000000..390879a43bad128f601f65c759bbeee5819d4b04 --- /dev/null +++ b/103120/examples/json/request3.json @@ -0,0 +1,87 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation", + "@xmlns:doc": "http://uri.etsi.org/03120/common/2020/09/Document", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "69353ac0-9582-4c71-b162-86259c99de20", + "Timestamp": "2015-09-01T12:02:00.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "RequestPayload": { + "ActionRequests": { + "ActionRequest": [ + { + "ActionIdentifier": 0, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Document}DocumentObject", + "ObjectIdentifier": "4193f541-5e19-468e-b4a3-1c636ce115e9", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "doc:DocumentReference": "W000001", + "doc:DocumentTimespan": { + "doc:StartTime": "2015-09-01T12:00:00Z", + "doc:EndTime": "2015-12-01T12:00:00Z" + }, + "doc:DocumentType": { + "common:Owner": "ETSI", + "common:Name": "DocumentType", + "common:Value": "Warrant" + }, + "doc:DocumentSignature": [ + { + "common:ApproverDetails": { + "common:ApproverName": "John Doe", + "common:ApproverContactDetails": [ + { + "common:ApproverEmailAddress": "john.doe@example.com", + "common:ApproverPhoneNumber": "442079460223" + }, + { + "common:ApproverAlternateName": "Jane Doe", + "common:ApproverEmailAddress": "jane.doe@example.com", + "common:ApproverPhoneNumber": "442079461110" + } + ] + }, + "common:ApprovalTimestamp": "2015-09-01T12:00:00Z" + } + ] + } + } + }, + { + "ActionIdentifier": 1, + "UPDATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject", + "ObjectIdentifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", + "AssociatedObjects": { + "AssociatedObject": [ + "4193f541-5e19-468e-b4a3-1c636ce115e9" + ] + } + } + } + } + ] + } + } + } +} diff --git a/103120/examples/json/request4-Preservation-Link.json b/103120/examples/json/request4-Preservation-Link.json new file mode 100644 index 0000000000000000000000000000000000000000..cfbef8382d130f72b3803b2e3fe07bbf79950458 --- /dev/null +++ b/103120/examples/json/request4-Preservation-Link.json @@ -0,0 +1,101 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "c02358b2-76cf-4ba4-a8eb-f6436ccaea2e", + "Timestamp": "2019-09-30T13:37:00.000000Z", + "Version": { + "ETSIVersion": "V1.14.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "RequestPayload": { + "ActionRequests": { + "ActionRequest": [ + { + "ActionIdentifier": 0, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject", + "ObjectIdentifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "auth:AuthorisationReference": "W000001", + "auth:AuthorisationTimespan": { + "auth:StartTime": "2019-09-30T12:00:00Z", + "auth:EndTime": "2019-12-01T12:00:00Z" + } + } + } + }, + { + "ActionIdentifier": 1, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Task}LDTaskObject", + "ObjectIdentifier": "2b36a78b-b628-416d-bd22-404e68a0cd36", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "AssociatedObjects": { + "AssociatedObject": [ + "7dbbc880-8750-4d3c-abe7-ea4a17646045" + ] + }, + "task:Reference": "XX-ACTOR01-1234", + "task:RequestDetails": { + "task:StartTime": "2019-09-30T12:00:00Z", + "task:EndTime": "2019-12-30T12:00:00Z", + "task:RequestValues": { + "task:RequestValue": [ + { + "task:FormatType": { + "task:FormatOwner": "ETSI", + "task:FormatName": "InternationalE164" + }, + "task:Value": "442079460223" + } + ] + } + }, + "task:DeliveryDetails": { + "task:LDDeliveryDestination": [ + { + "task:DeliveryAddress": { + "task:IPv4Address": "192.0.2.0" + } + } + ] + }, + "task:CSPID": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "task:AlternativePreservationReferences": { + "task:AlternativePreservationReference": [ + { + "task:ReferenceValue": "ExternalReferenceValue", + "task:NatureOfReference": "Preservation Request Type" + } + ] + } + } + } + } + ] + } + } + } +} diff --git a/103120/examples/json/request4.json b/103120/examples/json/request4.json new file mode 100644 index 0000000000000000000000000000000000000000..f813f4a063df443f1237f8c366890f329ac107e7 --- /dev/null +++ b/103120/examples/json/request4.json @@ -0,0 +1,93 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "c02358b2-76cf-4ba4-a8eb-f6436ccaea2e", + "Timestamp": "2019-09-30T13:37:00.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "RequestPayload": { + "ActionRequests": { + "ActionRequest": [ + { + "ActionIdentifier": 0, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject", + "ObjectIdentifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "auth:AuthorisationReference": "W000001", + "auth:AuthorisationTimespan": { + "auth:StartTime": "2019-09-30T12:00:00Z", + "auth:EndTime": "2019-12-01T12:00:00Z" + } + } + } + }, + { + "ActionIdentifier": 1, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Task}LDTaskObject", + "ObjectIdentifier": "2b36a78b-b628-416d-bd22-404e68a0cd36", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "AssociatedObjects": { + "AssociatedObject": [ + "7dbbc880-8750-4d3c-abe7-ea4a17646045" + ] + }, + "task:Reference": "XX-ACTOR01-1234", + "task:RequestDetails": { + "task:StartTime": "2019-09-30T12:00:00Z", + "task:EndTime": "2019-12-30T12:00:00Z", + "task:RequestValues": { + "task:RequestValue": [ + { + "task:FormatType": { + "task:FormatOwner": "ETSI", + "task:FormatName": "InternationalE164" + }, + "task:Value": "442079460223" + } + ] + } + }, + "task:DeliveryDetails": { + "task:LDDeliveryDestination": [ + { + "task:DeliveryAddress": { + "task:IPv4Address": "192.0.2.0" + } + } + ] + }, + "task:CSPID": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + } + } + } + } + ] + } + } + } +} diff --git a/103120/examples/json/request5-Binary-Delivery.json b/103120/examples/json/request5-Binary-Delivery.json new file mode 100644 index 0000000000000000000000000000000000000000..e10954d16c47079b577572b575382ae03a6e0abc --- /dev/null +++ b/103120/examples/json/request5-Binary-Delivery.json @@ -0,0 +1,67 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:delivery": "http://uri.etsi.org/03120/common/2019/10/Delivery", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR2" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR1" + }, + "TransactionIdentifier": "8854cfad-44ac-43b8-99ae-530b690b43da", + "Timestamp": "2019-09-30T13:37:37.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "RequestPayload": { + "ActionRequests": { + "ActionRequest": [ + { + "ActionIdentifier": 0, + "DELIVER": { + "Identifier": "71ff52ca-bcea-4fa3-b34e-1b89dcfb0d9e", + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2019/10/Delivery}DeliveryObject", + "ObjectIdentifier": "71ff52ca-bcea-4fa3-b34e-1b89dcfb0d9e", + "AssociatedObjects": { + "AssociatedObject": [ + "2b36a78b-b628-416d-bd22-404e68a0cd36" + ] + }, + "delivery:Reference": { + "delivery:LDID": "XX-ACTOR01-1234" + }, + "delivery:DeliveryID": "d1079830-8e9a-4731-8fb7-36b9b961eb72", + "delivery:SequenceNumber": 1, + "delivery:LastSequence": true, + "delivery:Manifest": { + "delivery:Specification": { + "common:Owner": "ETSI", + "common:Name": "ManifestSpecification", + "common:Value": "TS102657-XML" + } + }, + "delivery:Delivery": { + "delivery:BinaryData": { + "delivery:Data": "VGhpcyBpc24ndCBhY3R1YWxseSBhbiBpbWFnZS4=", + "delivery:ContentType": "image/jpeg", + "delivery:Checksum": "98ecb6a08c34a97f6edc0e97ddcd32cb139e2253825186a817ddb24997ccd68f" + } + } + } + } + } + ] + } + } + } +} diff --git a/103120/examples/json/request7-TrafficPolicyObject.json b/103120/examples/json/request7-TrafficPolicyObject.json new file mode 100644 index 0000000000000000000000000000000000000000..09afd84ece898fd6384683a3cbc949c38544677b --- /dev/null +++ b/103120/examples/json/request7-TrafficPolicyObject.json @@ -0,0 +1,93 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:policy": "http://uri.etsi.org/03120/common/2022/07/TrafficPolicy", + "@xmlns:etsi": "http://uri.etsi.org/03280/common/2017/07", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "c02358b2-76cf-4ba4-a8eb-f6436ccaa8eb", + "Timestamp": "2022-07-01T12:00:00.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "RequestPayload": { + "ActionRequests": { + "ActionRequest": [ + { + "ActionIdentifier": 0, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2022/07/TrafficPolicy}TrafficRuleObject", + "ObjectIdentifier": "f69eb93b-a85b-4ff7-abaa-6f3aead286d5", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "policy:Criteria": { + "policy:Criteria": { + "policy:IPPolicyCriteria": { + "policy:SourceIPRange": { + "etsi:IPv4CIDR": "203.0.113.0/24" + } + } + } + }, + "policy:Action": { + "common:Owner": "ETSI", + "common:Name": "PolicyAction", + "common:Value": "PDSR" + } + } + } + }, + { + "ActionIdentifier": 1, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2022/07/TrafficPolicy}TrafficPolicyObject", + "ObjectIdentifier": "55e25c0a-787b-4049-b7fb-518a13a9483b", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "policy:TrafficPolicyName": "Template Rule 1", + "policy:TrafficRules": { + "policy:TrafficRuleReference": { + "policy:Order": "1", + "policy:ObjectIdentifier": "f69eb93b-a85b-4ff7-abaa-6f3aead286d5" + } + } + } + } + }, + { + "ActionIdentifier": 1, + "UPDATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Task}LITaskObject", + "ObjectIdentifier": "2b36a78b-b628-416d-bd22-404e68a0cd36", + "task:ListOfTrafficPolicyReferences": { + "task:TrafficPolicyReference": [ + { + "task:Order": 1, + "task:ObjectIdentifier": "f69eb93b-a85b-4ff7-abaa-6f3aead286d5" + } + ] + } + } + } + } + ] + } + } + } +} diff --git a/103120/examples/json/request8_LPTaskObject.json b/103120/examples/json/request8_LPTaskObject.json new file mode 100644 index 0000000000000000000000000000000000000000..8e5ca5a9dcb43ff2f090db67bc2b20cb5ec3c5e5 --- /dev/null +++ b/103120/examples/json/request8_LPTaskObject.json @@ -0,0 +1,65 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:policy": "http://uri.etsi.org/03120/common/2022/07/TrafficPolicy", + "@xmlns:etsi": "http://uri.etsi.org/03280/common/2017/07", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "46f95c5b-57d6-47f8-959f-cd8807d08bf6", + "Timestamp": "2023-06-21T12:00:00.000000Z", + "Version": { + "ETSIVersion": "V1.14.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "RequestPayload": { + "ActionRequests": { + "ActionRequest": [ + { + "ActionIdentifier": 0, + "CREATE": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Task}LPTaskObject", + "ObjectIdentifier": "f1205c94-4f56-4d97-9717-39410073979b", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "task:DesiredStatus": { + "common:Owner": "ETSI", + "common:Name": "LPTaskDesiredStatus", + "common:Value": "Preserved" + }, + "task:RequestDetails": { + "task:StartTime": "2023-05-01T12:00:00Z", + "task:EndTime": "2023-05-02T12:00:00Z", + "task:RequestValues": { + "task:RequestValue": [ + { + "task:FormatType": { + "task:FormatOwner": "ETSI", + "task:FormatName": "InternationalE164" + }, + "task:Value": "442079460223" + } + ] + } + }, + "task:DesiredPreservationExpiration": "2023-06-30T12:00:00Z" + } + } + } + ] + } + } + } +} diff --git a/103120/examples/json/response1.json b/103120/examples/json/response1.json new file mode 100644 index 0000000000000000000000000000000000000000..3a97690bca956abf6497632268257c3255ac8032 --- /dev/null +++ b/103120/examples/json/response1.json @@ -0,0 +1,44 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "c02358b2-76cf-4ba4-a8eb-f6436ccaea2e", + "Timestamp": "2015-09-01T12:00:01.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "ResponsePayload": { + "ActionResponses": { + "ActionResponse": [ + { + "ActionIdentifier": 0, + "CREATEResponse": { + "Identifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045" + } + }, + { + "ActionIdentifier": 1, + "CREATEResponse": { + "Identifier": "2b36a78b-b628-416d-bd22-404e68a0cd36" + } + } + ] + } + } + } +} diff --git a/103120/examples/json/response2.json b/103120/examples/json/response2.json new file mode 100644 index 0000000000000000000000000000000000000000..829c8a7f1c93b836b655e60706a052513d319f04 --- /dev/null +++ b/103120/examples/json/response2.json @@ -0,0 +1,118 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "45002c1e-dc4a-470a-9152-8e752638c86c", + "Timestamp": "2015-09-01T12:01:00.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "ResponsePayload": { + "ActionResponses": { + "ActionResponse": [ + { + "ActionIdentifier": 0, + "GETResponse": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject", + "ObjectIdentifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "Generation": "1", + "LastChanged": "2015-09-01T12:00:00Z", + "auth:AuthorisationReference": "W000001", + "auth:AuthorisationStatus": { + "common:Owner": "ETSI", + "common:Name": "AuthorisationStatus", + "common:Value": "Invalid" + }, + "auth:AuthorisationTimespan": { + "auth:StartTime": "2015-09-01T12:00:00Z", + "auth:EndTime": "2015-12-01T12:00:00Z" + }, + "auth:AuthorisationInvalidReason": { + "ErrorCode": "3000", + "ErrorDescription": "The Authorisation is not associated with a valid Warrant Document Object" + } + } + } + }, + { + "ActionIdentifier": 0, + "GETResponse": { + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Task}LITaskObject", + "ObjectIdentifier": "2b36a78b-b628-416d-bd22-404e68a0cd36", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "Generation": "1", + "AssociatedObjects": { + "AssociatedObject": [ + "7dbbc880-8750-4d3c-abe7-ea4a17646045" + ] + }, + "LastChanged": "2015-09-01T12:00:00Z", + "task:Reference": "LIID1", + "task:Status": { + "common:Owner": "ETSI", + "common:Name": "TaskStatus", + "common:Value": "Invalid" + }, + "task:TargetIdentifier": { + "task:TargetIdentifierValues": { + "task:TargetIdentifierValue": [ + { + "task:FormatType": { + "task:FormatOwner": "ETSI", + "task:FormatName": "InternationalE164" + }, + "task:Value": "442079460223" + } + ] + } + }, + "task:DeliveryType": { + "common:Owner": "ETSI", + "common:Name": "TaskDeliveryType", + "common:Value": "IRIandCC" + }, + "task:DeliveryDetails": { + "task:DeliveryDestination": [ + { + "task:DeliveryAddress": { + "task:IPv4Address": "192.0.2.0" + } + } + ] + }, + "task:CSPID": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "task:InvalidReason": { + "ErrorCode": "3000", + "ErrorDescription": "The associated Authorisation is in an Invalid state" + } + } + } + } + ] + } + } + } +} diff --git a/103120/examples/json/response3.json b/103120/examples/json/response3.json new file mode 100644 index 0000000000000000000000000000000000000000..87bca95d06ebcc7bf42e585b21732cde66e5a14c --- /dev/null +++ b/103120/examples/json/response3.json @@ -0,0 +1,68 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation", + "@xmlns:doc": "http://uri.etsi.org/03120/common/2020/09/Document", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "69353ac0-9582-4c71-b162-86259c99de20", + "Timestamp": "2015-09-01T12:02:00.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "ResponsePayload": { + "ActionResponses": { + "ActionResponse": [ + { + "ActionIdentifier": 0, + "CREATEResponse": { + "Identifier": "4193f541-5e19-468e-b4a3-1c636ce115e9" + } + }, + { + "ActionIdentifier": 1, + "UPDATEResponse": { + "Identifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", + "HI1Object": { + "@xsi:type": "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject", + "ObjectIdentifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045", + "CountryCode": "XX", + "OwnerIdentifier": "ACTOR01", + "Generation": "2", + "AssociatedObjects": { + "AssociatedObject": [ + "4193f541-5e19-468e-b4a3-1c636ce115e9" + ] + }, + "LastChanged": "2015-09-01T12:02:00Z", + "auth:AuthorisationReference": "W000001", + "auth:AuthorisationStatus": { + "common:Owner": "ETSI", + "common:Name": "AuthorisationStatus", + "common:Value": "Active" + }, + "auth:AuthorisationTimespan": { + "auth:StartTime": "2015-09-01T12:00:00Z", + "auth:EndTime": "2015-12-01T12:00:00Z" + } + } + } + } + ] + } + } + } +} diff --git a/103120/examples/json/response4.json b/103120/examples/json/response4.json new file mode 100644 index 0000000000000000000000000000000000000000..e5d5545b40b5caddee2a444e87927ef38190a003 --- /dev/null +++ b/103120/examples/json/response4.json @@ -0,0 +1,44 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "c02358b2-76cf-4ba4-a8eb-f6436ccaea2e", + "Timestamp": "2019-09-30T13:37:01.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "ResponsePayload": { + "ActionResponses": { + "ActionResponse": [ + { + "ActionIdentifier": 0, + "CREATEResponse": { + "Identifier": "7dbbc880-8750-4d3c-abe7-ea4a17646045" + } + }, + { + "ActionIdentifier": 1, + "CREATEResponse": { + "Identifier": "2b36a78b-b628-416d-bd22-404e68a0cd36" + } + } + ] + } + } + } +} diff --git a/103120/examples/json/response5.json b/103120/examples/json/response5.json new file mode 100644 index 0000000000000000000000000000000000000000..8ad8d7cc9cc0737830000803d765381402ea4c58 --- /dev/null +++ b/103120/examples/json/response5.json @@ -0,0 +1,39 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xs": "xmlns:xs=http://www.w3.org/2001/XMLSchema", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:delivery": "http://uri.etsi.org/03120/common/2019/10/Delivery", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "TransactionIdentifier": "8854cfad-44ac-43b8-99ae-530b690b43da", + "Timestamp": "2019-09-30T13:37:37.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "ResponsePayload": { + "ActionResponses": { + "ActionResponse": [ + { + "ActionIdentifier": 0, + "DELIVERResponse": { + "Identifier": "71ff52ca-bcea-4fa3-b34e-1b89dcfb0d9e" + } + } + ] + } + } + } +} diff --git a/103120/examples/json/response6.json b/103120/examples/json/response6.json new file mode 100644 index 0000000000000000000000000000000000000000..103a6cff02b511a0bad4739f3064b1ea026a8188 --- /dev/null +++ b/103120/examples/json/response6.json @@ -0,0 +1,44 @@ +{ + "@xmlns": "http://uri.etsi.org/03120/common/2019/10/Core", + "@xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance", + "@xmlns:common": "http://uri.etsi.org/03120/common/2016/02/Common", + "@xmlns:task": "http://uri.etsi.org/03120/common/2020/09/Task", + "@xmlns:auth": "http://uri.etsi.org/03120/common/2020/09/Authorisation", + "Header": { + "SenderIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR01" + }, + "ReceiverIdentifier": { + "CountryCode": "XX", + "UniqueIdentifier": "ACTOR02" + }, + "TransactionIdentifier": "c02358b2-76cf-4ba4-a8eb-f6436ccaea2f", + "Timestamp": "2021-10-11T13:37:01.000000Z", + "Version": { + "ETSIVersion": "V1.13.1", + "NationalProfileOwner": "XX", + "NationalProfileVersion": "v1.0" + } + }, + "Payload": { + "ResponsePayload": { + "ActionResponses": { + "ActionResponse": [ + { + "ActionIdentifier": 0, + "CREATEResponse": { + "Identifier": "7dbbc880-8750-4d3c-abe7-ea4a1764604f" + } + }, + { + "ActionIdentifier": 1, + "CREATEResponse": { + "Identifier": "2b36a78b-b628-416d-bd22-404e68a0cd3f" + } + } + ] + } + } + } +} diff --git a/103120/examples/FooServiceSchema.xsd b/103120/examples/xml/FooServiceSchema.xsd similarity index 100% rename from 103120/examples/FooServiceSchema.xsd rename to 103120/examples/xml/FooServiceSchema.xsd diff --git a/103120/examples/example.key b/103120/examples/xml/example.key similarity index 100% rename from 103120/examples/example.key rename to 103120/examples/xml/example.key diff --git a/103120/examples/example.pem b/103120/examples/xml/example.pem similarity index 100% rename from 103120/examples/example.pem rename to 103120/examples/xml/example.pem diff --git a/103120/examples/mutliple-auth-example-request.xml b/103120/examples/xml/mutliple-auth-example-request.xml similarity index 100% rename from 103120/examples/mutliple-auth-example-request.xml rename to 103120/examples/xml/mutliple-auth-example-request.xml diff --git a/103120/examples/request1.xml b/103120/examples/xml/request1.xml similarity index 100% rename from 103120/examples/request1.xml rename to 103120/examples/xml/request1.xml diff --git a/103120/examples/request2.xml b/103120/examples/xml/request2.xml similarity index 100% rename from 103120/examples/request2.xml rename to 103120/examples/xml/request2.xml diff --git a/103120/examples/request3.xml b/103120/examples/xml/request3.xml similarity index 100% rename from 103120/examples/request3.xml rename to 103120/examples/xml/request3.xml diff --git a/103120/examples/xml/request4-Preservation-Link.xml b/103120/examples/xml/request4-Preservation-Link.xml new file mode 100644 index 0000000000000000000000000000000000000000..2cb2ffdfb4e4a3b4b94d8ccbf1304844314dd83d --- /dev/null +++ b/103120/examples/xml/request4-Preservation-Link.xml @@ -0,0 +1,85 @@ + + +
+ + XX + ACTOR01 + + + XX + ACTOR02 + + c02358b2-76cf-4ba4-a8eb-f6436ccaea2e + 2019-09-30T13:37:00.000000Z + + V1.14.1 + XX + v1.0 + +
+ + + + + 0 + + + 7dbbc880-8750-4d3c-abe7-ea4a17646045 + XX + ACTOR01 + W000001 + + 2019-09-30T12:00:00Z + 2019-12-01T12:00:00Z + + + + + + 1 + + + 2b36a78b-b628-416d-bd22-404e68a0cd36 + XX + ACTOR01 + + 7dbbc880-8750-4d3c-abe7-ea4a17646045 + + XX-ACTOR01-1234 + + 2019-09-30T12:00:00Z + 2019-12-30T12:00:00Z + + + + ETSI + InternationalE164 + + 442079460223 + + + + + + + 192.0.2.0 + + + + + XX + ACTOR02 + + + + ExternalReferenceValue + Preservation Request Type + + + + + + + + +
diff --git a/103120/examples/request4.xml b/103120/examples/xml/request4.xml similarity index 100% rename from 103120/examples/request4.xml rename to 103120/examples/xml/request4.xml diff --git a/103120/examples/request5-Binary-Delivery.xml b/103120/examples/xml/request5-Binary-Delivery.xml similarity index 100% rename from 103120/examples/request5-Binary-Delivery.xml rename to 103120/examples/xml/request5-Binary-Delivery.xml diff --git a/103120/examples/request5-XML-Delivery.xml b/103120/examples/xml/request5-XML-Delivery.xml similarity index 100% rename from 103120/examples/request5-XML-Delivery.xml rename to 103120/examples/xml/request5-XML-Delivery.xml diff --git a/103120/examples/request6.xml b/103120/examples/xml/request6.xml similarity index 100% rename from 103120/examples/request6.xml rename to 103120/examples/xml/request6.xml diff --git a/103120/examples/request6_signed.xml b/103120/examples/xml/request6_signed.xml similarity index 100% rename from 103120/examples/request6_signed.xml rename to 103120/examples/xml/request6_signed.xml diff --git a/103120/examples/request7_TrafficPolicyObject.xml b/103120/examples/xml/request7_TrafficPolicyObject.xml similarity index 100% rename from 103120/examples/request7_TrafficPolicyObject.xml rename to 103120/examples/xml/request7_TrafficPolicyObject.xml diff --git a/103120/examples/xml/request8_LPTaskObject.xml b/103120/examples/xml/request8_LPTaskObject.xml new file mode 100644 index 0000000000000000000000000000000000000000..4e02d12bd4ba39391990a0ed7d744a5b6c259f9e --- /dev/null +++ b/103120/examples/xml/request8_LPTaskObject.xml @@ -0,0 +1,55 @@ + + +
+ + XX + ACTOR01 + + + XX + ACTOR02 + + 46f95c5b-57d6-47f8-959f-cd8807d08bf6 + 2023-06-21T12:00:00.000000Z + + V1.14.1 + XX + v1.0 + +
+ + + + + 0 + + + f1205c94-4f56-4d97-9717-39410073979b + XX + ACTOR01 + + ETSI + LPTaskDesiredStatus + Preserved + + + 2023-05-01T12:00:00Z + 2023-05-02T12:00:00Z + + + + ETSI + InternationalE164 + + 442079460223 + + + + 2023-06-30T12:00:00Z + + + + + + +
diff --git a/103120/examples/response1.xml b/103120/examples/xml/response1.xml similarity index 100% rename from 103120/examples/response1.xml rename to 103120/examples/xml/response1.xml diff --git a/103120/examples/response2.xml b/103120/examples/xml/response2.xml similarity index 100% rename from 103120/examples/response2.xml rename to 103120/examples/xml/response2.xml diff --git a/103120/examples/response3.xml b/103120/examples/xml/response3.xml similarity index 100% rename from 103120/examples/response3.xml rename to 103120/examples/xml/response3.xml diff --git a/103120/examples/response4.xml b/103120/examples/xml/response4.xml similarity index 100% rename from 103120/examples/response4.xml rename to 103120/examples/xml/response4.xml diff --git a/103120/examples/response5.xml b/103120/examples/xml/response5.xml similarity index 100% rename from 103120/examples/response5.xml rename to 103120/examples/xml/response5.xml diff --git a/103120/examples/response6.xml b/103120/examples/xml/response6.xml similarity index 100% rename from 103120/examples/response6.xml rename to 103120/examples/xml/response6.xml diff --git a/103120/schema/json/TS_103_280.schema.json b/103120/schema/json/TS_103_280.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..02cd078e139e4896bad9cd8efcb2cfc7ae1a070a --- /dev/null +++ b/103120/schema/json/TS_103_280.schema.json @@ -0,0 +1,389 @@ +{ + "$id": "ts_103280_2017_07", + "$defs": { + "ShortString": { + "type": "string", + "maxLength": 255 + }, + "LongString": { + "type": "string", + "maxLength": 65535 + }, + "LIID": { + "type": "string", + "pattern": "^([!-~]{1,25})|([0-9a-f]{26,50})$" + }, + "UTCDateTime": { + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$" + }, + "UTCMicrosecondDateTime": { + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{6}Z$" + }, + "QualifiedDateTime": { + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(Z|[+-][0-9]{2}:[0-9]{2})$" + }, + "QualifiedMicrosecondDateTime": { + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{6}(Z|[+-][0-9]{2}:[0-9]{2})$" + }, + "InternationalE164": { + "type": "string", + "pattern": "^[0-9]{1,15}$" + }, + "IMSI": { + "type": "string", + "pattern": "^[0-9]{6,15}$" + }, + "IMEI": { + "type": "string", + "pattern": "^[0-9]{14}$" + }, + "IMEICheckDigit": { + "type": "string", + "pattern": "^[0-9]{15}$" + }, + "IMEISV": { + "type": "string", + "pattern": "^[0-9]{16}$" + }, + "IPv4Address": { + "type": "string", + "pattern": "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$" + }, + "IPv4CIDR": { + "type": "string", + "pattern": "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])/([1-2]?[0-9]|3[0-2])$" + }, + "IPv6Address": { + "type": "string", + "pattern": "^([0-9a-f]{4}:){7}([0-9a-f]{4})$" + }, + "IPv6CIDR": { + "type": "string", + "pattern": "^([0-9a-f]{4}:){7}([0-9a-f]{4})/(([1-9][0-9]?)|(1[0-1][0-9])|(12[0-8]))$" + }, + "TCPPort": { + "type": "integer", + "exclusiveMinimum": 1, + "maximum": 65535 + }, + "UDPPort": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "MACAddress": { + "type": "string", + "pattern": "^([a-f0-9]{2}:){5}[a-f0-9]{2}$" + }, + "EmailAddress": { + "allOf": [ + { + "$ref": "#/$defs/ShortString" + }, + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\.!#$%&'\\*\\+\\\\/=\\?\\^_`\\{\\|\\}~\\-]+@[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$" + } + ] + }, + "UUID": { + "type": "string", + "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$" + }, + "ISOCountryCode": { + "type": "string", + "pattern": "^[A-Z]{2}$" + }, + "SIPURI": { + "type": "string", + "pattern": "^sips?:[a-zA-Z0-9!#$&-;=?-\\[\\]_~%]+$" + }, + "TELURI": { + "type": "string", + "pattern": "^tel:[a-zA-Z0-9!#$&-;=?-\\[\\]_~%]+$" + }, + "WGS84LatitudeDecimal": { + "type": "string", + "pattern": "^[NS][0-9]{2}\\.[0-9]{6}$" + }, + "WGS84LongitudeDecimal": { + "type": "string", + "pattern": "^[EW][0-9]{3}\\.[0-9]{6}$" + }, + "WGS84LatitudeAngular": { + "type": "string", + "pattern": "^[NS][0-9]{6}\\.[0-9]{2}$" + }, + "WGS84LongitudeAngular": { + "type": "string", + "pattern": "^[EW][0-9]{7}\\.[0-9]{2}$" + }, + "SUPIIMSI": { + "$ref": "#/$defs/IMSI" + }, + "SUPINAI": { + "$ref": "#/$defs/NAI" + }, + "SUCI": { + "type": "string", + "pattern": "^([a-fA-F0-9]{2})*$" + }, + "PEIIMEI": { + "$ref": "#/$defs/IMEI" + }, + "PEIIMEICheckDigit": { + "$ref": "#/$defs/IMEICheckDigit" + }, + "PEIIMEISV": { + "$ref": "#/$defs/IMEISV" + }, + "GPSIMSISDN": { + "type": "string", + "pattern": "^[0-9]{1,15}$" + }, + "GPSINAI": { + "$ref": "#/$defs/NAI" + }, + "NAI": { + "type": "string" + }, + "LDID": { + "type": "string", + "pattern": "^([A-Z]{2}-.+-.+)$" + }, + "InternationalizedEmailAddress": { + "allOf": [ + { + "$ref": "#/$defs/ShortString" + }, + { + "type": "string", + "pattern": "^.+@.+$" + } + ] + }, + "EUI64": { + "type": "string", + "pattern": "^([a-f0-9]{2}:){7}[a-f0-9]{2}$" + }, + "CGI": { + "type": "string", + "pattern": "^[0-9]{3}-[0-9]{2,3}-[a-f0-9]{4}-[a-f0-9]{4}$" + }, + "ECGI": { + "type": "string", + "pattern": "^[0-9]{3}-[0-9]{2,3}-[a-f0-9]{7}$" + }, + "NCGI": { + "type": "string", + "pattern": "^[0-9]{3}-[0-9]{2,3}-[a-f0-9]{9}$" + }, + "ICCID": { + "type": "string", + "pattern": "^[0-9]{19,20}$" + }, + "IPProtocol": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "IPAddress": { + "oneOf": [ + { + "type": "object", + "properties": { + "etsi280:IPv4Address": { + "$ref": "#/$defs/IPv4Address" + } + }, + "required": [ + "etsi280:IPv4Address" + ] + }, + { + "type": "object", + "properties": { + "etsi280:IPv6Address": { + "$ref": "#/$defs/IPv6Address" + } + }, + "required": [ + "etsi280:IPv6Address" + ] + } + ] + }, + "IPCIDR": { + "oneOf": [ + { + "type": "object", + "properties": { + "etsi280:IPv4CIDR": { + "$ref": "#/$defs/IPv4CIDR" + } + }, + "required": [ + "etsi280:IPv4CIDR" + ] + }, + { + "type": "object", + "properties": { + "etsi280:IPv6CIDR": { + "$ref": "#/$defs/IPv6CIDR" + } + }, + "required": [ + "etsi280:IPv6CIDR" + ] + } + ] + }, + "TCPPortRange": { + "type": "object", + "properties": { + "etsi280:start": { + "$ref": "#/$defs/TCPPort" + }, + "etsi280:end": { + "$ref": "#/$defs/TCPPort" + } + }, + "required": [ + "etsi280:start", + "etsi280:end" + ] + }, + "UDPPortRange": { + "type": "object", + "properties": { + "etsi280:start": { + "$ref": "#/$defs/UDPPort" + }, + "etsi280:end": { + "$ref": "#/$defs/UDPPort" + } + }, + "required": [ + "etsi280:start", + "etsi280:end" + ] + }, + "Port": { + "oneOf": [ + { + "type": "object", + "properties": { + "etsi280:TCPPort": { + "$ref": "#/$defs/TCPPort" + } + }, + "required": [ + "etsi280:TCPPort" + ] + }, + { + "type": "object", + "properties": { + "etsi280:UDPPort": { + "$ref": "#/$defs/UDPPort" + } + }, + "required": [ + "etsi280:UDPPort" + ] + } + ] + }, + "PortRange": { + "oneOf": [ + { + "type": "object", + "properties": { + "etsi280:TCPPortRange": { + "$ref": "#/$defs/TCPPortRange" + } + }, + "required": [ + "etsi280:TCPPortRange" + ] + }, + { + "type": "object", + "properties": { + "etsi280:UDPPortRange": { + "$ref": "#/$defs/UDPPortRange" + } + }, + "required": [ + "etsi280:UDPPortRange" + ] + } + ] + }, + "IPAddressPort": { + "type": "object", + "properties": { + "etsi280:address": { + "$ref": "#/$defs/IPAddress" + }, + "etsi280:port": { + "$ref": "#/$defs/Port" + } + }, + "required": [ + "etsi280:address", + "etsi280:port" + ] + }, + "IPAddressPortRange": { + "type": "object", + "properties": { + "etsi280:address": { + "$ref": "#/$defs/IPAddress" + }, + "etsi280:portRange": { + "$ref": "#/$defs/PortRange" + } + }, + "required": [ + "etsi280:address", + "etsi280:portRange" + ] + }, + "WGS84CoordinateDecimal": { + "type": "object", + "properties": { + "etsi280:latitude": { + "$ref": "#/$defs/WGS84LatitudeDecimal" + }, + "etsi280:longitude": { + "$ref": "#/$defs/WGS84LongitudeDecimal" + } + }, + "required": [ + "etsi280:latitude", + "etsi280:longitude" + ] + }, + "WGS84CoordinateAngular": { + "type": "object", + "properties": { + "etsi280:latitude": { + "$ref": "#/$defs/WGS84LatitudeAngular" + }, + "etsi280:longitude": { + "$ref": "#/$defs/WGS84LongitudeAngular" + } + }, + "required": [ + "etsi280:latitude", + "etsi280:longitude" + ] + } + } +} \ No newline at end of file diff --git a/103120/schema/json/ts_103120_Authorisation.schema.json b/103120/schema/json/ts_103120_Authorisation.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..1c9a68ff3b802d056ed59f805808d31b2fed2c8e --- /dev/null +++ b/103120/schema/json/ts_103120_Authorisation.schema.json @@ -0,0 +1,148 @@ +{ + "$id": "ts_103120_Authorisation_2020_09", + "$defs": { + "AuthorisationObject": { + "type": "object", + "properties": { + "@xsi:type": { + "type": "string", + "enum": "{http://uri.etsi.org/03120/common/2020/09/Authorisation}AuthorisationObject" + }, + "ObjectIdentifier": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + }, + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "OwnerIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "Generation": { + "type": "integer", + "minimum": 0 + }, + "ExternalIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "AssociatedObjects": { + "$ref": "ts_103120_Core_2019_10#/$defs/AssociatedObjects" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "NationalHandlingParameters": { + "$ref": "ts_103120_Core_2019_10#/$defs/NationalHandlingParameters" + }, + "auth:AuthorisationReference": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "auth:AuthorisationLegalType": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "auth:AuthorisationPriority": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "auth:AuthorisationStatus": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "auth:AuthorisationDesiredStatus": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "auth:AuthorisationTimespan": { + "$ref": "#/$defs/AuthorisationTimespan" + }, + "auth:AuthorisationCSPID": { + "$ref": "#/$defs/AuthorisationCSPID" + }, + "auth:AuthorisationCreationTimestamp": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "auth:AuthorisationServedTimestamp": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "auth:AuthorisationTerminationTimestamp": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "auth:AuthorisationApprovalDetails": { + "type": "array", + "items": { + "$ref": "ts_103120_Common_2016_02#/$defs/ApprovalDetails" + } + }, + "auth:AuthorisationInvalidReason": { + "$ref": "ts_103120_Core_2019_10#/$defs/ActionUnsuccesfulInformation" + }, + "auth:AuthorisationFlags": { + "$ref": "#/$defs/AuthorisationFlags" + }, + "auth:AuthorisationManualInformation": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "auth:NationalAuthorisationParameters": { + "$ref": "#/$defs/NationalAuthorisationParameters" + }, + "auth:AuthorisationJurisdiction": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "auth:AuthorisationTypeOfCase": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "auth:AuthorisationLegalEntity": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + } + }, + "required": [ + "@xsi:type", + "ObjectIdentifier" + ] + }, + "AuthorisationFlags": { + "type": "object", + "properties": { + "auth:AuthorisationFlag": { + "type": "array", + "items": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + } + } + }, + "required": [] + }, + "AuthorisationTimespan": { + "type": "object", + "properties": { + "auth:StartTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "auth:EndTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + } + }, + "required": [] + }, + "AuthorisationCSPID": { + "type": "object", + "properties": { + "auth:CSPID": { + "type": "array", + "items": { + "$ref": "ts_103120_Core_2019_10#/$defs/EndpointID" + }, + "minItems": 1 + } + }, + "required": [] + }, + "NationalAuthorisationParameters": { + "type": "object", + "properties": { + "auth:CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + } + }, + "required": [ + "auth:CountryCode" + ] + } + } +} \ No newline at end of file diff --git a/103120/schema/json/ts_103120_Common.schema.json b/103120/schema/json/ts_103120_Common.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..d11b4b4c22cbcf9a3c76619adf6a66da64e1ba8b --- /dev/null +++ b/103120/schema/json/ts_103120_Common.schema.json @@ -0,0 +1,164 @@ +{ + "$id": "ts_103120_Common_2016_02", + "$defs": { + "ETSIVersion": { + "allOf": [ + { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + { + "type": "string", + "pattern": "^V\\d+\\.\\d+\\.\\d+$" + } + ] + }, + "DictionaryEntry": { + "type": "object", + "properties": { + "common:Owner": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "common:Name": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "common:Value": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + } + }, + "required": [ + "common:Owner", + "common:Name", + "common:Value" + ] + }, + "ApprovalDetails": { + "type": "object", + "properties": { + "common:ApprovalType": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "common:ApprovalDescription": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "common:ApprovalReference": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "common:ApproverDetails": { + "$ref": "#/$defs/ApproverDetails" + }, + "common:ApprovalTimestamp": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "common:ApprovalIsEmergency": { + "type": "boolean" + }, + "common:ApprovalDigitalSignature": { + "$ref": "#/$defs/ApprovalDigitalSignature" + }, + "common:ApprovalNationalDetails": { + "$ref": "#/$defs/ApprovalNationalDetails" + } + }, + "required": [] + }, + "ApproverDetails": { + "type": "object", + "properties": { + "common:ApproverName": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "common:ApproverRole": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "common:ApproverIdentity": { + "$ref": "#/$defs/ApproverIdentity" + }, + "common:ApproverContactDetails": { + "type": "array", + "items": { + "$ref": "#/$defs/ApproverContactDetails" + } + } + }, + "required": [] + }, + "ApproverIdentity": { + "oneOf": [ + { + "type": "object", + "properties": { + "common:NationalApproverIdentity": { + "$ref": "#/$defs/NationalApproverIdentity" + } + }, + "required": [ + "common:NationalApproverIdentity" + ] + } + ] + }, + "ApproverContactDetails": { + "type": "object", + "properties": { + "common:ApproverAlternateName": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "common:ApproverEmailAddress": { + "$ref": "ts_103280_2017_07#/$defs/InternationalizedEmailAddress" + }, + "common:ApproverPhoneNumber": { + "$ref": "ts_103280_2017_07#/$defs/InternationalE164" + } + }, + "required": [] + }, + "NationalApproverIdentity": { + "type": "object", + "properties": { + "common:CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + } + }, + "required": [ + "common:CountryCode" + ] + }, + "ApprovalDigitalSignature": { + "oneOf": [ + { + "type": "object", + "properties": { + "common:NationalDigitalSignature": { + "$ref": "#/$defs/NationalDigitalSignature" + } + }, + "required": [ + "common:NationalDigitalSignature" + ] + } + ] + }, + "ApprovalNationalDetails": { + "type": "object", + "properties": { + "common:CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + } + }, + "required": [ + "common:CountryCode" + ] + }, + "NationalDigitalSignature": { + "type": "object", + "properties": { + "common:CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + } + }, + "required": [ + "common:CountryCode" + ] + } + } +} \ No newline at end of file diff --git a/103120/schema/json/ts_103120_Core.schema.json b/103120/schema/json/ts_103120_Core.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..8225cf3e1ca13734e06b6e19ad6f21116b30e757 --- /dev/null +++ b/103120/schema/json/ts_103120_Core.schema.json @@ -0,0 +1,596 @@ +{ + "$id": "ts_103120_Core_2019_10", + "$defs": { + "ObjectIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/UUID" + }, + "HI1Message": { + "type": "object", + "properties": { + "Header": { + "$ref": "#/$defs/MessageHeader" + }, + "Payload": { + "$ref": "#/$defs/MessagePayload" + }, + "Signature": {}, + "xmldsig:Signature": { + "$ref": "www.w3.org_2000_09_xmldsig##/$defs/SignatureType" + } + }, + "required": [ + "Header", + "Payload" + ] + }, + "MessageHeader": { + "type": "object", + "properties": { + "SenderIdentifier": { + "$ref": "#/$defs/EndpointID" + }, + "ReceiverIdentifier": { + "$ref": "#/$defs/EndpointID" + }, + "TransactionIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/UUID" + }, + "Timestamp": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedMicrosecondDateTime" + }, + "Version": { + "$ref": "#/$defs/Version" + } + }, + "required": [ + "SenderIdentifier", + "ReceiverIdentifier", + "TransactionIdentifier", + "Timestamp", + "Version" + ] + }, + "Version": { + "type": "object", + "properties": { + "ETSIVersion": { + "$ref": "ts_103120_Common_2016_02#/$defs/ETSIVersion" + }, + "NationalProfileOwner": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "NationalProfileVersion": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + } + }, + "required": [ + "ETSIVersion", + "NationalProfileOwner", + "NationalProfileVersion" + ] + }, + "EndpointID": { + "type": "object", + "properties": { + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "UniqueIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + } + }, + "required": [ + "CountryCode", + "UniqueIdentifier" + ] + }, + "MessagePayload": { + "oneOf": [ + { + "type": "object", + "properties": { + "RequestPayload": { + "$ref": "#/$defs/RequestPayload" + } + }, + "required": [ + "RequestPayload" + ] + }, + { + "type": "object", + "properties": { + "ResponsePayload": { + "$ref": "#/$defs/ResponsePayload" + } + }, + "required": [ + "ResponsePayload" + ] + } + ] + }, + "RequestPayload": { + "type": "object", + "properties": { + "ActionRequests": { + "$ref": "#/$defs/ActionRequests" + } + }, + "required": [ + "ActionRequests" + ] + }, + "ActionRequests": { + "type": "object", + "properties": { + "ActionRequest": { + "type": "array", + "items": { + "$ref": "#/$defs/ActionRequest" + }, + "minItems": 1 + } + }, + "required": [] + }, + "ResponsePayload": { + "oneOf": [ + { + "type": "object", + "properties": { + "ActionResponses": { + "$ref": "#/$defs/ActionResponses" + } + }, + "required": [ + "ActionResponses" + ] + }, + { + "type": "object", + "properties": { + "ErrorInformation": { + "$ref": "#/$defs/ActionUnsuccesfulInformation" + } + }, + "required": [ + "ErrorInformation" + ] + } + ] + }, + "ActionResponses": { + "type": "object", + "properties": { + "ActionResponse": { + "type": "array", + "items": { + "$ref": "#/$defs/ActionResponse" + }, + "minItems": 1 + } + }, + "required": [] + }, + "ActionRequest": { + "allOf": [ + { + "type": "object", + "properties": { + "ActionIdentifier": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "ActionIdentifier" + ] + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "GET": { + "$ref": "#/$defs/GETRequest" + } + }, + "required": [ + "GET" + ] + }, + { + "type": "object", + "properties": { + "CREATE": { + "$ref": "#/$defs/CREATERequest" + } + }, + "required": [ + "CREATE" + ] + }, + { + "type": "object", + "properties": { + "UPDATE": { + "$ref": "#/$defs/UPDATERequest" + } + }, + "required": [ + "UPDATE" + ] + }, + { + "type": "object", + "properties": { + "LIST": { + "$ref": "#/$defs/LISTRequest" + } + }, + "required": [ + "LIST" + ] + }, + { + "type": "object", + "properties": { + "DELIVER": { + "$ref": "#/$defs/DELIVERRequest" + } + }, + "required": [ + "DELIVER" + ] + } + ] + } + ] + }, + "ActionResponse": { + "allOf": [ + { + "type": "object", + "properties": { + "ActionIdentifier": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "ActionIdentifier" + ] + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "GETResponse": { + "$ref": "#/$defs/GETResponse" + } + }, + "required": [ + "GETResponse" + ] + }, + { + "type": "object", + "properties": { + "CREATEResponse": { + "$ref": "#/$defs/CREATEResponse" + } + }, + "required": [ + "CREATEResponse" + ] + }, + { + "type": "object", + "properties": { + "UPDATEResponse": { + "$ref": "#/$defs/UPDATEResponse" + } + }, + "required": [ + "UPDATEResponse" + ] + }, + { + "type": "object", + "properties": { + "LISTResponse": { + "$ref": "#/$defs/LISTResponse" + } + }, + "required": [ + "LISTResponse" + ] + }, + { + "type": "object", + "properties": { + "ErrorInformation": { + "$ref": "#/$defs/ActionUnsuccesfulInformation" + } + }, + "required": [ + "ErrorInformation" + ] + }, + { + "type": "object", + "properties": { + "DELIVERResponse": { + "$ref": "#/$defs/DELIVERResponse" + } + }, + "required": [ + "DELIVERResponse" + ] + } + ] + } + ] + }, + "GETRequest": { + "type": "object", + "properties": { + "Identifier": { + "$ref": "#/$defs/ObjectIdentifier" + } + }, + "required": [ + "Identifier" + ] + }, + "GETResponse": { + "type": "object", + "properties": { + "HI1Object": { + "$ref": "#/$defs/ConcreteHI1Object" + } + }, + "required": [ + "HI1Object" + ] + }, + "CREATERequest": { + "type": "object", + "properties": { + "HI1Object": { + "$ref": "#/$defs/ConcreteHI1Object" + } + }, + "required": [ + "HI1Object" + ] + }, + "CREATEResponse": { + "type": "object", + "properties": { + "Identifier": { + "$ref": "#/$defs/ObjectIdentifier" + }, + "HI1Object": { + "$ref": "#/$defs/ConcreteHI1Object" + } + }, + "required": [ + "Identifier" + ] + }, + "UPDATERequest": { + "type": "object", + "properties": { + "HI1Object": { + "$ref": "#/$defs/ConcreteHI1Object" + } + }, + "required": [ + "HI1Object" + ] + }, + "UPDATEResponse": { + "type": "object", + "properties": { + "Identifier": { + "$ref": "#/$defs/ObjectIdentifier" + }, + "HI1Object": { + "$ref": "#/$defs/ConcreteHI1Object" + } + }, + "required": [ + "Identifier" + ] + }, + "LISTRequest": { + "type": "object", + "properties": { + "ObjectType": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + } + }, + "required": [] + }, + "LISTResponse": { + "type": "object", + "properties": { + "ListResponseRecord": { + "type": "array", + "items": { + "$ref": "#/$defs/ListResponseRecord" + } + } + }, + "required": [] + }, + "ListResponseRecord": { + "type": "object", + "properties": { + "ObjectType": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "Identifier": { + "$ref": "#/$defs/ObjectIdentifier" + }, + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "OwnerIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "Generation": { + "type": "integer", + "minimum": 0 + }, + "ExternalIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + } + }, + "required": [ + "ObjectType", + "Identifier", + "Generation" + ] + }, + "ActionUnsuccesfulInformation": { + "type": "object", + "properties": { + "ErrorCode": { + "type": "integer", + "minimum": 0 + }, + "ErrorDescription": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + } + }, + "required": [ + "ErrorCode", + "ErrorDescription" + ] + }, + "DELIVERRequest": { + "type": "object", + "properties": { + "Identifier": { + "$ref": "#/$defs/ObjectIdentifier" + }, + "HI1Object": { + "$ref": "#/$defs/ConcreteHI1Object" + } + }, + "required": [ + "Identifier", + "HI1Object" + ] + }, + "DELIVERResponse": { + "type": "object", + "properties": { + "Identifier": { + "$ref": "#/$defs/ObjectIdentifier" + } + }, + "required": [ + "Identifier" + ] + }, + "HI1Object": { + "type": "object", + "properties": { + "ObjectIdentifier": { + "$ref": "#/$defs/ObjectIdentifier" + }, + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "OwnerIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "Generation": { + "type": "integer", + "minimum": 0 + }, + "ExternalIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "AssociatedObjects": { + "$ref": "#/$defs/AssociatedObjects" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "NationalHandlingParameters": { + "$ref": "#/$defs/NationalHandlingParameters" + } + }, + "required": [ + "ObjectIdentifier" + ] + }, + "AssociatedObjects": { + "type": "object", + "properties": { + "AssociatedObject": { + "type": "array", + "items": { + "$ref": "#/$defs/ObjectIdentifier" + } + } + }, + "required": [] + }, + "NationalHandlingParameters": { + "type": "object", + "properties": { + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + } + }, + "required": [ + "CountryCode" + ] + }, + "ConcreteHI1Object": { + "oneOf": [ + { + "$ref": "ts_103120_Authorisation_2020_09#/$defs/AuthorisationObject" + }, + { + "$ref": "ts_103120_Task_2020_09#/$defs/LITaskObject" + }, + { + "$ref": "ts_103120_Task_2020_09#/$defs/LPTaskObject" + }, + { + "$ref": "ts_103120_Task_2020_09#/$defs/LDTaskObject" + }, + { + "$ref": "ts_103120_Document_2020_09#/$defs/DocumentObject" + }, + { + "$ref": "ts_103120_Notification_2016_02#/$defs/NotificationObject" + }, + { + "$ref": "ts_103120_Delivery_2019_10#/$defs/DeliveryObject" + }, + { + "$ref": "ts_103120_TrafficPolicy_2022_07#/$defs/TrafficPolicyObject" + }, + { + "$ref": "ts_103120_TrafficPolicy_2022_07#/$defs/TrafficRuleObject" + } + ] + } + }, + "$ref": "#/$defs/HI1Message" +} \ No newline at end of file diff --git a/103120/schema/json/ts_103120_Delivery.schema.json b/103120/schema/json/ts_103120_Delivery.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..093d1276aa3ad3480d106df81f4f60f764ae294b --- /dev/null +++ b/103120/schema/json/ts_103120_Delivery.schema.json @@ -0,0 +1,209 @@ +{ + "$id": "ts_103120_Delivery_2019_10", + "$defs": { + "DeliveryObject": { + "type": "object", + "properties": { + "@xsi:type": { + "type": "string", + "enum": "{http://uri.etsi.org/03120/common/2019/10/Delivery}DeliveryObject" + }, + "ObjectIdentifier": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + }, + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "OwnerIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "Generation": { + "type": "integer", + "minimum": 0 + }, + "ExternalIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "AssociatedObjects": { + "$ref": "ts_103120_Core_2019_10#/$defs/AssociatedObjects" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "NationalHandlingParameters": { + "$ref": "ts_103120_Core_2019_10#/$defs/NationalHandlingParameters" + }, + "delivery:Reference": { + "$ref": "#/$defs/Reference" + }, + "delivery:DeliveryID": { + "$ref": "ts_103280_2017_07#/$defs/UUID" + }, + "delivery:SequenceNumber": { + "type": "integer", + "minimum": 0 + }, + "delivery:LastSequence": { + "type": "boolean" + }, + "delivery:Manifest": { + "$ref": "#/$defs/Manifest" + }, + "delivery:Delivery": { + "$ref": "#/$defs/Delivery" + } + }, + "required": [ + "@xsi:type", + "ObjectIdentifier" + ] + }, + "Reference": { + "oneOf": [ + { + "type": "object", + "properties": { + "delivery:LDID": { + "$ref": "ts_103280_2017_07#/$defs/LDID" + } + }, + "required": [ + "delivery:LDID" + ] + }, + { + "type": "object", + "properties": { + "delivery:LIID": { + "$ref": "ts_103280_2017_07#/$defs/LIID" + } + }, + "required": [ + "delivery:LIID" + ] + } + ] + }, + "Manifest": { + "oneOf": [ + { + "type": "object", + "properties": { + "delivery:Specification": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + } + }, + "required": [ + "delivery:Specification" + ] + }, + { + "type": "object", + "properties": { + "delivery:ExternalSchema": { + "$ref": "#/$defs/ExternalSchema" + } + }, + "required": [ + "delivery:ExternalSchema" + ] + } + ] + }, + "ExternalSchema": { + "type": "object", + "properties": { + "delivery:ManifestID": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "delivery:ManifestContents": { + "$ref": "#/$defs/ManifestContents" + } + }, + "required": [] + }, + "ManifestContents": { + "oneOf": [ + { + "type": "object", + "properties": { + "delivery:BinaryData": { + "$ref": "#/$defs/EmbeddedBinaryData" + } + }, + "required": [ + "delivery:BinaryData" + ] + }, + { + "type": "object", + "properties": { + "delivery:XMLSchema": { + "$ref": "#/$defs/SchemaContent" + } + }, + "required": [ + "delivery:XMLSchema" + ] + } + ] + }, + "SchemaContent": { + "type": "object", + "properties": { + "delivery:schema": {} + }, + "required": [ + "delivery:schema" + ] + }, + "Delivery": { + "oneOf": [ + { + "type": "object", + "properties": { + "delivery:BinaryData": { + "$ref": "#/$defs/EmbeddedBinaryData" + } + }, + "required": [ + "delivery:BinaryData" + ] + }, + { + "type": "object", + "properties": { + "delivery:XMLData": { + "$ref": "#/$defs/EmbeddedXMLData" + } + }, + "required": [ + "delivery:XMLData" + ] + } + ] + }, + "EmbeddedBinaryData": { + "type": "object", + "properties": { + "delivery:Data": { + "type": "string", + "pattern": "^[A-Za-z0-9+\\/]*={0,3}$" + }, + "delivery:ContentType": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "delivery:Checksum": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "delivery:ChecksumType": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + } + }, + "required": [ + "delivery:Data" + ] + }, + "EmbeddedXMLData": {} + } +} \ No newline at end of file diff --git a/103120/schema/json/ts_103120_Document.schema.json b/103120/schema/json/ts_103120_Document.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..d844092e5afe97138055851e90ffb9c7b0e9dd61 --- /dev/null +++ b/103120/schema/json/ts_103120_Document.schema.json @@ -0,0 +1,148 @@ +{ + "$id": "ts_103120_Document_2020_09", + "$defs": { + "DocumentObject": { + "type": "object", + "properties": { + "@xsi:type": { + "type": "string", + "enum": "{http://uri.etsi.org/03120/common/2020/09/Document}DocumentObject" + }, + "ObjectIdentifier": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + }, + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "OwnerIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "Generation": { + "type": "integer", + "minimum": 0 + }, + "ExternalIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "AssociatedObjects": { + "$ref": "ts_103120_Core_2019_10#/$defs/AssociatedObjects" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "NationalHandlingParameters": { + "$ref": "ts_103120_Core_2019_10#/$defs/NationalHandlingParameters" + }, + "doc:DocumentReference": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "doc:DocumentName": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "doc:DocumentStatus": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "doc:DocumentDesiredStatus": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "doc:DocumentTimespan": { + "$ref": "#/$defs/DocumentTimespan" + }, + "doc:DocumentType": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "doc:DocumentProperties": { + "$ref": "#/$defs/DocumentProperties" + }, + "doc:DocumentBody": { + "$ref": "#/$defs/DocumentBody" + }, + "doc:DocumentSignature": { + "type": "array", + "items": { + "$ref": "ts_103120_Common_2016_02#/$defs/ApprovalDetails" + } + }, + "doc:DocumentInvalidReason": { + "$ref": "ts_103120_Core_2019_10#/$defs/ActionUnsuccesfulInformation" + }, + "doc:NationalDocumentParameters": { + "$ref": "#/$defs/NationalDocumentParameters" + } + }, + "required": [ + "@xsi:type", + "ObjectIdentifier" + ] + }, + "DocumentTimespan": { + "type": "object", + "properties": { + "doc:StartTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "doc:EndTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + } + }, + "required": [] + }, + "DocumentProperties": { + "type": "object", + "properties": { + "doc:DocumentProperty": { + "type": "array", + "items": { + "$ref": "#/$defs/DocumentProperty" + } + } + }, + "required": [] + }, + "DocumentProperty": { + "type": "object", + "properties": { + "doc:PropertyType": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "doc:PropertyValue": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + } + }, + "required": [ + "doc:PropertyType", + "doc:PropertyValue" + ] + }, + "DocumentBody": { + "type": "object", + "properties": { + "doc:Contents": { + "type": "string", + "pattern": "^[A-Za-z0-9+\\/]*={0,3}$" + }, + "doc:ContentType": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "doc:Checksum": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "doc:ChecksumType": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + } + }, + "required": [] + }, + "NationalDocumentParameters": { + "type": "object", + "properties": { + "doc:CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + } + }, + "required": [ + "doc:CountryCode" + ] + } + } +} \ No newline at end of file diff --git a/103120/schema/json/ts_103120_Notification.schema.json b/103120/schema/json/ts_103120_Notification.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..84fbf046ca455b5e49221c0c268d2d6c345d0cd2 --- /dev/null +++ b/103120/schema/json/ts_103120_Notification.schema.json @@ -0,0 +1,103 @@ +{ + "$id": "ts_103120_Notification_2016_02", + "$defs": { + "NotificationObject": { + "type": "object", + "properties": { + "@xsi:type": { + "type": "string", + "enum": "{http://uri.etsi.org/03120/common/2016/02/Notification}NotificationObject" + }, + "ObjectIdentifier": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + }, + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "OwnerIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "Generation": { + "type": "integer", + "minimum": 0 + }, + "ExternalIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "AssociatedObjects": { + "$ref": "ts_103120_Core_2019_10#/$defs/AssociatedObjects" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "NationalHandlingParameters": { + "$ref": "ts_103120_Core_2019_10#/$defs/NationalHandlingParameters" + }, + "notification:NotificationDetails": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "notification:NotificationType": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "notification:NewNotification": { + "type": "boolean" + }, + "notification:NotificationTimestamp": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "notification:StatusOfAssociatedObjects": { + "$ref": "#/$defs/ListOfAssociatedObjectStatus" + }, + "notification:NationalNotificationParameters": { + "$ref": "#/$defs/NationalNotificationParameters" + } + }, + "required": [ + "@xsi:type", + "ObjectIdentifier" + ] + }, + "ListOfAssociatedObjectStatus": { + "type": "object", + "properties": { + "notification:AssociatedObjectStatus": { + "type": "array", + "items": { + "$ref": "#/$defs/AssociatedObjectStatus" + }, + "minItems": 1 + } + }, + "required": [] + }, + "AssociatedObjectStatus": { + "type": "object", + "properties": { + "notification:AssociatedObject": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + }, + "notification:Status": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "notification:Details": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + } + }, + "required": [ + "notification:AssociatedObject", + "notification:Status" + ] + }, + "NationalNotificationParameters": { + "type": "object", + "properties": { + "notification:CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + } + }, + "required": [ + "notification:CountryCode" + ] + } + } +} \ No newline at end of file diff --git a/103120/schema/json/ts_103120_Task.schema.json b/103120/schema/json/ts_103120_Task.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..5bb92ac68d135247223f64027912958dbe924b4a --- /dev/null +++ b/103120/schema/json/ts_103120_Task.schema.json @@ -0,0 +1,723 @@ +{ + "$id": "ts_103120_Task_2020_09", + "$defs": { + "LITaskObject": { + "type": "object", + "properties": { + "@xsi:type": { + "type": "string", + "enum": "{http://uri.etsi.org/03120/common/2020/09/Task}LITaskObject" + }, + "ObjectIdentifier": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + }, + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "OwnerIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "Generation": { + "type": "integer", + "minimum": 0 + }, + "ExternalIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "AssociatedObjects": { + "$ref": "ts_103120_Core_2019_10#/$defs/AssociatedObjects" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "NationalHandlingParameters": { + "$ref": "ts_103120_Core_2019_10#/$defs/NationalHandlingParameters" + }, + "task:Reference": { + "$ref": "ts_103280_2017_07#/$defs/LIID" + }, + "task:Status": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:DesiredStatus": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:Timespan": { + "$ref": "#/$defs/TaskTimespan" + }, + "task:TargetIdentifier": { + "$ref": "#/$defs/TargetIdentifier" + }, + "task:DeliveryType": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:DeliveryDetails": { + "$ref": "#/$defs/TaskDeliveryDetails" + }, + "task:ApprovalDetails": { + "type": "array", + "items": { + "$ref": "ts_103120_Common_2016_02#/$defs/ApprovalDetails" + } + }, + "task:CSPID": { + "$ref": "ts_103120_Core_2019_10#/$defs/EndpointID" + }, + "task:HandlingProfile": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:InvalidReason": { + "$ref": "ts_103120_Core_2019_10#/$defs/ActionUnsuccesfulInformation" + }, + "task:Flags": { + "$ref": "#/$defs/TaskFlags" + }, + "task:NationalLITaskingParameters": { + "$ref": "#/$defs/NationalLITaskingParameters" + }, + "task:ListOfTrafficPolicyReferences": { + "$ref": "#/$defs/ListOfTrafficPolicyReferences" + } + }, + "required": [ + "@xsi:type", + "ObjectIdentifier" + ] + }, + "TaskTimespan": { + "type": "object", + "properties": { + "task:StartTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "task:EndTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "task:TerminationTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "task:ProvisioningTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "task:DeprovisioningTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + } + }, + "required": [] + }, + "TargetIdentifier": { + "type": "object", + "properties": { + "task:TargetIdentifierValues": { + "$ref": "#/$defs/TargetIdentifierValues" + }, + "task:ServiceType": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + } + }, + "required": [] + }, + "TargetIdentifierValues": { + "type": "object", + "properties": { + "task:TargetIdentifierValue": { + "type": "array", + "items": { + "$ref": "#/$defs/TargetIdentifierValue" + }, + "minItems": 1 + } + }, + "required": [] + }, + "TargetIdentifierValue": { + "type": "object", + "properties": { + "task:FormatType": { + "$ref": "#/$defs/FormatType" + }, + "task:Value": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + } + }, + "required": [ + "task:FormatType", + "task:Value" + ] + }, + "FormatType": { + "type": "object", + "properties": { + "task:FormatOwner": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "task:FormatName": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + } + }, + "required": [ + "task:FormatOwner", + "task:FormatName" + ] + }, + "TaskDeliveryDetails": { + "type": "object", + "properties": { + "task:DeliveryDestination": { + "type": "array", + "items": { + "$ref": "#/$defs/DeliveryDestination" + }, + "minItems": 1 + } + }, + "required": [] + }, + "DeliveryDestination": { + "type": "object", + "properties": { + "task:DeliveryAddress": { + "$ref": "#/$defs/DeliveryAddress" + }, + "task:EncryptionDetails": { + "$ref": "#/$defs/NationalEncryptionDetails" + }, + "task:IRIorCC": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:HandoverFormat": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:DeliveryProfile": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:NationalDeliveryParameters": { + "$ref": "#/$defs/NationalDeliveryParameters" + } + }, + "required": [] + }, + "DeliveryAddress": { + "oneOf": [ + { + "type": "object", + "properties": { + "task:IPv4Address": { + "$ref": "ts_103280_2017_07#/$defs/IPv4Address" + } + }, + "required": [ + "task:IPv4Address" + ] + }, + { + "type": "object", + "properties": { + "task:IPv6Address": { + "$ref": "ts_103280_2017_07#/$defs/IPv6Address" + } + }, + "required": [ + "task:IPv6Address" + ] + }, + { + "type": "object", + "properties": { + "task:IPAddressPort": { + "$ref": "ts_103280_2017_07#/$defs/IPAddressPort" + } + }, + "required": [ + "task:IPAddressPort" + ] + }, + { + "type": "object", + "properties": { + "task:IPAddressPortRange": { + "$ref": "ts_103280_2017_07#/$defs/IPAddressPortRange" + } + }, + "required": [ + "task:IPAddressPortRange" + ] + }, + { + "type": "object", + "properties": { + "task:E164Number": { + "$ref": "ts_103280_2017_07#/$defs/InternationalE164" + } + }, + "required": [ + "task:E164Number" + ] + }, + { + "type": "object", + "properties": { + "task:FTPAddress": { + "type": "string" + } + }, + "required": [ + "task:FTPAddress" + ] + }, + { + "type": "object", + "properties": { + "task:URL": { + "type": "string" + } + }, + "required": [ + "task:URL" + ] + }, + { + "type": "object", + "properties": { + "task:FQDN": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + } + }, + "required": [ + "task:FQDN" + ] + }, + { + "type": "object", + "properties": { + "task:EmailAddress": { + "$ref": "ts_103280_2017_07#/$defs/EmailAddress" + } + }, + "required": [ + "task:EmailAddress" + ] + }, + { + "type": "object", + "properties": { + "task:EndpointID": { + "$ref": "ts_103120_Core_2019_10#/$defs/EndpointID" + } + }, + "required": [ + "task:EndpointID" + ] + }, + { + "type": "object", + "properties": { + "task:DeliveryInformationID": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + } + }, + "required": [ + "task:DeliveryInformationID" + ] + } + ] + }, + "TaskFlags": { + "type": "object", + "properties": { + "task:TaskFlag": { + "type": "array", + "items": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + } + } + }, + "required": [] + }, + "NationalLITaskingParameters": { + "type": "object", + "properties": { + "task:CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + } + }, + "required": [ + "task:CountryCode" + ] + }, + "NationalDeliveryParameters": { + "type": "object", + "properties": { + "task:CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + } + }, + "required": [ + "task:CountryCode" + ] + }, + "NationalEncryptionDetails": { + "type": "object", + "properties": { + "task:CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + } + }, + "required": [ + "task:CountryCode" + ] + }, + "LDTaskObject": { + "type": "object", + "properties": { + "@xsi:type": { + "type": "string", + "enum": "{http://uri.etsi.org/03120/common/2020/09/Task}LDTaskObject" + }, + "ObjectIdentifier": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + }, + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "OwnerIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "Generation": { + "type": "integer", + "minimum": 0 + }, + "ExternalIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "AssociatedObjects": { + "$ref": "ts_103120_Core_2019_10#/$defs/AssociatedObjects" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "NationalHandlingParameters": { + "$ref": "ts_103120_Core_2019_10#/$defs/NationalHandlingParameters" + }, + "task:Reference": { + "$ref": "ts_103280_2017_07#/$defs/LDID" + }, + "task:Status": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:StatusReason": { + "$ref": "ts_103120_Core_2019_10#/$defs/ActionUnsuccesfulInformation" + }, + "task:DesiredStatus": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:RequestDetails": { + "$ref": "#/$defs/RequestDetails" + }, + "task:DeliveryDetails": { + "$ref": "#/$defs/LDDeliveryDetails" + }, + "task:ApprovalDetails": { + "type": "array", + "items": { + "$ref": "ts_103120_Common_2016_02#/$defs/ApprovalDetails" + } + }, + "task:CSPID": { + "$ref": "ts_103120_Core_2019_10#/$defs/EndpointID" + }, + "task:HandlingProfile": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:Flags": { + "$ref": "#/$defs/LDTaskFlags" + }, + "task:AlternativePreservationReferences": { + "$ref": "#/$defs/ListOfAlternativePreservationReferences" + }, + "task:NationalLDTaskingParameters": { + "$ref": "#/$defs/NationalLDTaskingParameters" + } + }, + "required": [ + "@xsi:type", + "ObjectIdentifier" + ] + }, + "RequestDetails": { + "type": "object", + "properties": { + "task:Type": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:StartTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "task:EndTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "task:ObservedTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "task:ObservedTimes": { + "type": "array", + "items": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + } + }, + "task:RequestValues": { + "$ref": "#/$defs/RequestValues" + }, + "task:Subtype": { + "$ref": "#/$defs/RequestSubtype" + } + }, + "required": [] + }, + "RequestValues": { + "type": "object", + "properties": { + "task:RequestValue": { + "type": "array", + "items": { + "$ref": "#/$defs/RequestValue" + }, + "minItems": 1 + } + }, + "required": [] + }, + "RequestValue": { + "type": "object", + "properties": { + "task:FormatType": { + "$ref": "#/$defs/FormatType" + }, + "task:Value": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + } + }, + "required": [ + "task:FormatType", + "task:Value" + ] + }, + "RequestSubtype": { + "type": "object", + "properties": { + "task:RequestSubtype": { + "type": "array", + "items": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "minItems": 1 + } + }, + "required": [] + }, + "LDDeliveryDetails": { + "type": "object", + "properties": { + "task:LDDeliveryDestination": { + "type": "array", + "items": { + "$ref": "#/$defs/LDDeliveryDestination" + }, + "minItems": 1 + } + }, + "required": [] + }, + "LDDeliveryDestination": { + "type": "object", + "properties": { + "task:DeliveryAddress": { + "$ref": "#/$defs/DeliveryAddress" + }, + "task:EncryptionDetails": { + "$ref": "#/$defs/NationalEncryptionDetails" + }, + "task:LDHandoverFormat": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:LDDeliveryProfile": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:NationalDeliveryParameters": { + "$ref": "#/$defs/NationalDeliveryParameters" + } + }, + "required": [] + }, + "LDTaskFlags": { + "type": "object", + "properties": { + "task:LDTaskFlag": { + "type": "array", + "items": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + } + } + }, + "required": [] + }, + "ListOfAlternativePreservationReferences": { + "type": "object", + "properties": { + "task:AlternativePreservationReference": { + "type": "array", + "items": { + "$ref": "#/$defs/AlternativePreservationReference" + }, + "minItems": 1 + } + }, + "required": [] + }, + "AlternativePreservationReference": { + "type": "object", + "properties": { + "task:ReferenceValue": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "task:NatureOfReference": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + } + }, + "required": [ + "task:ReferenceValue" + ] + }, + "NationalLDTaskingParameters": { + "type": "object", + "properties": { + "task:CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + } + }, + "required": [ + "task:CountryCode" + ] + }, + "LPTaskObject": { + "type": "object", + "properties": { + "@xsi:type": { + "type": "string", + "enum": "{http://uri.etsi.org/03120/common/2020/09/Task}LPTaskObject" + }, + "ObjectIdentifier": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + }, + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "OwnerIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "Generation": { + "type": "integer", + "minimum": 0 + }, + "ExternalIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "AssociatedObjects": { + "$ref": "ts_103120_Core_2019_10#/$defs/AssociatedObjects" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "NationalHandlingParameters": { + "$ref": "ts_103120_Core_2019_10#/$defs/NationalHandlingParameters" + }, + "task:Status": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:StatusReason": { + "$ref": "ts_103120_Core_2019_10#/$defs/ActionUnsuccesfulInformation" + }, + "task:DesiredStatus": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:RequestDetails": { + "$ref": "#/$defs/LPRequestDetails" + }, + "task:DesiredPreservationExpiration": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "task:PreservationExpiration": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "task:CSPID": { + "$ref": "ts_103120_Core_2019_10#/$defs/EndpointID" + }, + "task:NationalLPTaskingParameters": { + "$ref": "#/$defs/NationalLPTaskingParameters" + } + }, + "required": [ + "@xsi:type", + "ObjectIdentifier" + ] + }, + "LPRequestDetails": { + "type": "object", + "properties": { + "task:Type": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + }, + "task:StartTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "task:EndTime": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "task:RequestValues": { + "$ref": "#/$defs/RequestValues" + }, + "task:Subtype": { + "$ref": "#/$defs/RequestSubtype" + } + }, + "required": [] + }, + "NationalLPTaskingParameters": { + "type": "object", + "properties": { + "task:CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + } + }, + "required": [ + "task:CountryCode" + ] + }, + "ListOfTrafficPolicyReferences": { + "type": "object", + "properties": { + "task:TrafficPolicyReference": { + "type": "array", + "items": { + "$ref": "#/$defs/TrafficPolicyReference" + }, + "minItems": 1 + } + }, + "required": [] + }, + "TrafficPolicyReference": { + "type": "object", + "properties": { + "task:Order": { + "type": "integer", + "minimum": 1 + }, + "task:ObjectIdentifier": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + } + }, + "required": [] + } + } +} \ No newline at end of file diff --git a/103120/schema/json/ts_103120_TrafficPolicy.schema.json b/103120/schema/json/ts_103120_TrafficPolicy.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..1d9619e456ebd108829819edb66a613155ef640a --- /dev/null +++ b/103120/schema/json/ts_103120_TrafficPolicy.schema.json @@ -0,0 +1,198 @@ +{ + "$id": "ts_103120_TrafficPolicy_2022_07", + "$defs": { + "TrafficPolicyObject": { + "type": "object", + "properties": { + "@xsi:type": { + "type": "string", + "enum": "{http://uri.etsi.org/03120/common/2022/07/TrafficPolicy}TrafficPolicyObject" + }, + "ObjectIdentifier": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + }, + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "OwnerIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "Generation": { + "type": "integer", + "minimum": 0 + }, + "ExternalIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "AssociatedObjects": { + "$ref": "ts_103120_Core_2019_10#/$defs/AssociatedObjects" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "NationalHandlingParameters": { + "$ref": "ts_103120_Core_2019_10#/$defs/NationalHandlingParameters" + }, + "tp:TrafficPolicyName": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "tp:TrafficRules": { + "$ref": "#/$defs/ListOfTrafficRuleReferences" + } + }, + "required": [ + "@xsi:type", + "ObjectIdentifier" + ] + }, + "ListOfTrafficRuleReferences": { + "type": "object", + "properties": { + "tp:TrafficRuleReference": { + "type": "array", + "items": { + "$ref": "#/$defs/TrafficRuleReference" + }, + "minItems": 1 + } + }, + "required": [] + }, + "TrafficRuleReference": { + "type": "object", + "properties": { + "tp:Order": { + "type": "integer", + "minimum": 1 + }, + "tp:ObjectIdentifier": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + } + }, + "required": [ + "tp:Order", + "tp:ObjectIdentifier" + ] + }, + "TrafficRuleObject": { + "type": "object", + "properties": { + "@xsi:type": { + "type": "string", + "enum": "{http://uri.etsi.org/03120/common/2022/07/TrafficPolicy}TrafficRuleObject" + }, + "ObjectIdentifier": { + "$ref": "ts_103120_Core_2019_10#/$defs/ObjectIdentifier" + }, + "CountryCode": { + "$ref": "ts_103280_2017_07#/$defs/ISOCountryCode" + }, + "OwnerIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "Generation": { + "type": "integer", + "minimum": 0 + }, + "ExternalIdentifier": { + "$ref": "ts_103280_2017_07#/$defs/LongString" + }, + "AssociatedObjects": { + "$ref": "ts_103120_Core_2019_10#/$defs/AssociatedObjects" + }, + "LastChanged": { + "$ref": "ts_103280_2017_07#/$defs/QualifiedDateTime" + }, + "NationalHandlingParameters": { + "$ref": "ts_103120_Core_2019_10#/$defs/NationalHandlingParameters" + }, + "tp:Criteria": { + "$ref": "#/$defs/ListOfTrafficCriteria" + }, + "tp:Action": { + "$ref": "ts_103120_Common_2016_02#/$defs/DictionaryEntry" + } + }, + "required": [ + "@xsi:type", + "ObjectIdentifier" + ] + }, + "ListOfTrafficCriteria": { + "type": "object", + "properties": { + "tp:Criteria": { + "type": "array", + "items": { + "$ref": "#/$defs/TrafficCriteria" + }, + "minItems": 1 + } + }, + "required": [] + }, + "TrafficCriteria": { + "oneOf": [ + { + "type": "object", + "properties": { + "tp:IPPolicyCriteria": { + "$ref": "#/$defs/IPPolicyCriteria" + } + }, + "required": [ + "tp:IPPolicyCriteria" + ] + }, + { + "type": "object", + "properties": { + "tp:MobileAccessPolicyCriteria": { + "$ref": "#/$defs/MobileAccessPolicyCriteria" + } + }, + "required": [ + "tp:MobileAccessPolicyCriteria" + ] + } + ] + }, + "IPPolicyCriteria": { + "type": "object", + "properties": { + "tp:IPProtocol": { + "type": "integer", + "minimum": 0 + }, + "tp:SourceIPRange": { + "$ref": "ts_103280_2017_07#/$defs/IPCIDR" + }, + "tp:SourcePortRange": { + "$ref": "ts_103280_2017_07#/$defs/PortRange" + }, + "tp:DestinationIPRange": { + "$ref": "ts_103280_2017_07#/$defs/IPCIDR" + }, + "tp:DestinationPortRange": { + "$ref": "ts_103280_2017_07#/$defs/PortRange" + }, + "tp:BothDirections": { + "type": "boolean" + } + }, + "required": [] + }, + "MobileAccessPolicyCriteria": { + "type": "object", + "properties": { + "tp:APN": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + }, + "tp:DNN": { + "$ref": "ts_103280_2017_07#/$defs/ShortString" + } + }, + "required": [] + } + } +} \ No newline at end of file diff --git a/103120/schema/ts_103120_Authorisation.xsd b/103120/schema/xsd/ts_103120_Authorisation.xsd similarity index 100% rename from 103120/schema/ts_103120_Authorisation.xsd rename to 103120/schema/xsd/ts_103120_Authorisation.xsd diff --git a/103120/schema/ts_103120_Common.xsd b/103120/schema/xsd/ts_103120_Common.xsd similarity index 100% rename from 103120/schema/ts_103120_Common.xsd rename to 103120/schema/xsd/ts_103120_Common.xsd diff --git a/103120/schema/ts_103120_Core.xsd b/103120/schema/xsd/ts_103120_Core.xsd similarity index 100% rename from 103120/schema/ts_103120_Core.xsd rename to 103120/schema/xsd/ts_103120_Core.xsd diff --git a/103120/schema/ts_103120_Delivery.xsd b/103120/schema/xsd/ts_103120_Delivery.xsd similarity index 100% rename from 103120/schema/ts_103120_Delivery.xsd rename to 103120/schema/xsd/ts_103120_Delivery.xsd diff --git a/103120/schema/ts_103120_Document.xsd b/103120/schema/xsd/ts_103120_Document.xsd similarity index 100% rename from 103120/schema/ts_103120_Document.xsd rename to 103120/schema/xsd/ts_103120_Document.xsd diff --git a/103120/schema/ts_103120_Notification.xsd b/103120/schema/xsd/ts_103120_Notification.xsd similarity index 100% rename from 103120/schema/ts_103120_Notification.xsd rename to 103120/schema/xsd/ts_103120_Notification.xsd diff --git a/103120/schema/ts_103120_Task.xsd b/103120/schema/xsd/ts_103120_Task.xsd similarity index 81% rename from 103120/schema/ts_103120_Task.xsd rename to 103120/schema/xsd/ts_103120_Task.xsd index bef4f8aa6976b0c3b6b10910c442554bbda71dab..59f45d04b29e739ab8f4753ca656e273e076c709 100644 --- a/103120/schema/ts_103120_Task.xsd +++ b/103120/schema/xsd/ts_103120_Task.xsd @@ -121,6 +121,7 @@ + @@ -172,10 +173,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/103120/schema/ts_103120_TrafficPolicy.xsd b/103120/schema/xsd/ts_103120_TrafficPolicy.xsd similarity index 81% rename from 103120/schema/ts_103120_TrafficPolicy.xsd rename to 103120/schema/xsd/ts_103120_TrafficPolicy.xsd index 2494a5ed23c4c93e54fad28ec59e52ef110e456d..e201f0293f7b9d307b492474fbb79393ebb8d99c 100644 --- a/103120/schema/ts_103120_TrafficPolicy.xsd +++ b/103120/schema/xsd/ts_103120_TrafficPolicy.xsd @@ -7,12 +7,17 @@ - - + + + + + + + @@ -28,12 +33,17 @@ - - + + + + + + + diff --git a/103221-1/TS_103_221_01.xsd b/103221-1/TS_103_221_01.xsd index c3ca89a06ef81b0671a57ac1465f637ef38c7dbf..4bc8a1480bf20b19d082220c445bd8a73149084d 100644 --- a/103221-1/TS_103_221_01.xsd +++ b/103221-1/TS_103_221_01.xsd @@ -1,5 +1,5 @@ - + @@ -156,6 +156,7 @@ + @@ -251,6 +252,7 @@ + @@ -319,6 +321,14 @@ + + + + + + + + diff --git a/103221-1/TS_103_221_01_TrafficPolicy.xsd b/103221-1/TS_103_221_01_TrafficPolicy.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2e59aa91533e0ac94096483a97c1468fc50f385c --- /dev/null +++ b/103221-1/TS_103_221_01_TrafficPolicy.xsd @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/103221-1/examples/CreateTrafficPolicy_example.xml b/103221-1/examples/CreateTrafficPolicy_example.xml new file mode 100644 index 0000000000000000000000000000000000000000..2edc79858298c25d81b5c616a4bb181fbfabe622 --- /dev/null +++ b/103221-1/examples/CreateTrafficPolicy_example.xml @@ -0,0 +1,64 @@ + + + + admfID + neID + 2023-02-14T18:46:21.247432Z + v1.13.1 + 2654a277-bafb-4240-9143-806ee41a3751 + + 6c67de93-926a-488b-9435-b0a30c20f676 + + + + + 203.0.113.0/24 + + + + + + ETSI + PolicyAction + PDSR + + + + + admfID + neID + 2023-02-14T18:46:21.247432Z + v1.13.1 + 2654a277-bafb-4240-9143-806ee41a3751 + + b04057af-362f-4e8d-9337-416f43bfd7ec + Template Rule 1 + + + 1 + 6c67de93-926a-488b-9435-b0a30c20f676 + + + + + + admfID + neID + 2023-02-14T18:46:21.247432Z + v1.13.1 + 211900a7-afb5-4187-b036-c85a92ab94aa + + 2f5faff3-077d-4ec3-b66a-226e3a921eec + + + 447700900000 + + + X2andX3 + + + b04057af-362f-4e8d-9337-416f43bfd7ec + + + + diff --git a/103280/TS_103_280.schema.json b/103280/TS_103_280.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..17d01361efba2c1dfc01b151815786bff0f84452 --- /dev/null +++ b/103280/TS_103_280.schema.json @@ -0,0 +1,389 @@ +{ + "$id": "ts_103280_2017_07", + "$defs": { + "ShortString": { + "type": "string", + "maxLength": 255 + }, + "LongString": { + "type": "string", + "maxLength": 65535 + }, + "LIID": { + "type": "string", + "pattern": "^([!-~]{1,25})|([0-9a-f]{26,50})$" + }, + "UTCDateTime": { + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$" + }, + "UTCMicrosecondDateTime": { + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{6}Z$" + }, + "QualifiedDateTime": { + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(Z|[+-][0-9]{2}:[0-9]{2})$" + }, + "QualifiedMicrosecondDateTime": { + "type": "string", + "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{6}(Z|[+-][0-9]{2}:[0-9]{2})$" + }, + "InternationalE164": { + "type": "string", + "pattern": "^[0-9]{1,15}$" + }, + "IMSI": { + "type": "string", + "pattern": "^[0-9]{6,15}$" + }, + "IMEI": { + "type": "string", + "pattern": "^[0-9]{14}$" + }, + "IMEICheckDigit": { + "type": "string", + "pattern": "^[0-9]{15}$" + }, + "IMEISV": { + "type": "string", + "pattern": "^[0-9]{16}$" + }, + "IPv4Address": { + "type": "string", + "pattern": "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$" + }, + "IPv4CIDR": { + "type": "string", + "pattern": "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])/([1-2]?[0-9]|3[0-2])$" + }, + "IPv6Address": { + "type": "string", + "pattern": "^([0-9a-f]{4}:){7}([0-9a-f]{4})$" + }, + "IPv6CIDR": { + "type": "string", + "pattern": "^([0-9a-f]{4}:){7}([0-9a-f]{4})/(([1-9][0-9]?)|(1[0-1][0-9])|(12[0-8]))$" + }, + "TCPPort": { + "type": "integer", + "exclusiveMinimum": 1, + "maximum": 65535 + }, + "UDPPort": { + "type": "integer", + "minimum": 0, + "maximum": 65535 + }, + "MACAddress": { + "type": "string", + "pattern": "^([a-f0-9]{2}:){5}[a-f0-9]{2}$" + }, + "EmailAddress": { + "allOf": [ + { + "$ref": "#/$defs/ShortString" + }, + { + "type": "string", + "pattern": "^[a-zA-Z0-9\\.!#$%&'\\*\\+\\\\/=\\?\\^_`\\{\\|\\}~\\-]+@[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$" + } + ] + }, + "UUID": { + "type": "string", + "pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$" + }, + "ISOCountryCode": { + "type": "string", + "pattern": "^[A-Z]{2}$" + }, + "SIPURI": { + "type": "string", + "pattern": "^sips?:[a-zA-Z0-9!#$&-;=?-\\[\\]_~%]+$" + }, + "TELURI": { + "type": "string", + "pattern": "^tel:[a-zA-Z0-9!#$&-;=?-\\[\\]_~%]+$" + }, + "WGS84LatitudeDecimal": { + "type": "string", + "pattern": "^[NS][0-9]{2}\\.[0-9]{6}$" + }, + "WGS84LongitudeDecimal": { + "type": "string", + "pattern": "^[EW][0-9]{3}\\.[0-9]{6}$" + }, + "WGS84LatitudeAngular": { + "type": "string", + "pattern": "^[NS][0-9]{6}\\.[0-9]{2}$" + }, + "WGS84LongitudeAngular": { + "type": "string", + "pattern": "^[EW][0-9]{7}\\.[0-9]{2}$" + }, + "SUPIIMSI": { + "$ref": "#/$defs/IMSI" + }, + "SUPINAI": { + "$ref": "#/$defs/NAI" + }, + "SUCI": { + "type": "string", + "pattern": "^([a-fA-F0-9]{2})*$" + }, + "PEIIMEI": { + "$ref": "#/$defs/IMEI" + }, + "PEIIMEICheckDigit": { + "$ref": "#/$defs/IMEICheckDigit" + }, + "PEIIMEISV": { + "$ref": "#/$defs/IMEISV" + }, + "GPSIMSISDN": { + "type": "string", + "pattern": "^[0-9]{1,15}$" + }, + "GPSINAI": { + "$ref": "#/$defs/NAI" + }, + "NAI": { + "type": "string" + }, + "LDID": { + "type": "string", + "pattern": "^([A-Z]{2}-.+-.+)$" + }, + "InternationalizedEmailAddress": { + "allOf": [ + { + "$ref": "#/$defs/ShortString" + }, + { + "type": "string", + "pattern": "^.+@.+$" + } + ] + }, + "EUI64": { + "type": "string", + "pattern": "^([a-f0-9]{2}:){7}[a-f0-9]{2}$" + }, + "CGI": { + "type": "string", + "pattern": "^[0-9]{3}-[0-9]{2,3}-[a-f0-9]{4}-[a-f0-9]{4}$" + }, + "ECGI": { + "type": "string", + "pattern": "^[0-9]{3}-[0-9]{2,3}-[a-f0-9]{7}$" + }, + "NCGI": { + "type": "string", + "pattern": "^[0-9]{3}-[0-9]{2,3}-[a-f0-9]{9}$" + }, + "ICCID": { + "type": "string", + "pattern": "^[0-9]{19,20}$" + }, + "IPProtocol": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "IPAddress": { + "oneOf": [ + { + "type": "object", + "properties": { + "etsi280:IPv4Address": { + "$ref": "#/$defs/IPv4Address" + } + }, + "required": [ + "etsi280:IPv4Address" + ] + }, + { + "type": "object", + "properties": { + "etsi280:IPv6Address": { + "$ref": "#/$defs/IPv6Address" + } + }, + "required": [ + "etsi280:IPv6Address" + ] + } + ] + }, + "IPCIDR": { + "oneOf": [ + { + "type": "object", + "properties": { + "etsi280:IPv4CIDR": { + "$ref": "#/$defs/IPv4CIDR" + } + }, + "required": [ + "etsi280:IPv4CIDR" + ] + }, + { + "type": "object", + "properties": { + "etsi280:IPv6CIDR": { + "$ref": "#/$defs/IPv6CIDR" + } + }, + "required": [ + "etsi280:IPv6CIDR" + ] + } + ] + }, + "TCPPortRange": { + "type": "object", + "properties": { + "etsi280:start": { + "$ref": "#/$defs/TCPPort" + }, + "etsi280:end": { + "$ref": "#/$defs/TCPPort" + } + }, + "required": [ + "etsi280:start", + "etsi280:end" + ] + }, + "UDPPortRange": { + "type": "object", + "properties": { + "etsi280:start": { + "$ref": "#/$defs/UDPPort" + }, + "etsi280:end": { + "$ref": "#/$defs/UDPPort" + } + }, + "required": [ + "etsi280:start", + "etsi280:end" + ] + }, + "Port": { + "oneOf": [ + { + "type": "object", + "properties": { + "etsi280:TCPPort": { + "$ref": "#/$defs/TCPPort" + } + }, + "required": [ + "etsi280:TCPPort" + ] + }, + { + "type": "object", + "properties": { + "etsi280:UDPPort": { + "$ref": "#/$defs/UDPPort" + } + }, + "required": [ + "etsi280:UDPPort" + ] + } + ] + }, + "PortRange": { + "oneOf": [ + { + "type": "object", + "properties": { + "etsi280:TCPPortRange": { + "$ref": "#/$defs/TCPPortRange" + } + }, + "required": [ + "etsi280:TCPPortRange" + ] + }, + { + "type": "object", + "properties": { + "etsi280:UDPPortRange": { + "$ref": "#/$defs/UDPPortRange" + } + }, + "required": [ + "etsi280:UDPPortRange" + ] + } + ] + }, + "IPAddressPort": { + "type": "object", + "properties": { + "etsi280:address": { + "$ref": "#/$defs/IPAddress" + }, + "etsi280:port": { + "$ref": "#/$defs/Port" + } + }, + "required": [ + "etsi280:address", + "etsi280:port" + ] + }, + "IPAddressPortRange": { + "type": "object", + "properties": { + "etsi280:address": { + "$ref": "#/$defs/IPAddress" + }, + "etsi280:portRange": { + "$ref": "#/$defs/PortRange" + } + }, + "required": [ + "etsi280:address", + "etsi280:portRange" + ] + }, + "WGS84CoordinateDecimal": { + "type": "object", + "properties": { + "etsi280:latitude": { + "$ref": "#/$defs/WGS84LatitudeDecimal" + }, + "etsi280:longitude": { + "$ref": "#/$defs/WGS84LongitudeDecimal" + } + }, + "required": [ + "etsi280:latitude", + "etsi280:longitude" + ] + }, + "WGS84CoordinateAngular": { + "type": "object", + "properties": { + "etsi280:latitude": { + "$ref": "#/$defs/WGS84LatitudeAngular" + }, + "etsi280:longitude": { + "$ref": "#/$defs/WGS84LongitudeAngular" + } + }, + "required": [ + "etsi280:latitude", + "etsi280:longitude" + ] + } + } +} diff --git a/create_attachments.py b/create_attachments.py new file mode 100644 index 0000000000000000000000000000000000000000..9f5f02642be950126d9675f5ca937f368c2f0c70 --- /dev/null +++ b/create_attachments.py @@ -0,0 +1,60 @@ +from io import BytesIO +from pathlib import Path +import logging +import zipfile + +# For ETSI portal attachments, a single zip archive is created which +# contains: +# - All files in the top-level spec directory +# - A zipfile for each subdirectory, which contains all the files in that subdirectory +# This second step is recursive, so each zip file contains only files and other zipfiles, never subdirectories +# For an explanation as to *why* this is the case, speak to your ETSI technical officer. +# +# Example: Assuming the files for the portal attachment are of the following form: +# +# (contents of directory) +# - top_level_file.ext +# - subdirectory_1 +# - subdirectory_1_file.ext +# - subdirectory_2 +# - subdirectory_2_file.ext +# - TS 102 232-1 +# +# ...then the correct form for ETSI portal attachments is as follows +# +# ts_xxxxxx_vxxyyzzp0.zip +# which contains: +# - top_level_file.ext +# - subdirectory_1.zip +# (which contains) +# - subdirectory_1_file.ext +# - subdirectory_2.zip +# (which contains) +# - subdirectory_2_file.ext + + +def recursively_zip_directory(directory: Path, zipname: str, recursion=0): + logging.info( + f"{'':{recursion * 4}}Packaging contents of {directory} into {zipname}" + ) + buffer = BytesIO() + zip = zipfile.ZipFile(buffer, "a") + for f in directory.iterdir(): + if f.is_file(): + logging.info(f"{'':{recursion * 4}}Adding file: {f}") + zip.write(f, f.name) + elif f.is_dir(): + zipname = f.with_suffix(".zip").name + logging.info(f"{'':{recursion * 4}}Adding archive: {f}") + recurse_buffer = recursively_zip_directory(f, zipname, recursion + 1) + zip.writestr(zipname, recurse_buffer.getvalue()) + return buffer + + +if __name__ == "__main__": + logging.info("Creating attachments...") + for directory in Path(".").glob("1*"): + zip_name = f"ts_{directory.name}vXXYYZZp0.zip" + zip_buffer = recursively_zip_directory(directory, zip_name) + with open(zip_name, "wb") as f: + f.write(zip_buffer.getvalue()) diff --git a/testing/xsd_compile_targets.json b/testing/xsd_compile_targets.json index a1bde12e8cf2c0d58135e37cdd05317cc16e7a31..3b28b4305a3ebf3b0d5e398fecf7a4f98458ae38 100644 --- a/testing/xsd_compile_targets.json +++ b/testing/xsd_compile_targets.json @@ -15,8 +15,13 @@ "103221-1/TS_103_221_01.xsd", "103221-1/TS_103_221_01_HashedID.xsd", "103221-1/TS_103_221_01_DestinationSet.xsd", + "103221-1/TS_103_221_01_TrafficPolicy.xsd", "103280/TS_103_280.xsd", - "103221-1/examples/ExampleGenericObjects.xsd" + "103221-1/examples/ExampleGenericObjects.xsd", + "103120/schema/xsd/ts_103120_Common.xsd", + "103120/schema/xsd/ts_103120_Core.xsd", + "103120/schema/xsd/ts_103120_TrafficPolicy.xsd", + "testing/deps/xmldsig/xmldsig-core-schema.xsd" ], "exampleFiles" : [ "103221-1/examples" @@ -30,21 +35,21 @@ ] }, { - "coreSchema" : "103120/schema/ts_103120_Core.xsd", + "coreSchema" : "103120/schema/xsd/ts_103120_Core.xsd", "supportingSchemas" : [ - "103120/schema/ts_103120_Authorisation.xsd", - "103120/schema/ts_103120_Common.xsd", - "103120/schema/ts_103120_Delivery.xsd", - "103120/schema/ts_103120_Document.xsd", - "103120/schema/ts_103120_Notification.xsd", - "103120/schema/ts_103120_Task.xsd", - "103120/schema/ts_103120_TrafficPolicy.xsd", + "103120/schema/xsd/ts_103120_Authorisation.xsd", + "103120/schema/xsd/ts_103120_Common.xsd", + "103120/schema/xsd/ts_103120_Delivery.xsd", + "103120/schema/xsd/ts_103120_Document.xsd", + "103120/schema/xsd/ts_103120_Notification.xsd", + "103120/schema/xsd/ts_103120_Task.xsd", + "103120/schema/xsd/ts_103120_TrafficPolicy.xsd", "103280/TS_103_280.xsd", "testing/deps/xmldsig/xmldsig-core-schema.xsd", - "103120/examples/FooServiceSchema.xsd" + "103120/examples/xml/FooServiceSchema.xsd" ], "exampleFiles" : [ - "103120/examples" + "103120/examples/xml" ] } -] \ No newline at end of file +] diff --git a/utils/json_to_xml.py b/utils/json_to_xml.py new file mode 100644 index 0000000000000000000000000000000000000000..17764a7af097aae7a2020522a1ae45adafa7d26a --- /dev/null +++ b/utils/json_to_xml.py @@ -0,0 +1,35 @@ +import sys +import logging +from pprint import pprint +import json +from pathlib import Path +import fileinput + +import xmltodict +import argparse + + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument('-v', '--verbose', action='count', help='Verbose logging (can be specified multiple times)') + parser.add_argument('-i', '--input', type=argparse.FileType('r'), default=sys.stdin, help="Path to input file (if absent, stdin is used)") + args = parser.parse_args() + + match args.verbose: + case v if v and v >= 2: + logging.basicConfig(level=logging.DEBUG) + case 1: + logging.basicConfig(level=logging.INFO) + case _: + logging.basicConfig(level=logging.WARNING) + + logging.debug(f"Arguments: {args}") + + s = args.input.read() + args.input.close() + + logging.debug(s) + j = json.loads(s) + + xml = xmltodict.unparse({'HI1Message' : j}, ) + print(xml) \ No newline at end of file diff --git a/utils/translate/ChoiceMapping.py b/utils/translate/ChoiceMapping.py new file mode 100644 index 0000000000000000000000000000000000000000..b477a3360e0a6a7b891f5854951eb4f37dce4b39 --- /dev/null +++ b/utils/translate/ChoiceMapping.py @@ -0,0 +1,47 @@ +import logging + +from xmlschema.validators.simple_types import * +from xmlschema.validators.complex_types import * +from xmlschema.validators.groups import * +from xmlschema.validators.facets import * + +from .TypeMapping import TypeMapping +from .ComplexTypeMapping import ComplexTypeMapping + +log = logging.getLogger() + +class ChoiceMapping(ComplexTypeMapping): + @classmethod + def process_choice(cls, choice: XsdGroup, current_ns : str, ns_to_id_map): + if choice.model != 'choice': + raise Exception(f"Wrong group type: {c.model}") + oneOf = [] + for c in choice.iter_model(): + if not (type(c) is XsdElement): + raise Exception (f"Non-element {c} encountered in choice {choice}") + element_name = c.local_name + if c.target_namespace in ns_to_id_map: + ns = ns_to_id_map[c.target_namespace] + if 'prefix' in ns: + element_name = ns['prefix'] + ":" + element_name + t = TypeMapping.get_type_from_elem(c, current_ns) + oneOf.append({ + "type" : "object", + "properties" : { + element_name : t + }, + "required" : [element_name] + }) + return oneOf + + def map(self, xst : BaseXsdType): + log.debug(f"Attempting mapping of {xst} to choice") + j = super().map(xst) + if j is None: + log.debug("Not a complex type, giving up") + return None + content = xst.content + if (content.model != 'choice'): + log.debug("Not a choice, giving up") + return None + return { 'oneOf' : ChoiceMapping.process_choice(content, xst.namespaces[''], self.ns_to_id_map)} diff --git a/utils/translate/ComplexTypeMapping.py b/utils/translate/ComplexTypeMapping.py new file mode 100644 index 0000000000000000000000000000000000000000..e18190901be2c3e0695c00a772be5364cce591d1 --- /dev/null +++ b/utils/translate/ComplexTypeMapping.py @@ -0,0 +1,11 @@ +from xmlschema.validators.complex_types import * + +from .TypeMapping import TypeMapping + +class ComplexTypeMapping(TypeMapping): + def map(self, xst: BaseXsdType): + if not (type(xst) is XsdComplexType): + return None + return { + "type" : "object" + } diff --git a/utils/translate/SequenceMapping.py b/utils/translate/SequenceMapping.py new file mode 100644 index 0000000000000000000000000000000000000000..4dc5c93e8a70c5a68cc753891032789d268c1be4 --- /dev/null +++ b/utils/translate/SequenceMapping.py @@ -0,0 +1,85 @@ +import logging + +from xmlschema.validators.simple_types import * +from xmlschema.validators.complex_types import * +from xmlschema.validators.groups import * +from xmlschema.validators.facets import * + +from .TypeMapping import TypeMapping +from .ChoiceMapping import ChoiceMapping +from .ComplexTypeMapping import ComplexTypeMapping + +log = logging.getLogger() + + +class SequenceMapping(ComplexTypeMapping): + def map(self, xst: BaseXsdType): + log.debug(f"Attempting mapping of {xst} to sequence") + j = super().map(xst) + if j is None: + log.debug("Not a complex type, giving up") + return None + content = xst.content + if (content.model != 'sequence'): + log.debug("Not a sequence, giving up") + return None + mapped_type = { + 'type' : 'object', + 'properties' : {}, + 'required' : [] + } + + # Not going to try and do all of this automatically for now + # Only make insert the xsiType parameter + if (xst.base_type): + # mapped_type['__DESCENDENT_OF__'] = TypeMapping.get_ref_for(xst.base_type, xst.namespaces['']) + mapped_type['properties']['@xsi:type'] = { + "type" : "string", + "enum" : xst.name + } + mapped_type['required'].append('@xsi:type') + # if xst.abstract: + # mapped_type['__ABSTRACT__'] = True + # pass + + inner_choice = None + for c in list(content.iter_model()): + log.debug(f"Processing model item {c}") + if type(c) is XsdElement: + element_name = c.local_name + if c.target_namespace in self.ns_to_id_map: + ns = self.ns_to_id_map[c.target_namespace] + if 'prefix' in ns: + element_name = ns['prefix'] + ":" + element_name + if c.effective_max_occurs != 1: + mapped_type['properties'][element_name] = { + "type" : "array", + "items" : TypeMapping.get_type_from_elem(c, xst.namespaces['']) + } + if c.effective_max_occurs: + mapped_type['properties'][element_name]['maxItems'] = c.effective_max_occurs + if c.effective_min_occurs > 0: + mapped_type['properties'][element_name]['minItems'] = c.effective_min_occurs + else: + mapped_type['properties'][element_name] = TypeMapping.get_type_from_elem(c, xst.namespaces['']) + if c.effective_min_occurs == 1: + mapped_type['required'].append(element_name) + elif type(c) is XsdGroup: + if inner_choice: + raise Exception (f"Second group '{element_name}' encountered in {xst}") + if c.model != "choice": + raise Exception (f"Don't know what to do with inner group {c} in {xst} - not a choice") + inner_choice = ChoiceMapping.process_choice(c, xst.namespaces[''], self.ns_to_id_map) + elif type(c) is XsdAnyElement: + mapped_type = {} + else: + raise Exception(f"Unknown element type {c}") + if (inner_choice): + return { + 'allOf' : [ + mapped_type, + {'oneOf' : inner_choice} + ] + } + else: + return mapped_type diff --git a/utils/translate/SimpleTypeMapping.py b/utils/translate/SimpleTypeMapping.py new file mode 100644 index 0000000000000000000000000000000000000000..2e60f9ca06b321a28992c2a32235707671f95735 --- /dev/null +++ b/utils/translate/SimpleTypeMapping.py @@ -0,0 +1,18 @@ +import logging + +from xmlschema.validators.complex_types import * +from xmlschema.validators.simple_types import XsdAtomicRestriction + +from .TypeMapping import TypeMapping + +log = logging.getLogger() + +class SimpleTypeMapping(TypeMapping): + def map(self, xst: BaseXsdType): + log.debug(f"Attempting mapping of {xst} to simple type") + if not (type(xst) is XsdAtomicRestriction): + log.debug("Type is not an XsdAtomicRestriction, giving up") + return None + return { + "$ref" : xst.base_type.name + } \ No newline at end of file diff --git a/utils/translate/TypeMapping.py b/utils/translate/TypeMapping.py new file mode 100644 index 0000000000000000000000000000000000000000..2b4b785ceeedb631c98ecf63df5c8d9754848b29 --- /dev/null +++ b/utils/translate/TypeMapping.py @@ -0,0 +1,70 @@ +import logging +from abc import ABC, abstractmethod + +from xmlschema.validators.simple_types import * +from xmlschema.validators.complex_types import * +from xmlschema.validators.groups import * +from xmlschema.validators.facets import * + +log = logging.getLogger() + +class TypeMapping(ABC): + ns_to_id_map = {} + + XSD_NS = "http://www.w3.org/2001/XMLSchema" + + XSD_TYPE_MAP = { + "string" : { "type" : "string" }, + "normalizedString" : { "type" : "string"}, + "dateTime" : { "type" : "string"}, + "token" : { "type" : "string"}, + "anyURI" : { "type" : "string" }, + + "integer" : { "type" : "integer"}, + "nonNegativeInteger" : { "type" : "integer", "minimum" : 0}, + "positiveInteger" : { "type" : "integer", "minimum" : 1}, + + "boolean" : { "type" : "boolean" }, + + "hexBinary" : { "type" : "string", "pattern" : "^([a-fA-F0-9]{2})*$"}, + "base64Binary" : { "type" : "string", "pattern" : "^[A-Za-z0-9+\/]*={0,3}$"}, + + "anyType" : {} + } + + @abstractmethod + def map(self, xst : BaseXsdType): + return None + + @classmethod + def extract_namespace(cls, qname: str): + match = re.search(r'^\{([^\{\}]+)\}(([^\{\}]+))$', qname) + if match is None: + return None + return match.group(1) + + @classmethod + def get_ref_for(cls, xsd_type: XsdType, current_ns : str): + ns = cls.extract_namespace(xsd_type.name) + if ns == current_ns: + return { "$ref" : f"#/$defs/{xsd_type.local_name}" } + else: + mapped_id = cls.ns_to_id_map[ns] + return { "$ref" : f"{mapped_id['id']}#/$defs/{xsd_type.local_name}"} + + @classmethod + def get_type_from_elem(cls, elem: XsdElement, current_ns : str): + ns = cls.extract_namespace(elem.type.name) + if (ns == TypeMapping.XSD_NS): + # this should be an XSD primitive type + return dict(TypeMapping.XSD_TYPE_MAP[elem.type.local_name]) + else: + return cls.get_ref_for(elem.type, current_ns) + + + + + + + + diff --git a/utils/translate/XSDNativeSimpleTypeMapping.py b/utils/translate/XSDNativeSimpleTypeMapping.py new file mode 100644 index 0000000000000000000000000000000000000000..772ac10b308d4c2128bcf1bac3271117d9bbe80e --- /dev/null +++ b/utils/translate/XSDNativeSimpleTypeMapping.py @@ -0,0 +1,72 @@ +import logging + +from xmlschema.validators.simple_types import * +from xmlschema.validators.complex_types import * +from xmlschema.validators.groups import * +from xmlschema.validators.facets import * + +from .TypeMapping import TypeMapping +from .SimpleTypeMapping import SimpleTypeMapping + +log = logging.getLogger() + +class XSDNativeSimpleTypeMapping(SimpleTypeMapping): + + def map(self, xst: BaseXsdType): + log.debug(f"Attempting mapping of {xst} to XSD native type") + j = super().map(xst) + if j is None: + log.debug("Not a simple type, giving up") + return None + + mapped_type = TypeMapping.XSD_TYPE_MAP.get(xst.base_type.local_name) + parent_type = None + + if mapped_type is None: + ns = TypeMapping.extract_namespace(xst.base_type.name) + if ns == XSDNativeSimpleTypeMapping.XSD_NS: + print (xst) + print (xst.base_type) + raise Exception (f"No mapping for xs:{xst.base_type.local_name}") + if len(xst.facets) == 0: + mapped_type = TypeMapping.get_ref_for(xst.base_type, xst.namespaces['']) + else: + parent_type = TypeMapping.get_ref_for(xst.base_type, xst.namespaces['']) + mapped_type = TypeMapping.XSD_TYPE_MAP.get(xst.root_type.local_name) + if mapped_type is None: + raise Exception (f"Could not find mapping for root type xs:{xst.root_type.local_name}") + + mapped_type = dict(mapped_type) + + for k, v in xst.facets.items(): + log.debug(f"Mapping facet {v}") + if type(v) is XsdMaxLengthFacet: + mapped_type['maxLength'] = v.value + continue + if type(v) is XsdMinLengthFacet: + mapped_type['minLength'] = v.value + continue + if type(v) is XsdPatternFacets: + if len(v.regexps) > 1: + raise Exception (f"Multiple patterns given in facet {v} of {xst}") + p = v.regexps[0] + if (not p.startswith('^')) and (not p.endswith('$')): + p = f"^{p}$" + mapped_type['pattern'] = p + continue + if type (v) is XsdMinInclusiveFacet: + mapped_type['minimum'] = v.value + continue + if type (v) is XsdMaxInclusiveFacet: + mapped_type['maximum'] = v.value + continue + if type (v) is XsdMinExclusiveFacet: + mapped_type['exclusiveMinimum'] = v.value + continue + if type (v) is XsdMaxExclusiveFacet: + mapped_type['exclusiveMaximum'] = v.value + continue + raise Exception (f"Unhandled facet {v}") + if parent_type: + return { 'allOf' : [parent_type, mapped_type] } + return mapped_type diff --git a/utils/translate/__init__.py b/utils/translate/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ba05008f9be181798aad7578d1cb1b75ee595f71 --- /dev/null +++ b/utils/translate/__init__.py @@ -0,0 +1,64 @@ +import logging + +from pathlib import Path +from xmlschema import * + +from .TypeMapping import * +from .XSDNativeSimpleTypeMapping import XSDNativeSimpleTypeMapping +from .ChoiceMapping import ChoiceMapping +from .SequenceMapping import SequenceMapping + + +log = logging.getLogger() + +mappings = [ + XSDNativeSimpleTypeMapping(), + ChoiceMapping(), + SequenceMapping(), +] + +def translate_schema (schema_path: str, ns_to_id_map: dict, schema_locations = []): + js = { + "$id" : "?", + "$defs" : {} + } + + logging.info(f"Translating schema {schema_path}") + xs = XMLSchema(schema_path, validation='lax', locations=schema_locations) + logging.info(f"Schema namespace: {xs.target_namespace}" ) + + schema_id = ns_to_id_map[xs.target_namespace]["id"] + js['$id'] = schema_id + + TypeMapping.ns_to_id_map = ns_to_id_map + + elementList = [] + for elementName, element in xs.elements.items(): + logging.info(f"Processing element {elementName} : {element}") + elementList.append(TypeMapping.get_ref_for(element.type, element.namespaces[''])) + if len(elementList) == 1: + js['$ref'] = elementList[0]['$ref'] + elif len(elementList) > 1: + js['oneOf'] = elementList + + descendent_types = {} + for type_name, xsd_type in xs.types.items(): + logging.info(f"Processing {type_name} : {xsd_type}") + + j = None + for mapping in mappings: + log.debug("\n----------------------------------------") + j = mapping.map(xsd_type) + if j is None: + continue + else: + break + if j is None: + raise Exception(f"Unmapped type {type_name} ({xsd_type})") + js["$defs"][xsd_type.local_name] = j + logging.debug (f"Mapped {type_name} to {j}") + + print (descendent_types) + return js + + diff --git a/utils/translate_spec.py b/utils/translate_spec.py new file mode 100644 index 0000000000000000000000000000000000000000..eac24e496f3c5e2cf3c6640161db6563b3607044 --- /dev/null +++ b/utils/translate_spec.py @@ -0,0 +1,107 @@ +import json +import os +import logging +from pathlib import Path +import sys + +from xmlschema import * + +from translate import * + +logging.basicConfig(level = logging.INFO) + +def build_schema_locations (paths): + schema_locations = [] + for schemaFile in paths: + try: + xs = XMLSchema(schemaFile, validation='skip') + schema_locations.append((xs.target_namespace, str(Path(schemaFile).resolve()))) + logging.debug (" [ {0} -> {1} ]".format(xs.target_namespace, schemaFile)) + except XMLSchemaParseError as ex: + logging.debug (" [ {0} failed to parse: {1} ]".format(schemaFile, ex)) + return schema_locations + +def get_json(filename): + with open(filename) as f: + j = json.load(f) + return j + +def convert_ns_to_id (ns): + if ns.startswith('http://uri.etsi.org'): + c = ns.split("/") + return f"ts_1{c[3]}{'_' + c[7] if len(c) > 7 else ''}_{c[5]}_{c[6]}" + else: + return ns.replace("http://","").replace("/","_") + +def convert_xsd_to_filename (xsd): + f = Path(xsd) + return f.name.replace('.xsd', '.schema.json') + +if __name__ == "__main__": + if len(sys.argv) < 2: + logging.error ("Usage: translate_spec.py path_to_config_file") + exit(-1) + + config = get_json(sys.argv[1]) + + + logging.info("Bulding ns map...") + ns_map = {} + for location, settings in config['schemas'].items(): + xs = XMLSchema(location, validation='skip') + ns = xs.target_namespace + id = convert_ns_to_id(ns) + ns_map[ns] = { + "id" : id, + "location" : str(Path(location).resolve()) + } | settings + logging.debug(ns_map) + + logging.info("Building schema locations") + schema_locations = [(k, v["location"]) for k,v in ns_map.items()] + logging.debug(schema_locations) + + output_path = Path(config['output']) + if not output_path.exists(): + logging.info("Creating output directory") + os.mkdir(str(output_path)) + + logging.info("Translating schemas...") + json_schemas = {} + for schema_tuple in schema_locations: + logging.info(f" Translating {schema_tuple}") + if 'xmldsig' in (schema_tuple[1]): + # TODO - work out what to do here + logging.info(" Skipping XML Dsig...") + continue + js = translate_schema(schema_tuple[1], ns_map, schema_locations) + + # TODO - Special case, get rid of signature + if ns_map[schema_tuple[0]] == 'core.json': + js['$defs']['HI1Message']['properties'].pop('Signature') + js_path = output_path / convert_xsd_to_filename(schema_tuple[1]) + + # TODO - Special case - abstract HI1Object + if "Core" in schema_tuple[1]: + js["$defs"]['ConcreteHI1Object'] = { + 'oneOf' : [ + {'$ref' : 'ts_103120_Authorisation_2020_09#/$defs/AuthorisationObject'}, + {'$ref' : 'ts_103120_Task_2020_09#/$defs/LITaskObject'}, + {'$ref' : 'ts_103120_Task_2020_09#/$defs/LPTaskObject'}, + {'$ref' : 'ts_103120_Task_2020_09#/$defs/LDTaskObject'}, + {'$ref' : 'ts_103120_Document_2020_09#/$defs/DocumentObject'}, + {'$ref' : 'ts_103120_Notification_2016_02#/$defs/NotificationObject'}, + {'$ref' : 'ts_103120_Delivery_2019_10#/$defs/DeliveryObject'}, + {'$ref' : 'ts_103120_TrafficPolicy_2022_07#/$defs/TrafficPolicyObject'}, + {'$ref' : 'ts_103120_TrafficPolicy_2022_07#/$defs/TrafficRuleObject'}, + ] + } + + json_string = json.dumps(js, indent=2) + + if "Core" in schema_tuple[1]: + json_string = json_string.replace('"$ref": "#/$defs/HI1Object"', '"$ref": "#/$defs/ConcreteHI1Object"') + + with open(str(js_path), 'w') as f: + f.write(json_string) + json_schemas[js['$id']] = json.loads(json_string) diff --git a/utils/ts103120_config.json b/utils/ts103120_config.json new file mode 100644 index 0000000000000000000000000000000000000000..4c8bce711503acec8132fadb0e6e7ed2a1fe194d --- /dev/null +++ b/utils/ts103120_config.json @@ -0,0 +1,36 @@ +{ + "schemas" : { + "./103120/schema/xsd/ts_103120_Authorisation.xsd" : { + "prefix" : "auth" + }, + "./103120/schema/xsd/ts_103120_Common.xsd" : { + "prefix" : "common" + }, + "./103120/schema/xsd/ts_103120_Core.xsd" : { + }, + "./103120/schema/xsd/ts_103120_Delivery.xsd" : { + "prefix" : "delivery" + }, + "./103120/schema/xsd/ts_103120_Document.xsd" : { + "prefix" : "doc" + }, + "./103120/schema/xsd/ts_103120_Notification.xsd" : { + "prefix" : "notification" + }, + "./103120/schema/xsd/ts_103120_Task.xsd" : { + "prefix" : "task" + }, + "./103120/schema/xsd/ts_103120_TrafficPolicy.xsd" : { + "prefix" : "tp" + }, + "./103280/TS_103_280.xsd" : { + "prefix" : "etsi280", + "skip" : true + }, + "./testing/deps/xmldsig/xmldsig-core-schema.xsd" : { + "prefix" : "xmldsig", + "skip" : true + } + }, + "output" : "./103120/schema/json/" +} diff --git a/utils/validate_json.py b/utils/validate_json.py new file mode 100644 index 0000000000000000000000000000000000000000..43f460b4eb6c5ad7191cf02ebf88417d19535c24 --- /dev/null +++ b/utils/validate_json.py @@ -0,0 +1,122 @@ +import sys +from jsonschema import validate, RefResolver, Draft202012Validator +from jsonschema.exceptions import ValidationError +import json +from pathlib import Path +import logging +import argparse + + +def handle_uri(u): + print(u) + +def load_json(path : str): + with open(path) as f: + return json.load(f) + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + + parser.add_argument('-s','--schemadir', action="append", help="Directory containing supporting schema files to use for validation") + parser.add_argument('-v', '--verbose', action="count", help="Verbose logging (can be specified multiple times)") + parser.add_argument('-i', '--input', type=argparse.FileType('r'), default=sys.stdin, help="Path to input file (if absent, stdin is used)") + parser.add_argument('schema', help="Primary schema to validate against") + + args = parser.parse_args() + + match args.verbose: + case v if v and v >= 2: + logging.basicConfig(level=logging.DEBUG) + case 1: + logging.basicConfig(level=logging.INFO) + case _: + logging.basicConfig(level=logging.WARNING) + + logging.debug(f"Arguments: {args}") + + instance_doc = json.loads(args.input.read()) + args.input.close() + main_schema = load_json(args.schema) + schema_dict = { main_schema['$id'] : main_schema } + + if args.schemadir: + schema_paths = [] + for d in args.schemadir: + logging.info(f"Searching {d}") + logging.info(list(Path(d).rglob("*.schema.json"))) + schema_paths += [f for f in Path(d).rglob("*.schema.json")] + logging.info(f"Schema files loaded: {schema_paths}") + + schemas_json = [json.load(p.open()) for p in schema_paths] + schema_dict = schema_dict | { s['$id'] : s for s in schemas_json } + + logging.info(f"Schema IDs loaded: {[k for k in schema_dict.keys()]}") + + logging.debug (f"Instance doc: {instance_doc}") + logging.debug (f"Main schema: {main_schema}") + + resolver = RefResolver(None, + referrer=None, + store=schema_dict) + + v = Draft202012Validator(main_schema, resolver=resolver) + try: + v.validate(instance_doc) + except ValidationError as ex: + # Any failure within the Payload element results in a failure against the oneOf constraint in the Payload element + # This isn't terribly helpful in working out what is actually wrong, so in this case we attempt an explicit + # validation against the relevant oneOf alternation to try and get a more useful validation error + if list(ex.schema_path) == ['properties', 'Payload', 'oneOf']: + logging.error ("Error detected validating payload oneOf - attempting explicit validation...") + try: + if 'RequestPayload' in instance_doc['Payload'].keys(): + request_fragment_schema = { "$ref" : "ts_103120_Core_2019_10#/$defs/RequestPayload" } + v = Draft202012Validator(request_fragment_schema, resolver=resolver) + v.validate(instance_doc['Payload']['RequestPayload']) + elif 'ResponsePayload' in instance_doc['Payload'].keys(): + request_fragment_schema = { "$ref" : "ts_103120_Core_2019_10#/$defs/ResponsePayload" } + v = Draft202012Validator(request_fragment_schema, resolver=resolver) + v.validate(instance_doc['Payload']['ResponsePayload']) + else: + logging.error("No RequestPayload or ResponsePayload found - is the Payload malformed?") + raise ex + except ValidationError as ex2: + # Similar to above, this is inner validation to try and get a more useful error in the event + # that something fails the verb oneOf constraint + logging.error("Error detected in ActionRequests/ActionResponses") + error_path = list(ex2.schema_path) + if error_path != ['properties', 'ActionRequests', 'properties', 'ActionRequest', 'items', 'allOf', 1, 'oneOf'] and error_path != ['properties', 'ActionResponses', 'properties', 'ActionResponse', 'items', 'allOf', 1, 'oneOf']: + logging.error("Error not in inner Request/Response allOf/oneOf constraint") + raise ex2 + j = ex2.instance + j.pop('ActionIdentifier') # Remove ActionIdentifier - one remaining key will be the verb + verb = list(j.keys())[0] + message = "Request" if error_path[1] == "ActionRequests" else "Response" + v = Draft202012Validator({"$ref" : f"ts_103120_Core_2019_10#/$defs/{verb}{message}"}, resolver=resolver) + try: + v.validate(j[verb]) + except ValidationError as ex3: + logging.error("Error detected in verb") + # The final level of validation is for the actual HI1Object validation + if list(ex3.schema_path) != ['properties', 'HI1Object', 'oneOf']: + logging.error("Error not inside HI1Object") + raise ex3 + object_type = ex3.instance['@xsi:type'].split('}')[-1] + object_ref = { + 'AuthorisationObject': 'ts_103120_Authorisation_2020_09#/$defs/AuthorisationObject', + 'LITaskObject': 'ts_103120_Task_2020_09#/$defs/LITaskObject', + 'LDTaskObject': 'ts_103120_Task_2020_09#/$defs/LDTaskObject', + 'LPTaskObject': 'ts_103120_Task_2020_09#/$defs/LPTaskObject', + 'DocumentObject': 'ts_103120_Document_2020_09#/$defs/DocumentObject', + 'NotificationObject': 'ts_103120_Notification_2016_02#/$defs/NotificationObject', + 'DeliveryObject': 'ts_103120_Delivery_2019_10#/$defs/DeliveryObject', + 'TrafficPolicyObject': 'ts_103120_TrafficPolicy_2022_07#/$defs/TrafficPolicyObject', + 'TrafficRuleObject': 'ts_103120_TrafficPolicy_2022_07#/$defs/TrafficRuleObject', + }[object_type] + v = Draft202012Validator({"$ref" : object_ref}, resolver=resolver) + v.validate(ex3.instance) + + exit(-1) + + + logging.info("Done") diff --git a/utils/xml_to_json.py b/utils/xml_to_json.py new file mode 100644 index 0000000000000000000000000000000000000000..7caebb6b9e195594c494dbc6fc1d512c2727be84 --- /dev/null +++ b/utils/xml_to_json.py @@ -0,0 +1,120 @@ +import sys +import logging +from pprint import pprint +import json +from pathlib import Path +import fileinput + +import xmltodict +import argparse + + +def extract_prefixes (d): + return { k.split(':')[1]: d[k] for k in d.keys() if k.startswith("@xmlns:") } + +def removePrefixes (o, prefixes): + if not isinstance(o, dict): return + replacements = [] + for k,v in o.items(): + if isinstance(v, dict): + removePrefixes(v, prefixes) + if isinstance(v, list): + for i in v: + removePrefixes(i, prefixes) + if ":" in k: + prefix = k.split(':')[0] + if (prefix) in prefixes: + new_key = k.split(':')[1] + replacements.append( (k, new_key) ) + for r in replacements: + o[r[1]] = o.pop(r[0]) + +object_namespaces = { + 'AuthorisationObject' : 'http://uri.etsi.org/03120/common/2020/09/Authorisation', + 'DeliveryObject' : 'http://uri.etsi.org/03120/common/2019/10/Delivery', + 'DocumentObject' : 'http://uri.etsi.org/03120/common/2020/09/Document', + 'NotificationObject' : 'http://uri.etsi.org/03120/common/2016/02/Notification', + 'LITaskObject' : 'http://uri.etsi.org/03120/common/2020/09/Task', + 'LPTaskObject' : 'http://uri.etsi.org/03120/common/2020/09/Task', + 'LDTaskObject' : 'http://uri.etsi.org/03120/common/2020/09/Task', + 'TrafficPolicyObject' : 'http://uri.etsi.org/03120/common/2022/07/TrafficPolicy', + 'TrafficRuleObject' : 'http://uri.etsi.org/03120/common/2022/07/TrafficPolicy' +} + +coerce_to_list = [ + 'auth:AuthorisationApprovalDetails', + 'auth:AuthorisationFlag', + 'auth:CSPID', + 'common:ApproverContactDetails', + 'ActionRequest', + 'ActionResponse', + 'ListResponseRecord', + 'AssociatedObject', + 'doc:DocumentSignature', + 'doc:DocumentProperty', + 'notification:AssociatedObjectStatus', + 'task:ApprovalDetails', + 'task:TargetIdentifierValue', + 'task:DeliveryDestination', + 'task:TaskFlag', + 'task:AlternativePreservationReference', + 'task:ApprovalDetails', + 'task:ObservedTimes', + 'task:RequestValue', + 'task:RequestSubtype', + 'task:LDDeliveryDestination', + 'task:LDTaskFlag', + 'task:TrafficPolicyReference', + 'tp:TrafficRuleReference', + 'tp:Criteria' +] + +coerce_to_int = [ + 'ActionIdentifier', + 'delivery:SequenceNumber', + 'task:Order' +] + +coerce_to_bool = [ + 'delivery:LastSequence' +] + +def postprocessor (path, key, value): + if key == "@xsi:type": + object_name = value.split(":")[-1] + if object_name in object_namespaces.keys(): + value = "{" + object_namespaces[object_name] + "}" + object_name + return key, value + if key in coerce_to_int: + return key, int(value) + if key in coerce_to_bool: + return key, bool(value) + return key, value + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument('-v', '--verbose', action='count', help='Verbose logging (can be specified multiple times)') + parser.add_argument('-i', '--input', type=argparse.FileType('r'), default=sys.stdin, help="Path to input file (if absent, stdin is used)") + args = parser.parse_args() + + match args.verbose: + case v if v and v >= 2: + logging.basicConfig(level=logging.DEBUG) + case 1: + logging.basicConfig(level=logging.INFO) + case _: + logging.basicConfig(level=logging.WARNING) + + logging.debug(f"Arguments: {args}") + + s = args.input.read() + args.input.close() + + logging.debug(s) + + d = xmltodict.parse(s, + force_list=tuple(coerce_to_list), + postprocessor=postprocessor + )['HI1Message'] + + print(json.dumps(d, indent=2))