github.com/kubearmor/cilium@v1.6.12/api/v1/server/restapi/endpoint/patch_endpoint_id_config_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 // PatchEndpointIDConfigOKCode is the HTTP code returned for type PatchEndpointIDConfigOK 17 const PatchEndpointIDConfigOKCode int = 200 18 19 /*PatchEndpointIDConfigOK Success 20 21 swagger:response patchEndpointIdConfigOK 22 */ 23 type PatchEndpointIDConfigOK struct { 24 } 25 26 // NewPatchEndpointIDConfigOK creates PatchEndpointIDConfigOK with default headers values 27 func NewPatchEndpointIDConfigOK() *PatchEndpointIDConfigOK { 28 29 return &PatchEndpointIDConfigOK{} 30 } 31 32 // WriteResponse to the client 33 func (o *PatchEndpointIDConfigOK) 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 // PatchEndpointIDConfigInvalidCode is the HTTP code returned for type PatchEndpointIDConfigInvalid 41 const PatchEndpointIDConfigInvalidCode int = 400 42 43 /*PatchEndpointIDConfigInvalid Invalid configuration request 44 45 swagger:response patchEndpointIdConfigInvalid 46 */ 47 type PatchEndpointIDConfigInvalid struct { 48 } 49 50 // NewPatchEndpointIDConfigInvalid creates PatchEndpointIDConfigInvalid with default headers values 51 func NewPatchEndpointIDConfigInvalid() *PatchEndpointIDConfigInvalid { 52 53 return &PatchEndpointIDConfigInvalid{} 54 } 55 56 // WriteResponse to the client 57 func (o *PatchEndpointIDConfigInvalid) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 58 59 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 60 61 rw.WriteHeader(400) 62 } 63 64 // PatchEndpointIDConfigNotFoundCode is the HTTP code returned for type PatchEndpointIDConfigNotFound 65 const PatchEndpointIDConfigNotFoundCode int = 404 66 67 /*PatchEndpointIDConfigNotFound Endpoint not found 68 69 swagger:response patchEndpointIdConfigNotFound 70 */ 71 type PatchEndpointIDConfigNotFound struct { 72 } 73 74 // NewPatchEndpointIDConfigNotFound creates PatchEndpointIDConfigNotFound with default headers values 75 func NewPatchEndpointIDConfigNotFound() *PatchEndpointIDConfigNotFound { 76 77 return &PatchEndpointIDConfigNotFound{} 78 } 79 80 // WriteResponse to the client 81 func (o *PatchEndpointIDConfigNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 82 83 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 84 85 rw.WriteHeader(404) 86 } 87 88 // PatchEndpointIDConfigFailedCode is the HTTP code returned for type PatchEndpointIDConfigFailed 89 const PatchEndpointIDConfigFailedCode int = 500 90 91 /*PatchEndpointIDConfigFailed Update failed. Details in message. 92 93 swagger:response patchEndpointIdConfigFailed 94 */ 95 type PatchEndpointIDConfigFailed struct { 96 97 /* 98 In: Body 99 */ 100 Payload models.Error `json:"body,omitempty"` 101 } 102 103 // NewPatchEndpointIDConfigFailed creates PatchEndpointIDConfigFailed with default headers values 104 func NewPatchEndpointIDConfigFailed() *PatchEndpointIDConfigFailed { 105 106 return &PatchEndpointIDConfigFailed{} 107 } 108 109 // WithPayload adds the payload to the patch endpoint Id config failed response 110 func (o *PatchEndpointIDConfigFailed) WithPayload(payload models.Error) *PatchEndpointIDConfigFailed { 111 o.Payload = payload 112 return o 113 } 114 115 // SetPayload sets the payload to the patch endpoint Id config failed response 116 func (o *PatchEndpointIDConfigFailed) SetPayload(payload models.Error) { 117 o.Payload = payload 118 } 119 120 // WriteResponse to the client 121 func (o *PatchEndpointIDConfigFailed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 122 123 rw.WriteHeader(500) 124 payload := o.Payload 125 if err := producer.Produce(rw, payload); err != nil { 126 panic(err) // let the recovery middleware deal with this 127 } 128 }