Commit 401ba139 authored by YannGarcia's avatar YannGarcia
Browse files

Review typing for MEC 016

parent 673418dc
Loading
Loading
Loading
Loading
+171 −157
Original line number Diff line number Diff line
/**
 *  @author     ETSI / TTF T012
 *  @author     ETSI / TTF T012 / TTF T027
 *  @version    $Url$
 *              $Id$
 *  @desc       Types ANd Values for ETSI GS MEC 016 V2.2.1 (2020-04)
@@ -14,84 +14,26 @@ module DeviceApplicationInterfaceAPI_TypesAndValues {
  // JSON
  import from Json all;

  // LibCommon
  import from LibCommon_BasicTypesAndValues all;

  /**
   * @desc Required service continuity mode for this application.
   */
  type enumerated ServiceCount {
    SERVICE_CONTINUITY_NOT_REQUIRED (0),
    SERVICE_CONTINUITY_REQUIRED (1)
  } with {
    variant "JSON: as number"
  }

  /**
   * @desc Characteristics of the application
   * @member memory The maximum size in Mbytes of the memory resource expected to be used by the MEC application instance in the MEC system
   * @member storageThe maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system
   * @member latency The target round trip time in milliseconds supported by the MEC system for the MEC application instance
   * @member bandwidth The required connection bandwidth in kbit/s for the use of the MEC application instance
   * @member serviceCont Required service continuity mode for this application
   * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList
   */
  type record AppCharcs {
    UInt32 memory optional,
    UInt32 storage optional,
    UInt32 latency optional,
    UInt32 bandwidth optional,
    ServiceCount serviceCont optional
  }

  /**
   * @desc elements comprising the civic address
   * @member caType Describe the content type of caValue. The value of caType shall comply with section 3.4 of IETF RFC 4776
   * @member caValue Content of civic address element corresponding to the caType. The format caValue shall comply with section 3.4 of IETF RFC 4776
   * @desc Information on available applications
   * @member appList List of user applications available to the device application
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList
   */
  type record CivicAddressElement {
    Json.Integer caType,
    Json.String caValue
  }

  type record Geometry {
    Json.String type_,
    Coordinates coordinates
  } with {
    variant (type_) "name as 'type'";
  }
  type record of Json.Number Coordinate;
  type record of Coordinate Coordinates;
  type record Property {
    Json.String key,
    Json.String value_
  } with {
    variant (value_) "name as 'value'";
  }
  type record of Property Properties;
  type record Polygon {
    Json.String type_,
    Geometry geometry,
    Properties properties,
    Json.String this_
  } with {
    variant (type_) "name as 'type'";
    variant (this_) "name as 'this'";
  type record ApplicationList {
    AppList appList optional
  }

  /**
   * @desc Identifies the locations of the MEC application
   * @member countryCode The two-letter ISO 3166 [7] country code in capital letters. Shall be present in case the "area" attribute is absent
   * @member civicAddressElement Zero or more elements comprising the civic address
   * @member area Geographic area. Shall be absent if the "civicAddressElement" attribute is present
   * @see ETSI GS MEC 016 Clause 6.5.2 Type: LocationConstraints
   * @desc Information on available applications
   * @member appInfo List of user applications available to the device application
   * @member vendorSpecificExt Extension for vendor specific information
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList
   */
  type record LocationConstraints {
    Json.String countryCode optional,
    CivicAddressElement civicAddressElement optional,
    Polygon area optional
  type record AppListItem {
    ApplicationList_AppInfo appInfo,
    VendorSpecificExt vendorSpecificExt optional
  }
  type record of LocationConstraints LocationConstraintsList;
  type record of AppListItem AppList;

  /**
   * @desc Information on available applications
@@ -103,7 +45,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues {
   * @member appDescription Human readable description of the MEC application
   * @member appLocation Identifies the locations of the MEC application
   * @member appCharcs Characteristics of the application
   * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList
   */
  type record ApplicationList_AppInfo {
    Json.String             appDId,
@@ -119,45 +61,58 @@ module DeviceApplicationInterfaceAPI_TypesAndValues {
  /**
   * @desc Extension for vendor specific information
   * @member vendorId Vendor identifier
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList
   */
  type record VendorSpecificExt {
    Json.String vendorId
  }

  /**
   * @desc Information on available applications
   * @member appInfo List of user applications available to the device application
   * @member vendorSpecificExt Extension for vendor specific information
   * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList
   * @desc Characteristics of the application
   * @member memory The maximum size in Mbytes of the memory resource expected to be used by the MEC application instance in the MEC system
   * @member storageThe maximum size in Mbytes of the storage resource expected to be used by the MEC application instance in the MEC system
   * @member latency The target round trip time in milliseconds supported by the MEC system for the MEC application instance
   * @member bandwidth The required connection bandwidth in kbit/s for the use of the MEC application instance
   * @member serviceCont Required service continuity mode for this application
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList
   */
  type record AppListItem {
    ApplicationList_AppInfo appInfo,
    VendorSpecificExt vendorSpecificExt optional
  type record AppCharcs {
    Json.UInteger memory optional,
    Json.UInteger storage optional,
    Json.UInteger latency optional,
    Json.UInteger bandwidth optional,
    ServiceCount  serviceCont optional
  }
  type record of AppListItem AppList;

  /**
   * @desc Information on available applications
   * @member appList List of user applications available to the device application
   * @see ETSI GS MEC 016 Clause 6.2.2 Type: ApplicationList
   * @desc Required service continuity mode for this application
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.2 Type: ApplicationList
   */
  type record ApplicationList {
    AppList appList optional
  type enumerated ServiceCount {
    SERVICE_CONTINUITY_NOT_REQUIRED (0),
    SERVICE_CONTINUITY_REQUIRED     (1)
  } with {
    variant "JSON: as number"
  }

  /**
   * @desc user application instance information
   * @member appInstanceId  Identifier of the user application instance
   * @member referenceURI Address of the user application instance
   * @member appLocation Location of the user application instance
   * @see ETSI GS MEC 016 Clause 6.2.3 Type: AppContext
   * @desc Information on application context created by the MEC system
   * @member contextId Uniquely identifies the application context in the MEC system
   * @member associateDevAppId Uniquely identifies the device application
   * @member callbackReference Assigned by the device application to receive application lifecycle related notifications
   * @member appLocationUpdates Used by the device application to request to receive notifications at the callbackReference URI relating to location availability for user application instantiation
   * @member appAutoInstantiation Provides indication to the MEC system that instantiation of the requested application is desired should a requested appLocation become available that was not at the time of the request
   * @member appInfo 
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext
   */
  type record UserAppInstanceInfo {
    Json.String appInstanceId optional,
    Json.AnyURI referenceURI optional,
    LocationConstraints appLocation optional
  type record AppContext {
    Json.String                contextId optional,
    Json.String                associateDevAppId,
    Json.AnyURI                callbackReference optional,
    boolean                    appLocationUpdates optional,
    boolean                    appAutoInstantiation optional,
    ApplicationContext_AppInfo appInfo
  }
  type record of UserAppInstanceInfo UserAppInstanceInfoList;

  /**
   * @desc Information on available applications
@@ -169,7 +124,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues {
   * @member appDescription Human readable description of the MEC application
   * @member userAppInstanceInfo List of user application instance information
   * @member appPackageSource URI of the application package
   * @see ETSI GS MEC 016 Clause 6.2.3 Type: AppContext
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext
   */
  type record ApplicationContext_AppInfo {
    Json.String             appDId,
@@ -183,34 +138,30 @@ module DeviceApplicationInterfaceAPI_TypesAndValues {
  }

  /**
   * @desc Information on application context created by the MEC system
   * @member contextId Uniquely identifies the application context in the MEC system
   * @member associateDevAppId Uniquely identifies the device application
   * @member callbackReference Assigned by the device application to receive application lifecycle related notifications
   * @member appLocationUpdates Used by the device application to request to receive notifications at the callbackReference URI relating to location availability for user application instantiation
   * @member appAutoInstantiation Provides indication to the MEC system that instantiation of the requested application is desired should a requested appLocation become available that was not at the time of the request
   * @member appInfo 
   * @see ETSI GS MEC 016 Clause 6.2.3 Type: AppContext
   * @desc user application instance information
   * @member appInstanceId  Identifier of the user application instance
   * @member referenceURI Address of the user application instance
   * @member appLocation Location of the user application instance
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.3 Type: AppContext
   */
  type record AppContext {
    Json.String contextId optional,
    Json.String associateDevAppId,
    Json.AnyURI callbackReference optional,
    boolean appLocationUpdates optional,
    boolean appAutoInstantiation optional,
    ApplicationContext_AppInfo appInfo
  type record UserAppInstanceInfo {
    Json.String appInstanceId optional,
    Json.AnyURI referenceURI optional,
    LocationConstraints appLocation optional
  }
  type record of UserAppInstanceInfo UserAppInstanceInfoList;

  /**
   * @desc
   * @member appLocation Shall only be included in the response, where it indicates a location constraint available in the MEC system

   * @see ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability
   * @desc Information on locations available instantiation of new user application instances
   * @member associateDevAppId Uniquely identifies the device application
   * @member appInfo 
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability
   */
  type record AvailableLocations {
    LocationConstraints appLocation optional
  type record ApplicationLocationAvailability {
    Json.String                             associateDevAppId,
    ApplicationLocationAvailability_AppInfo appInfo
  }
  type record of AvailableLocations AvailableLocationsList;

  /**
   * @desc 
   * @member appDId Identifier of this MEC application descriptor
@@ -221,7 +172,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues {
   * @member appDescription Human readable description of the MEC application
   * @member availableLocations MEC application location constraints
   * @member appPackageSource URI of the application package. Shall be included in the request
   * @see ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability
   * @seeETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability
   */
  type record ApplicationLocationAvailability_AppInfo {
    Json.String            appDId,
@@ -235,15 +186,14 @@ module DeviceApplicationInterfaceAPI_TypesAndValues {
  }

  /**
   * @desc Information on locations available instantiation of new user application instances
   * @member associateDevAppId Uniquely identifies the device application
   * @member appInfo 
   * @see ETSI GS MEC 016 Clause 6.2.4 Type: ApplicationLocationAvailability
   * @desc
   * @member appLocation Shall only be included in the response, where it indicates a location constraint available in the MEC system
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.2.4 Type: ApplicationLocationAvailability
   */
  type record ApplicationLocationAvailability {
    Json.String associateDevAppId,
    ApplicationLocationAvailability_AppInfo appInfo
  type record AvailableLocations {
    LocationConstraints appLocation optional
  }
  type record of AvailableLocations AvailableLocationsList;

  /**
   * @desc Notification from the UALCMP regarding a change in address of a user application instance
@@ -251,7 +201,7 @@ module DeviceApplicationInterfaceAPI_TypesAndValues {
   * @member contextId Uniquely identifies the application context in the MEC system
   * @member appInstanceId Identifier of the user application instance
   * @member referenceURI Address of the user application. Used as the reference URI for the application
   * @see ETSI GS MEC 016 Clause 6.4.2 Type: AddressChangeNotification
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.2 Type: AddressChangeNotification
   */
  type record AddressChangeNotification {
    Json.String notificationType,
@@ -262,9 +212,9 @@ module DeviceApplicationInterfaceAPI_TypesAndValues {

  /**
   * @desc Notification from the UALCMP regarding the deletion of an application context by the MEC system
   * @member notificationType Shall be set to "AddressChangeNotification"
   * @member notificationType Shall be set to "ApplicationContextDeleteNotification"
   * @member contextId Uniquely identifies the application context in the MEC system
   * @see ETSI GS MEC 016 Clause 6.4.3 Type: ApplicationContextDeleteNotification
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.3 Type: ApplicationContextDeleteNotification
   */
  type record ApplicationContextDeleteNotification {
    Json.String notificationType,
@@ -273,10 +223,10 @@ module DeviceApplicationInterfaceAPI_TypesAndValues {

  /**
   * @desc Notification from the UALCMP regarding an update to an application change by the MEC system
   * @member notificationType Shall be set to "AddressChangeNotification"
   * @member notificationType Shall be set to "ApplicationContextUpdateNotification"
   * @member contextId Uniquely identifies the application context in the MEC system
   * @member userAppInstanceInfo List of user application instance information
   * @see ETSI GS MEC 016 Clause 6.4.4 Type: ApplicationContextDeleteNotification
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.4 Type: ApplicationContextUpdateNotification
   */
  type record ApplicationContextUpdateNotification {
    Json.String notificationType,
@@ -286,10 +236,10 @@ module DeviceApplicationInterfaceAPI_TypesAndValues {

  /**
   * @desc Notification from the UALCMP regarding the availability of a location that was requested in the Application context create that could not be fulfilled at the time of the request
   * @member notificationType Shall be set to "AddressChangeNotification"
   * @member notificationType Shall be set to "ApplicationLocationAvailabilityNotification"
   * @member contextId Uniquely identifies the application context in the MEC system
   * @member availableLocations Locations available to the MEC application
   * @see ETSI GS MEC 016 Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.4.5 Type: ApplicationLocationAvailabilityNotification
   */
  type record ApplicationLocationAvailabilityNotification {
    Json.String            notificationType,
@@ -297,6 +247,70 @@ module DeviceApplicationInterfaceAPI_TypesAndValues {
    AvailableLocationsList availableLocations
  }

  /**
   * @desc Identifies the locations of the MEC application
   * @member countryCode The two-letter ISO 3166 [7] country code in capital letters. Shall be present in case the "area" attribute is absent
   * @member civicAddressElement Zero or more elements comprising the civic address
   * @member area Geographic area. Shall be absent if the "civicAddressElement" attribute is present
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints
   */
  type record LocationConstraints {
    Json.String         countryCode optional,
    CivicAddressElement civicAddressElement optional,
    Polygon             area optional
  }
  type record of LocationConstraints LocationConstraintsList;

  /**
   * @desc Elements comprising the civic address
   * @member caType Describe the content type of caValue. The value of caType shall comply with section 3.4 of IETF RFC 4776
   * @member caValue Content of civic address element corresponding to the caType. The format caValue shall comply with section 3.4 of IETF RFC 4776
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints
   */
  type record CivicAddressElement {
    Json.Integer caType,
    Json.String caValue
  }

  /**
   * @desc 
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints
   */
  type record Polygon {
    Json.String type_,
    Geometry geometry,
    Properties properties,
    Json.String this_
  } with {
    variant (type_) "name as 'type'";
    variant (this_) "name as 'this'";
  }

  /**
   * @desc 
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints
   */
  type record Geometry {
    Json.String type_,
    Coordinates coordinates
  } with {
    variant (type_) "name as 'type'";
  }
  type record of Json.Number Coordinate;
  type record of Coordinate Coordinates;

  /**
   * @desc 
   * @see ETSI GS MEC 016 V2.2.1 (2020-04) Clause 6.5.2 Type: LocationConstraints
   */
  type record Property {
    Json.String key,
    Json.String value_
  } with {
    variant (value_) "name as 'value'";
  }
  type record of Property Properties;

} with {
  encode "JSON"
} // End of module DeviceApplicationInterfaceAPI_TypesAndValues
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 *  @author     ETSI / STF569 / TTF T027
 *  @version    $URL$
 *              $Id$
 *  @desc       Module containing types and values for UeIdentiyAPI protocol
 *  @desc       Module containing types and values for ETSI GS MEC 014 V3.1.1 (2023-06)
 *  @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.