Moving RMR message reciver into go routine
[ric-plt/a1.git] / a1-go / pkg / restapi / operations / a1_mediator / a1_controller_get_policy_instance_responses.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 a1_mediator
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         "net/http"
30
31         "github.com/go-openapi/runtime"
32 )
33
34 // A1ControllerGetPolicyInstanceOKCode is the HTTP code returned for type A1ControllerGetPolicyInstanceOK
35 const A1ControllerGetPolicyInstanceOKCode int = 200
36
37 /*A1ControllerGetPolicyInstanceOK The policy instance. the schema of this object is defined by the create_schema field of the policy type
38
39
40 swagger:response a1ControllerGetPolicyInstanceOK
41 */
42 type A1ControllerGetPolicyInstanceOK struct {
43
44         /*
45           In: Body
46         */
47         Payload interface{} `json:"body,omitempty"`
48 }
49
50 // NewA1ControllerGetPolicyInstanceOK creates A1ControllerGetPolicyInstanceOK with default headers values
51 func NewA1ControllerGetPolicyInstanceOK() *A1ControllerGetPolicyInstanceOK {
52
53         return &A1ControllerGetPolicyInstanceOK{}
54 }
55
56 // WithPayload adds the payload to the a1 controller get policy instance o k response
57 func (o *A1ControllerGetPolicyInstanceOK) WithPayload(payload interface{}) *A1ControllerGetPolicyInstanceOK {
58         o.Payload = payload
59         return o
60 }
61
62 // SetPayload sets the payload to the a1 controller get policy instance o k response
63 func (o *A1ControllerGetPolicyInstanceOK) SetPayload(payload interface{}) {
64         o.Payload = payload
65 }
66
67 // WriteResponse to the client
68 func (o *A1ControllerGetPolicyInstanceOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
69
70         rw.WriteHeader(200)
71         payload := o.Payload
72         if err := producer.Produce(rw, payload); err != nil {
73                 panic(err) // let the recovery middleware deal with this
74         }
75 }
76
77 // A1ControllerGetPolicyInstanceNotFoundCode is the HTTP code returned for type A1ControllerGetPolicyInstanceNotFound
78 const A1ControllerGetPolicyInstanceNotFoundCode int = 404
79
80 /*A1ControllerGetPolicyInstanceNotFound there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
81
82
83 swagger:response a1ControllerGetPolicyInstanceNotFound
84 */
85 type A1ControllerGetPolicyInstanceNotFound struct {
86 }
87
88 // NewA1ControllerGetPolicyInstanceNotFound creates A1ControllerGetPolicyInstanceNotFound with default headers values
89 func NewA1ControllerGetPolicyInstanceNotFound() *A1ControllerGetPolicyInstanceNotFound {
90
91         return &A1ControllerGetPolicyInstanceNotFound{}
92 }
93
94 // WriteResponse to the client
95 func (o *A1ControllerGetPolicyInstanceNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
96
97         rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
98
99         rw.WriteHeader(404)
100 }
101
102 // A1ControllerGetPolicyInstanceServiceUnavailableCode is the HTTP code returned for type A1ControllerGetPolicyInstanceServiceUnavailable
103 const A1ControllerGetPolicyInstanceServiceUnavailableCode int = 503
104
105 /*A1ControllerGetPolicyInstanceServiceUnavailable Potentially transient backend database error. Client should attempt to retry later.
106
107 swagger:response a1ControllerGetPolicyInstanceServiceUnavailable
108 */
109 type A1ControllerGetPolicyInstanceServiceUnavailable struct {
110 }
111
112 // NewA1ControllerGetPolicyInstanceServiceUnavailable creates A1ControllerGetPolicyInstanceServiceUnavailable with default headers values
113 func NewA1ControllerGetPolicyInstanceServiceUnavailable() *A1ControllerGetPolicyInstanceServiceUnavailable {
114
115         return &A1ControllerGetPolicyInstanceServiceUnavailable{}
116 }
117
118 // WriteResponse to the client
119 func (o *A1ControllerGetPolicyInstanceServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
120
121         rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
122
123         rw.WriteHeader(503)
124 }