Replacing a1-python with a1-go implementation
[ric-plt/a1.git] / pkg / restapi / operations / a1_mediator / a1_controller_get_policy_instance_status_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 // A1ControllerGetPolicyInstanceStatusOKCode is the HTTP code returned for type A1ControllerGetPolicyInstanceStatusOK
35 const A1ControllerGetPolicyInstanceStatusOKCode int = 200
36
37 /*A1ControllerGetPolicyInstanceStatusOK successfully retrieved the status
38
39
40 swagger:response a1ControllerGetPolicyInstanceStatusOK
41 */
42 type A1ControllerGetPolicyInstanceStatusOK struct {
43
44         /*
45           In: Body
46         */
47         Payload *A1ControllerGetPolicyInstanceStatusOKBody `json:"body,omitempty"`
48 }
49
50 // NewA1ControllerGetPolicyInstanceStatusOK creates A1ControllerGetPolicyInstanceStatusOK with default headers values
51 func NewA1ControllerGetPolicyInstanceStatusOK() *A1ControllerGetPolicyInstanceStatusOK {
52
53         return &A1ControllerGetPolicyInstanceStatusOK{}
54 }
55
56 // WithPayload adds the payload to the a1 controller get policy instance status o k response
57 func (o *A1ControllerGetPolicyInstanceStatusOK) WithPayload(payload *A1ControllerGetPolicyInstanceStatusOKBody) *A1ControllerGetPolicyInstanceStatusOK {
58         o.Payload = payload
59         return o
60 }
61
62 // SetPayload sets the payload to the a1 controller get policy instance status o k response
63 func (o *A1ControllerGetPolicyInstanceStatusOK) SetPayload(payload *A1ControllerGetPolicyInstanceStatusOKBody) {
64         o.Payload = payload
65 }
66
67 // WriteResponse to the client
68 func (o *A1ControllerGetPolicyInstanceStatusOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
69
70         rw.WriteHeader(200)
71         if o.Payload != nil {
72                 payload := o.Payload
73                 if err := producer.Produce(rw, payload); err != nil {
74                         panic(err) // let the recovery middleware deal with this
75                 }
76         }
77 }
78
79 // A1ControllerGetPolicyInstanceStatusNotFoundCode is the HTTP code returned for type A1ControllerGetPolicyInstanceStatusNotFound
80 const A1ControllerGetPolicyInstanceStatusNotFoundCode int = 404
81
82 /*A1ControllerGetPolicyInstanceStatusNotFound there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id
83
84
85 swagger:response a1ControllerGetPolicyInstanceStatusNotFound
86 */
87 type A1ControllerGetPolicyInstanceStatusNotFound struct {
88 }
89
90 // NewA1ControllerGetPolicyInstanceStatusNotFound creates A1ControllerGetPolicyInstanceStatusNotFound with default headers values
91 func NewA1ControllerGetPolicyInstanceStatusNotFound() *A1ControllerGetPolicyInstanceStatusNotFound {
92
93         return &A1ControllerGetPolicyInstanceStatusNotFound{}
94 }
95
96 // WriteResponse to the client
97 func (o *A1ControllerGetPolicyInstanceStatusNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
98
99         rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
100
101         rw.WriteHeader(404)
102 }
103
104 // A1ControllerGetPolicyInstanceStatusServiceUnavailableCode is the HTTP code returned for type A1ControllerGetPolicyInstanceStatusServiceUnavailable
105 const A1ControllerGetPolicyInstanceStatusServiceUnavailableCode int = 503
106
107 /*A1ControllerGetPolicyInstanceStatusServiceUnavailable Potentially transient backend database error. Client should attempt to retry later.
108
109 swagger:response a1ControllerGetPolicyInstanceStatusServiceUnavailable
110 */
111 type A1ControllerGetPolicyInstanceStatusServiceUnavailable struct {
112 }
113
114 // NewA1ControllerGetPolicyInstanceStatusServiceUnavailable creates A1ControllerGetPolicyInstanceStatusServiceUnavailable with default headers values
115 func NewA1ControllerGetPolicyInstanceStatusServiceUnavailable() *A1ControllerGetPolicyInstanceStatusServiceUnavailable {
116
117         return &A1ControllerGetPolicyInstanceStatusServiceUnavailable{}
118 }
119
120 // WriteResponse to the client
121 func (o *A1ControllerGetPolicyInstanceStatusServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
122
123         rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
124
125         rw.WriteHeader(503)
126 }