Commit 200f4f13 authored by YannGarcia's avatar YannGarcia
Browse files

Review typing for MEC 021

parent 18cf1f99
Loading
Loading
Loading
Loading
+0 −28
Original line number Original line Diff line number Diff line
@@ -13,13 +13,6 @@ type record AppMobilityServiceInfo {
  String appMobilityServiceId
  String appMobilityServiceId
}
}


type record of RegistrationInfo RegistrationInfos;
type record RegistrationInfo {
  ServiceConsumerId serviceConsumerId,
  DeviceInformations deviceInformation optional,
  UInt32 expiryTime optional
}



type record RegistrationRequest {
type record RegistrationRequest {
  ServiceConsumerId serviceConsumerId,
  ServiceConsumerId serviceConsumerId,
@@ -35,12 +28,6 @@ type record RegistrationRequestWithError {
}
}




type record of ServiceConsumerId ServiceConsumerIds;
type record ServiceConsumerId {
  String appInstanceId optional,
  String mepId optional
}

type record ServiceConsumerIdWithError {
type record ServiceConsumerIdWithError {
  String appId optional,
  String appId optional,
  String mepId optional
  String mepId optional
@@ -53,11 +40,6 @@ type record ServiceConsumer {
  String mepId optional
  String mepId optional
}
}


type record of DeviceInformation DeviceInformations;
type record DeviceInformation {
  String associateId
}



type Json.AnyURI links;
type Json.AnyURI links;


@@ -152,16 +134,6 @@ type record AdjacentAppInfoSubscription_ {
  }
  }
  
  


  /**
   * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
   */
  type UInt32 Seconds;

  /**
   * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
   */
  type UInt32 NanoSeconds;

//  
//  
//  
//  
//  
//  
+1 −0
Original line number Original line Diff line number Diff line
@@ -5,3 +5,4 @@ sources := \
    ttcn/ApplicationMobilityServiceAPI_Templates.ttcn \
    ttcn/ApplicationMobilityServiceAPI_Templates.ttcn \
    ttcn/ApplicationMobilityServiceAPI_Functions.ttcn \
    ttcn/ApplicationMobilityServiceAPI_Functions.ttcn \


modules := ../../RnisAPI
+373 −5
Original line number Original line Diff line number Diff line
/**
 *  @author     ETSI / STF569 / TTF T027
 *  @version    $Url$
 *              $Id$
 *  @desc       Types and Values for ETSI GS MEC 021 V3.1.1 (2023-10)
 *  @copyright   ETSI Copyright Notification
 *               No part may be reproduced except as authorized by written permission.
 *               The copyright and the foregoing restriction extend to reproduction in all media.
 *               All rights reserved.
 */
module ApplicationMobilityServiceAPI_TypesAndValues {
module ApplicationMobilityServiceAPI_TypesAndValues {


  // JSON
  // JSON
  import from Json all;
  import from Json all;


  // LibCommon
  // MEC 012
  import from LibCommon_BasicTypesAndValues all;
  import from RnisAPI_TypesAndValues all;

  /**
   * @desc This data type represents the registration information used in the registration API of Application Mobility Service
   * @member appMobilityServiceId The identifier of registered Application Mobility Service
   * @member serviceConsumerId The identifier of service consumer requesting the Application Mobility Service
   * @member deviceInformation Specifies the device served by the application instance which is registering the Application Mobility Service
   * @member expiryTime Indicates the time of Application Mobility Service expiration from the time of registration accepted
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo
   */
  type record RegistrationInfo {
    Json.String        appMobilityServiceId
    ServiceConsumerId  serviceConsumerId,
    DeviceInformation  deviceInformation optional,
    UInt32             expiryTime optional
  }
  type record of RegistrationInfo RegistrationInfos;

  /**
   * @desc The identifier of service consumer requesting the Application Mobility Service
   * @member appInstanceId Represents the identifier of the application instance registering the Application Mobility Service
   * @member mepId Represents the identifier of the MEC platform registering the Application Mobility Service
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo
   */
  type record ServiceConsumerId {
    Json.String appInstanceId optional,
    Json.String mepId optional
  }
  type record of ServiceConsumerId ServiceConsumerIds;

  /**
   * @desc Specifies the device served by the application instance which is registering the Application Mobility Service
   * @member associateId Represents the identifier of the device
   * @member appMobilityServiceLevel If the application is stateful, this attribute shall be included
   * @member contextTransferState If present, it represents the state of transferring the user context to another application instance
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo
   */
  type record DeviceInformation_ {
    Json.String             associateId,
    AppMobilityServiceLevel appMobilityServiceLevel optional,
    ContextTransferState    contextTransferState optional
  }
  type record of DeviceInformation_ DeviceInformation;

  /**
   * @desc Represents the state of transferring the user context to another application instance
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.2-1: Attributes of RegistrationInfo
   */
  type enumerated ContextTransferState {
    NOT_TRANSFERRED,
    USER_CONTEXT_TRANSFER_COMPLETED
  } with {
    variant "JSON: as number"
  }

  /**
   * @desc This data type represents the adjacent application instance information of the adjacent_app_instances resource
   * @member appInstanceId	Identifier of the application instance
   * @member appDId	Identifier of the application descriptor
   * @member appInstanceCommLink It specifies the communication interface of application instance
   * @member mecHostInformation The MEC host where the application instance is running on
   * @member registeredInstanceId Identifier of the application instance that registers to the AMS, which is instantiated from the application descriptor identified by the attribute "appDId"
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.2.3-1: Attributes of AdjacentAppInstanceInfo
   */
  type record AdjacentAppInstanceInfo {
    Json.String            appInstanceId,
    Json.String            appDId,
    CommunicationInterface appInstanceCommLink,
    MECHostInformation     mecHostInformation optional,
    Json.String            registeredInstanceId optional
  }

  /**
   * @desc This type represents a subscription to mobility procedure notifications from AMS
   * @member subscriptionType	Shall be set to "MobilityProcedureSubscription"
   * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service
   * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4]
   * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications
   * @member links Hyperlink related to the resource
   * @member filterCriteria List of filtering criteria for the subscription
   * @member expiryDeadline Identifies a boundary after which the subscription will expire
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription
   */
  type record MobilityProcedureSubscription {
    SubscriptionType   subscriptionType,
    Json.AnyURI        callbackReference optional,
    Json.Bool          requestTestNotification optional,
    WebsockNotifConfig websockNotifConfig optional,
    Links              links optional,
    FilterCriteria     filterCriteria,
    TimeStamp          expiryDeadline optional 
  } with {
    variant (links) "name as '_links'";
  }
  type record of MobilityProcedureSubscription MobilityProcedureSubscriptions;

  /**
   * @desc Hyperlink related to the resource
   * @member self_ Self-referring URI
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription
   */
  type record Links {
    LinkType self_
  } with {
    variant (self_) "name as 'self'";
  }
  /**
   * @desc List of filtering criteria for the subscription
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.2-1: Attributes of the MobilityProcedureSubscription
   */
  type record FilterCriteria {
    Json.String        appInstanceId optional,
    AssociateIdList    associateId optional, 
    MobilityStatusType mobilityStatus	
  }
  type record of FilterCriteria FilterCriterias;

  /**
   * @desc This type represents a subscription to notification about the change on adjacent application instance information from AMS
   * @member subscriptionType	Shall be set to "AdjacentAppInfoSubscription"
   * @member callbackReference URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service
   * @member requestTestNotification Set to TRUE by the service consumer to request a test notification via HTTP on the callbackReference URI, as specified in ETSI GS MEC 009 [4]
   * @member websockNotifConfig Provides details to negotiate and signal the use of a Websocket connection between the location server and the service consumer for notifications
   * @member links Hyperlink related to the resource
   * @member filterCriteria List of filtering criteria for the subscription
   * @member expiryDeadline Identifies a boundary after which the subscription will expire
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription
   */
  type record AdjacentAppInfoSubscription {
    SubscriptionType       subscriptionType,
    Json.AnyURI            callbackReference optional,
    Json.Bool              requestTestNotification optional,
    WebsockNotifConfig     websockNotifConfig optional,
    Links                  links optional,
    AdjacentFilterCriteria filterCriteria,
    TimeStamp              expiryDeadline optional
  } with {
    variant (links) "name as '_links'";
  }
  type record of AdjacentAppInfoSubscription AdjacentAppInfoSubscriptions;

  /**
   * @desc List of filtering criteria for the subscription
   * @member appInstanceId Identifier of the application instance that registers to the Application Mobility Service
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.3-1: Attributes of the AdjacentAppInfoSubscription
   */
  type record AdjacentFilterCriteria {
    Json.String appInstanceId optional
  }

  /**
   * @desc This type represents a list of links related to currently existing subscriptions for the service consumer
   * @member links The URI referring to the subscription
   * @member subscription The service consumer's subscriptions
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.4-1: Attributes of the SubscriptionLinkList
   */
  type record SubscriptionLinkList {
    Links        links,
    Subscription subscription
  } with {
    variant (links) "name as '_links'";
  }

  /**
   * @desc The service consumer's subscriptions
   * @member href The URI referring to the subscription
   * @member subscriptionType Type of the subscription
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.3.4-1: Attributes of the SubscriptionLinkList
   */
  type record Subscription {
    Json.AnyURI href,
    Json.String subscriptionType
  }

  /**
   * @desc This type represents a notification from AMS with regards to mobility procedure
   * @member notificationType Shall be set to "MobilityProcedureNotification"
   * @member timeStamp Date and time of the generation of the notification
   * @member associateId 1 to N identifiers to associate the information for specific UE(s) and flow(s)
   * @member mobilityStatus Indicate the status of the UE mobility
   * @member targetAppInfo Identifiers to associate the information of target application instance
   * @member links Object containing hyperlinks related to the resource
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification
   */
  type record MobilityProcedureNotification {
    Json.String        notificationType,
    TimeStamp          timeStamp optional,
    AssociateId        associateId,
    MobilityStatus     mobilityStatus,
    TargetAppInfo      targetAppInfo	optional,
    Links_Notification links
  } with {
    variant (links) "name as '_links'";
  }

  /**
   * @desc Identifiers to associate the information of target application instance
   * @member appInstanceId Identifiers of the target application instance
   * @member CommunicationInterface It specifies the communication interface of the application instance
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification
   */
  type record TargetAppInfo {
    Json.String appInstanceId	String	1	.
    CommunicationInterface commInterface optional
  }

  /**
   * @desc Indicate the status of the UE mobility
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification
   */
  type enumerated MobilityStatus {
    INTERHOST_MOVEOUT_TRIGGERED (1),
    INTERHOST_MOVEOUT_COMPLETED (2),
    INTERHOST_MOVEOUT_FAILED    (3)
  } with {
    variant "JSON: as number"
  }

  /**
   * @desc Object containing hyperlinks related to the resource
   * @member subscription Link to the related subscription
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.2-1: Attributes of the MobilityProcedureNotification
   */
  type record Links_Notification {
    LinkType subscription
  }

  /**
   * @desc This type represents a notification from AMS with regards to change on adjacent application instances information
   * @member notificationType Shall be set to "MobilityProcedureNotification"
   * @member timeStamp Date and time of the generation of the notification
   * @member adjacentAppInfo 0 to N identifiers to associate the information for adjacent application instances
   * @member links Object containing hyperlinks related to the resource
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.3-1: Attributes of the AdjacentAppInfoNotification
   */
  type record AdjacentAppInfoNotification {
    Json.String        notificationType,
    TimeStamp          timeStamp optional,
    AdjacentAppInfo    adjacentAppInfo optional,
    Links_Notification links
  } with {
    variant (links) "name as '_links'";
  }

  type record of TargetAppInfo AdjacentAppInfo;

  /**
   * @desc This data type represents a notification from AMS with regards to expiry of the existing subscription
   * @member notificationType Shall be set to "ExpiryNotification"
   * @member timeStamp Date and time of the generation of the notification
   * @member links Object containing hyperlinks related to the resource
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.4-1: Attributes of the ExpiryNotification
   */
  type record ExpiryNotification {
    Json.String        notificationType,
    TimeStamp          timeStamp optional,
    Links_Notification links
  } with {
    variant (links) "name as '_links'";
  }

  /**
   * @desc This data type represents the Application Mobility Service level information used in the Application Mobility Service APIs
   * @member appMobilityServiceLevel Provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.5-1: Attributes of AppMobilityServiceLevel 
   */
  type record AppMobilityServiceLevel {
    AppMobilityServiceLevelEnmu appMobilityServiceLevel
  }

  /**
   * @desc Provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.5-1: Attributes of AppMobilityServiceLevel 
   */
  type enumerated AppMobilityServiceLevelEnmu {
    APP_MOBILITY_NOT_ALLOWED          (1),
    APP_MOBILITY_WITH_CONFIRMATION    (2),
    APP_MOBILITY_WITHOUT_CONFIRMATION (3)
  } with {
    variant "JSON: as number"
  }

  /**
   * @desc This data type represents a notification from AMS with regards to expiry of the existing subscription
   * @member notificationType Shall be set to "TestNotification"
   * @member links Object containing hyperlinks related to the resource
   * @see ETSI GS MEC 021 V3.1.1 (2023-10) Table 7.4.6-1: Attributes of the TestNotification
   */
  type record TestNotification {
    Json.String        notificationType,
    Links_Notification links
  } with {
    variant (links) "name as '_links'";
  }


  /**
  /**
   * @desc This type represents the communication interface of an application instance
   * @desc This type represents the communication interface of an application instance
@@ -23,11 +326,76 @@ module ApplicationMobilityServiceAPI_TypesAndValues {
   */
   */
  type record IpAddress {
  type record IpAddress {
    Json.String   host,
    Json.String   host,
    UInt32 port_
    Json.UInteger port_
  } with {
  } with {
      variant (port_) "name as 'port'";
      variant (port_) "name as 'port'";
  }
  }

  type record length(1..infinity) of IpAddress IpAddresses;
  type record length(1..infinity) of IpAddress IpAddresses;


  /**
   * @desc
   * @member seconds The seconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
   * @member nanoSeconds The nanoseconds part of the time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
   * @see ETSI GS MEC 021 Clause 7.5.3	Type: TimeStamp
   */
  type record TimeStamp {
    Seconds     seconds,
    NanoSeconds nanoSeconds
  }

  /**
   * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
   */
  type Json.UInteger Seconds;

  /**
   * @desc The nanoseconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
   */
  type Json.UInteger NanoSeconds;

  /**
   * @desc This type represents a type of link
   * @member href URI referring to a resource
   * @see ETSI GS MEC 021 Clause 7.5.4	Type: LinkType
   */
  type record LinkType {
    Json.AnyURI href
  }

  /**
   * @desc The type represents the parameters of MEC host information
   * @member hostName Human-readable name of MEC host
   * @member hostId Deployment-specific information to identify a MEC host
   * @see ETSI GS MEC 021 Table 7.5.5-1: Attributes of MECHostInformation
   */
  type record IpAddress {
    Json.String   hostName optional,
    KeyValuePairs hostId
  }

  /**
    * @desc This data type represents a list of key-value pairs
    * @member key_name
    * @member key_value
    * @see ETSI GS MEC 010-2 Clause 6.2.5.3	Type: KeyValuePairs
    */
  type record KeyValuePairs {
    Json.String key_name,
    anytype key_value // FIXME To be refined
  }

  /**
   * @desc This type represents configuration for the delivery of subscription notifications over Websockets
   * @member websocketUri Set by location server to indicate to the service consumer the Websocket URI to be used for delivering notifications
   * @member requestWebsocketUri Set to true by the service consumer to indicate that Websocket delivery is requested
   * @see ETSI GS MEC 021 Clause 7.5.7	Type: WebsockNotifConfig
   */
  type record WebsockNotifConfig {
    Json.AnyURI websocketUri optional,
    Json.Bool   requestWebsocketUri optional
  }

} with {
  extension "anytype integer, float, boolean, universal charstring";
  encode "JSON"
} // End of module ApplicationMobilityServiceAPI_TypesAndValues
} // End of module ApplicationMobilityServiceAPI_TypesAndValues
+1 −1
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
 *  @author     ETSI / STF569 / TTF T027
 *  @author     ETSI / STF569 / TTF T027
 *  @version    $Url$
 *  @version    $Url$
 *              $Id$
 *              $Id$
 *  @desc       Types ANd Values for ETSI GS MEC 014 V2.2.1 (2022-02)
 *  @desc       Types ANd Values for ETSI GS MEC 012 V2.2.1 (2022-02)
 *  @copyright   ETSI Copyright Notification
 *  @copyright   ETSI Copyright Notification
 *               No part may be reproduced except as authorized by written permission.
 *               No part may be reproduced except as authorized by written permission.
 *               The copyright and the foregoing restriction extend to reproduction in all media.
 *               The copyright and the foregoing restriction extend to reproduction in all media.
+7 −7

File changed.

Contains only whitespace changes.