Update module name
[ric-plt/a1.git] / a1-go / pkg / restapi / operations / a1_mediator / a1_controller_get_policy_type_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        "gerrit.o-ran-sc.org/r/ric-plt/a1/pkg/models"
34 )
35
36 // A1ControllerGetPolicyTypeOKCode is the HTTP code returned for type A1ControllerGetPolicyTypeOK
37 const A1ControllerGetPolicyTypeOKCode int = 200
38
39 /*A1ControllerGetPolicyTypeOK policy type successfully found
40
41 swagger:response a1ControllerGetPolicyTypeOK
42 */
43 type A1ControllerGetPolicyTypeOK struct {
44
45         /*
46           In: Body
47         */
48         Payload *models.PolicyTypeSchema `json:"body,omitempty"`
49 }
50
51 // NewA1ControllerGetPolicyTypeOK creates A1ControllerGetPolicyTypeOK with default headers values
52 func NewA1ControllerGetPolicyTypeOK() *A1ControllerGetPolicyTypeOK {
53
54         return &A1ControllerGetPolicyTypeOK{}
55 }
56
57 // WithPayload adds the payload to the a1 controller get policy type o k response
58 func (o *A1ControllerGetPolicyTypeOK) WithPayload(payload *models.PolicyTypeSchema) *A1ControllerGetPolicyTypeOK {
59         o.Payload = payload
60         return o
61 }
62
63 // SetPayload sets the payload to the a1 controller get policy type o k response
64 func (o *A1ControllerGetPolicyTypeOK) SetPayload(payload *models.PolicyTypeSchema) {
65         o.Payload = payload
66 }
67
68 // WriteResponse to the client
69 func (o *A1ControllerGetPolicyTypeOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
70
71         rw.WriteHeader(200)
72         if o.Payload != nil {
73                 payload := o.Payload
74                 if err := producer.Produce(rw, payload); err != nil {
75                         panic(err) // let the recovery middleware deal with this
76                 }
77         }
78 }
79
80 // A1ControllerGetPolicyTypeNotFoundCode is the HTTP code returned for type A1ControllerGetPolicyTypeNotFound
81 const A1ControllerGetPolicyTypeNotFoundCode int = 404
82
83 /*A1ControllerGetPolicyTypeNotFound policy type not found
84
85
86 swagger:response a1ControllerGetPolicyTypeNotFound
87 */
88 type A1ControllerGetPolicyTypeNotFound struct {
89 }
90
91 // NewA1ControllerGetPolicyTypeNotFound creates A1ControllerGetPolicyTypeNotFound with default headers values
92 func NewA1ControllerGetPolicyTypeNotFound() *A1ControllerGetPolicyTypeNotFound {
93
94         return &A1ControllerGetPolicyTypeNotFound{}
95 }
96
97 // WriteResponse to the client
98 func (o *A1ControllerGetPolicyTypeNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
99
100         rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
101
102         rw.WriteHeader(404)
103 }
104
105 // A1ControllerGetPolicyTypeServiceUnavailableCode is the HTTP code returned for type A1ControllerGetPolicyTypeServiceUnavailable
106 const A1ControllerGetPolicyTypeServiceUnavailableCode int = 503
107
108 /*A1ControllerGetPolicyTypeServiceUnavailable Potentially transient backend database error. Client should attempt to retry later.
109
110 swagger:response a1ControllerGetPolicyTypeServiceUnavailable
111 */
112 type A1ControllerGetPolicyTypeServiceUnavailable struct {
113 }
114
115 // NewA1ControllerGetPolicyTypeServiceUnavailable creates A1ControllerGetPolicyTypeServiceUnavailable with default headers values
116 func NewA1ControllerGetPolicyTypeServiceUnavailable() *A1ControllerGetPolicyTypeServiceUnavailable {
117
118         return &A1ControllerGetPolicyTypeServiceUnavailable{}
119 }
120
121 // WriteResponse to the client
122 func (o *A1ControllerGetPolicyTypeServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
123
124         rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
125
126         rw.WriteHeader(503)
127 }