Add optional subscription ID
[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         "SubscriptionId": {
354           "description": "Optional subscription ID (Submgr allocates if not given)",
355           "type": "string"
356         }
357       }
358     },
359     "SubscriptionResponse": {
360       "type": "object",
361       "required": [
362         "SubscriptionId",
363         "SubscriptionInstances"
364       ],
365       "properties": {
366         "SubscriptionId": {
367           "type": "string"
368         },
369         "SubscriptionInstances": {
370           "type": "array",
371           "items": {
372             "$ref": "#/definitions/SubscriptionInstance"
373           }
374         }
375       }
376     },
377     "SubsequentAction": {
378       "description": "SubsequentAction is an OPTIONAL IE",
379       "type": "object",
380       "required": [
381         "SubsequentActionType",
382         "TimeToWait"
383       ],
384       "properties": {
385         "SubsequentActionType": {
386           "type": "string",
387           "enum": [
388             "continue",
389             "wait"
390           ]
391         },
392         "TimeToWait": {
393           "type": "string",
394           "enum": [
395             "zero",
396             "w1ms",
397             "w2ms",
398             "w5ms",
399             "w10ms",
400             "w20ms",
401             "w30ms",
402             "w40ms",
403             "w50ms",
404             "w100ms",
405             "w200ms",
406             "w500ms",
407             "w1s",
408             "w2s",
409             "w5s",
410             "w10s",
411             "w20s",
412             "w60s"
413           ]
414         }
415       }
416     },
417     "XAppConfig": {
418       "type": "object",
419       "required": [
420         "metadata",
421         "config"
422       ],
423       "properties": {
424         "config": {
425           "description": "Configuration in JSON format",
426           "type": "object"
427         },
428         "metadata": {
429           "$ref": "#/definitions/ConfigMetadata"
430         }
431       }
432     },
433     "XappConfigList": {
434       "type": "array",
435       "items": {
436         "$ref": "#/definitions/XAppConfig"
437       }
438     }
439   }
440 }`))
441         FlatSwaggerJSON = json.RawMessage([]byte(`{
442   "schemes": [
443     "http"
444   ],
445   "swagger": "2.0",
446   "info": {
447     "description": "This is the initial REST API for RIC subscription",
448     "title": "RIC subscription",
449     "license": {
450       "name": "Apache 2.0",
451       "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
452     },
453     "version": "0.0.1"
454   },
455   "host": "hostname",
456   "basePath": "/ric/v1",
457   "paths": {
458     "/config": {
459       "get": {
460         "produces": [
461           "application/json",
462           "application/xml"
463         ],
464         "tags": [
465           "xapp"
466         ],
467         "summary": "Returns the configuration of all xapps",
468         "operationId": "getXappConfigList",
469         "responses": {
470           "200": {
471             "description": "successful query of xApp config",
472             "schema": {
473               "$ref": "#/definitions/XappConfigList"
474             }
475           },
476           "500": {
477             "description": "Internal error"
478           }
479         }
480       }
481     },
482     "/subscriptions": {
483       "get": {
484         "produces": [
485           "application/json"
486         ],
487         "tags": [
488           "common"
489         ],
490         "summary": "Returns list of subscriptions",
491         "operationId": "getAllSubscriptions",
492         "responses": {
493           "200": {
494             "description": "successful query of subscriptions",
495             "schema": {
496               "$ref": "#/definitions/SubscriptionList"
497             }
498           },
499           "500": {
500             "description": "Internal error"
501           }
502         }
503       },
504       "post": {
505         "consumes": [
506           "application/json"
507         ],
508         "produces": [
509           "application/json"
510         ],
511         "tags": [
512           "common"
513         ],
514         "summary": "Subscribe a list of X2AP event triggers to receive messages sent by RAN",
515         "operationId": "Subscribe",
516         "parameters": [
517           {
518             "description": "Subscription parameters",
519             "name": "SubscriptionParams",
520             "in": "body",
521             "schema": {
522               "$ref": "#/definitions/SubscriptionParams"
523             }
524           }
525         ],
526         "responses": {
527           "201": {
528             "description": "Subscription successfully created",
529             "schema": {
530               "$ref": "#/definitions/SubscriptionResponse"
531             }
532           },
533           "400": {
534             "description": "Invalid input"
535           },
536           "500": {
537             "description": "Internal error"
538           }
539         }
540       }
541     },
542     "/subscriptions/{subscriptionId}": {
543       "delete": {
544         "consumes": [
545           "application/json"
546         ],
547         "produces": [
548           "application/json"
549         ],
550         "tags": [
551           "common"
552         ],
553         "summary": "Unsubscribe X2AP events from Subscription Manager",
554         "operationId": "Unsubscribe",
555         "parameters": [
556           {
557             "type": "string",
558             "description": "The subscriptionId received in the Subscription Response",
559             "name": "subscriptionId",
560             "in": "path",
561             "required": true
562           }
563         ],
564         "responses": {
565           "204": {
566             "description": "Operation done successfully"
567           },
568           "400": {
569             "description": "Invalid subscriptionId supplied"
570           },
571           "500": {
572             "description": "Internal error"
573           }
574         }
575       }
576     }
577   },
578   "definitions": {
579     "ActionDefinition": {
580       "description": "E2SM Octet string. ActionDefinition is an OPTIONAL IE",
581       "type": "object",
582       "properties": {
583         "OctetString": {
584           "type": "string"
585         }
586       }
587     },
588     "ActionToBeSetup": {
589       "type": "object",
590       "required": [
591         "ActionID",
592         "ActionType"
593       ],
594       "properties": {
595         "ActionDefinition": {
596           "$ref": "#/definitions/ActionDefinition"
597         },
598         "ActionID": {
599           "type": "integer",
600           "maximum": 255,
601           "minimum": 0
602         },
603         "ActionType": {
604           "type": "string",
605           "enum": [
606             "insert",
607             "policy",
608             "report"
609           ]
610         },
611         "SubsequentAction": {
612           "$ref": "#/definitions/SubsequentAction"
613         }
614       }
615     },
616     "ActionsToBeSetup": {
617       "type": "array",
618       "items": {
619         "$ref": "#/definitions/ActionToBeSetup"
620       }
621     },
622     "ConfigMetadata": {
623       "type": "object",
624       "required": [
625         "xappName",
626         "configType"
627       ],
628       "properties": {
629         "configType": {
630           "description": "The type of the content",
631           "type": "string",
632           "enum": [
633             "json",
634             "xml",
635             "other"
636           ]
637         },
638         "xappName": {
639           "description": "Name of the xApp",
640           "type": "string"
641         }
642       }
643     },
644     "EventTriggerDefinition": {
645       "description": "E2SM Octet string",
646       "type": "object",
647       "properties": {
648         "OctetString": {
649           "type": "string"
650         }
651       }
652     },
653     "SubscriptionData": {
654       "type": "object",
655       "properties": {
656         "ClientEndpoint": {
657           "type": "array",
658           "items": {
659             "type": "string"
660           }
661         },
662         "Meid": {
663           "type": "string"
664         },
665         "SubscriptionId": {
666           "type": "integer"
667         },
668         "SubscriptionInstances": {
669           "type": "array",
670           "items": {
671             "$ref": "#/definitions/SubscriptionInstance"
672           }
673         }
674       }
675     },
676     "SubscriptionDetail": {
677       "type": "object",
678       "required": [
679         "RequestorId",
680         "InstanceId",
681         "EventTriggers",
682         "ActionToBeSetupList"
683       ],
684       "properties": {
685         "ActionToBeSetupList": {
686           "$ref": "#/definitions/ActionsToBeSetup"
687         },
688         "EventTriggers": {
689           "$ref": "#/definitions/EventTriggerDefinition"
690         },
691         "InstanceId": {
692           "type": "integer",
693           "maximum": 65535,
694           "minimum": 0
695         },
696         "RequestorId": {
697           "type": "integer",
698           "maximum": 65535,
699           "minimum": 0
700         }
701       }
702     },
703     "SubscriptionDetailsList": {
704       "type": "array",
705       "items": {
706         "$ref": "#/definitions/SubscriptionDetail"
707       }
708     },
709     "SubscriptionInstance": {
710       "type": "object",
711       "required": [
712         "RequestorId",
713         "InstanceId",
714         "ErrorCause"
715       ],
716       "properties": {
717         "ErrorCause": {
718           "description": "Empty string when no error.",
719           "type": "string"
720         },
721         "InstanceId": {
722           "type": "integer",
723           "maximum": 65535,
724           "minimum": 0
725         },
726         "RequestorId": {
727           "type": "integer",
728           "maximum": 65535,
729           "minimum": 0
730         }
731       }
732     },
733     "SubscriptionList": {
734       "description": "A list of subscriptions",
735       "type": "array",
736       "items": {
737         "$ref": "#/definitions/SubscriptionData"
738       }
739     },
740     "SubscriptionParams": {
741       "type": "object",
742       "required": [
743         "ClientEndpoint",
744         "Meid",
745         "RANFunctionID",
746         "SubscriptionDetails"
747       ],
748       "properties": {
749         "ClientEndpoint": {
750           "description": "xApp service address and port",
751           "type": "object",
752           "properties": {
753             "HTTPPort": {
754               "description": "xApp HTTP service address port",
755               "type": "integer",
756               "maximum": 65535,
757               "minimum": 0
758             },
759             "Host": {
760               "description": "xApp service address name like 'service-ricxapp-xappname-http.ricxapp'",
761               "type": "string"
762             },
763             "RMRPort": {
764               "description": "xApp RMR service address port",
765               "type": "integer",
766               "maximum": 65535,
767               "minimum": 0
768             }
769           }
770         },
771         "Meid": {
772           "type": "string"
773         },
774         "RANFunctionID": {
775           "type": "integer",
776           "maximum": 4095,
777           "minimum": 0
778         },
779         "SubscriptionDetails": {
780           "$ref": "#/definitions/SubscriptionDetailsList"
781         },
782         "SubscriptionId": {
783           "description": "Optional subscription ID (Submgr allocates if not given)",
784           "type": "string"
785         }
786       }
787     },
788     "SubscriptionParamsClientEndpoint": {
789       "description": "xApp service address and port",
790       "type": "object",
791       "properties": {
792         "HTTPPort": {
793           "description": "xApp HTTP service address port",
794           "type": "integer",
795           "maximum": 65535,
796           "minimum": 0
797         },
798         "Host": {
799           "description": "xApp service address name like 'service-ricxapp-xappname-http.ricxapp'",
800           "type": "string"
801         },
802         "RMRPort": {
803           "description": "xApp RMR service address port",
804           "type": "integer",
805           "maximum": 65535,
806           "minimum": 0
807         }
808       }
809     },
810     "SubscriptionResponse": {
811       "type": "object",
812       "required": [
813         "SubscriptionId",
814         "SubscriptionInstances"
815       ],
816       "properties": {
817         "SubscriptionId": {
818           "type": "string"
819         },
820         "SubscriptionInstances": {
821           "type": "array",
822           "items": {
823             "$ref": "#/definitions/SubscriptionInstance"
824           }
825         }
826       }
827     },
828     "SubsequentAction": {
829       "description": "SubsequentAction is an OPTIONAL IE",
830       "type": "object",
831       "required": [
832         "SubsequentActionType",
833         "TimeToWait"
834       ],
835       "properties": {
836         "SubsequentActionType": {
837           "type": "string",
838           "enum": [
839             "continue",
840             "wait"
841           ]
842         },
843         "TimeToWait": {
844           "type": "string",
845           "enum": [
846             "zero",
847             "w1ms",
848             "w2ms",
849             "w5ms",
850             "w10ms",
851             "w20ms",
852             "w30ms",
853             "w40ms",
854             "w50ms",
855             "w100ms",
856             "w200ms",
857             "w500ms",
858             "w1s",
859             "w2s",
860             "w5s",
861             "w10s",
862             "w20s",
863             "w60s"
864           ]
865         }
866       }
867     },
868     "XAppConfig": {
869       "type": "object",
870       "required": [
871         "metadata",
872         "config"
873       ],
874       "properties": {
875         "config": {
876           "description": "Configuration in JSON format",
877           "type": "object"
878         },
879         "metadata": {
880           "$ref": "#/definitions/ConfigMetadata"
881         }
882       }
883     },
884     "XappConfigList": {
885       "type": "array",
886       "items": {
887         "$ref": "#/definitions/XAppConfig"
888       }
889     }
890   }
891 }`))
892 }