Initial commit

Signed-off-by: Gabor Szalai <gabor.szalai@ericsson.com>
diff --git a/5G_system_TS29510_Nnrf_CNL113886.tpd b/5G_system_TS29510_Nnrf_CNL113886.tpd
new file mode 100644
index 0000000..d1e4734
--- /dev/null
+++ b/5G_system_TS29510_Nnrf_CNL113886.tpd
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TITAN_Project_File_Information version="1.0">
+  <ProjectName>5G_system_TS29510_Nnrf_CNL113886</ProjectName>
+  <ReferencedProjects>
+    <ReferencedProject name="5G_system_TS29518_Namf_CNL113890" projectLocationURI="../5G_system_TS29518_Namf_CNL113890/5G_system_TS29518_Namf_CNL113890.tpd"/>
+    <ReferencedProject name="5G_system_TS29571_CommonData_CNL113880" projectLocationURI="../5G_system_TS29571_CommonData_CNL113880/5G_system_TS29571_CommonData_CNL113880.tpd"/>
+  </ReferencedProjects>
+  <Folders>
+    <FolderResource projectRelativePath="src" relativeURI="src"/>
+  </Folders>
+  <Files>
+    <FileResource projectRelativePath="src/TS29510_NRF_OAuth2_v15.ttcn" relativeURI="src/TS29510_NRF_OAuth2_v15.ttcn"/>
+    <FileResource projectRelativePath="src/TS29510_Nnrf_NFDiscovery.ttcn" relativeURI="src/TS29510_Nnrf_NFDiscovery.ttcn"/>
+    <FileResource projectRelativePath="src/TS29510_Nnrf_NFManagement.ttcn" relativeURI="src/TS29510_Nnrf_NFManagement.ttcn"/>
+  </Files>
+  <ActiveConfiguration>Default</ActiveConfiguration>
+  <Configurations>
+    <Configuration name="Default">
+      <ProjectProperties>
+        <MakefileSettings>
+          <GNUMake>true</GNUMake>
+          <incrementalDependencyRefresh>true</incrementalDependencyRefresh>
+          <targetExecutable>bin/5G_system_TS29510_Nnrf_CNL113886</targetExecutable>
+        </MakefileSettings>
+        <LocalBuildSettings>
+          <workingDirectory>bin</workingDirectory>
+        </LocalBuildSettings>
+      </ProjectProperties>
+    </Configuration>
+  </Configurations>
+</TITAN_Project_File_Information>
diff --git a/doc/5G_system_TS29572_Nlmf_Description.adoc b/doc/5G_system_TS29572_Nlmf_Description.adoc
new file mode 100644
index 0000000..db7bc10
--- /dev/null
+++ b/doc/5G_system_TS29572_Nlmf_Description.adoc
@@ -0,0 +1,82 @@
+= 5G system TS29510 Nnrf Protocol Modules for TTCN-3 Toolset with TITAN, Description
+:author: Gábor Szalai
+:toc: left
+
+== About This Document
+
+This is the description for the 5G system TS29510 Nnrf protocol module. The 5G system TS29510 Nnrf protocol modules are developed for the TTCN-3 Toolset with Titan. 
+
+== Functionality
+
+The 5G system TS29510 Nnrf protocol module implements the object structures of the 3GPP TS 29510 v15.1.0<<_5, [5]>> in a formalized way, using the standard specification language TTCN-3. This allows defining of test data (templates) in the TTCN-3 language and correctly encoding/decoding messages when executing test suites using the Titan TTCN-3 test environment.
+The 5G system TS29510 Nnrf protocol module uses Titan’s JSON encoding <<_3, [3]>> and hence is usable with the Titan test toolset only.
+
+=== System Requirements
+Protocol modules are a set of TTCN-3 source code files that can be used as part of TTCN-3 test suites only. Hence, protocol modules alone do not put specific requirements on the system used. However, in order to compile and execute a TTCN-3 test suite using the set of protocol modules the following system requirements must be satisfied:
+
+* Titan TTCN-3 Test Executor version CRL 113 200/6 R5A (6.5.pl0) or higher installed. For Installation Guide see <<_2, [2]>>. Please note: This version of the test port is not compatible with Titan releases earlier than CRL 113 200/6 R5A.
+
+===	Installation
+The set of protocol modules can be used in developing TTCN-3 test suites using any text editor. Since the 5G system TS29510 Nnrf protocol is used as a part of a TTCN-3 test suite, this requires TTCN-3 Test Executor be installed before the module can be compiled and executed together with other parts of the test suite. For more details on the installation of TTCN-3 Test Executor see the relevant section of <<_2, [2]>>.
+
+== Interface description
+
+=== Encoding/decoding and other related functions
+This product also contains encoding/decoding functions, which assure correct encoding of messages when sent from Titan and correct decoding of messages when received by Titan. 
+
+==== Implemented encoding and decoding functions
+
+[source]
+----
+Name	Type of formal parameters	Type of return value
+f_enc_SearchResult(in SearchResult pdu) return octetstring 
+f_dec_SearchResult(in octetstring stream, out SearchResult pdu) return integer 
+f_enc_NFProfile(in NFProfile pdu) return octetstring 
+f_dec_NFProfile(in octetstring stream, out NFProfile pdu) return integer 
+f_enc_NFRegistrationData(in NFRegistrationData pdu) return octetstring 
+f_dec_NFRegistrationData(in octetstring stream, out NFRegistrationData pdu) return integer 
+f_enc_SubscriptionData(in SubscriptionData pdu) return octetstring 
+f_dec_SubscriptionData(in octetstring stream, out SubscriptionData pdu) return integer 
+f_enc_NotificationData(in NotificationData pdu) return octetstring 
+f_dec_NotificationData(in octetstring stream, out NotificationData pdu) return integer 
+f_enc_AccessTokenRsp(in AccessTokenRsp pdu) return octetstring 
+f_dec_AccessTokenRsp(in octetstring stream, out AccessTokenRsp pdu) return integer 
+f_enc_AccessTokenErr(in AccessTokenErr pdu) return octetstring 
+f_dec_AccessTokenErr(in octetstring stream, out AccessTokenErr pdu) return integer 
+----
+
+== Usage
+
+The protocol module provides abstract data types for JSON objects used by the services defined in the standard <<_5, [5]>>. The protocol module provides encoder and decoder functions for the JSON objects. The decoder function validates the received JSON object based on the JSON schema as well. Only the validated JSON value is decoded.
+
+== Terminology	
+
+=== Abbreviations
+
+JSON:: JavaScript Object Notation
+
+PDU:: Protocol Data Unit
+
+TTCN-3:: Testing and Test Control Notation version 3
+
+== References
+
+[[_1]]
+[1]	ETSI ES 201 873-1 v4.4.1 (2012-04) +
+The Testing and Test Control Notation version 3. Part 1: Core Language
+
+[[_2]]
+[2]	1/ 198 17-CRL 113 200/6 Uen +
+Installation Guide for the TITAN TTCN-3 Test Executor
+
+[[_3]]
+[3]	2/198 17-CRL 113 200/6 Uen +
+Programmer's Technical Reference for Titan TTCN-3 Test Executor
+
+[[_4]]
+[4]	https://www.json.org
+
+[[_5]]
+[5] 3GPP TS 29510 v15.1.0+
+5G System; Network function repository services; Stage 3
+
diff --git a/doc/change.log b/doc/change.log
new file mode 100644
index 0000000..352060a
--- /dev/null
+++ b/doc/change.log
@@ -0,0 +1,15 @@
+= 5G system TS29510 Nnrf Protocol Modules for TTCN-3 Toolset with TITAN, Change log

+:author: Gábor Szalai

+:toc: left

+

+== Changes

+

+=== R1A

+

+Initial revision

+

+=== R2A

+

+The file TS29510_NRF_OAuth2.ttcn was renamed to TS29510_NRF_OAuth2_v15.ttcn.

+

+

diff --git a/src/TS29510_NRF_OAuth2_v15.ttcn b/src/TS29510_NRF_OAuth2_v15.ttcn
new file mode 100644
index 0000000..0ac05d1
--- /dev/null
+++ b/src/TS29510_NRF_OAuth2_v15.ttcn
@@ -0,0 +1,70 @@
+/******************************************************************************
+* Copyright (c) 2000-2019  Ericsson AB
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v2.0
+* which accompanies this distribution, and is available at
+* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
+*
+* Contributors:
+*   Gabor Szalai - initial implementation and initial documentation
+******************************************************************************/
+//
+//  File:               TS29510_NRF_OAuth2_v15.ttcn
+//  Description:	      Type definitions for 3GPP TS29510
+/////////////////////////////////////////////// 
+module TS29510_NRF_OAuth2_v15 {
+
+  import from TS29571_CommonData all
+  import from TS29510_Nnrf_NFManagement all
+
+  external function f_enc_AccessTokenRsp(in AccessTokenRsp pdu) return octetstring 
+  with { extension "prototype(convert) encode(JSON)" }
+
+  external function f_dec_AccessTokenRsp(in octetstring stream, out AccessTokenRsp pdu) return integer 
+  with { extension "prototype(backtrack) decode(JSON)" }
+
+  external function f_enc_AccessTokenErr(in AccessTokenErr pdu) return octetstring 
+  with { extension "prototype(convert) encode(JSON)" }
+
+  external function f_dec_AccessTokenErr(in octetstring stream, out AccessTokenErr pdu) return integer 
+  with { extension "prototype(backtrack) decode(JSON)" }
+
+
+  type set AccessTokenReq {
+    enumerated { client_credentials} grant_type,
+    TS29571_CommonData.NfInstanceId    nfInstanceId,
+    TS29510_Nnrf_NFManagement.NFType    nfType,
+    TS29510_Nnrf_NFManagement.NFType    targetNfType,
+    charstring scope // (pattern "^([a-zA-Z0-9_]*[*]{0,1})$")
+  }
+
+  type set AccessTokenRsp {
+    charstring access_token,
+    charstring token_type,
+    integer expires_in optional,
+    charstring scope optional // (pattern "^([a-zA-Z0-9_]*[*]{0,1})$") 
+  }
+
+  type set AccessTokenClaims {
+    TS29571_CommonData.NfInstanceId    issuer,
+    charstring subject,
+    set of       TS29571_CommonData.NfInstanceId    audience,
+    charstring scope, // (pattern "^([a-zA-Z0-9_]*[*]{0,1})$"),
+    integer expiration
+  }
+
+  type set AccessTokenErr {
+    enumerated { invalid_request, invalid_client, invalid_grant, unauthorized_client, unsupported_grant_type, invalid_sope} error_,
+    charstring error_description optional,
+    charstring error_uri optional
+  } with {
+    variant (error_) "name as 'error'"
+  }
+
+
+
+
+
+} with {
+  encode "JSON"
+}
diff --git a/src/TS29510_Nnrf_NFDiscovery.ttcn b/src/TS29510_Nnrf_NFDiscovery.ttcn
new file mode 100644
index 0000000..87920be
--- /dev/null
+++ b/src/TS29510_Nnrf_NFDiscovery.ttcn
@@ -0,0 +1,83 @@
+/******************************************************************************
+* Copyright (c) 2000-2019  Ericsson AB
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v2.0
+* which accompanies this distribution, and is available at
+* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
+*
+* Contributors:
+*   Gabor Szalai - initial implementation and initial documentation
+******************************************************************************/
+//
+//  File:               TS29510_Nnrf_NFDiscovery.ttcn
+//  Description:	      Type definitions for 3GPP TS29510
+/////////////////////////////////////////////// 
+module TS29510_Nnrf_NFDiscovery {
+
+  import from TS29571_CommonData all
+  import from TS29510_Nnrf_NFManagement all
+  import from JSON_Generic all;
+
+  external function f_enc_SearchResult(in SearchResult pdu) return octetstring 
+  with { extension "prototype(convert) encode(JSON)" }
+
+  external function f_dec_SearchResult(in octetstring stream, out SearchResult pdu) return integer 
+  with { extension "prototype(backtrack) decode(JSON)" }
+
+
+  type set SearchResult {
+    integer validityPeriod optional,
+    set of       NFProfile    nfInstances optional
+  }
+
+  type set NFProfile {
+    TS29571_CommonData.NfInstanceId    nfInstanceId,
+    TS29510_Nnrf_NFManagement.NFType    nfType,
+    TS29510_Nnrf_NFManagement.NFStatus    nfStatus,
+    TS29571_CommonData.PlmnId    plmn optional,
+    set of       TS29571_CommonData.Snssai    sNssais optional,
+    set of       charstring nsiList optional,
+    TS29510_Nnrf_NFManagement.Fqdn    fqdn optional,
+    set of       TS29571_CommonData.Ipv4Addr    ipv4Address optional,
+    set of       TS29571_CommonData.Ipv6Addr    ipv6Address optional,
+    integer capacity (0..65535) optional,
+    integer load (0..100) optional,
+    charstring locality optional,
+    integer priority (0..65535) optional,
+    TS29510_Nnrf_NFManagement.UdrInfo    udrInfo optional,
+    TS29510_Nnrf_NFManagement.UdmInfo    udmInfo optional,
+    TS29510_Nnrf_NFManagement.AusfInfo    ausfInfo optional,
+    TS29510_Nnrf_NFManagement.AmfInfo    amfInfo optional,
+    TS29510_Nnrf_NFManagement.SmfInfo    smfInfo optional,
+    TS29510_Nnrf_NFManagement.UpfInfo    upfInfo optional,
+    TS29510_Nnrf_NFManagement.PcfInfo    pcfInfo optional,
+    TS29510_Nnrf_NFManagement.BsfInfo    bsfInfo optional,
+    JSON_generic_val customInfo optional,
+    TS29571_CommonData.DateTime    recoveryTime optional,
+    set of       NFService    nfServices optional
+  }
+
+  type set NFService {
+    charstring serviceInstanceId,
+    TS29510_Nnrf_NFManagement.ServiceName    serviceName,
+    set of       TS29510_Nnrf_NFManagement.NFServiceVersion    versions,
+    TS29571_CommonData.UriScheme    scheme,
+    TS29510_Nnrf_NFManagement.NFServiceStatus    nfServiceStatus,
+    TS29510_Nnrf_NFManagement.Fqdn    fqdn optional,
+    set of       TS29510_Nnrf_NFManagement.IpEndPoint    ipEndPoints optional,
+    charstring apiPrefix optional,
+    set of       TS29510_Nnrf_NFManagement.DefaultNotificationSubscription    defaultNotificationSubscriptions optional,
+    integer capacity (0..65535) optional,
+    integer load (0..100) optional,
+    integer priority (0..65535) optional,
+    TS29571_CommonData.DateTime    recoveryTime optional,
+    TS29571_CommonData.SupportedFeatures    supportedFeatures optional
+  }
+
+
+
+
+
+} with {
+  encode "JSON"
+}
diff --git a/src/TS29510_Nnrf_NFManagement.ttcn b/src/TS29510_Nnrf_NFManagement.ttcn
new file mode 100644
index 0000000..72e26a6
--- /dev/null
+++ b/src/TS29510_Nnrf_NFManagement.ttcn
@@ -0,0 +1,405 @@
+/******************************************************************************
+* Copyright (c) 2000-2019  Ericsson AB
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v2.0
+* which accompanies this distribution, and is available at
+* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
+*
+* Contributors:
+*   Gabor Szalai - initial implementation and initial documentation
+******************************************************************************/
+//
+//  File:               TS29510_Nnrf_NFManagement.ttcn
+//  Description:	      Type definitions for 3GPP TS29510
+/////////////////////////////////////////////// 
+module TS29510_Nnrf_NFManagement {
+
+  import from TS29571_CommonData all
+  import from TS29518_Namf_Communication all
+  import from JSON_Generic all;
+
+  external function f_enc_NFProfile(in NFProfile pdu) return octetstring 
+  with { extension "prototype(convert) encode(JSON)" }
+
+  external function f_dec_NFProfile(in octetstring stream, out NFProfile pdu) return integer 
+  with { extension "prototype(backtrack) decode(JSON)" }
+
+  external function f_enc_NFRegistrationData(in NFRegistrationData pdu) return octetstring 
+  with { extension "prototype(convert) encode(JSON)" }
+
+  external function f_dec_NFRegistrationData(in octetstring stream, out NFRegistrationData pdu) return integer 
+  with { extension "prototype(backtrack) decode(JSON)" }
+
+  external function f_enc_SubscriptionData(in SubscriptionData pdu) return octetstring 
+  with { extension "prototype(convert) encode(JSON)" }
+
+  external function f_dec_SubscriptionData(in octetstring stream, out SubscriptionData pdu) return integer 
+  with { extension "prototype(backtrack) decode(JSON)" }
+
+  external function f_enc_NotificationData(in NotificationData pdu) return octetstring 
+  with { extension "prototype(convert) encode(JSON)" }
+
+  external function f_dec_NotificationData(in octetstring stream, out NotificationData pdu) return integer 
+  with { extension "prototype(backtrack) decode(JSON)" }
+
+
+  type set NFProfile {
+    TS29571_CommonData.NfInstanceId    nfInstanceId,
+    NFType    nfType,
+    NFStatus    nfStatus,
+    TS29571_CommonData.PlmnId    plmn optional,
+    set of       TS29571_CommonData.Snssai    sNssais optional,
+    set of       charstring nsiList optional,
+    Fqdn    fqdn optional,
+    Fqdn    interPlmnFqdn optional,
+    set of       TS29571_CommonData.Ipv4Addr    ipv4Addresses optional,
+    set of       TS29571_CommonData.Ipv6Addr    ipv6Addresses optional,
+    integer priority (0..65535) optional,
+    integer capacity (0..65535) optional,
+    integer load (0..100) optional,
+    charstring locality optional,
+    UdrInfo    udrInfo optional,
+    UdmInfo    udmInfo optional,
+    AusfInfo    ausfInfo optional,
+    AmfInfo    amfInfo optional,
+    SmfInfo    smfInfo optional,
+    UpfInfo    upfInfo optional,
+    PcfInfo    pcfInfo optional,
+    BsfInfo    bsfInfo optional,
+    JSON_generic_val customInfo optional,
+    TS29571_CommonData.DateTime    recoveryTime optional,
+    set of       NFService    nfServices optional
+  }
+
+  type set NFService {
+    charstring serviceInstanceId,
+    ServiceName    serviceName,
+    set of       NFServiceVersion    versions,
+    TS29571_CommonData.UriScheme    scheme,
+    NFServiceStatus    nfServiceStatus,
+    Fqdn    fqdn optional,
+    Fqdn    interPlmnFqdn optional,
+    set of       IpEndPoint    ipEndPoints optional,
+    charstring apiPrefix optional,
+    set of       DefaultNotificationSubscription    defaultNotificationSubscriptions optional,
+    set of       TS29571_CommonData.PlmnId    allowedPlmns optional,
+    set of       NFType    allowedNfTypes optional,
+    set of       charstring allowedNfDomains optional,
+    set of       TS29571_CommonData.Snssai    allowedNssais optional,
+    integer priority (0..65535) optional,
+    integer capacity (0..65535) optional,
+    integer load (0..100) optional,
+    TS29571_CommonData.DateTime    recoveryTime optional,
+    TS29571_CommonData.SupportedFeatures    supportedFeatures optional
+  }
+
+  type enumerated NFType_enum { NRF, UDM, AMF, SMF, AUSF, NEF, PCF, SMSF, NSSF, UDR, LMF, GMLC, FIVEG_EIR, SEPP, UPF, N3IWF, AF, UDSF, BSF, CHF, NWDAF}
+  with {
+    variant "text 'FIVEG_EIR' as '5G_EIR'"
+  }
+
+  type union NFType {
+    NFType_enum  enum_val,
+    charstring           other_val
+  } with {
+    variant "JSON: as value"
+  }
+
+
+  type charstring Fqdn
+
+  type set IpEndPoint {
+    TS29571_CommonData.Ipv4Addr    ipv4Address optional,
+    TS29571_CommonData.Ipv6Addr    ipv6Address optional,
+    TransportProtocol    transport optional,
+    integer port_ optional
+  } with {
+    variant (port_) "name as 'port'"
+  }
+
+
+  type set SubscriptionData {
+    charstring nfStatusNotificationUri,
+    charstring subscriptionId, // (pattern "^([0-9]{5,6}-)?[^-]+$"),
+    TS29571_CommonData.DateTime    validityTime optional,
+    set of       NotificationEventType    reqNotifEvents optional,
+    TS29571_CommonData.PlmnId    plmnId optional,
+    TS29571_CommonData.NfInstanceId    nfInstanceId optional,
+    NFType    nfType optional,
+    ServiceName    serviceName optional,
+    charstring amfSetId optional,
+    charstring amfRegionId optional,
+    set of       TS29571_CommonData.Guami    guamiList optional
+  }
+
+  type set UdrInfo {
+    charstring groupId optional,
+    set of       SupiRange    supiRanges optional,
+    set of       IdentityRange    gpsiRanges optional,
+    set of       IdentityRange    externalGroupIdentityfiersRanges optional,
+    set of       DataSetId    supportedDataSets optional
+  }
+
+  type set SupiRange {
+    charstring start_ optional,
+    charstring end optional,
+    charstring pattern_ optional
+  } with {
+    variant (start_) "name as 'start'"
+    variant (pattern_) "name as 'pattern'"
+  }
+
+
+  type set IdentityRange {
+    charstring start_ optional,
+    charstring end optional,
+    charstring pattern_ optional
+  } with {
+    variant (start_) "name as 'start'"
+    variant (pattern_) "name as 'pattern'"
+  }
+
+
+  type enumerated DataSetId_enum { SUBSCRIPTION, POLICY, EXPOSURE, APPLICATION}
+
+  type union DataSetId {
+    DataSetId_enum  enum_val,
+    charstring           other_val
+  } with {
+    variant "JSON: as value"
+  }
+
+
+  type set UdmInfo {
+    charstring groupId optional,
+    set of       SupiRange    supiRanges optional,
+    set of       IdentityRange    gpsiRanges optional,
+    set of       IdentityRange    externalGroupIdentityfiersRanges optional,
+    set of       charstring routingIndicators optional
+  }
+
+  type set AusfInfo {
+    charstring groupId optional,
+    set of       SupiRange    supiRanges optional,
+    set of       charstring routingIndicators optional
+  }
+
+  type set AmfInfo {
+    charstring amfSetId,
+    charstring amfRegionId,
+    set of       TS29571_CommonData.Guami    guamiList,
+    set of       TS29571_CommonData.Tai    taiList optional,
+    set of       TaiRange    taiRangeList optional,
+    set of       TS29571_CommonData.Guami    backupInfoAmfFailure optional,
+    set of       TS29571_CommonData.Guami    backupInfoAmfRemoval optional,
+    N2InterfaceAmfInfo    n2InterfaceAmfInfo optional
+  }
+
+  type set SmfInfo {
+    set of       TS29571_CommonData.Dnn    dnnList,
+    set of       TS29571_CommonData.Tai    taiList optional,
+    set of       TaiRange    taiRangeList optional,
+    Fqdn    pgwFqdn optional
+  }
+
+  type set UpfInfo {
+    set of       SnssaiUpfInfoItem    sNssaiUpfInfoList,
+    set of       charstring smfServingArea optional,
+    set of       InterfaceUpfInfoItem    interfaceUpfInfoList optional
+  }
+
+  type set SnssaiUpfInfoItem {
+    TS29571_CommonData.Snssai    sNssai,
+    set of       DnnUpfInfoItem    dnnUpfInfoList
+  }
+
+  type set DnnUpfInfoItem {
+    TS29571_CommonData.Dnn    dnn
+  }
+
+  type set InterfaceUpfInfoItem {
+    UPInterfaceType    interfaceType,
+    set of       TS29571_CommonData.Ipv4Addr    ipv4EndpointAddress optional,
+    set of       TS29571_CommonData.Ipv6Addr    ipv6EndpointAddress optional,
+    Fqdn    endpointFqdn optional,
+    charstring networkInstance optional
+  }
+
+  type enumerated UPInterfaceType_enum { N3, N6, N9}
+
+  type union UPInterfaceType {
+    UPInterfaceType_enum  enum_val,
+    charstring           other_val
+  } with {
+    variant "JSON: as value"
+  }
+
+
+  type set PcfInfo {
+    set of       TS29571_CommonData.Dnn    dnnList optional,
+    set of       SupiRange    supiRangeList optional
+  }
+
+  type set BsfInfo {
+    set of       Ipv4AddressRange    ipv4AddressRanges optional,
+    set of       Ipv6PrefixRange    ipv6PrefixRanges optional
+  }
+
+  type set Ipv4AddressRange {
+    TS29571_CommonData.Ipv4Addr    start_ optional,
+    TS29571_CommonData.Ipv4Addr    end optional
+  } with {
+    variant (start_) "name as 'start'"
+  }
+
+  type set Ipv6PrefixRange {
+    TS29571_CommonData.Ipv6Prefix    start_ optional,
+    TS29571_CommonData.Ipv6Prefix    end optional
+  } with {
+    variant (start_) "name as 'start'"
+  }
+
+
+  type set DefaultNotificationSubscription {
+    NotificationType    notificationType,
+    TS29571_CommonData.Uri    callbackUri,
+    TS29518_Namf_Communication.N1MessageClass    n1MessageClass optional,
+    TS29518_Namf_Communication.N2InformationClass    n2InformationClass optional
+  }
+
+  type enumerated NotificationType_enum { N1_MESSAGES, N2_INFORMATION, LOCATION_NOTIFICATION, DATA_REMOVAL_NOTIFICATION, DATA_CHANGE_NOTIFICATION}
+
+  type union NotificationType {
+    NotificationType_enum  enum_val,
+    charstring           other_val
+  } with {
+    variant "JSON: as value"
+  }
+
+
+  type enumerated TransportProtocol_enum { TCP}
+
+  type union TransportProtocol {
+    TransportProtocol_enum  enum_val,
+    charstring           other_val
+  } with {
+    variant "JSON: as value"
+  }
+
+
+  type enumerated NotificationEventType_enum { NF_REGISTERED, NF_DEREGISTERED, NF_PROFILE_CHANGED}
+
+  type union NotificationEventType {
+    NotificationEventType_enum  enum_val,
+    charstring           other_val
+  } with {
+    variant "JSON: as value"
+  }
+
+
+  type set NotificationData {
+    NotificationEventType    event,
+    TS29571_CommonData.Uri    nfInstanceUri,
+    NFProfile    newProfile optional
+  }
+
+  type enumerated NFStatus_enum { REGISTERED, SUSPENDED}
+
+  type union NFStatus {
+    NFStatus_enum  enum_val,
+    charstring           other_val
+  } with {
+    variant "JSON: as value"
+  }
+
+
+  type set NFRegistrationData {
+    integer heartBeatTimer,
+    NFProfile    nfProfile
+  }
+
+  type set NFServiceVersion {
+    charstring apiVersionInUri,
+    charstring apiFullVersion,
+    TS29571_CommonData.DateTime    expiry optional
+  }
+
+  type enumerated ServiceName_enum { nnrf_nfm, nnrf_disc, nudm_sdm, nudm_uecm, nudm_ueau, nudm_ee, nudm_pp, namf_comm, namf_evts, namf_mt, namf_location, nsmf_pdusession, nsmf_event_exposure, nausf_auth, nausf_sorprotection, nnef_pfdmanagement, npcf_am_policy_control, npcf_smpolicycontrol, npcf_policyauthorization, npcf_bdtpolicycontrol, nsmsf_sms, nnssf_nsselection, nnssf_nssaiavailability, nudr_dr, nlmf_loc, n5g_eir_eic, nbsf_management, nchf_spendinglimitcontrol, nnwdaf_eventsubscription, nnwdaf_analyticsinfo} with {
+    variant "text 'nnrf_nfm' as 'nnrf-nfm'"
+    variant "text 'nnrf_disc' as 'nnrf-disc'"
+    variant "text 'nudm_sdm' as 'nudm-sdm'"
+    variant "text 'nudm_uecm' as 'nudm-uecm'"
+    variant "text 'nudm_ueau' as 'nudm-uea'"
+    variant "text 'nudm_ee' as 'nudm-ee'"
+    variant "text 'nudm_pp' as 'nudm-pp'"
+    variant "text 'namf_comm' as 'namf-comm'"
+    variant "text 'namf_evts' as 'namf-evts'"
+    variant "text 'namf_mt' as 'namf-mt'"
+    variant "text 'namf_location' as 'namf-location'"
+    variant "text 'nsmf_pdusession' as 'nsmf-pdusession'"
+    variant "text 'nsmf_event_exposure' as 'nsmf-event-exposure'"
+    variant "text 'nausf_auth' as 'nausf-auth'"
+    variant "text 'nausf_sorprotection' as 'nausf-sorprotection'"
+    variant "text 'nnef_pfdmanagement' as 'nnef-pfdmanagement'"
+    variant "text 'npcf_am_policy_control' as 'npcf-am-policy-control'"
+    variant "text 'npcf_smpolicycontrol' as 'npcf-smpolicycontrol'"
+    variant "text 'npcf_policyauthorization' as 'npcf-policyauthorization'"
+    variant "text 'npcf_bdtpolicycontrol' as 'npcf-bdtpolicycontrol'"
+    variant "text 'nsmsf_sms' as 'nsmsf-sms'"
+    variant "text 'nnssf_nsselection' as 'nnssf-nsselection'"
+    variant "text 'nnssf_nssaiavailability' as 'nnssf-nssaiavailability'"
+    variant "text 'nudr_dr' as 'nudr-dr'"
+    variant "text 'nlmf_loc' as 'nlmf-loc'"
+    variant "text 'n5g_eir_eic' as 'n5g-eir-eic'"
+    variant "text 'nbsf_management' as 'nbsf-management'"
+    variant "text 'nchf_spendinglimitcontrol' as 'nchf-spendinglimitcontrol'"
+    variant "text 'nnwdaf_eventsubscription' as 'nnwdaf-eventsubscription'"
+    variant "text 'nnwdaf_analyticsinfo' as 'nnwdaf-analyticsinfo'"
+  }
+
+  type union ServiceName {
+    ServiceName_enum  enum_val,
+    charstring           other_val
+  } with {
+    variant "JSON: as value"
+  }
+
+
+  type set N2InterfaceAmfInfo {
+    set of       TS29571_CommonData.Ipv4Addr    ipv4EndpointAddress optional,
+    set of       TS29571_CommonData.Ipv6Addr    ipv6EndpointAddress optional,
+    TS29571_CommonData.AmfName    amfName optional
+  }
+
+  type enumerated NFServiceStatus_enum { REGISTERED, SUSPENDED}
+
+  type union NFServiceStatus {
+    NFServiceStatus_enum  enum_val,
+    charstring           other_val
+  } with {
+    variant "JSON: as value"
+  }
+
+
+  type set TaiRange {
+    TS29571_CommonData.PlmnId    plmnId,
+    set of       TacRange    tacRangeList optional
+  }
+
+  type set TacRange {
+    charstring start_  optional,// (pattern "^([A-Fa-f0-9]{4}|[A-Fa-f0-9]{6})$")
+    charstring end optional,// (pattern "^([A-Fa-f0-9]{4}|[A-Fa-f0-9]{6})$") 
+    charstring pattern_ optional
+  } with {
+    variant (start_) "name as 'start'"
+    variant (pattern_) "name as 'pattern'"
+  }
+
+
+
+
+
+
+} with {
+  encode "JSON"
+}