Commit 7d22b028 authored by YannGarcia's avatar YannGarcia
Browse files

Review typing for MEC 012

parent 9a64913a
Loading
Loading
Loading
Loading
Original line number Diff line number Diff line
Subproject commit 0a28ff34d9ca15d6ed481dad98485210e4d6e179
Subproject commit 163d1cfca22b18ceb1d7e24380f46f7fbaa53a97
+19 −22
Original line number Diff line number Diff line
@@ -3,9 +3,6 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
  // JSON
  import from Json all;

  // LibCommon
  import from LibCommon_BasicTypesAndValues all;

  // LibMec
  import from LibMec_TypesAndValues all;

@@ -58,7 +55,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
     */
    type record SecurityInfo {
      OAuth2Info oAuth2Info optional,
      UInt8      extentions optional
      Json.UInt8 extentions optional
    }

    /**
@@ -384,7 +381,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
     * @see ETSI GS MEC 010-2 Clause 6.2.1.14	Type: LatencyDescriptor
     */
    type record LatencyDescriptor {
      UInt32 maxLatency
      Json.UInteger maxLatency
    }

    /**
@@ -740,7 +737,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
    type record OperateAppRequest {
      OperationalState changeStateTo,
      StopType         stopType optional,
      UInt32 gracefulStopTimeout optional
      Json.UInteger    gracefulStopTimeout optional
    }

    type enumerated StopType {
@@ -756,7 +753,7 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
     */
    type record TerminateAppRequest {
      TerminationType terminationType,
      UInt32 gracefulTerminationTimeout optional
      Json.UInteger   gracefulTerminationTimeout optional
    }

    type StopType TerminationType;
@@ -1784,12 +1781,12 @@ module ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues {
    /**
     * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
     */
    type UInt32 Seconds;
    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 UInt32 NanoSeconds;
    type Json.UInteger NanoSeconds;

    /**
     * @desc This type represents the checksum of an application package
+15 −18
Original line number Diff line number Diff line
@@ -7,16 +7,13 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
  // JSON
  import from Json all;

  // LibCommon
  import from LibCommon_BasicTypesAndValues all;

  // MEC-10-2
  import from ApplicationPackageLifecycleAndOperationGrantingAPI_TypesAndValues all;

  /**
   * @desc Maximum timeout value in seconds for graceful termination or graceful stop of an application instance.
   */
  type UInt32 MaxGracefulTimeout;
  type Json.UInteger MaxGracefulTimeout;

  /**
   * @desc Shall be set to AppTerminationNotification.
@@ -159,12 +156,12 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
  /**
   * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC.
   */
  type UInt32 Seconds;
  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 UInt32 NanoSeconds;
  type Json.UInteger NanoSeconds;

  /**
   * @desc Platform Time Source status. 1 = TRACEABLE - time source is locked to the UTC time source. 2 = NONTRACEABLE - time source is not locked to the UTC time source.
@@ -300,7 +297,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
  /**
   * @desc Time to live value.
   */
  type UInt32 Ttl;
  type Json.UInteger Ttl;

  /**
   * @desc This type represents the general information of a DNS rule
@@ -330,7 +327,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
  /**
   * @desc Port portion of the address.
   */
  type UInt32   Address_Port;
  type Json.UInteger   Address_Port;

  /**
   * @desc A IP address and port pair.
@@ -485,7 +482,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
   */
  type record SecurityInfo {
    OAuth2Info oAuth2Info optional,
    UInt8      extentions optional
    Json.UInt8 extentions optional
  }

  /**
@@ -641,7 +638,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
    LocalityType scopeOfLocality optional,
    Json.Bool consumedLocalOnly optional,
    Json.Bool isLocal optional,
    UInt32 livenessInterval optional,
    Json.UInteger livenessInterval optional,
    ServiceInfo_Link links
  } with {
    variant (links) "name as '_links'";
@@ -658,7 +655,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
  /**
   * @desc Authentication key number.
   */
  type UInt32 AuthenticationKeyNum;
  type Json.UInteger AuthenticationKeyNum;

  /**
   * @desc NTP authentication option.
@@ -672,12 +669,12 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
  /**
   * @desc Acceptable maximum rate of the Delay_Req messages in packets per second.
   */
  type UInt32 DelayReqMaxRate;
  type Json.UInteger DelayReqMaxRate;

  /**
   * @desc NTP server local priority.
   */
  type UInt32 LocalPriority;
  type Json.UInteger LocalPriority;

  /**
   * @desc Maximum poll interval for NTP messages, in seconds as a power of two. Range 3...17.
@@ -710,7 +707,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
  /**
   * @desc PTP Master local priority.
   */
  type UInt32 NtpServers_PtpMasterLocalPriority;
  type Json.UInteger NtpServers_PtpMasterLocalPriority;

  /**
   * @desc NTP server detail.
@@ -776,7 +773,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
  /**
   * @desc Used to match all IPv4 packets that have the same Differentiated Services Code Point (DSCP).
   */
  type UInt32 TrafficFilter_DSCP;
  type Json.UInteger TrafficFilter_DSCP;

  /**
   * @desc Identify the traffic ip address.
@@ -793,12 +790,12 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
  /**
   * @desc Used to match all packets that have the same Quality Class Indicator (QCI).
   */
  type UInt32 TrafficFilter_QCI;
  type Json.UInteger TrafficFilter_QCI;

  /**
   * @desc Used to match all IPv6 packets that have the same Traffic Class.
   */
  type UInt32 TrafficFilter_TC;
  type Json.UInteger TrafficFilter_TC;

  /**
   * @desc Used for tag based traffic rule.
@@ -880,7 +877,7 @@ module EdgePlatformApplicationEnablementAPI_TypesAndValues {
  /**
   * @desc Priority of this traffic rule. If traffic rule conflicts, the one with higher priority take precedence.
   */
  type UInt32 TrafficRule_Priority;
  type Json.UInteger TrafficRule_Priority;

  /**
   * @desc Contains the traffic rule state.
+0 −60
Original line number Diff line number Diff line
@@ -210,66 +210,6 @@ module LocationAPI_Templates {
    resourceURL       := *
  } // End of template mw_periodic_tracking_subscription
  
  template (omit) CircleNotificationSubscription m_circle_notification_subscription(
                                                                                    in template (omit) ClientCorrelator p_clientCorrelator := omit,
                                                                                    in template (value) CallbackReference p_callbackReference,
                                                                                    in template (value) Addresses p_address,
                                                                                    in template (value) Latitude p_latitude := PX_UE_COORD_LAT,
                                                                                    in template (value) Longitude p_longitude := PX_UE_COORD_LONG,
                                                                                    in template (value) Json.Number p_radius := 200.0,
                                                                                    in template (value) Json.Number p_trackingAccuracy := 10.0,
                                                                                    in template (value) EnteringLeavingCriteria p_enteringLeavingCriteria := Entering,
                                                                                    in template (value) Json.Bool p_checkImmediate := true,
                                                                                    in template (value) UInt32 p_frequency := 10,
                                                                                    in template (omit) ResourceURL p_resourceURL := omit
 ) := {
    address_                := p_address,
    callbackReference       := p_callbackReference,
    checkImmediate          := p_checkImmediate,
    clientCorrelator        := p_clientCorrelator,
    count                   := omit,
    duration                := omit,
    enteringLeavingCriteria := p_enteringLeavingCriteria,
    frequency               := p_frequency,
    latitude                := p_latitude,
    link                    := omit,
    longitude               := p_longitude,
    radius                  := p_radius,
    requester               := omit,
    resourceURL             := p_resourceURL,
    trackingAccuracy        := p_trackingAccuracy
  } // End of template m_circle_notification_subscription

  template CircleNotificationSubscription mw_circle_notification_subscription(
                                                                              template ClientCorrelator p_clientCorrelator := *,
                                                                              template (present) CallbackReference p_callbackReference := ?,
                                                                              template (present) Addresses p_address := ?,
                                                                              template (present) Latitude p_latitude := ?,
                                                                              template (present) Longitude p_longitude := ?,
                                                                              template (present) Json.Number p_radius := ?,
                                                                              template (present) Json.Number p_trackingAccuracy := ?,
                                                                              template (present) EnteringLeavingCriteria p_enteringLeavingCriteria := ?,
                                                                              template (present) Json.Bool p_checkImmediate := ?,
                                                                              template (present) UInt32 p_frequency := ?,
                                                                              template ResourceURL p_resourceURL := *
  ) := {
    address_                := p_address,
    callbackReference       := p_callbackReference,
    checkImmediate          := p_checkImmediate,
    clientCorrelator        := p_clientCorrelator,
    count                   := *,
    duration                := *,
    enteringLeavingCriteria := p_enteringLeavingCriteria,
    frequency               := p_frequency,
    latitude                := p_latitude,
    link                    := *,
    longitude               := p_longitude,
    radius                  := p_radius,
    requester               := *,
    resourceURL             := p_resourceURL,
    trackingAccuracy        := p_trackingAccuracy
  } // End of template m_wcircle_notification_subscription
  
  template (value) TerminalDistance m_terminal_distance(in Json.Number p_distance) := {
    distance   := p_distance,
    accuracy   := omit,
+104 −145
Original line number Diff line number Diff line
@@ -13,18 +13,15 @@ module LocationAPI_TypesAndValues {
  // JSON
  import from Json all;

  // LibCommon
  import from LibCommon_BasicTypesAndValues all;

  /**
   * @desc The seconds part of the Time. Time is defined as Unix-time since January 1, 1970, 00:00:00 UTC
   */
  type UInt32 Seconds;
  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 UInt32 NanoSeconds;
  type Json.UInteger NanoSeconds;

  /**
   * @desc
@@ -75,6 +72,15 @@ module LocationAPI_TypesAndValues {
  } // End of type UserEventPara

  
/**
   * @desc Indicates whether event reporting is one time
   * @see ETSI TS 129 572 V16.7.0 (2021-08) Clause 6.1.6.3.16 Enumeration: OccurrenceInfo 
   */
   type enumerated OccurrenceInfo {
    ONE_TIME_EVENT,
    MULTIPLE_TIME_EVENT
  }

  /**
   * @desc This type represents the parameters that control the report times and frequency
   * @member minimumInterval Minimum interval between reports in case frequently reporting. Unit is second.
@@ -96,7 +102,7 @@ module LocationAPI_TypesAndValues {
   * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.5.7 Type: AreaInfo
   */
  type record AreaInfo {
    Shae shape, 
    Shape         shape, 
    Points        points,
    Json.UInteger radius optional
  } // End of type AreaInfo
@@ -145,15 +151,15 @@ module LocationAPI_TypesAndValues {
    Latitude      latitude,
    Longitude     longitude,
    Json.Number   altitude optional,
    UInt32 accuracy optional,
    UInt32 accuracySemiMinor optional,
    UInt32 accuracyAltitude optional,
    UInt32 orientationMajorAxis optional,
    UInt32 confidence optional,
    UInt32 innerRadius  optional,
    UInt32 uncertaintyRadius optional,
    UInt32 offsetAngle optional,
    UInt32 includedAngle optional,
    Json.UInteger accuracy optional,
    Json.UInteger accuracySemiMinor optional,
    Json.UInteger accuracyAltitude optional,
    Json.UInteger orientationMajorAxis optional,
    Json.UInteger confidence optional,
    Json.UInteger innerRadius  optional,
    Json.UInteger uncertaintyRadius optional,
    Json.UInteger offsetAngle optional,
    Json.UInteger includedAngle optional,
    Shape         shape,
    TimeStamp     timestamp_ optional,
    Velocity      velocity optional
@@ -235,6 +241,7 @@ module LocationAPI_TypesAndValues {
    NumberOfUsers                     numberOfUsers,
    ResourceURL                       resourceURL
  }
  type record of ZoneInfo ZoneInfos;

  /**
   * @desc Collection of the zone information list.
@@ -243,13 +250,12 @@ module LocationAPI_TypesAndValues {
   * @see OMA-TS-REST_NetAPI_ZonalPresence-V1_0-20160308-C Clause 5.2.2.1 Type: ZoneList
   * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1 Zonal presence data types
   */
  type record of ZoneInfo ZoneInfos;
  type record ZoneList {
    ZoneInfos zone optional,
    ResourceURL resourceURL
  }

  type UInt32 DateTimeStamp; // FIXME To be reviewed
  type Json.UInteger DateTimeStamp; // FIXME To be reviewed

  /**
   * @desc A type containing access point information.
@@ -391,6 +397,7 @@ REST_NetAPI_Common].
    ENTERING_AREA_EVENT,
    LEAVING_AREA_EVENT
  }
  type record of LocationEventType LocationEventCriteria;

  /**
   * @desc This enumeration represents the result of a localization associated with a notification
@@ -413,7 +420,7 @@ REST_NetAPI_Common].
   * @member self_ Self-referring URI
   */
  type record Links {
    Link self_
    LinkType self_
  } with {
    variant (self_) "name as 'self'";
  }
@@ -421,37 +428,37 @@ REST_NetAPI_Common].
  /**
   * @desc The number of access points within the zone
   */
  type UInt32 NumberOfAccessPoints;
  type Json.UInteger NumberOfAccessPoints;

  /**
   * @desc Number of inoperable access points within the zone.
   */
  type UInt32 NumberOfUnserviceableAccessPoints;
  type Json.UInteger NumberOfUnserviceableAccessPoints;

  /**
   * @desc The number of users currently on the access point.
   */
  type UInt32 NumberOfUsers;
  type Json.UInteger NumberOfUsers;

  /**
   * @desc Threshold number of users in an access point which if crossed shall cause a notification.
   */
  type UInt32 NumberOfUsersAPThreshold;
  type Json.UInteger NumberOfUsersAPThreshold;

  /**
   * @desc This element shall be present when ZoneStatusSubscription includes numberOfUsersAPThreshold element and the number of users in an access point exceeds the threshold defined in the subscription.
   */
  type UInt32 NumberOfUsersInAP;
  type Json.UInteger NumberOfUsersInAP;

  /**
   * @desc Threshold number of users in a zone which if crossed shall cause a notification.
   */
  type UInt32 NumberOfUsersInZone;
  type Json.UInteger NumberOfUsersInZone;

  /**
   * @desc Threshold number of users in a zone which if crossed shall cause a notification.
   */
  type UInt32 NumberOfUsersZoneThreshold;
  type Json.UInteger NumberOfUsersZoneThreshold;

  /**
   * @desc The operation status of the access point
@@ -679,65 +686,6 @@ REST_NetAPI_Common].
   * @desc Identifier of zone
   */
  type Json.String ZoneId;

  /**
   * @desc A type containing zone status subscription.
   * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server
   * @member resourceURL Self referring URL
   * @member callbackReference 
   * @member zoneId Identifier of zone
   * @member numberOfUsersZoneThreshold Threshold number of users in a zone which if crossed shall cause a notification
   * @member numberOfUsersAPThreshold Threshold number of users in an access point which if crossed shall cause a notification
   * @member operationStatus List of operation status values to generate notifications for (these apply to all access points within a zone).
   */
  type record ZoneStatusSubscription {
    ClientCorrelator clientCorrelator optional,
    ResourceURL resourceURL optional,
    CallbackReference callbackReference,
    ZoneId zoneId,
    NumberOfUsersZoneThreshold numberOfUsersZoneThreshold optional,
    NumberOfUsersAPThreshold numberOfUsersAPThreshold optional,
    OperationStatus operationStatus optional
  } // End of type ZoneStatusSubscription

  /**
   * @desc A type containing data for notifications, when the area is defined as a circle
   * @member address Address of terminals to monitor (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)
   * @member callbackReference 
   * @member checkImmediate Check location immediately after establishing notification
   * @member clientCorrelator A correlator that the client can use to tag this particular resource representation during a request to create a resource on the server
   * @member count Maximum number of notifications per individual address. For no maximum, either do not include this element or specify a value of zero. Default value is 0
   * @member duration Period of time (in seconds) notifications are provided for. If set to “0” (zero), a default duration time, which is specified by the service policy, will be used. If the parameter is omitted, the notifications will continue until the maximum duration time, which is specified by the service policy, unless the notifications are stopped by deletion of subscription for notifications
   * @member enteringLeavingCriteria 
   * @member frequency Maximum frequency (in seconds) of notifications per subscription (can also be considered minimum time between notifications)
   * @member latitude Latitude of center point
   * @member link Link to other resources that are in relationship with the resource
   * @member longitude Longitude of center point
   * @member radius Radius circle around center point in meters
   * @member requester Identifies the entity that is requesting the information (e.g. \"sip\" URI, \"tel\" URI, \"acr\" URI)
   * @member resourceURL Self referring URL
   * @member trackingAccuracy Number of meters of acceptable error in tracking distance
   */
  type record CircleNotificationSubscription {
    Addresses address_,
    CallbackReference callbackReference,
    Json.Bool checkImmediate,
    ClientCorrelator clientCorrelator optional,
    UInt32 count optional,
    UInt32 duration optional,
    EnteringLeavingCriteria enteringLeavingCriteria,
    UInt32 frequency,
    Latitude latitude,
    Link link optional,
    Longitude longitude,
    Json.Number radius,
    Json.AnyURI requester optional,
    ResourceURL resourceURL optional,
    Json.Number trackingAccuracy
  } with {
    variant (address_) "name as 'address'";
  } // End of type CircleNotificationSubscription

  type enumerated EnteringLeavingCriteria {
    Entering,
    Leaving
@@ -792,6 +740,20 @@ REST_NetAPI_Common].
  } // End of type TerminalLocation
  type record of TerminalLocation TerminalLocationList

  /**
   * @desc Indicate a notification termination or cancellation
   * @member messageId Message identifier, either with prefix SVC or with prefix POL
   * @member text Message text, with replacement variables marked with %n, where n is an index into the list of <variables> elements, starting at 1
   * @member variables Variables to substitute into text string
   * @see OMA-TS-REST_NetAPI_Common-V1_0-20180116-A Clause B.1.4 Type: ServiceError
   * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.2.1A Terminal location data types
   */
  type record ServiceError {
    Json.String messageId,
    Json.String text,
    Json.String variables optional
  } // End of type ServiceError

  /**
   * @desc This type contains a list of subscriptions
   * @member href The URI referring to the subscription
@@ -987,7 +949,7 @@ REST_NetAPI_Common].
    Json.Bool requestTestNotification optional,
    WebsockNotifConfig websockNotifConfig optional,
    Links links_ optional,
    AreaDefine areaDefine,
    AreaInfo areaDefine,
    Json.Number trackingAccuracy,
    LocationEventCriteria locationEventCriteria optional,
    ReportingCtrl reportingCtrl optional,
@@ -1029,8 +991,6 @@ REST_NetAPI_Common].
    Json.Number trackingAccuracy,
    DistanceCriteria criteria,
    Json.Bool checkImmediate,
    Json.Number trackingAccuracy,
    LocationEventCriteria locationEventCriteria optional,
    ReportingCtrl reportingCtrl optional,
    TimeStamp expiryDeadline optional
  } with {
@@ -1057,7 +1017,7 @@ REST_NetAPI_Common].
   * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.4 Type: UserLoctiationEventNotification
   */
  type record LinksSubscription {
    Link subscription
    LinkType subscription
  }

  /**
@@ -1165,7 +1125,6 @@ REST_NetAPI_Common].
    Links           links_
  } with {
    variant (links_) "name as '_links'";
    variant (address_) "name as 'address'";
  } // End of type ZoneStatusNotification

  type enumerated UserNumEvent {
@@ -1212,7 +1171,7 @@ REST_NetAPI_Common].
   * @member _links Object containing hyperlinks related to the resource
   * @see ETSI GS MEC 013 V3.1.1 (2023-01) Clause 6.4.9 Type: UserDistanceNotification
   */
  type record UserAreaNotification {
  type record UserDistanceNotification {
    Json.String notificationType,
    TimeStamp timeStamp optional,
    UserList monitoredUsers,
Loading