github.com/cilium/cilium@v1.16.2/api/v1/server/restapi/endpoint/get_endpoint_id_log_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 // GetEndpointIDLogOKCode is the HTTP code returned for type GetEndpointIDLogOK 20 const GetEndpointIDLogOKCode int = 200 21 22 /* 23 GetEndpointIDLogOK Success 24 25 swagger:response getEndpointIdLogOK 26 */ 27 type GetEndpointIDLogOK struct { 28 29 /* 30 In: Body 31 */ 32 Payload models.EndpointStatusLog `json:"body,omitempty"` 33 } 34 35 // NewGetEndpointIDLogOK creates GetEndpointIDLogOK with default headers values 36 func NewGetEndpointIDLogOK() *GetEndpointIDLogOK { 37 38 return &GetEndpointIDLogOK{} 39 } 40 41 // WithPayload adds the payload to the get endpoint Id log o k response 42 func (o *GetEndpointIDLogOK) WithPayload(payload models.EndpointStatusLog) *GetEndpointIDLogOK { 43 o.Payload = payload 44 return o 45 } 46 47 // SetPayload sets the payload to the get endpoint Id log o k response 48 func (o *GetEndpointIDLogOK) SetPayload(payload models.EndpointStatusLog) { 49 o.Payload = payload 50 } 51 52 // WriteResponse to the client 53 func (o *GetEndpointIDLogOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 54 55 rw.WriteHeader(200) 56 payload := o.Payload 57 if payload == nil { 58 // return empty array 59 payload = models.EndpointStatusLog{} 60 } 61 62 if err := producer.Produce(rw, payload); err != nil { 63 panic(err) // let the recovery middleware deal with this 64 } 65 } 66 67 // GetEndpointIDLogInvalidCode is the HTTP code returned for type GetEndpointIDLogInvalid 68 const GetEndpointIDLogInvalidCode int = 400 69 70 /* 71 GetEndpointIDLogInvalid Invalid identity provided 72 73 swagger:response getEndpointIdLogInvalid 74 */ 75 type GetEndpointIDLogInvalid struct { 76 } 77 78 // NewGetEndpointIDLogInvalid creates GetEndpointIDLogInvalid with default headers values 79 func NewGetEndpointIDLogInvalid() *GetEndpointIDLogInvalid { 80 81 return &GetEndpointIDLogInvalid{} 82 } 83 84 // WriteResponse to the client 85 func (o *GetEndpointIDLogInvalid) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 86 87 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 88 89 rw.WriteHeader(400) 90 } 91 92 // GetEndpointIDLogNotFoundCode is the HTTP code returned for type GetEndpointIDLogNotFound 93 const GetEndpointIDLogNotFoundCode int = 404 94 95 /* 96 GetEndpointIDLogNotFound Endpoint not found 97 98 swagger:response getEndpointIdLogNotFound 99 */ 100 type GetEndpointIDLogNotFound struct { 101 } 102 103 // NewGetEndpointIDLogNotFound creates GetEndpointIDLogNotFound with default headers values 104 func NewGetEndpointIDLogNotFound() *GetEndpointIDLogNotFound { 105 106 return &GetEndpointIDLogNotFound{} 107 } 108 109 // WriteResponse to the client 110 func (o *GetEndpointIDLogNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 111 112 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 113 114 rw.WriteHeader(404) 115 } 116 117 // GetEndpointIDLogTooManyRequestsCode is the HTTP code returned for type GetEndpointIDLogTooManyRequests 118 const GetEndpointIDLogTooManyRequestsCode int = 429 119 120 /* 121 GetEndpointIDLogTooManyRequests Rate-limiting too many requests in the given time frame 122 123 swagger:response getEndpointIdLogTooManyRequests 124 */ 125 type GetEndpointIDLogTooManyRequests struct { 126 } 127 128 // NewGetEndpointIDLogTooManyRequests creates GetEndpointIDLogTooManyRequests with default headers values 129 func NewGetEndpointIDLogTooManyRequests() *GetEndpointIDLogTooManyRequests { 130 131 return &GetEndpointIDLogTooManyRequests{} 132 } 133 134 // WriteResponse to the client 135 func (o *GetEndpointIDLogTooManyRequests) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 136 137 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 138 139 rw.WriteHeader(429) 140 }