github.com/cilium/cilium@v1.16.2/api/v1/server/restapi/endpoint/delete_endpoint_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 endpoint 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 // DeleteEndpointIDOKCode is the HTTP code returned for type DeleteEndpointIDOK 20 const DeleteEndpointIDOKCode int = 200 21 22 /* 23 DeleteEndpointIDOK Success 24 25 swagger:response deleteEndpointIdOK 26 */ 27 type DeleteEndpointIDOK struct { 28 } 29 30 // NewDeleteEndpointIDOK creates DeleteEndpointIDOK with default headers values 31 func NewDeleteEndpointIDOK() *DeleteEndpointIDOK { 32 33 return &DeleteEndpointIDOK{} 34 } 35 36 // WriteResponse to the client 37 func (o *DeleteEndpointIDOK) 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 // DeleteEndpointIDErrorsCode is the HTTP code returned for type DeleteEndpointIDErrors 45 const DeleteEndpointIDErrorsCode int = 206 46 47 /* 48 DeleteEndpointIDErrors Deleted with a number of errors encountered 49 50 swagger:response deleteEndpointIdErrors 51 */ 52 type DeleteEndpointIDErrors struct { 53 54 /* 55 In: Body 56 */ 57 Payload int64 `json:"body,omitempty"` 58 } 59 60 // NewDeleteEndpointIDErrors creates DeleteEndpointIDErrors with default headers values 61 func NewDeleteEndpointIDErrors() *DeleteEndpointIDErrors { 62 63 return &DeleteEndpointIDErrors{} 64 } 65 66 // WithPayload adds the payload to the delete endpoint Id errors response 67 func (o *DeleteEndpointIDErrors) WithPayload(payload int64) *DeleteEndpointIDErrors { 68 o.Payload = payload 69 return o 70 } 71 72 // SetPayload sets the payload to the delete endpoint Id errors response 73 func (o *DeleteEndpointIDErrors) SetPayload(payload int64) { 74 o.Payload = payload 75 } 76 77 // WriteResponse to the client 78 func (o *DeleteEndpointIDErrors) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 79 80 rw.WriteHeader(206) 81 payload := o.Payload 82 if err := producer.Produce(rw, payload); err != nil { 83 panic(err) // let the recovery middleware deal with this 84 } 85 } 86 87 // DeleteEndpointIDInvalidCode is the HTTP code returned for type DeleteEndpointIDInvalid 88 const DeleteEndpointIDInvalidCode int = 400 89 90 /* 91 DeleteEndpointIDInvalid Invalid endpoint ID format for specified type. Details in error 92 message 93 94 swagger:response deleteEndpointIdInvalid 95 */ 96 type DeleteEndpointIDInvalid struct { 97 98 /* 99 In: Body 100 */ 101 Payload models.Error `json:"body,omitempty"` 102 } 103 104 // NewDeleteEndpointIDInvalid creates DeleteEndpointIDInvalid with default headers values 105 func NewDeleteEndpointIDInvalid() *DeleteEndpointIDInvalid { 106 107 return &DeleteEndpointIDInvalid{} 108 } 109 110 // WithPayload adds the payload to the delete endpoint Id invalid response 111 func (o *DeleteEndpointIDInvalid) WithPayload(payload models.Error) *DeleteEndpointIDInvalid { 112 o.Payload = payload 113 return o 114 } 115 116 // SetPayload sets the payload to the delete endpoint Id invalid response 117 func (o *DeleteEndpointIDInvalid) SetPayload(payload models.Error) { 118 o.Payload = payload 119 } 120 121 // WriteResponse to the client 122 func (o *DeleteEndpointIDInvalid) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 123 124 rw.WriteHeader(400) 125 payload := o.Payload 126 if err := producer.Produce(rw, payload); err != nil { 127 panic(err) // let the recovery middleware deal with this 128 } 129 } 130 131 // DeleteEndpointIDForbiddenCode is the HTTP code returned for type DeleteEndpointIDForbidden 132 const DeleteEndpointIDForbiddenCode int = 403 133 134 /* 135 DeleteEndpointIDForbidden Forbidden 136 137 swagger:response deleteEndpointIdForbidden 138 */ 139 type DeleteEndpointIDForbidden struct { 140 } 141 142 // NewDeleteEndpointIDForbidden creates DeleteEndpointIDForbidden with default headers values 143 func NewDeleteEndpointIDForbidden() *DeleteEndpointIDForbidden { 144 145 return &DeleteEndpointIDForbidden{} 146 } 147 148 // WriteResponse to the client 149 func (o *DeleteEndpointIDForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 150 151 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 152 153 rw.WriteHeader(403) 154 } 155 156 // DeleteEndpointIDNotFoundCode is the HTTP code returned for type DeleteEndpointIDNotFound 157 const DeleteEndpointIDNotFoundCode int = 404 158 159 /* 160 DeleteEndpointIDNotFound Endpoint not found 161 162 swagger:response deleteEndpointIdNotFound 163 */ 164 type DeleteEndpointIDNotFound struct { 165 } 166 167 // NewDeleteEndpointIDNotFound creates DeleteEndpointIDNotFound with default headers values 168 func NewDeleteEndpointIDNotFound() *DeleteEndpointIDNotFound { 169 170 return &DeleteEndpointIDNotFound{} 171 } 172 173 // WriteResponse to the client 174 func (o *DeleteEndpointIDNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 175 176 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 177 178 rw.WriteHeader(404) 179 } 180 181 // DeleteEndpointIDTooManyRequestsCode is the HTTP code returned for type DeleteEndpointIDTooManyRequests 182 const DeleteEndpointIDTooManyRequestsCode int = 429 183 184 /* 185 DeleteEndpointIDTooManyRequests Rate-limiting too many requests in the given time frame 186 187 swagger:response deleteEndpointIdTooManyRequests 188 */ 189 type DeleteEndpointIDTooManyRequests struct { 190 } 191 192 // NewDeleteEndpointIDTooManyRequests creates DeleteEndpointIDTooManyRequests with default headers values 193 func NewDeleteEndpointIDTooManyRequests() *DeleteEndpointIDTooManyRequests { 194 195 return &DeleteEndpointIDTooManyRequests{} 196 } 197 198 // WriteResponse to the client 199 func (o *DeleteEndpointIDTooManyRequests) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 200 201 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 202 203 rw.WriteHeader(429) 204 }