REST API: use byte array for E2SM event trigger
[ric-plt/xapp-frame.git] / pkg / restapi / embedded_spec.go
1 // Code generated by go-swagger; DO NOT EDIT.
2
3 package restapi
4
5 // This file was generated by the swagger tool.
6 // Editing this file might prove futile when you re-run the swagger generate command
7
8 import (
9         "encoding/json"
10 )
11
12 var (
13         // SwaggerJSON embedded version of the swagger document used at generation time
14         SwaggerJSON json.RawMessage
15         // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
16         FlatSwaggerJSON json.RawMessage
17 )
18
19 func init() {
20         SwaggerJSON = json.RawMessage([]byte(`{
21   "schemes": [
22     "http"
23   ],
24   "swagger": "2.0",
25   "info": {
26     "description": "This is the initial REST API for RIC subscription",
27     "title": "RIC subscription",
28     "license": {
29       "name": "Apache 2.0",
30       "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
31     },
32     "version": "0.0.2"
33   },
34   "host": "hostname",
35   "basePath": "/ric/v1",
36   "paths": {
37     "/config": {
38       "get": {
39         "produces": [
40           "application/json",
41           "application/xml"
42         ],
43         "tags": [
44           "xapp"
45         ],
46         "summary": "Returns the configuration of all xapps",
47         "operationId": "getXappConfigList",
48         "responses": {
49           "200": {
50             "description": "successful query of xApp config",
51             "schema": {
52               "$ref": "#/definitions/XappConfigList"
53             }
54           },
55           "500": {
56             "description": "Internal error"
57           }
58         }
59       }
60     },
61     "/subscriptions": {
62       "get": {
63         "produces": [
64           "application/json"
65         ],
66         "tags": [
67           "common"
68         ],
69         "summary": "Returns list of subscriptions",
70         "operationId": "getAllSubscriptions",
71         "responses": {
72           "200": {
73             "description": "successful query of subscriptions",
74             "schema": {
75               "$ref": "#/definitions/SubscriptionList"
76             }
77           },
78           "500": {
79             "description": "Internal error"
80           }
81         }
82       },
83       "post": {
84         "consumes": [
85           "application/json"
86         ],
87         "produces": [
88           "application/json"
89         ],
90         "tags": [
91           "common"
92         ],
93         "summary": "Subscribe a list of X2AP event triggers to receive messages sent by RAN",
94         "operationId": "Subscribe",
95         "parameters": [
96           {
97             "description": "Subscription parameters",
98             "name": "SubscriptionParams",
99             "in": "body",
100             "schema": {
101               "$ref": "#/definitions/SubscriptionParams"
102             }
103           }
104         ],
105         "responses": {
106           "201": {
107             "description": "Subscription successfully created",
108             "schema": {
109               "$ref": "#/definitions/SubscriptionResponse"
110             }
111           },
112           "400": {
113             "description": "Invalid input"
114           },
115           "500": {
116             "description": "Internal error"
117           }
118         }
119       }
120     },
121     "/subscriptions/{subscriptionId}": {
122       "delete": {
123         "consumes": [
124           "application/json"
125         ],
126         "produces": [
127           "application/json"
128         ],
129         "tags": [
130           "common"
131         ],
132         "summary": "Unsubscribe X2AP events from Subscription Manager",
133         "operationId": "Unsubscribe",
134         "parameters": [
135           {
136             "type": "string",
137             "description": "The subscriptionId received in the Subscription Response",
138             "name": "subscriptionId",
139             "in": "path",
140             "required": true
141           }
142         ],
143         "responses": {
144           "204": {
145             "description": "Operation done successfully"
146           },
147           "400": {
148             "description": "Invalid subscriptionId supplied"
149           },
150           "500": {
151             "description": "Internal error"
152           }
153         }
154       }
155     }
156   },
157   "definitions": {
158     "ActionDefinition": {
159       "description": "E2SM byte array. ActionDefinition is an OPTIONAL IE",
160       "type": "array",
161       "items": {
162         "type": "integer"
163       }
164     },
165     "ActionToBeSetup": {
166       "type": "object",
167       "required": [
168         "ActionID",
169         "ActionType"
170       ],
171       "properties": {
172         "ActionDefinition": {
173           "$ref": "#/definitions/ActionDefinition"
174         },
175         "ActionID": {
176           "type": "integer",
177           "maximum": 255
178         },
179         "ActionType": {
180           "type": "string",
181           "enum": [
182             "insert",
183             "policy",
184             "report"
185           ]
186         },
187         "SubsequentAction": {
188           "$ref": "#/definitions/SubsequentAction"
189         }
190       }
191     },
192     "ActionsToBeSetup": {
193       "type": "array",
194       "items": {
195         "$ref": "#/definitions/ActionToBeSetup"
196       }
197     },
198     "ConfigMetadata": {
199       "type": "object",
200       "required": [
201         "xappName",
202         "configType"
203       ],
204       "properties": {
205         "configType": {
206           "description": "The type of the content",
207           "type": "string",
208           "enum": [
209             "json",
210             "xml",
211             "other"
212           ]
213         },
214         "xappName": {
215           "description": "Name of the xApp",
216           "type": "string"
217         }
218       }
219     },
220     "EventTriggerDefinition": {
221       "description": "E2SM byte array",
222       "type": "array",
223       "items": {
224         "type": "integer"
225       }
226     },
227     "SubscriptionData": {
228       "type": "object",
229       "properties": {
230         "ClientEndpoint": {
231           "type": "array",
232           "items": {
233             "type": "string"
234           }
235         },
236         "Meid": {
237           "type": "string"
238         },
239         "SubscriptionId": {
240           "type": "integer"
241         },
242         "SubscriptionInstances": {
243           "type": "array",
244           "items": {
245             "$ref": "#/definitions/SubscriptionInstance"
246           }
247         }
248       }
249     },
250     "SubscriptionDetail": {
251       "type": "object",
252       "required": [
253         "XappEventInstanceId",
254         "EventTriggers",
255         "ActionToBeSetupList"
256       ],
257       "properties": {
258         "ActionToBeSetupList": {
259           "$ref": "#/definitions/ActionsToBeSetup"
260         },
261         "EventTriggers": {
262           "$ref": "#/definitions/EventTriggerDefinition"
263         },
264         "XappEventInstanceId": {
265           "type": "integer",
266           "maximum": 65535
267         }
268       }
269     },
270     "SubscriptionDetailsList": {
271       "type": "array",
272       "items": {
273         "$ref": "#/definitions/SubscriptionDetail"
274       }
275     },
276     "SubscriptionInstance": {
277       "type": "object",
278       "required": [
279         "XappEventInstanceId",
280         "E2EventInstanceId",
281         "ErrorCause"
282       ],
283       "properties": {
284         "E2EventInstanceId": {
285           "type": "integer",
286           "maximum": 65535
287         },
288         "ErrorCause": {
289           "description": "Empty string when no error.",
290           "type": "string"
291         },
292         "XappEventInstanceId": {
293           "type": "integer",
294           "maximum": 65535
295         }
296       }
297     },
298     "SubscriptionList": {
299       "description": "A list of subscriptions",
300       "type": "array",
301       "items": {
302         "$ref": "#/definitions/SubscriptionData"
303       }
304     },
305     "SubscriptionParams": {
306       "type": "object",
307       "required": [
308         "ClientEndpoint",
309         "Meid",
310         "RANFunctionID",
311         "SubscriptionDetails"
312       ],
313       "properties": {
314         "ClientEndpoint": {
315           "description": "xApp service address and port",
316           "type": "object",
317           "properties": {
318             "HTTPPort": {
319               "description": "xApp HTTP service address port",
320               "type": "integer",
321               "maximum": 65535
322             },
323             "Host": {
324               "description": "xApp service address name like 'service-ricxapp-xappname-http.ricxapp'",
325               "type": "string"
326             },
327             "RMRPort": {
328               "description": "xApp RMR service address port",
329               "type": "integer",
330               "maximum": 65535
331             }
332           }
333         },
334         "Meid": {
335           "type": "string"
336         },
337         "RANFunctionID": {
338           "type": "integer",
339           "maximum": 4095
340         },
341         "SubscriptionDetails": {
342           "$ref": "#/definitions/SubscriptionDetailsList"
343         },
344         "SubscriptionId": {
345           "description": "Optional subscription ID (Submgr allocates if not given)",
346           "type": "string"
347         }
348       }
349     },
350     "SubscriptionResponse": {
351       "type": "object",
352       "required": [
353         "SubscriptionId",
354         "SubscriptionInstances"
355       ],
356       "properties": {
357         "SubscriptionId": {
358           "type": "string"
359         },
360         "SubscriptionInstances": {
361           "type": "array",
362           "items": {
363             "$ref": "#/definitions/SubscriptionInstance"
364           }
365         }
366       }
367     },
368     "SubsequentAction": {
369       "description": "SubsequentAction is an OPTIONAL IE",
370       "type": "object",
371       "required": [
372         "SubsequentActionType",
373         "TimeToWait"
374       ],
375       "properties": {
376         "SubsequentActionType": {
377           "type": "string",
378           "enum": [
379             "continue",
380             "wait"
381           ]
382         },
383         "TimeToWait": {
384           "type": "string",
385           "enum": [
386             "zero",
387             "w1ms",
388             "w2ms",
389             "w5ms",
390             "w10ms",
391             "w20ms",
392             "w30ms",
393             "w40ms",
394             "w50ms",
395             "w100ms",
396             "w200ms",
397             "w500ms",
398             "w1s",
399             "w2s",
400             "w5s",
401             "w10s",
402             "w20s",
403             "w60s"
404           ]
405         }
406       }
407     },
408     "XAppConfig": {
409       "type": "object",
410       "required": [
411         "metadata",
412         "config"
413       ],
414       "properties": {
415         "config": {
416           "description": "Configuration in JSON format",
417           "type": "object"
418         },
419         "metadata": {
420           "$ref": "#/definitions/ConfigMetadata"
421         }
422       }
423     },
424     "XappConfigList": {
425       "type": "array",
426       "items": {
427         "$ref": "#/definitions/XAppConfig"
428       }
429     }
430   }
431 }`))
432         FlatSwaggerJSON = json.RawMessage([]byte(`{
433   "schemes": [
434     "http"
435   ],
436   "swagger": "2.0",
437   "info": {
438     "description": "This is the initial REST API for RIC subscription",
439     "title": "RIC subscription",
440     "license": {
441       "name": "Apache 2.0",
442       "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
443     },
444     "version": "0.0.2"
445   },
446   "host": "hostname",
447   "basePath": "/ric/v1",
448   "paths": {
449     "/config": {
450       "get": {
451         "produces": [
452           "application/json",
453           "application/xml"
454         ],
455         "tags": [
456           "xapp"
457         ],
458         "summary": "Returns the configuration of all xapps",
459         "operationId": "getXappConfigList",
460         "responses": {
461           "200": {
462             "description": "successful query of xApp config",
463             "schema": {
464               "$ref": "#/definitions/XappConfigList"
465             }
466           },
467           "500": {
468             "description": "Internal error"
469           }
470         }
471       }
472     },
473     "/subscriptions": {
474       "get": {
475         "produces": [
476           "application/json"
477         ],
478         "tags": [
479           "common"
480         ],
481         "summary": "Returns list of subscriptions",
482         "operationId": "getAllSubscriptions",
483         "responses": {
484           "200": {
485             "description": "successful query of subscriptions",
486             "schema": {
487               "$ref": "#/definitions/SubscriptionList"
488             }
489           },
490           "500": {
491             "description": "Internal error"
492           }
493         }
494       },
495       "post": {
496         "consumes": [
497           "application/json"
498         ],
499         "produces": [
500           "application/json"
501         ],
502         "tags": [
503           "common"
504         ],
505         "summary": "Subscribe a list of X2AP event triggers to receive messages sent by RAN",
506         "operationId": "Subscribe",
507         "parameters": [
508           {
509             "description": "Subscription parameters",
510             "name": "SubscriptionParams",
511             "in": "body",
512             "schema": {
513               "$ref": "#/definitions/SubscriptionParams"
514             }
515           }
516         ],
517         "responses": {
518           "201": {
519             "description": "Subscription successfully created",
520             "schema": {
521               "$ref": "#/definitions/SubscriptionResponse"
522             }
523           },
524           "400": {
525             "description": "Invalid input"
526           },
527           "500": {
528             "description": "Internal error"
529           }
530         }
531       }
532     },
533     "/subscriptions/{subscriptionId}": {
534       "delete": {
535         "consumes": [
536           "application/json"
537         ],
538         "produces": [
539           "application/json"
540         ],
541         "tags": [
542           "common"
543         ],
544         "summary": "Unsubscribe X2AP events from Subscription Manager",
545         "operationId": "Unsubscribe",
546         "parameters": [
547           {
548             "type": "string",
549             "description": "The subscriptionId received in the Subscription Response",
550             "name": "subscriptionId",
551             "in": "path",
552             "required": true
553           }
554         ],
555         "responses": {
556           "204": {
557             "description": "Operation done successfully"
558           },
559           "400": {
560             "description": "Invalid subscriptionId supplied"
561           },
562           "500": {
563             "description": "Internal error"
564           }
565         }
566       }
567     }
568   },
569   "definitions": {
570     "ActionDefinition": {
571       "description": "E2SM byte array. ActionDefinition is an OPTIONAL IE",
572       "type": "array",
573       "items": {
574         "type": "integer"
575       }
576     },
577     "ActionToBeSetup": {
578       "type": "object",
579       "required": [
580         "ActionID",
581         "ActionType"
582       ],
583       "properties": {
584         "ActionDefinition": {
585           "$ref": "#/definitions/ActionDefinition"
586         },
587         "ActionID": {
588           "type": "integer",
589           "maximum": 255,
590           "minimum": 0
591         },
592         "ActionType": {
593           "type": "string",
594           "enum": [
595             "insert",
596             "policy",
597             "report"
598           ]
599         },
600         "SubsequentAction": {
601           "$ref": "#/definitions/SubsequentAction"
602         }
603       }
604     },
605     "ActionsToBeSetup": {
606       "type": "array",
607       "items": {
608         "$ref": "#/definitions/ActionToBeSetup"
609       }
610     },
611     "ConfigMetadata": {
612       "type": "object",
613       "required": [
614         "xappName",
615         "configType"
616       ],
617       "properties": {
618         "configType": {
619           "description": "The type of the content",
620           "type": "string",
621           "enum": [
622             "json",
623             "xml",
624             "other"
625           ]
626         },
627         "xappName": {
628           "description": "Name of the xApp",
629           "type": "string"
630         }
631       }
632     },
633     "EventTriggerDefinition": {
634       "description": "E2SM byte array",
635       "type": "array",
636       "items": {
637         "type": "integer"
638       }
639     },
640     "SubscriptionData": {
641       "type": "object",
642       "properties": {
643         "ClientEndpoint": {
644           "type": "array",
645           "items": {
646             "type": "string"
647           }
648         },
649         "Meid": {
650           "type": "string"
651         },
652         "SubscriptionId": {
653           "type": "integer"
654         },
655         "SubscriptionInstances": {
656           "type": "array",
657           "items": {
658             "$ref": "#/definitions/SubscriptionInstance"
659           }
660         }
661       }
662     },
663     "SubscriptionDetail": {
664       "type": "object",
665       "required": [
666         "XappEventInstanceId",
667         "EventTriggers",
668         "ActionToBeSetupList"
669       ],
670       "properties": {
671         "ActionToBeSetupList": {
672           "$ref": "#/definitions/ActionsToBeSetup"
673         },
674         "EventTriggers": {
675           "$ref": "#/definitions/EventTriggerDefinition"
676         },
677         "XappEventInstanceId": {
678           "type": "integer",
679           "maximum": 65535,
680           "minimum": 0
681         }
682       }
683     },
684     "SubscriptionDetailsList": {
685       "type": "array",
686       "items": {
687         "$ref": "#/definitions/SubscriptionDetail"
688       }
689     },
690     "SubscriptionInstance": {
691       "type": "object",
692       "required": [
693         "XappEventInstanceId",
694         "E2EventInstanceId",
695         "ErrorCause"
696       ],
697       "properties": {
698         "E2EventInstanceId": {
699           "type": "integer",
700           "maximum": 65535,
701           "minimum": 0
702         },
703         "ErrorCause": {
704           "description": "Empty string when no error.",
705           "type": "string"
706         },
707         "XappEventInstanceId": {
708           "type": "integer",
709           "maximum": 65535,
710           "minimum": 0
711         }
712       }
713     },
714     "SubscriptionList": {
715       "description": "A list of subscriptions",
716       "type": "array",
717       "items": {
718         "$ref": "#/definitions/SubscriptionData"
719       }
720     },
721     "SubscriptionParams": {
722       "type": "object",
723       "required": [
724         "ClientEndpoint",
725         "Meid",
726         "RANFunctionID",
727         "SubscriptionDetails"
728       ],
729       "properties": {
730         "ClientEndpoint": {
731           "description": "xApp service address and port",
732           "type": "object",
733           "properties": {
734             "HTTPPort": {
735               "description": "xApp HTTP service address port",
736               "type": "integer",
737               "maximum": 65535,
738               "minimum": 0
739             },
740             "Host": {
741               "description": "xApp service address name like 'service-ricxapp-xappname-http.ricxapp'",
742               "type": "string"
743             },
744             "RMRPort": {
745               "description": "xApp RMR service address port",
746               "type": "integer",
747               "maximum": 65535,
748               "minimum": 0
749             }
750           }
751         },
752         "Meid": {
753           "type": "string"
754         },
755         "RANFunctionID": {
756           "type": "integer",
757           "maximum": 4095,
758           "minimum": 0
759         },
760         "SubscriptionDetails": {
761           "$ref": "#/definitions/SubscriptionDetailsList"
762         },
763         "SubscriptionId": {
764           "description": "Optional subscription ID (Submgr allocates if not given)",
765           "type": "string"
766         }
767       }
768     },
769     "SubscriptionParamsClientEndpoint": {
770       "description": "xApp service address and port",
771       "type": "object",
772       "properties": {
773         "HTTPPort": {
774           "description": "xApp HTTP service address port",
775           "type": "integer",
776           "maximum": 65535,
777           "minimum": 0
778         },
779         "Host": {
780           "description": "xApp service address name like 'service-ricxapp-xappname-http.ricxapp'",
781           "type": "string"
782         },
783         "RMRPort": {
784           "description": "xApp RMR service address port",
785           "type": "integer",
786           "maximum": 65535,
787           "minimum": 0
788         }
789       }
790     },
791     "SubscriptionResponse": {
792       "type": "object",
793       "required": [
794         "SubscriptionId",
795         "SubscriptionInstances"
796       ],
797       "properties": {
798         "SubscriptionId": {
799           "type": "string"
800         },
801         "SubscriptionInstances": {
802           "type": "array",
803           "items": {
804             "$ref": "#/definitions/SubscriptionInstance"
805           }
806         }
807       }
808     },
809     "SubsequentAction": {
810       "description": "SubsequentAction is an OPTIONAL IE",
811       "type": "object",
812       "required": [
813         "SubsequentActionType",
814         "TimeToWait"
815       ],
816       "properties": {
817         "SubsequentActionType": {
818           "type": "string",
819           "enum": [
820             "continue",
821             "wait"
822           ]
823         },
824         "TimeToWait": {
825           "type": "string",
826           "enum": [
827             "zero",
828             "w1ms",
829             "w2ms",
830             "w5ms",
831             "w10ms",
832             "w20ms",
833             "w30ms",
834             "w40ms",
835             "w50ms",
836             "w100ms",
837             "w200ms",
838             "w500ms",
839             "w1s",
840             "w2s",
841             "w5s",
842             "w10s",
843             "w20s",
844             "w60s"
845           ]
846         }
847       }
848     },
849     "XAppConfig": {
850       "type": "object",
851       "required": [
852         "metadata",
853         "config"
854       ],
855       "properties": {
856         "config": {
857           "description": "Configuration in JSON format",
858           "type": "object"
859         },
860         "metadata": {
861           "$ref": "#/definitions/ConfigMetadata"
862         }
863       }
864     },
865     "XappConfigList": {
866       "type": "array",
867       "items": {
868         "$ref": "#/definitions/XAppConfig"
869       }
870     }
871   }
872 }`))
873 }