AppEnablementAPI_TypesAndValues.ttcn 20.4 KB
Newer Older
YannGarcia's avatar
YannGarcia committed
1
2
3
4
5
6
7
8
9
10
11
12
/**
 * @desc The ETSI MEC ISG MEC011 Application Enablement API described using OpenAPI
 * @see http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf
 */
module AppEnablementAPI_TypesAndValues {

  // JSON
  import from JSON all;
 
  // LibCommon
  import from LibCommon_BasicTypesAndValues all;

YannGarcia's avatar
YannGarcia committed
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
  /**
   * @desc Maximum timeout value in seconds for graceful termination or graceful stop of an application instance.
   */
  type UInt32 MaxGracefulTimeout;

  /**
   * @desc Shall be set to AppTerminationNotification.
   */
  type JSON.String NotificationType;

  /**
   * @desc This type represents the information that the mobile edge platform notifies the subscribed application instance about  the corresponding application instance termination/stop.
   */
  type record AppTerminationNotification {
    NotificationType notificationType,
    MaxGracefulTimeout maxGracefulTimeout,
    Subscription links
  } with {
    variant (links) "name as '_links'";
  }

  /**
   * @desc It is used as the filtering criterion for the subscribed events.
   */
  type JSON.String AppInstanceId;

  /**
   * @desc URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge application instance management information. 
   *       This shall be included in both the request and the response."
   */
  type JSON.String AppTerminationNotificationSubscription_CallbackReference;

  /**
   * @desc This type represents the information that the mobile edge platform notifies the subscribed application instance about  the corresponding application instance termination/stop.
   */
  type record AppTerminationNotificationSubscription {
    SubscriptionType subscriptionType,
    AppTerminationNotificationSubscription_CallbackReference callbackReference,
    Self links,
    AppInstanceId appInstanceId
  } with {
    variant (links) "name as '_links'";
  }

  /**
   * @desc Shall be set to AppTerminationNotificationSubscription.
   */
  type JSON.String SubscriptionType;

  /**
   * @desc Reference of the catalogue.
   */
  type JSON.String CategoryRef_Href;
  
  /**
   * @desc Unique identifier of the category.
   */
  type JSON.String CategoryRef_Id;

  /**
Yann Garcia's avatar
Yann Garcia committed
73
   * @desc Name of the category.
YannGarcia's avatar
YannGarcia committed
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
   */
  type JSON.String Name;

  /**
   * @desc Category version.
   */
  type JSON.String CategoryRef_Version;

  /**
   * @desc This type represents the category reference.
   */
  type record CategoryRef {
    CategoryRef_Href href,
    CategoryRef_Id id,
    Name name,
    CategoryRef_Version version
  }

  /**
   * @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;

  /**
   * @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.
   */
  type enumerated TimeSourceStatus {
    TRACEABLE (1),
    NONTRACEABLE (2)
  }
  
  /**
   * @desc This type represents the information provided by the mobile edge platform in response to the Get Platform Time Request message.
   * @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.
   * @member timeSourceStatus 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.
   */
  type record CurrentTime {
    Seconds seconds,
    NanoSeconds nanoSeconds,
    TimeSourceStatus timeSourceStatus
  }

  /**
   * @desc Type of the interface.
   */
  type enumerated InterfaceType {
    TUNNEL,
    MAC,
Yann Garcia's avatar
Yann Garcia committed
128
129
    IP,
    NONE
YannGarcia's avatar
YannGarcia committed
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
  }

  /**
   * @desc IP address of the remote destination.
   */
  type JSON.String DestinationInterface_IpAddress;

  /**
   * @desc Source address identifies the MAC address of the interface.
   */
  type JSON.String DestinationInterface_MacAddress;

  /**
   * @desc This type represents the destination interface.
   */
  type record DestinationInterface {
    InterfaceType interfaceType,
    TunnelInfo tunnelInfo optional,
    DestinationInterface_MacAddress srcMacAddress optional,
    DestinationInterface_MacAddress dstMacAddress optional,
    DestinationInterface_IpAddress dstIpAddress optional
  }

  /**
   * @desc FQDN resolved by the DNS rule.
   */
  type JSON.String DomainName;

  /**
   * @desc Identifies the DNS Rule.
   */
  type JSON.String DnsRule_Id;

  /**
   * @desc IP address associated with the FQDN resolved by the DNS rule.
   */
  type JSON.String DnsRule_IpAddress;

  /**
   * @desc IP address type.
   */
  type enumerated DnsRule_IpAddressType {
    IP_V6,
    IP_V4
   }

  /**
   * @desc DNS rule state.
   */
  type enumerated DnsRule_State {
    ACTIVE,
YannGarcia's avatar
YannGarcia committed
181
182
    INACTIVE,
    UNKNOWN_VALUE
YannGarcia's avatar
YannGarcia committed
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
  }

  /**
   * @desc Time to live value.
   */
  type UInt32 Ttl;

  /**
   * @desc This type represents the general information of a DNS rule.
   */
  type record DnsRule {
    DnsRule_Id dnsRuleId,
    DomainName domainName,
    DnsRule_IpAddressType ipAddressType,
    DnsRule_IpAddress ipAddress,
    Ttl ttl,
    DnsRule_State state
  }
YannGarcia's avatar
YannGarcia committed
201
  type record of DnsRule DnsRuleList;
YannGarcia's avatar
YannGarcia committed
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225

  /**
   * @desc Host portion of the address.
   */
  type JSON.String Host;

  /**
   * @desc Port portion of the address.
   */
  type UInt32   Address_Port;

  /**
   * @desc A IP address and port pair.
   */
  type record Address {
    Host host,
    Address_Port port_
  } with {
    variant (port_) "name as 'port'";
  }

  /**
   * @desc Entry point information of the service as one or more pairs of IP address and port.
   */
Yann Garcia's avatar
Yann Garcia committed
226
  type record length(0..infinity) of Address EndPointInfo_AddressList;
YannGarcia's avatar
YannGarcia committed
227
228
229
230

  /**
   * @desc Entry point information of the service in a format defined by an implementation, or in an external specification.
   */
Yann Garcia's avatar
Yann Garcia committed
231
  type record EndPointInfo_Alternative {
YannGarcia's avatar
YannGarcia committed
232
233
234
235
236
237
238
239
240
241
242
    anytype alternative
  }

  /**
   * @desc Entry point information of the service.
   */
  type JSON.String EndPointInfo_Uri;

  /**
   * @desc Entry point information of the service as string, formatted according to URI syntax.
   */
243
  type record length(0..infinity) of EndPointInfo_Uri EndPointInfo_UriList;
YannGarcia's avatar
YannGarcia committed
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292

  /**
   * @desc This type represents a type of link and may be referenced from data structures.
   */
  type record LinkType {
    Href href
  }

  /**
   * @desc URI referring to a resource.
   */
  type JSON.String Href;

  /**
   * @desc Self-referring URI.
   */
  type record Mp1SubscriptionLinkList_Links {
    LinkType self_,
    Mp1SubscriptionLinkList_SubscriptionList subscription optional
  } with {
    variant (self_) "name as 'self'";
  }

  /**
   * @desc The values are as defined in the \"subscriptionType\" attribute for each different Mp1 event subscription data type.
   */
  type enumerated Rel {
    AppTerminationNotificationSubscription,
    SerAvailabilityNotificationSubscription
  }
  
  /**
   * @desc A link to a subscription.
   */
  type record Mp1SubscriptionLinkList_Subscription {
    Href href,
    Rel rel
  }
  type record length(0..infinity) of Mp1SubscriptionLinkList_Subscription Mp1SubscriptionLinkList_SubscriptionList;

  /**
   * @desc This type represents a list of links related to currently existing subscriptions for a mobile edge application instance. This information is returned when sending a request to receive current subscriptions.
   */
  type record Mp1SubscriptionLinkList {
    Mp1SubscriptionLinkList_Links links
  } with {
    variant (links) "name as '_links'";
  }
  
YannGarcia's avatar
YannGarcia committed
293
  type record Links {
Yann Garcia's avatar
Yann Garcia committed
294
295
    LinkType self_,
    Subscriptions subscriptions
YannGarcia's avatar
YannGarcia committed
296
297
298
299
300
301
302
303
  } with {
    variant (self_) "name as 'self'";
  }

  /**
   * @desc This type represents a list of links related to currently existing subscriptions for a MEC application instance.
   */
  type record SubscriptionLinkList {
Yann Garcia's avatar
Yann Garcia committed
304
    Links links
YannGarcia's avatar
YannGarcia committed
305
306
307
308
309
  } with {
    variant (links) "name as '_links'";
  }

  /**
Yann Garcia's avatar
Yann Garcia committed
310
311
312
   * @desc The MEC application instance's subscriptions
   * @member href URI referring to the subscription
   * @member subscriptionType Type of the subscription
YannGarcia's avatar
YannGarcia committed
313
314
315
316
317
   */
  type record Subscription_ {
    JSON.AnyURI href,
    SubscriptionType subscriptionType
  }
Yann Garcia's avatar
Yann Garcia committed
318
  type record length(0..infinity) of Subscription_ Subscriptions;
YannGarcia's avatar
YannGarcia committed
319

YannGarcia's avatar
YannGarcia committed
320
  /**
YannGarcia's avatar
YannGarcia committed
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
   * @desc List of supported OAuth 2.0 grant types.
   */
  type enumerated GrantTypes {
    OAUTH2_AUTHORIZATION_CODE,
    OAUTH2_IMPLICIT_GRANT,
    OAUTH2_RESOURCE_OWNER,
    OAUTH2_CLIENT_CREDENTIALS
  }
  type record length(1..4) of GrantTypes GrantTypesList;

  /**
   * @desc The token endpoint.
   */
  type JSON.String TokenEndpoint;

  /**
   * @desc Parameters related to use of OAuth 2.0.
YannGarcia's avatar
YannGarcia committed
338
   */
YannGarcia's avatar
YannGarcia committed
339
340
341
  type record OAuth2Info {
    GrantTypesList grantTypes,
    TokenEndpoint tokenEndpoint
YannGarcia's avatar
YannGarcia committed
342
343
344
  }

  /**
YannGarcia's avatar
YannGarcia committed
345
   * @desc This type represents security information related to a transport.
YannGarcia's avatar
YannGarcia committed
346
   */
YannGarcia's avatar
YannGarcia committed
347
348
  type record SecurityInfo {
    OAuth2Info oAuth2Info
YannGarcia's avatar
YannGarcia committed
349
350
351
  }

  /**
YannGarcia's avatar
YannGarcia committed
352
   * @desc Self-referring URI.
YannGarcia's avatar
YannGarcia committed
353
   */
YannGarcia's avatar
YannGarcia committed
354
355
356
357
358
  type record Self {
    LinkType self_,
    JSON.Bool readOnly optional
  } with {
    variant (self_) "name as 'self'";
YannGarcia's avatar
YannGarcia committed
359
360
361
  }

  /**
YannGarcia's avatar
YannGarcia committed
362
   * @desc URI selected by the mobile edge application instance to receive notifications on the subscribed mobile edge service availability information. This shall be included in both the request and the response.
YannGarcia's avatar
YannGarcia committed
363
   */
YannGarcia's avatar
YannGarcia committed
364
  type JSON.String SerAvailabilityNotificationSubscription_CallbackReference;
YannGarcia's avatar
YannGarcia committed
365
366

  /**
YannGarcia's avatar
YannGarcia committed
367
   * @desc This type represents a subscription to the notifications from the mobile edge platform regarding the availability of a mobile edge service or a list of mobile edge services.
YannGarcia's avatar
YannGarcia committed
368
   */
YannGarcia's avatar
YannGarcia committed
369
370
371
  type record SerAvailabilityNotificationSubscription {
    SerAvailabilityNotificationSubscription_SubscriptionType subscriptionType,
    SerAvailabilityNotificationSubscription_CallbackReference callbackReference,
YannGarcia's avatar
YannGarcia committed
372
373
    Self links optional,
    ServiceInfo filteringCriteria optional
Yann Garcia's avatar
Yann Garcia committed
374
375
  } with {
    variant (links) "name as '_links'";
YannGarcia's avatar
YannGarcia committed
376
377
378
  }

  /**
YannGarcia's avatar
YannGarcia committed
379
   * @desc Shall be set to SerAvailabilityNotificationSubscription.
YannGarcia's avatar
YannGarcia committed
380
   */
YannGarcia's avatar
YannGarcia committed
381
  type JSON.String SerAvailabilityNotificationSubscription_SubscriptionType;
YannGarcia's avatar
YannGarcia committed
382
383

  /**
YannGarcia's avatar
YannGarcia committed
384
   * @desc This type represents the service availability information.
YannGarcia's avatar
YannGarcia committed
385
   */
YannGarcia's avatar
YannGarcia committed
386
387
  type record ServiceAvailabilityNotification {
    SerAvailabilityNotificationSubscription_SubscriptionType notificationType,
YannGarcia's avatar
YannGarcia committed
388
    ServiceInfoList services,
YannGarcia's avatar
YannGarcia committed
389
390
    Subscription links
  }
YannGarcia's avatar
YannGarcia committed
391
392

  /**
YannGarcia's avatar
YannGarcia committed
393
   * @desc The enumeration SerializerTypes represents types of serializers.
YannGarcia's avatar
YannGarcia committed
394
   */
YannGarcia's avatar
YannGarcia committed
395
396
397
398
399
400
401
402
403
404
  type enumerated SerializerTypes {
    JSON,
    XML,
    PROTOBUF3
  }
  
  /**
   * @desc Identifier of the service instance assigned by the MEPM / mobile edge platform.
   */
  type JSON.String SerInstanceId;
YannGarcia's avatar
YannGarcia committed
405
406

  /**
YannGarcia's avatar
YannGarcia committed
407
   * @desc The name of the service. This is how the service producing mobile edge application identifies the service instance it produces.
YannGarcia's avatar
YannGarcia committed
408
   */
YannGarcia's avatar
YannGarcia committed
409
410
411
412
413
414
415
416
417
418
  type JSON.String SerName;

  /**
   * @desc Contains the state.
   */
  type enumerated ServiceInfo_State {
    ACTIVE,
    INACTIVE
  }

YannGarcia's avatar
YannGarcia committed
419
420
421
422
423
424
425
426
427
428
429
430
  /**
   * @desc Contains the types of locality.
   */
  type enumerated LocalityType {
    MEC_SYSTEM,
    MEC_HOST,
    NFVI_POP,
    ZONE,
    ZONE_GROUP,
    NFVI_NODE
  }
  
YannGarcia's avatar
YannGarcia committed
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
  /**
   * @desc Identifier of the platform-provided transport to be used by the service. Valid identifiers may be obtained using the \"Transport information query\" procedure. May be present in POST requests to signal the use of a platform-provided transport for the service, and shall be absent otherwise.
   */
  type JSON.String TransportId;

  /**
   * @desc Service version.
   */
  type JSON.String ServiceInfo_Version;

  /**
   * @desc This type represents the general information of a mobile edge service.
   */
  type record ServiceInfo {
    SerInstanceId serInstanceId optional,
    SerName serName,
    CategoryRef serCategory optional,
    ServiceInfo_Version version,
    ServiceInfo_State state,
YannGarcia's avatar
YannGarcia committed
450
451
452
453
454
455
    TransportId transportId optional,
    TransportInfo transportInfo optional,
    SerializerTypes serializer,
    LocalityType scopeOfLocality optional,
    boolean consumedLocalOnly optional,
    boolean isLocal optional
YannGarcia's avatar
YannGarcia committed
456
  }
YannGarcia's avatar
YannGarcia committed
457
  type record of ServiceInfo ServiceInfoList;
YannGarcia's avatar
YannGarcia committed
458
459

  /**
YannGarcia's avatar
YannGarcia committed
460
   * @desc A link to the related subscription.
YannGarcia's avatar
YannGarcia committed
461
   */
YannGarcia's avatar
YannGarcia committed
462
463
  type record Subscription {
    LinkType subscription
YannGarcia's avatar
YannGarcia committed
464
465
466
  }

  /**
YannGarcia's avatar
YannGarcia committed
467
   * @desc Authentication key number.
YannGarcia's avatar
YannGarcia committed
468
   */
YannGarcia's avatar
YannGarcia committed
469
470
471
472
473
474
475
476
477
  type UInt32 AuthenticationKeyNum;

  /**
   * @desc NTP authentication option.
   */
  type enumerated AuthenticationOption {
    NONE,
    SYMMETRIC_KEY,
    AUTO_KEY
YannGarcia's avatar
YannGarcia committed
478
479
480
  }

  /**
YannGarcia's avatar
YannGarcia committed
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
   * @desc Acceptable maximum rate of the Delay_Req messages in packets per second.
   */
  type UInt32 DelayReqMaxRate;

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

  /**
   * @desc Maximum poll interval for NTP messages, in seconds as a power of two. Range 3...17.
   */
  type integer MaxPollingInterval (3..17) with {variant "unsigned 32 bit"} ;

  /**
   * @desc Minimum poll interval for NTP messages, in seconds as a power of two. Range 3...17.
   */
  type integer MinPollingInterval (3..17) with {variant "unsigned 32 bit"} ;

  /**
   * @desc NTP server address.
   */
  type JSON.String NtpServerAddr;

  /**
   * @desc Address type of NTP server.
YannGarcia's avatar
YannGarcia committed
507
   */
YannGarcia's avatar
YannGarcia committed
508
509
510
  type enumerated NtpServerAddrType {
    IP_ADDRESS,
    DNS_NAME
YannGarcia's avatar
YannGarcia committed
511
512
513
  }

  /**
YannGarcia's avatar
YannGarcia committed
514
   * @desc PTP Master IP Address.
YannGarcia's avatar
YannGarcia committed
515
   */
YannGarcia's avatar
YannGarcia committed
516
  type JSON.String NtpServers_PtpMasterIpAddress;
YannGarcia's avatar
YannGarcia committed
517
518

  /**
YannGarcia's avatar
YannGarcia committed
519
   * @desc PTP Master local priority.
YannGarcia's avatar
YannGarcia committed
520
   */
YannGarcia's avatar
YannGarcia committed
521
  type UInt32 NtpServers_PtpMasterLocalPriority;
YannGarcia's avatar
YannGarcia committed
522
523

  /**
YannGarcia's avatar
YannGarcia committed
524
   * @desc NTP server detail.
YannGarcia's avatar
YannGarcia committed
525
   */
YannGarcia's avatar
YannGarcia committed
526
527
528
529
530
531
532
533
534
535
  type record NtpServers {
    NtpServerAddrType ntpServerAddrType,
    NtpServerAddr ntpServerAddr,
    MinPollingInterval minPollingInterval,
    MaxPollingInterval maxPollingInterval,
    LocalPriority localPriority,
    AuthenticationOption authenticationOption,
    AuthenticationKeyNum authenticationKeyNum
  }
  type record of NtpServers NtpServersList;
YannGarcia's avatar
YannGarcia committed
536
537

  /**
YannGarcia's avatar
YannGarcia committed
538
   * @desc NTP server detail.
YannGarcia's avatar
YannGarcia committed
539
   */
YannGarcia's avatar
YannGarcia committed
540
541
542
543
544
545
  type record TimingCaps_PtpMasters {
    NtpServers_PtpMasterIpAddress ptpMasterIpAddress,
    NtpServers_PtpMasterLocalPriority ptpMasterLocalPriority,
    DelayReqMaxRate delayReqMaxRate
  }
  type record of TimingCaps_PtpMasters TimingCaps_PtpMastersList;
YannGarcia's avatar
YannGarcia committed
546
547

  /**
YannGarcia's avatar
YannGarcia committed
548
549
550
   * @desc Time.
   * @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.
YannGarcia's avatar
YannGarcia committed
551
   */
YannGarcia's avatar
YannGarcia committed
552
553
554
  type record TimeStamp {
    Seconds seconds,
    NanoSeconds nanoSeconds
YannGarcia's avatar
YannGarcia committed
555
556
557
  }

  /**
YannGarcia's avatar
YannGarcia committed
558
   * @desc This type represents the information provided by the mobile edge platform in response to the Timing capabilities Query message.
YannGarcia's avatar
YannGarcia committed
559
   */
YannGarcia's avatar
YannGarcia committed
560
  type record TimingCaps {
YannGarcia's avatar
YannGarcia committed
561
562
563
    TimeStamp timeStamp optional,
    NtpServersList ntpServers optional,
    TimingCaps_PtpMastersList ptpMasters optional
YannGarcia's avatar
YannGarcia committed
564
  }
YannGarcia's avatar
YannGarcia committed
565
566

  /**
YannGarcia's avatar
YannGarcia committed
567
   * @desc Identify the traffic ip address.
YannGarcia's avatar
YannGarcia committed
568
   */
YannGarcia's avatar
YannGarcia committed
569
570
  type JSON.String TrafficFilter_Address;
  type record of TrafficFilter_Address TrafficFilter_AddressList;
YannGarcia's avatar
YannGarcia committed
571
572

  /**
YannGarcia's avatar
YannGarcia committed
573
   * @desc Used to match all IPv4 packets that have the same Differentiated Services Code Point (DSCP).
YannGarcia's avatar
YannGarcia committed
574
   */
YannGarcia's avatar
YannGarcia committed
575
  type UInt32 TrafficFilter_DSCP;
YannGarcia's avatar
YannGarcia committed
576
577

  /**
YannGarcia's avatar
YannGarcia committed
578
   * @desc Identify the traffic ip address.
YannGarcia's avatar
YannGarcia committed
579
   */
YannGarcia's avatar
YannGarcia committed
580
  type JSON.String TrafficFilter_Port;
Yann Garcia's avatar
Yann Garcia committed
581
  type record length(0..infinity) of TrafficFilter_Port TrafficFilter_PortList;
YannGarcia's avatar
YannGarcia committed
582
583

  /**
YannGarcia's avatar
YannGarcia committed
584
   * @desc Protocol of the traffic filter.
YannGarcia's avatar
YannGarcia committed
585
   */
YannGarcia's avatar
YannGarcia committed
586
587
  type JSON.String TrafficFilter_Protocol;
  type record of TrafficFilter_Protocol TrafficFilter_ProtocolList;
YannGarcia's avatar
YannGarcia committed
588
589

  /**
YannGarcia's avatar
YannGarcia committed
590
   * @desc Used to match all packets that have the same Quality Class Indicator (QCI).
YannGarcia's avatar
YannGarcia committed
591
   */
YannGarcia's avatar
YannGarcia committed
592
  type UInt32 TrafficFilter_QCI;
YannGarcia's avatar
YannGarcia committed
593
594

  /**
YannGarcia's avatar
YannGarcia committed
595
   * @desc Used to match all IPv6 packets that have the same Traffic Class.
YannGarcia's avatar
YannGarcia committed
596
   */
YannGarcia's avatar
YannGarcia committed
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
  type UInt32 TrafficFilter_TC;

  /**
   * @desc Used for token based traffic rule.
   */
  type JSON.String TrafficFilter_Token;
  type record of TrafficFilter_Token TrafficFilter_TokenList;

  /**
   * @desc Used for GTP tunnel based traffic rule.
   */
  type JSON.String TrafficFilter_TunnelAddress;
  type record of TrafficFilter_TunnelAddress TrafficFilter_TunnelAddressList;

  /**
   * @desc Used for GTP tunnel based traffic rule.
   */
  type JSON.String TrafficFilter_TunnelPort;
  type record of TrafficFilter_TunnelPort TrafficFilter_TunnelPortList;

  /**
   * @desc This type represents the traffic filter.
   */
  type record TrafficFilter {
Yann Garcia's avatar
Yann Garcia committed
621
    TrafficFilter_AddressList srcAddress,
YannGarcia's avatar
YannGarcia committed
622
    TrafficFilter_AddressList dstAddress,
Yann Garcia's avatar
Yann Garcia committed
623
624
    TrafficFilter_PortList srcPort,
    TrafficFilter_PortList dstPort,
YannGarcia's avatar
YannGarcia committed
625
626
627
628
629
630
    TrafficFilter_ProtocolList protocol,
    TrafficFilter_TokenList token,
    TrafficFilter_TunnelAddressList srcTunnelAddress,
    TrafficFilter_TunnelAddressList tgtTunnelAddress,
    TrafficFilter_TunnelPortList srcTunnelPort,
    TrafficFilter_TunnelPortList dstTunnelPort,
Yann Garcia's avatar
Yann Garcia committed
631
632
633
    TrafficFilter_QCI qCI optional,
    TrafficFilter_DSCP dSCP optional,
    TrafficFilter_TC tC optional
YannGarcia's avatar
YannGarcia committed
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
  }
  type record of TrafficFilter TrafficFilterList;

  /**
   * @desc The action of the ME host data plane when a packet matches the trafficFilter.
   */
  type enumerated TrafficRule_Action {
    DROP,
    FORWARD_DECAPSULATED,
    FORWARD_AS_IS,
    PASSTHROUGH,
    DUPLICATE_DECAPSULATED,
    DUPLICATE_AS_IS
  }

  /**
   * @desc Definition of filter per FLOW or PACKET. If flow the filter match UE->EPC packet and the reverse packet is handled in the same context.
   */
  type enumerated TrafficRule_FilterType {
    FLOW,
    PACKET
   }

  /**
   * @desc Identify the traffic rule.
   */
  type JSON.String TrafficRule_Id;

  /**
   * @desc Priority of this traffic rule. If traffic rule conflicts, the one with higher priority take precedence.
   */
  type UInt32 TrafficRule_Priority;

  /**
   * @desc Contains the traffic rule state.
   */
  type enumerated TrafficRule_State {
    ACTIVE,
    INACTIVE
  }

  /**
   * @desc This type represents the general information of a traffic rule.
   */
  type record TrafficRule {
    TrafficRule_Id trafficRuleId,
    TrafficRule_FilterType filterType,
    TrafficRule_Priority priority,
    TrafficFilterList trafficFilter,
    TrafficRule_Action action_,
    DestinationInterface dstInterface optional,
    TrafficRule_State state
  } with {
    variant (action_) "name as 'action'";
  }
YannGarcia's avatar
YannGarcia committed
689
  type record of TrafficRule TrafficRuleList
YannGarcia's avatar
YannGarcia committed
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723

  /**
   * @desc Human-readable description of this transport.
   */
  type JSON.String TransportInfo_Description;

  /**
   * @desc The identifier of this transport.
   */
  type JSON.String TransportInfo_Id;

  /**
   * @desc Additional implementation specific details of the transport.
   */
  type anytype TransportInfo_ImplSpecificInfo;

  /**
   * @desc The name of this transport.
   */
  type JSON.String TransportInfo_Name;

  /**
   * @desc The name of the protocol used. Shall be set to HTTP for a REST API.
   */
  type JSON.String TransportInfo_Protocol;

  /**
   * @desc The version of the protocol used.
   */
  type JSON.String TransportInfo_Version;

  /**
   * @desc This type represents information about a transport endpoint.
   */
724
725
  type union TransportInfo_Endpoint {
    EndPointInfo_UriList uris,
Yann Garcia's avatar
Yann Garcia committed
726
727
    EndPointInfo_AddressList addresses,
    EndPointInfo_Alternative alternative
YannGarcia's avatar
YannGarcia committed
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
  }

  /**
   * @desc This type represents the general information of a mobile edge service.
   */
  type record TransportInfo {
    TransportInfo_Id id,
    TransportInfo_Name name,
    TransportInfo_Description description optional,
    TransportTypes type_,
    TransportInfo_Protocol protocol,
    TransportInfo_Version version,
    TransportInfo_Endpoint endpoint,
    SecurityInfo security,
    TransportInfo_ImplSpecificInfo implSpecificInfo optional
  } with {
    variant (type_) "name as 'type'";
  }
  type record of TransportInfo TransportInfoList;

  /**
   * @desc The enumeration TransportTypes represents types of transports.
   */
  type enumerated TransportTypes {
    REST_HTTP,
    MB_TOPIC_BASED,
    MB_ROUTING,
    MB_PUBSUB,
    RPC,
    RPC_STREAMING,
    WEBSOCKET
  }

  /**
   * @desc Destination address of the tunnel.
   */
  type JSON.String TunnelInfo_TunnelDstAddress;

  /**
   * @desc Source address of the tunnel.
   */
  type JSON.String TunnelInfo_TunnelSrcAddress;

  /**
   * @desc This type represents the tunnel information.
   */
  type enumerated TunnelInfo_TunnelType {
    GTP_U,
    GRE
  }

  /**
   * @desc This type represents the tunnel information.
   */
  type record TunnelInfo {
    TunnelInfo_TunnelType tunnelType,
    TunnelInfo_TunnelDstAddress tunnelDstAddress optional,
    TunnelInfo_TunnelSrcAddress tunnelSrcAddress optional
  }

YannGarcia's avatar
YannGarcia committed
788
789
790
} with {
  encode "JSON"
} // End of module AppEnablementAPI_TypesAndValues