b031520f27af4807723aebbb47b2aeefcbefa4c3
[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.1"
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 Octet string. ActionDefinition is an OPTIONAL IE",
160       "type": "object",
161       "properties": {
162         "OctetString": {
163           "type": "string"
164         }
165       }
166     },
167     "ActionToBeSetup": {
168       "type": "object",
169       "required": [
170         "ActionID",
171         "ActionType"
172       ],
173       "properties": {
174         "ActionDefinition": {
175           "$ref": "#/definitions/ActionDefinition"
176         },
177         "ActionID": {
178           "type": "integer",
179           "maximum": 255
180         },
181         "ActionType": {
182           "type": "string",
183           "enum": [
184             "insert",
185             "policy",
186             "report"
187           ]
188         },
189         "SubsequentAction": {
190           "$ref": "#/definitions/SubsequentAction"
191         }
192       }
193     },
194     "ActionsToBeSetup": {
195       "type": "array",
196       "items": {
197         "$ref": "#/definitions/ActionToBeSetup"
198       }
199     },
200     "ConfigMetadata": {
201       "type": "object",
202       "required": [
203         "xappName",
204         "configType"
205       ],
206       "properties": {
207         "configType": {
208           "description": "The type of the content",
209           "type": "string",
210           "enum": [
211             "json",
212             "xml",
213             "other"
214           ]
215         },
216         "xappName": {
217           "description": "Name of the xApp",
218           "type": "string"
219         }
220       }
221     },
222     "EventTriggerDefinition": {
223       "description": "E2SM Octet string",
224       "type": "object",
225       "properties": {
226         "OctetString": {
227           "type": "string"
228         }
229       }
230     },
231     "SubscriptionData": {
232       "type": "object",
233       "properties": {
234         "ClientEndpoint": {
235           "type": "array",
236           "items": {
237             "type": "string"
238           }
239         },
240         "Meid": {
241           "type": "string"
242         },
243         "SubscriptionId": {
244           "type": "integer"
245         },
246         "SubscriptionInstances": {
247           "type": "array",
248           "items": {
249             "$ref": "#/definitions/SubscriptionInstance"
250           }
251         }
252       }
253     },
254     "SubscriptionDetail": {
255       "type": "object",
256       "required": [
257         "RequestorId",
258         "InstanceId",
259         "EventTriggers",
260         "ActionToBeSetupList"
261       ],
262       "properties": {
263         "ActionToBeSetupList": {
264           "$ref": "#/definitions/ActionsToBeSetup"
265         },
266         "EventTriggers": {
267           "$ref": "#/definitions/EventTriggerDefinition"
268         },
269         "InstanceId": {
270           "type": "integer",
271           "maximum": 65535
272         },
273         "RequestorId": {
274           "type": "integer",
275           "maximum": 65535
276         }
277       }
278     },
279     "SubscriptionDetailsList": {
280       "type": "array",
281       "items": {
282         "$ref": "#/definitions/SubscriptionDetail"
283       }
284     },
285     "SubscriptionInstance": {
286       "type": "object",
287       "required": [
288         "RequestorId",
289         "InstanceId",
290         "ErrorCause"
291       ],
292       "properties": {
293         "ErrorCause": {
294           "description": "Empty string when no error.",
295           "type": "string"
296         },
297         "InstanceId": {
298           "type": "integer",
299           "maximum": 65535
300         },
301         "RequestorId": {
302           "type": "integer",
303           "maximum": 65535
304         }
305       }
306     },
307     "SubscriptionList": {
308       "description": "A list of subscriptions",
309       "type": "array",
310       "items": {
311         "$ref": "#/definitions/SubscriptionData"
312       }
313     },
314     "SubscriptionParams": {
315       "type": "object",
316       "required": [
317         "ClientEndpoint",
318         "Meid",
319         "RANFunctionID",
320         "SubscriptionDetails"
321       ],
322       "properties": {
323         "ClientEndpoint": {
324           "description": "xApp service address and port",
325           "type": "object",
326           "properties": {
327             "HTTPPort": {
328               "description": "xApp HTTP service address port",
329               "type": "integer",
330               "maximum": 65535
331             },
332             "Host": {
333               "description": "xApp service address name like 'service-ricxapp-xappname-http.ricxapp'",
334               "type": "string"
335             },
336             "RMRPort": {
337               "description": "xApp RMR service address port",
338               "type": "integer",
339               "maximum": 65535
340             }
341           }
342         },
343         "Meid": {
344           "type": "string"
345         },
346         "RANFunctionID": {
347           "type": "integer",
348           "maximum": 4095
349         },
350         "SubscriptionDetails": {
351           "$ref": "#/definitions/SubscriptionDetailsList"
352         }
353       }
354     },
355     "SubscriptionResponse": {
356       "type": "object",
357       "required": [
358         "SubscriptionId",
359         "SubscriptionInstances"
360       ],
361       "properties": {
362         "SubscriptionId": {
363           "type": "string"
364         },
365         "SubscriptionInstances": {
366           "type": "array",
367           "items": {
368             "$ref": "#/definitions/SubscriptionInstance"
369           }
370         }
371       }
372     },
373     "SubsequentAction": {
374       "description": "SubsequentAction is an OPTIONAL IE",
375       "type": "object",
376       "required": [
377         "SubsequentActionType",
378         "TimeToWait"
379       ],
380       "properties": {
381         "SubsequentActionType": {
382           "type": "string",
383           "enum": [
384             "continue",
385             "wait"
386           ]
387         },
388         "TimeToWait": {
389           "type": "string",
390           "enum": [
391             "zero",
392             "w1ms",
393             "w2ms",
394             "w5ms",
395             "w10ms",
396             "w20ms",
397             "w30ms",
398             "w40ms",
399             "w50ms",
400             "w100ms",
401             "w200ms",
402             "w500ms",
403             "w1s",
404             "w2s",
405             "w5s",
406             "w10s",
407             "w20s",
408             "w60s"
409           ]
410         }
411       }
412     },
413     "XAppConfig": {
414       "type": "object",
415       "required": [
416         "metadata",
417         "config"
418       ],
419       "properties": {
420         "config": {
421           "description": "Configuration in JSON format",
422           "type": "object"
423         },
424         "metadata": {
425           "$ref": "#/definitions/ConfigMetadata"
426         }
427       }
428     },
429     "XappConfigList": {
430       "type": "array",
431       "items": {
432         "$ref": "#/definitions/XAppConfig"
433       }
434     }
435   }
436 }`))
437         FlatSwaggerJSON = json.RawMessage([]byte(`{
438   "schemes": [
439     "http"
440   ],
441   "swagger": "2.0",
442   "info": {
443     "description": "This is the initial REST API for RIC subscription",
444     "title": "RIC subscription",
445     "license": {
446       "name": "Apache 2.0",
447       "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
448     },
449     "version": "0.0.1"
450   },
451   "host": "hostname",
452   "basePath": "/ric/v1",
453   "paths": {
454     "/config": {
455       "get": {
456         "produces": [
457           "application/json",
458           "application/xml"
459         ],
460         "tags": [
461           "xapp"
462         ],
463         "summary": "Returns the configuration of all xapps",
464         "operationId": "getXappConfigList",
465         "responses": {
466           "200": {
467             "description": "successful query of xApp config",
468             "schema": {
469               "$ref": "#/definitions/XappConfigList"
470             }
471           },
472           "500": {
473             "description": "Internal error"
474           }
475         }
476       }
477     },
478     "/subscriptions": {
479       "get": {
480         "produces": [
481           "application/json"
482         ],
483         "tags": [
484           "common"
485         ],
486         "summary": "Returns list of subscriptions",
487         "operationId": "getAllSubscriptions",
488         "responses": {
489           "200": {
490             "description": "successful query of subscriptions",
491             "schema": {
492               "$ref": "#/definitions/SubscriptionList"
493             }
494           },
495           "500": {
496             "description": "Internal error"
497           }
498         }
499       },
500       "post": {
501         "consumes": [
502           "application/json"
503         ],
504         "produces": [
505           "application/json"
506         ],
507         "tags": [
508           "common"
509         ],
510         "summary": "Subscribe a list of X2AP event triggers to receive messages sent by RAN",
511         "operationId": "Subscribe",
512         "parameters": [
513           {
514             "description": "Subscription parameters",
515             "name": "SubscriptionParams",
516             "in": "body",
517             "schema": {
518               "$ref": "#/definitions/SubscriptionParams"
519             }
520           }
521         ],
522         "responses": {
523           "201": {
524             "description": "Subscription successfully created",
525             "schema": {
526               "$ref": "#/definitions/SubscriptionResponse"
527             }
528           },
529           "400": {
530             "description": "Invalid input"
531           },
532           "500": {
533             "description": "Internal error"
534           }
535         }
536       }
537     },
538     "/subscriptions/{subscriptionId}": {
539       "delete": {
540         "consumes": [
541           "application/json"
542         ],
543         "produces": [
544           "application/json"
545         ],
546         "tags": [
547           "common"
548         ],
549         "summary": "Unsubscribe X2AP events from Subscription Manager",
550         "operationId": "Unsubscribe",
551         "parameters": [
552           {
553             "type": "string",
554             "description": "The subscriptionId received in the Subscription Response",
555             "name": "subscriptionId",
556             "in": "path",
557             "required": true
558           }
559         ],
560         "responses": {
561           "204": {
562             "description": "Operation done successfully"
563           },
564           "400": {
565             "description": "Invalid subscriptionId supplied"
566           },
567           "500": {
568             "description": "Internal error"
569           }
570         }
571       }
572     }
573   },
574   "definitions": {
575     "ActionDefinition": {
576       "description": "E2SM Octet string. ActionDefinition is an OPTIONAL IE",
577       "type": "object",
578       "properties": {
579         "OctetString": {
580           "type": "string"
581         }
582       }
583     },
584     "ActionToBeSetup": {
585       "type": "object",
586       "required": [
587         "ActionID",
588         "ActionType"
589       ],
590       "properties": {
591         "ActionDefinition": {
592           "$ref": "#/definitions/ActionDefinition"
593         },
594         "ActionID": {
595           "type": "integer",
596           "maximum": 255,
597           "minimum": 0
598         },
599         "ActionType": {
600           "type": "string",
601           "enum": [
602             "insert",
603             "policy",
604             "report"
605           ]
606         },
607         "SubsequentAction": {
608           "$ref": "#/definitions/SubsequentAction"
609         }
610       }
611     },
612     "ActionsToBeSetup": {
613       "type": "array",
614       "items": {
615         "$ref": "#/definitions/ActionToBeSetup"
616       }
617     },
618     "ConfigMetadata": {
619       "type": "object",
620       "required": [
621         "xappName",
622         "configType"
623       ],
624       "properties": {
625         "configType": {
626           "description": "The type of the content",
627           "type": "string",
628           "enum": [
629             "json",
630             "xml",
631             "other"
632           ]
633         },
634         "xappName": {
635           "description": "Name of the xApp",
636           "type": "string"
637         }
638       }
639     },
640     "EventTriggerDefinition": {
641       "description": "E2SM Octet string",
642       "type": "object",
643       "properties": {
644         "OctetString": {
645           "type": "string"
646         }
647       }
648     },
649     "SubscriptionData": {
650       "type": "object",
651       "properties": {
652         "ClientEndpoint": {
653           "type": "array",
654           "items": {
655             "type": "string"
656           }
657         },
658         "Meid": {
659           "type": "string"
660         },
661         "SubscriptionId": {
662           "type": "integer"
663         },
664         "SubscriptionInstances": {
665           "type": "array",
666           "items": {
667             "$ref": "#/definitions/SubscriptionInstance"
668           }
669         }
670       }
671     },
672     "SubscriptionDetail": {
673       "type": "object",
674       "required": [
675         "RequestorId",
676         "InstanceId",
677         "EventTriggers",
678         "ActionToBeSetupList"
679       ],
680       "properties": {
681         "ActionToBeSetupList": {
682           "$ref": "#/definitions/ActionsToBeSetup"
683         },
684         "EventTriggers": {
685           "$ref": "#/definitions/EventTriggerDefinition"
686         },
687         "InstanceId": {
688           "type": "integer",
689           "maximum": 65535,
690           "minimum": 0
691         },
692         "RequestorId": {
693           "type": "integer",
694           "maximum": 65535,
695           "minimum": 0
696         }
697       }
698     },
699     "SubscriptionDetailsList": {
700       "type": "array",
701       "items": {
702         "$ref": "#/definitions/SubscriptionDetail"
703       }
704     },
705     "SubscriptionInstance": {
706       "type": "object",
707       "required": [
708         "RequestorId",
709         "InstanceId",
710         "ErrorCause"
711       ],
712       "properties": {
713         "ErrorCause": {
714           "description": "Empty string when no error.",
715           "type": "string"
716         },
717         "InstanceId": {
718           "type": "integer",
719           "maximum": 65535,
720           "minimum": 0
721         },
722         "RequestorId": {
723           "type": "integer",
724           "maximum": 65535,
725           "minimum": 0
726         }
727       }
728     },
729     "SubscriptionList": {
730       "description": "A list of subscriptions",
731       "type": "array",
732       "items": {
733         "$ref": "#/definitions/SubscriptionData"
734       }
735     },
736     "SubscriptionParams": {
737       "type": "object",
738       "required": [
739         "ClientEndpoint",
740         "Meid",
741         "RANFunctionID",
742         "SubscriptionDetails"
743       ],
744       "properties": {
745         "ClientEndpoint": {
746           "description": "xApp service address and port",
747           "type": "object",
748           "properties": {
749             "HTTPPort": {
750               "description": "xApp HTTP service address port",
751               "type": "integer",
752               "maximum": 65535,
753               "minimum": 0
754             },
755             "Host": {
756               "description": "xApp service address name like 'service-ricxapp-xappname-http.ricxapp'",
757               "type": "string"
758             },
759             "RMRPort": {
760               "description": "xApp RMR service address port",
761               "type": "integer",
762               "maximum": 65535,
763               "minimum": 0
764             }
765           }
766         },
767         "Meid": {
768           "type": "string"
769         },
770         "RANFunctionID": {
771           "type": "integer",
772           "maximum": 4095,
773           "minimum": 0
774         },
775         "SubscriptionDetails": {
776           "$ref": "#/definitions/SubscriptionDetailsList"
777         }
778       }
779     },
780     "SubscriptionResponse": {
781       "type": "object",
782       "required": [
783         "SubscriptionId",
784         "SubscriptionInstances"
785       ],
786       "properties": {
787         "SubscriptionId": {
788           "type": "string"
789         },
790         "SubscriptionInstances": {
791           "type": "array",
792           "items": {
793             "$ref": "#/definitions/SubscriptionInstance"
794           }
795         }
796       }
797     },
798     "SubsequentAction": {
799       "description": "SubsequentAction is an OPTIONAL IE",
800       "type": "object",
801       "required": [
802         "SubsequentActionType",
803         "TimeToWait"
804       ],
805       "properties": {
806         "SubsequentActionType": {
807           "type": "string",
808           "enum": [
809             "continue",
810             "wait"
811           ]
812         },
813         "TimeToWait": {
814           "type": "string",
815           "enum": [
816             "zero",
817             "w1ms",
818             "w2ms",
819             "w5ms",
820             "w10ms",
821             "w20ms",
822             "w30ms",
823             "w40ms",
824             "w50ms",
825             "w100ms",
826             "w200ms",
827             "w500ms",
828             "w1s",
829             "w2s",
830             "w5s",
831             "w10s",
832             "w20s",
833             "w60s"
834           ]
835         }
836       }
837     },
838     "XAppConfig": {
839       "type": "object",
840       "required": [
841         "metadata",
842         "config"
843       ],
844       "properties": {
845         "config": {
846           "description": "Configuration in JSON format",
847           "type": "object"
848         },
849         "metadata": {
850           "$ref": "#/definitions/ConfigMetadata"
851         }
852       }
853     },
854     "XappConfigList": {
855       "type": "array",
856       "items": {
857         "$ref": "#/definitions/XAppConfig"
858       }
859     }
860   }
861 }`))
862 }