github.com/kubearmor/cilium@v1.6.12/api/v1/server/restapi/endpoint/patch_endpoint_id_labels_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 // PatchEndpointIDLabelsOKCode is the HTTP code returned for type PatchEndpointIDLabelsOK 17 const PatchEndpointIDLabelsOKCode int = 200 18 19 /*PatchEndpointIDLabelsOK Success 20 21 swagger:response patchEndpointIdLabelsOK 22 */ 23 type PatchEndpointIDLabelsOK struct { 24 } 25 26 // NewPatchEndpointIDLabelsOK creates PatchEndpointIDLabelsOK with default headers values 27 func NewPatchEndpointIDLabelsOK() *PatchEndpointIDLabelsOK { 28 29 return &PatchEndpointIDLabelsOK{} 30 } 31 32 // WriteResponse to the client 33 func (o *PatchEndpointIDLabelsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 34 35 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 36 37 rw.WriteHeader(200) 38 } 39 40 // PatchEndpointIDLabelsNotFoundCode is the HTTP code returned for type PatchEndpointIDLabelsNotFound 41 const PatchEndpointIDLabelsNotFoundCode int = 404 42 43 /*PatchEndpointIDLabelsNotFound Endpoint not found 44 45 swagger:response patchEndpointIdLabelsNotFound 46 */ 47 type PatchEndpointIDLabelsNotFound struct { 48 } 49 50 // NewPatchEndpointIDLabelsNotFound creates PatchEndpointIDLabelsNotFound with default headers values 51 func NewPatchEndpointIDLabelsNotFound() *PatchEndpointIDLabelsNotFound { 52 53 return &PatchEndpointIDLabelsNotFound{} 54 } 55 56 // WriteResponse to the client 57 func (o *PatchEndpointIDLabelsNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 58 59 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 60 61 rw.WriteHeader(404) 62 } 63 64 // PatchEndpointIDLabelsUpdateFailedCode is the HTTP code returned for type PatchEndpointIDLabelsUpdateFailed 65 const PatchEndpointIDLabelsUpdateFailedCode int = 500 66 67 /*PatchEndpointIDLabelsUpdateFailed Error while updating labels 68 69 swagger:response patchEndpointIdLabelsUpdateFailed 70 */ 71 type PatchEndpointIDLabelsUpdateFailed struct { 72 73 /* 74 In: Body 75 */ 76 Payload models.Error `json:"body,omitempty"` 77 } 78 79 // NewPatchEndpointIDLabelsUpdateFailed creates PatchEndpointIDLabelsUpdateFailed with default headers values 80 func NewPatchEndpointIDLabelsUpdateFailed() *PatchEndpointIDLabelsUpdateFailed { 81 82 return &PatchEndpointIDLabelsUpdateFailed{} 83 } 84 85 // WithPayload adds the payload to the patch endpoint Id labels update failed response 86 func (o *PatchEndpointIDLabelsUpdateFailed) WithPayload(payload models.Error) *PatchEndpointIDLabelsUpdateFailed { 87 o.Payload = payload 88 return o 89 } 90 91 // SetPayload sets the payload to the patch endpoint Id labels update failed response 92 func (o *PatchEndpointIDLabelsUpdateFailed) SetPayload(payload models.Error) { 93 o.Payload = payload 94 } 95 96 // WriteResponse to the client 97 func (o *PatchEndpointIDLabelsUpdateFailed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 98 99 rw.WriteHeader(500) 100 payload := o.Payload 101 if err := producer.Produce(rw, payload); err != nil { 102 panic(err) // let the recovery middleware deal with this 103 } 104 }