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