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