067d41d7b5189e38d8b499eaccfec1d8f0dbf9da
[ric-plt/a1.git] / pkg / restapi / embedded_spec.go
1 /*
2 ==================================================================================
3   Copyright (c) 2021 Samsung
4
5    Licensed under the Apache License, Version 2.0 (the "License");
6    you may not use this file except in compliance with the License.
7    You may obtain a copy of the License at
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
11    Unless required by applicable law or agreed to in writing, software
12    distributed under the License is distributed on an "AS IS" BASIS,
13    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14    See the License for the specific language governing permissions and
15    limitations under the License.
16
17    This source code is part of the near-RT RIC (RAN Intelligent Controller)
18    platform project (RICP).
19 ==================================================================================
20 */
21 // Code generated by go-swagger; DO NOT EDIT.
22
23 package restapi
24
25 // This file was generated by the swagger tool.
26 // Editing this file might prove futile when you re-run the swagger generate command
27
28 import (
29         "encoding/json"
30 )
31
32 var (
33         // SwaggerJSON embedded version of the swagger document used at generation time
34         SwaggerJSON json.RawMessage
35         // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
36         FlatSwaggerJSON json.RawMessage
37 )
38
39 func init() {
40         SwaggerJSON = json.RawMessage([]byte(`{
41   "swagger": "2.0",
42   "info": {
43     "title": "RIC A1",
44     "version": "2.1.0"
45   },
46   "paths": {
47     "/a1-p/healthcheck": {
48       "get": {
49         "description": "Perform a healthcheck on a1\n",
50         "tags": [
51           "A1 Mediator"
52         ],
53         "operationId": "a1.controller.get_healthcheck",
54         "responses": {
55           "200": {
56             "description": "A1 is healthy. Anything other than a 200 should be considered a1 as failing\n"
57           }
58         }
59       }
60     },
61     "/a1-p/policytypes": {
62       "get": {
63         "description": "Get a list of all registered policy type ids",
64         "produces": [
65           "application/json"
66         ],
67         "tags": [
68           "A1 Mediator"
69         ],
70         "operationId": "a1.controller.get_all_policy_types",
71         "responses": {
72           "200": {
73             "description": "list of all registered policy type ids",
74             "schema": {
75               "type": "array",
76               "items": {
77                 "$ref": "#/definitions/policy_type_id"
78               }
79             },
80             "examples": {
81               "application/json": [
82                 20000,
83                 20020
84               ]
85             }
86           },
87           "503": {
88             "description": "Potentially transient backend database error. Client should attempt to retry later."
89           }
90         }
91       }
92     },
93     "/a1-p/policytypes/{policy_type_id}": {
94       "get": {
95         "description": "Get this policy type\n",
96         "produces": [
97           "application/json"
98         ],
99         "tags": [
100           "A1 Mediator"
101         ],
102         "operationId": "a1.controller.get_policy_type",
103         "responses": {
104           "200": {
105             "description": "policy type successfully found",
106             "schema": {
107               "$ref": "#/definitions/policy_type_schema"
108             }
109           },
110           "404": {
111             "description": "policy type not found\n"
112           },
113           "503": {
114             "description": "Potentially transient backend database error. Client should attempt to retry later."
115           }
116         }
117       },
118       "put": {
119         "description": "Create a new policy type . Replace is not currently allowed; to replace, for now do a DELETE and then a PUT again.\n",
120         "consumes": [
121           "application/json"
122         ],
123         "tags": [
124           "A1 Mediator"
125         ],
126         "operationId": "a1.controller.create_policy_type",
127         "parameters": [
128           {
129             "name": "body",
130             "in": "body",
131             "schema": {
132               "$ref": "#/definitions/policy_type_schema"
133             }
134           }
135         ],
136         "responses": {
137           "201": {
138             "description": "policy type successfully created"
139           },
140           "400": {
141             "description": "illegal ID, or object already existed"
142           },
143           "503": {
144             "description": "Potentially transient backend database error. Client should attempt to retry later."
145           }
146         }
147       },
148       "delete": {
149         "description": "Delete this policy type. Can only be performed if there are no instances of this type\n",
150         "tags": [
151           "A1 Mediator"
152         ],
153         "operationId": "a1.controller.delete_policy_type",
154         "responses": {
155           "204": {
156             "description": "policy type successfully deleted\n"
157           },
158           "400": {
159             "description": "Policy type cannot be deleted because there are instances All instances must be removed before a policy type can be deleted\n"
160           },
161           "404": {
162             "description": "policy type not found\n"
163           },
164           "503": {
165             "description": "Potentially transient backend database error. Client should attempt to retry later."
166           }
167         }
168       },
169       "parameters": [
170         {
171           "maximum": 2147483647,
172           "minimum": 1,
173           "type": "integer",
174           "description": "represents a policy type identifier. Currently this is restricted to an integer range.\n",
175           "name": "policy_type_id",
176           "in": "path",
177           "required": true
178         }
179       ]
180     },
181     "/a1-p/policytypes/{policy_type_id}/policies": {
182       "get": {
183         "description": "get a list of all policy instance ids for this policy type id",
184         "produces": [
185           "application/json"
186         ],
187         "tags": [
188           "A1 Mediator"
189         ],
190         "operationId": "a1.controller.get_all_instances_for_type",
191         "responses": {
192           "200": {
193             "description": "list of all policy instance ids for this policy type id",
194             "schema": {
195               "type": "array",
196               "items": {
197                 "$ref": "#/definitions/policy_instance_id"
198               }
199             },
200             "examples": {
201               "application/json": [
202                 "3d2157af-6a8f-4a7c-810f-38c2f824bf12",
203                 "06911bfc-c127-444a-8eb1-1bffad27cc3d"
204               ]
205             }
206           },
207           "503": {
208             "description": "Potentially transient backend database error. Client should attempt to retry later."
209           }
210         }
211       },
212       "parameters": [
213         {
214           "maximum": 2147483647,
215           "minimum": 1,
216           "type": "integer",
217           "description": "represents a policy type identifier. Currently this is restricted to an integer range.\n",
218           "name": "policy_type_id",
219           "in": "path",
220           "required": true
221         }
222       ]
223     },
224     "/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}": {
225       "get": {
226         "description": "Retrieve the policy instance\n",
227         "produces": [
228           "application/json"
229         ],
230         "tags": [
231           "A1 Mediator"
232         ],
233         "operationId": "a1.controller.get_policy_instance",
234         "responses": {
235           "200": {
236             "description": "The policy instance. the schema of this object is defined by the create_schema field of the policy type\n",
237             "schema": {
238               "type": "object"
239             }
240           },
241           "404": {
242             "description": "there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id\n"
243           },
244           "503": {
245             "description": "Potentially transient backend database error. Client should attempt to retry later."
246           }
247         }
248       },
249       "put": {
250         "description": "Create or replace a policy instance of type policy_type_id. The schema of the PUT body is defined by the create_schema field of the policy type.\n",
251         "consumes": [
252           "application/json"
253         ],
254         "tags": [
255           "A1 Mediator"
256         ],
257         "operationId": "a1.controller.create_or_replace_policy_instance",
258         "parameters": [
259           {
260             "name": "body",
261             "in": "body",
262             "schema": {
263               "description": "the schema of this object is defined by the create_schema field of the policy type\n",
264               "type": "object"
265             }
266           }
267         ],
268         "responses": {
269           "202": {
270             "description": "Policy instance creation initiated\n"
271           },
272           "400": {
273             "description": "Bad PUT body for this policy instance\n"
274           },
275           "404": {
276             "description": "There is no policy type with this policy_type_id\n"
277           },
278           "503": {
279             "description": "Potentially transient backend database error. Client should attempt to retry later."
280           }
281         }
282       },
283       "delete": {
284         "description": "Delete this policy instance\n",
285         "tags": [
286           "A1 Mediator"
287         ],
288         "operationId": "a1.controller.delete_policy_instance",
289         "responses": {
290           "202": {
291             "description": "policy instance deletion initiated\n"
292           },
293           "404": {
294             "description": "there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id\n"
295           },
296           "503": {
297             "description": "Potentially transient backend database error. Client should attempt to retry later."
298           }
299         }
300       },
301       "parameters": [
302         {
303           "maximum": 2147483647,
304           "minimum": 1,
305           "type": "integer",
306           "description": "represents a policy type identifier. Currently this is restricted to an integer range.\n",
307           "name": "policy_type_id",
308           "in": "path",
309           "required": true
310         },
311         {
312           "type": "string",
313           "description": "represents a policy instance identifier. UUIDs are advisable but can be any string\n",
314           "name": "policy_instance_id",
315           "in": "path",
316           "required": true
317         }
318       ]
319     },
320     "/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}/status": {
321       "get": {
322         "description": "Retrieve the policy instance status across all handlers of the policy If this endpoint returns successfully (200), it is either IN EFFECT or NOT IN EFFECT. IN EFFECT is returned if at least one policy handler in the RIC is implementing the policy NOT IN EFFECT is returned otherwise If a policy instance is successfully deleted, this endpoint will return a 404 (not a 200)\n",
323         "produces": [
324           "application/json"
325         ],
326         "tags": [
327           "A1 Mediator"
328         ],
329         "operationId": "a1.controller.get_policy_instance_status",
330         "responses": {
331           "200": {
332             "description": "successfully retrieved the status\n",
333             "schema": {
334               "type": "object",
335               "properties": {
336                 "created_at": {
337                   "type": "string",
338                   "format": "date-time"
339                 },
340                 "has_been_deleted": {
341                   "type": "boolean"
342                 },
343                 "instance_status": {
344                   "type": "string",
345                   "enum": [
346                     "IN EFFECT",
347                     "NOT IN EFFECT"
348                   ]
349                 }
350               }
351             }
352           },
353           "404": {
354             "description": "there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id\n"
355           },
356           "503": {
357             "description": "Potentially transient backend database error. Client should attempt to retry later."
358           }
359         }
360       },
361       "parameters": [
362         {
363           "maximum": 2147483647,
364           "minimum": 1,
365           "type": "integer",
366           "description": "represents a policy type identifier. Currently this is restricted to an integer range.\n",
367           "name": "policy_type_id",
368           "in": "path",
369           "required": true
370         },
371         {
372           "type": "string",
373           "description": "represents a policy instance identifier. UUIDs are advisable but can be any string\n",
374           "name": "policy_instance_id",
375           "in": "path",
376           "required": true
377         }
378       ]
379     },
380     "/data-delivery": {
381       "post": {
382         "description": "Deliver data produced by data producer.\n",
383         "consumes": [
384           "application/json"
385         ],
386         "tags": [
387           "A1 EI Data Delivery"
388         ],
389         "operationId": "a1.controller.data_delivery",
390         "parameters": [
391           {
392             "name": "body",
393             "in": "body",
394             "schema": {
395               "description": "object to represent data object\n",
396               "type": "object"
397             }
398           }
399         ],
400         "responses": {
401           "200": {
402             "description": "successfully delivered data from data producer\n"
403           },
404           "404": {
405             "description": "no job id defined for this data delivery\n"
406           }
407         }
408       }
409     }
410   },
411   "definitions": {
412     "policy_instance_id": {
413       "description": "represents a policy instance identifier. UUIDs are advisable but can be any string\n",
414       "type": "string",
415       "example": "3d2157af-6a8f-4a7c-810f-38c2f824bf12"
416     },
417     "policy_type_id": {
418       "description": "represents a policy type identifier. Currently this is restricted to an integer range.\n",
419       "type": "integer",
420       "maximum": 2147483647,
421       "minimum": 1
422     },
423     "policy_type_schema": {
424       "type": "object",
425       "required": [
426         "name",
427         "description",
428         "policy_type_id",
429         "create_schema"
430       ],
431       "properties": {
432         "create_schema": {
433           "description": "jsonschema (following http://json-schema.org/draft-07/schema) of the CREATE payload to be sent to handlers of this policy\n",
434           "type": "object"
435         },
436         "description": {
437           "description": "description of the policy type",
438           "type": "string"
439         },
440         "name": {
441           "description": "name of the policy type",
442           "type": "string"
443         },
444         "policy_type_id": {
445           "description": "the integer of the policy type",
446           "type": "integer"
447         }
448       },
449       "additionalProperties": false
450     }
451   },
452   "x-components": {}
453 }`))
454         FlatSwaggerJSON = json.RawMessage([]byte(`{
455   "swagger": "2.0",
456   "info": {
457     "title": "RIC A1",
458     "version": "2.1.0"
459   },
460   "paths": {
461     "/a1-p/healthcheck": {
462       "get": {
463         "description": "Perform a healthcheck on a1\n",
464         "tags": [
465           "A1 Mediator"
466         ],
467         "operationId": "a1.controller.get_healthcheck",
468         "responses": {
469           "200": {
470             "description": "A1 is healthy. Anything other than a 200 should be considered a1 as failing\n"
471           }
472         }
473       }
474     },
475     "/a1-p/policytypes": {
476       "get": {
477         "description": "Get a list of all registered policy type ids",
478         "produces": [
479           "application/json"
480         ],
481         "tags": [
482           "A1 Mediator"
483         ],
484         "operationId": "a1.controller.get_all_policy_types",
485         "responses": {
486           "200": {
487             "description": "list of all registered policy type ids",
488             "schema": {
489               "type": "array",
490               "items": {
491                 "$ref": "#/definitions/policy_type_id"
492               }
493             },
494             "examples": {
495               "application/json": [
496                 20000,
497                 20020
498               ]
499             }
500           },
501           "503": {
502             "description": "Potentially transient backend database error. Client should attempt to retry later."
503           }
504         }
505       }
506     },
507     "/a1-p/policytypes/{policy_type_id}": {
508       "get": {
509         "description": "Get this policy type\n",
510         "produces": [
511           "application/json"
512         ],
513         "tags": [
514           "A1 Mediator"
515         ],
516         "operationId": "a1.controller.get_policy_type",
517         "responses": {
518           "200": {
519             "description": "policy type successfully found",
520             "schema": {
521               "$ref": "#/definitions/policy_type_schema"
522             }
523           },
524           "404": {
525             "description": "policy type not found\n"
526           },
527           "503": {
528             "description": "Potentially transient backend database error. Client should attempt to retry later."
529           }
530         }
531       },
532       "put": {
533         "description": "Create a new policy type . Replace is not currently allowed; to replace, for now do a DELETE and then a PUT again.\n",
534         "consumes": [
535           "application/json"
536         ],
537         "tags": [
538           "A1 Mediator"
539         ],
540         "operationId": "a1.controller.create_policy_type",
541         "parameters": [
542           {
543             "name": "body",
544             "in": "body",
545             "schema": {
546               "$ref": "#/definitions/policy_type_schema"
547             }
548           }
549         ],
550         "responses": {
551           "201": {
552             "description": "policy type successfully created"
553           },
554           "400": {
555             "description": "illegal ID, or object already existed"
556           },
557           "503": {
558             "description": "Potentially transient backend database error. Client should attempt to retry later."
559           }
560         }
561       },
562       "delete": {
563         "description": "Delete this policy type. Can only be performed if there are no instances of this type\n",
564         "tags": [
565           "A1 Mediator"
566         ],
567         "operationId": "a1.controller.delete_policy_type",
568         "responses": {
569           "204": {
570             "description": "policy type successfully deleted\n"
571           },
572           "400": {
573             "description": "Policy type cannot be deleted because there are instances All instances must be removed before a policy type can be deleted\n"
574           },
575           "404": {
576             "description": "policy type not found\n"
577           },
578           "503": {
579             "description": "Potentially transient backend database error. Client should attempt to retry later."
580           }
581         }
582       },
583       "parameters": [
584         {
585           "maximum": 2147483647,
586           "minimum": 1,
587           "type": "integer",
588           "description": "represents a policy type identifier. Currently this is restricted to an integer range.\n",
589           "name": "policy_type_id",
590           "in": "path",
591           "required": true
592         }
593       ]
594     },
595     "/a1-p/policytypes/{policy_type_id}/policies": {
596       "get": {
597         "description": "get a list of all policy instance ids for this policy type id",
598         "produces": [
599           "application/json"
600         ],
601         "tags": [
602           "A1 Mediator"
603         ],
604         "operationId": "a1.controller.get_all_instances_for_type",
605         "responses": {
606           "200": {
607             "description": "list of all policy instance ids for this policy type id",
608             "schema": {
609               "type": "array",
610               "items": {
611                 "$ref": "#/definitions/policy_instance_id"
612               }
613             },
614             "examples": {
615               "application/json": [
616                 "3d2157af-6a8f-4a7c-810f-38c2f824bf12",
617                 "06911bfc-c127-444a-8eb1-1bffad27cc3d"
618               ]
619             }
620           },
621           "503": {
622             "description": "Potentially transient backend database error. Client should attempt to retry later."
623           }
624         }
625       },
626       "parameters": [
627         {
628           "maximum": 2147483647,
629           "minimum": 1,
630           "type": "integer",
631           "description": "represents a policy type identifier. Currently this is restricted to an integer range.\n",
632           "name": "policy_type_id",
633           "in": "path",
634           "required": true
635         }
636       ]
637     },
638     "/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}": {
639       "get": {
640         "description": "Retrieve the policy instance\n",
641         "produces": [
642           "application/json"
643         ],
644         "tags": [
645           "A1 Mediator"
646         ],
647         "operationId": "a1.controller.get_policy_instance",
648         "responses": {
649           "200": {
650             "description": "The policy instance. the schema of this object is defined by the create_schema field of the policy type\n",
651             "schema": {
652               "type": "object"
653             }
654           },
655           "404": {
656             "description": "there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id\n"
657           },
658           "503": {
659             "description": "Potentially transient backend database error. Client should attempt to retry later."
660           }
661         }
662       },
663       "put": {
664         "description": "Create or replace a policy instance of type policy_type_id. The schema of the PUT body is defined by the create_schema field of the policy type.\n",
665         "consumes": [
666           "application/json"
667         ],
668         "tags": [
669           "A1 Mediator"
670         ],
671         "operationId": "a1.controller.create_or_replace_policy_instance",
672         "parameters": [
673           {
674             "name": "body",
675             "in": "body",
676             "schema": {
677               "description": "the schema of this object is defined by the create_schema field of the policy type\n",
678               "type": "object"
679             }
680           }
681         ],
682         "responses": {
683           "202": {
684             "description": "Policy instance creation initiated\n"
685           },
686           "400": {
687             "description": "Bad PUT body for this policy instance\n"
688           },
689           "404": {
690             "description": "There is no policy type with this policy_type_id\n"
691           },
692           "503": {
693             "description": "Potentially transient backend database error. Client should attempt to retry later."
694           }
695         }
696       },
697       "delete": {
698         "description": "Delete this policy instance\n",
699         "tags": [
700           "A1 Mediator"
701         ],
702         "operationId": "a1.controller.delete_policy_instance",
703         "responses": {
704           "202": {
705             "description": "policy instance deletion initiated\n"
706           },
707           "404": {
708             "description": "there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id\n"
709           },
710           "503": {
711             "description": "Potentially transient backend database error. Client should attempt to retry later."
712           }
713         }
714       },
715       "parameters": [
716         {
717           "maximum": 2147483647,
718           "minimum": 1,
719           "type": "integer",
720           "description": "represents a policy type identifier. Currently this is restricted to an integer range.\n",
721           "name": "policy_type_id",
722           "in": "path",
723           "required": true
724         },
725         {
726           "type": "string",
727           "description": "represents a policy instance identifier. UUIDs are advisable but can be any string\n",
728           "name": "policy_instance_id",
729           "in": "path",
730           "required": true
731         }
732       ]
733     },
734     "/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}/status": {
735       "get": {
736         "description": "Retrieve the policy instance status across all handlers of the policy If this endpoint returns successfully (200), it is either IN EFFECT or NOT IN EFFECT. IN EFFECT is returned if at least one policy handler in the RIC is implementing the policy NOT IN EFFECT is returned otherwise If a policy instance is successfully deleted, this endpoint will return a 404 (not a 200)\n",
737         "produces": [
738           "application/json"
739         ],
740         "tags": [
741           "A1 Mediator"
742         ],
743         "operationId": "a1.controller.get_policy_instance_status",
744         "responses": {
745           "200": {
746             "description": "successfully retrieved the status\n",
747             "schema": {
748               "type": "object",
749               "properties": {
750                 "created_at": {
751                   "type": "string",
752                   "format": "date-time"
753                 },
754                 "has_been_deleted": {
755                   "type": "boolean"
756                 },
757                 "instance_status": {
758                   "type": "string",
759                   "enum": [
760                     "IN EFFECT",
761                     "NOT IN EFFECT"
762                   ]
763                 }
764               }
765             }
766           },
767           "404": {
768             "description": "there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id\n"
769           },
770           "503": {
771             "description": "Potentially transient backend database error. Client should attempt to retry later."
772           }
773         }
774       },
775       "parameters": [
776         {
777           "maximum": 2147483647,
778           "minimum": 1,
779           "type": "integer",
780           "description": "represents a policy type identifier. Currently this is restricted to an integer range.\n",
781           "name": "policy_type_id",
782           "in": "path",
783           "required": true
784         },
785         {
786           "type": "string",
787           "description": "represents a policy instance identifier. UUIDs are advisable but can be any string\n",
788           "name": "policy_instance_id",
789           "in": "path",
790           "required": true
791         }
792       ]
793     },
794     "/data-delivery": {
795       "post": {
796         "description": "Deliver data produced by data producer.\n",
797         "consumes": [
798           "application/json"
799         ],
800         "tags": [
801           "A1 EI Data Delivery"
802         ],
803         "operationId": "a1.controller.data_delivery",
804         "parameters": [
805           {
806             "name": "body",
807             "in": "body",
808             "schema": {
809               "description": "object to represent data object\n",
810               "type": "object"
811             }
812           }
813         ],
814         "responses": {
815           "200": {
816             "description": "successfully delivered data from data producer\n"
817           },
818           "404": {
819             "description": "no job id defined for this data delivery\n"
820           }
821         }
822       }
823     }
824   },
825   "definitions": {
826     "policy_instance_id": {
827       "description": "represents a policy instance identifier. UUIDs are advisable but can be any string\n",
828       "type": "string",
829       "example": "3d2157af-6a8f-4a7c-810f-38c2f824bf12"
830     },
831     "policy_type_id": {
832       "description": "represents a policy type identifier. Currently this is restricted to an integer range.\n",
833       "type": "integer",
834       "maximum": 2147483647,
835       "minimum": 1
836     },
837     "policy_type_schema": {
838       "type": "object",
839       "required": [
840         "name",
841         "description",
842         "policy_type_id",
843         "create_schema"
844       ],
845       "properties": {
846         "create_schema": {
847           "description": "jsonschema (following http://json-schema.org/draft-07/schema) of the CREATE payload to be sent to handlers of this policy\n",
848           "type": "object"
849         },
850         "description": {
851           "description": "description of the policy type",
852           "type": "string"
853         },
854         "name": {
855           "description": "name of the policy type",
856           "type": "string"
857         },
858         "policy_type_id": {
859           "description": "the integer of the policy type",
860           "type": "integer"
861         }
862       },
863       "additionalProperties": false
864     }
865   },
866   "x-components": {}
867 }`))
868 }