github.com/kubearmor/cilium@v1.6.12/api/v1/server/restapi/endpoint/put_endpoint_id_responses.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package endpoint 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "net/http" 10 11 "github.com/go-openapi/runtime" 12 13 models "github.com/cilium/cilium/api/v1/models" 14 ) 15 16 // PutEndpointIDCreatedCode is the HTTP code returned for type PutEndpointIDCreated 17 const PutEndpointIDCreatedCode int = 201 18 19 /*PutEndpointIDCreated Created 20 21 swagger:response putEndpointIdCreated 22 */ 23 type PutEndpointIDCreated struct { 24 } 25 26 // NewPutEndpointIDCreated creates PutEndpointIDCreated with default headers values 27 func NewPutEndpointIDCreated() *PutEndpointIDCreated { 28 29 return &PutEndpointIDCreated{} 30 } 31 32 // WriteResponse to the client 33 func (o *PutEndpointIDCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 34 35 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 36 37 rw.WriteHeader(201) 38 } 39 40 // PutEndpointIDInvalidCode is the HTTP code returned for type PutEndpointIDInvalid 41 const PutEndpointIDInvalidCode int = 400 42 43 /*PutEndpointIDInvalid Invalid endpoint in request 44 45 swagger:response putEndpointIdInvalid 46 */ 47 type PutEndpointIDInvalid struct { 48 49 /* 50 In: Body 51 */ 52 Payload models.Error `json:"body,omitempty"` 53 } 54 55 // NewPutEndpointIDInvalid creates PutEndpointIDInvalid with default headers values 56 func NewPutEndpointIDInvalid() *PutEndpointIDInvalid { 57 58 return &PutEndpointIDInvalid{} 59 } 60 61 // WithPayload adds the payload to the put endpoint Id invalid response 62 func (o *PutEndpointIDInvalid) WithPayload(payload models.Error) *PutEndpointIDInvalid { 63 o.Payload = payload 64 return o 65 } 66 67 // SetPayload sets the payload to the put endpoint Id invalid response 68 func (o *PutEndpointIDInvalid) SetPayload(payload models.Error) { 69 o.Payload = payload 70 } 71 72 // WriteResponse to the client 73 func (o *PutEndpointIDInvalid) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 74 75 rw.WriteHeader(400) 76 payload := o.Payload 77 if err := producer.Produce(rw, payload); err != nil { 78 panic(err) // let the recovery middleware deal with this 79 } 80 } 81 82 // PutEndpointIDExistsCode is the HTTP code returned for type PutEndpointIDExists 83 const PutEndpointIDExistsCode int = 409 84 85 /*PutEndpointIDExists Endpoint already exists 86 87 swagger:response putEndpointIdExists 88 */ 89 type PutEndpointIDExists struct { 90 } 91 92 // NewPutEndpointIDExists creates PutEndpointIDExists with default headers values 93 func NewPutEndpointIDExists() *PutEndpointIDExists { 94 95 return &PutEndpointIDExists{} 96 } 97 98 // WriteResponse to the client 99 func (o *PutEndpointIDExists) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 100 101 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 102 103 rw.WriteHeader(409) 104 } 105 106 // PutEndpointIDFailedCode is the HTTP code returned for type PutEndpointIDFailed 107 const PutEndpointIDFailedCode int = 500 108 109 /*PutEndpointIDFailed Endpoint creation failed 110 111 swagger:response putEndpointIdFailed 112 */ 113 type PutEndpointIDFailed struct { 114 115 /* 116 In: Body 117 */ 118 Payload models.Error `json:"body,omitempty"` 119 } 120 121 // NewPutEndpointIDFailed creates PutEndpointIDFailed with default headers values 122 func NewPutEndpointIDFailed() *PutEndpointIDFailed { 123 124 return &PutEndpointIDFailed{} 125 } 126 127 // WithPayload adds the payload to the put endpoint Id failed response 128 func (o *PutEndpointIDFailed) WithPayload(payload models.Error) *PutEndpointIDFailed { 129 o.Payload = payload 130 return o 131 } 132 133 // SetPayload sets the payload to the put endpoint Id failed response 134 func (o *PutEndpointIDFailed) SetPayload(payload models.Error) { 135 o.Payload = payload 136 } 137 138 // WriteResponse to the client 139 func (o *PutEndpointIDFailed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 140 141 rw.WriteHeader(500) 142 payload := o.Payload 143 if err := producer.Produce(rw, payload); err != nil { 144 panic(err) // let the recovery middleware deal with this 145 } 146 }