github.com/cilium/cilium@v1.16.2/api/v1/server/restapi/service/put_service_id_responses.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 // Copyright Authors of Cilium 4 // SPDX-License-Identifier: Apache-2.0 5 6 package service 7 8 // This file was generated by the swagger tool. 9 // Editing this file might prove futile when you re-run the swagger generate command 10 11 import ( 12 "net/http" 13 14 "github.com/go-openapi/runtime" 15 16 "github.com/cilium/cilium/api/v1/models" 17 ) 18 19 // PutServiceIDOKCode is the HTTP code returned for type PutServiceIDOK 20 const PutServiceIDOKCode int = 200 21 22 /* 23 PutServiceIDOK Updated 24 25 swagger:response putServiceIdOK 26 */ 27 type PutServiceIDOK struct { 28 } 29 30 // NewPutServiceIDOK creates PutServiceIDOK with default headers values 31 func NewPutServiceIDOK() *PutServiceIDOK { 32 33 return &PutServiceIDOK{} 34 } 35 36 // WriteResponse to the client 37 func (o *PutServiceIDOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 38 39 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 40 41 rw.WriteHeader(200) 42 } 43 44 // PutServiceIDCreatedCode is the HTTP code returned for type PutServiceIDCreated 45 const PutServiceIDCreatedCode int = 201 46 47 /* 48 PutServiceIDCreated Created 49 50 swagger:response putServiceIdCreated 51 */ 52 type PutServiceIDCreated struct { 53 } 54 55 // NewPutServiceIDCreated creates PutServiceIDCreated with default headers values 56 func NewPutServiceIDCreated() *PutServiceIDCreated { 57 58 return &PutServiceIDCreated{} 59 } 60 61 // WriteResponse to the client 62 func (o *PutServiceIDCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 63 64 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 65 66 rw.WriteHeader(201) 67 } 68 69 // PutServiceIDForbiddenCode is the HTTP code returned for type PutServiceIDForbidden 70 const PutServiceIDForbiddenCode int = 403 71 72 /* 73 PutServiceIDForbidden Forbidden 74 75 swagger:response putServiceIdForbidden 76 */ 77 type PutServiceIDForbidden struct { 78 } 79 80 // NewPutServiceIDForbidden creates PutServiceIDForbidden with default headers values 81 func NewPutServiceIDForbidden() *PutServiceIDForbidden { 82 83 return &PutServiceIDForbidden{} 84 } 85 86 // WriteResponse to the client 87 func (o *PutServiceIDForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 88 89 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 90 91 rw.WriteHeader(403) 92 } 93 94 // PutServiceIDInvalidFrontendCode is the HTTP code returned for type PutServiceIDInvalidFrontend 95 const PutServiceIDInvalidFrontendCode int = 460 96 97 /* 98 PutServiceIDInvalidFrontend Invalid frontend in service configuration 99 100 swagger:response putServiceIdInvalidFrontend 101 */ 102 type PutServiceIDInvalidFrontend struct { 103 104 /* 105 In: Body 106 */ 107 Payload models.Error `json:"body,omitempty"` 108 } 109 110 // NewPutServiceIDInvalidFrontend creates PutServiceIDInvalidFrontend with default headers values 111 func NewPutServiceIDInvalidFrontend() *PutServiceIDInvalidFrontend { 112 113 return &PutServiceIDInvalidFrontend{} 114 } 115 116 // WithPayload adds the payload to the put service Id invalid frontend response 117 func (o *PutServiceIDInvalidFrontend) WithPayload(payload models.Error) *PutServiceIDInvalidFrontend { 118 o.Payload = payload 119 return o 120 } 121 122 // SetPayload sets the payload to the put service Id invalid frontend response 123 func (o *PutServiceIDInvalidFrontend) SetPayload(payload models.Error) { 124 o.Payload = payload 125 } 126 127 // WriteResponse to the client 128 func (o *PutServiceIDInvalidFrontend) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 129 130 rw.WriteHeader(460) 131 payload := o.Payload 132 if err := producer.Produce(rw, payload); err != nil { 133 panic(err) // let the recovery middleware deal with this 134 } 135 } 136 137 // PutServiceIDInvalidBackendCode is the HTTP code returned for type PutServiceIDInvalidBackend 138 const PutServiceIDInvalidBackendCode int = 461 139 140 /* 141 PutServiceIDInvalidBackend Invalid backend in service configuration 142 143 swagger:response putServiceIdInvalidBackend 144 */ 145 type PutServiceIDInvalidBackend struct { 146 147 /* 148 In: Body 149 */ 150 Payload models.Error `json:"body,omitempty"` 151 } 152 153 // NewPutServiceIDInvalidBackend creates PutServiceIDInvalidBackend with default headers values 154 func NewPutServiceIDInvalidBackend() *PutServiceIDInvalidBackend { 155 156 return &PutServiceIDInvalidBackend{} 157 } 158 159 // WithPayload adds the payload to the put service Id invalid backend response 160 func (o *PutServiceIDInvalidBackend) WithPayload(payload models.Error) *PutServiceIDInvalidBackend { 161 o.Payload = payload 162 return o 163 } 164 165 // SetPayload sets the payload to the put service Id invalid backend response 166 func (o *PutServiceIDInvalidBackend) SetPayload(payload models.Error) { 167 o.Payload = payload 168 } 169 170 // WriteResponse to the client 171 func (o *PutServiceIDInvalidBackend) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 172 173 rw.WriteHeader(461) 174 payload := o.Payload 175 if err := producer.Produce(rw, payload); err != nil { 176 panic(err) // let the recovery middleware deal with this 177 } 178 } 179 180 // PutServiceIDFailureCode is the HTTP code returned for type PutServiceIDFailure 181 const PutServiceIDFailureCode int = 500 182 183 /* 184 PutServiceIDFailure Error while creating service 185 186 swagger:response putServiceIdFailure 187 */ 188 type PutServiceIDFailure struct { 189 190 /* 191 In: Body 192 */ 193 Payload models.Error `json:"body,omitempty"` 194 } 195 196 // NewPutServiceIDFailure creates PutServiceIDFailure with default headers values 197 func NewPutServiceIDFailure() *PutServiceIDFailure { 198 199 return &PutServiceIDFailure{} 200 } 201 202 // WithPayload adds the payload to the put service Id failure response 203 func (o *PutServiceIDFailure) WithPayload(payload models.Error) *PutServiceIDFailure { 204 o.Payload = payload 205 return o 206 } 207 208 // SetPayload sets the payload to the put service Id failure response 209 func (o *PutServiceIDFailure) SetPayload(payload models.Error) { 210 o.Payload = payload 211 } 212 213 // WriteResponse to the client 214 func (o *PutServiceIDFailure) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 215 216 rw.WriteHeader(500) 217 payload := o.Payload 218 if err := producer.Produce(rw, payload); err != nil { 219 panic(err) // let the recovery middleware deal with this 220 } 221 } 222 223 // PutServiceIDUpdateBackendFailureCode is the HTTP code returned for type PutServiceIDUpdateBackendFailure 224 const PutServiceIDUpdateBackendFailureCode int = 501 225 226 /* 227 PutServiceIDUpdateBackendFailure Error while updating backend states 228 229 swagger:response putServiceIdUpdateBackendFailure 230 */ 231 type PutServiceIDUpdateBackendFailure struct { 232 233 /* 234 In: Body 235 */ 236 Payload models.Error `json:"body,omitempty"` 237 } 238 239 // NewPutServiceIDUpdateBackendFailure creates PutServiceIDUpdateBackendFailure with default headers values 240 func NewPutServiceIDUpdateBackendFailure() *PutServiceIDUpdateBackendFailure { 241 242 return &PutServiceIDUpdateBackendFailure{} 243 } 244 245 // WithPayload adds the payload to the put service Id update backend failure response 246 func (o *PutServiceIDUpdateBackendFailure) WithPayload(payload models.Error) *PutServiceIDUpdateBackendFailure { 247 o.Payload = payload 248 return o 249 } 250 251 // SetPayload sets the payload to the put service Id update backend failure response 252 func (o *PutServiceIDUpdateBackendFailure) SetPayload(payload models.Error) { 253 o.Payload = payload 254 } 255 256 // WriteResponse to the client 257 func (o *PutServiceIDUpdateBackendFailure) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 258 259 rw.WriteHeader(501) 260 payload := o.Payload 261 if err := producer.Produce(rw, payload); err != nil { 262 panic(err) // let the recovery middleware deal with this 263 } 264 }