github.com/cilium/cilium@v1.16.2/api/v1/server/restapi/endpoint/delete_endpoint_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 17 // DeleteEndpointOKCode is the HTTP code returned for type DeleteEndpointOK 18 const DeleteEndpointOKCode int = 200 19 20 /* 21 DeleteEndpointOK Success 22 23 swagger:response deleteEndpointOK 24 */ 25 type DeleteEndpointOK struct { 26 } 27 28 // NewDeleteEndpointOK creates DeleteEndpointOK with default headers values 29 func NewDeleteEndpointOK() *DeleteEndpointOK { 30 31 return &DeleteEndpointOK{} 32 } 33 34 // WriteResponse to the client 35 func (o *DeleteEndpointOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 36 37 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 38 39 rw.WriteHeader(200) 40 } 41 42 // DeleteEndpointErrorsCode is the HTTP code returned for type DeleteEndpointErrors 43 const DeleteEndpointErrorsCode int = 206 44 45 /* 46 DeleteEndpointErrors Deleted with a number of errors encountered 47 48 swagger:response deleteEndpointErrors 49 */ 50 type DeleteEndpointErrors struct { 51 52 /* 53 In: Body 54 */ 55 Payload int64 `json:"body,omitempty"` 56 } 57 58 // NewDeleteEndpointErrors creates DeleteEndpointErrors with default headers values 59 func NewDeleteEndpointErrors() *DeleteEndpointErrors { 60 61 return &DeleteEndpointErrors{} 62 } 63 64 // WithPayload adds the payload to the delete endpoint errors response 65 func (o *DeleteEndpointErrors) WithPayload(payload int64) *DeleteEndpointErrors { 66 o.Payload = payload 67 return o 68 } 69 70 // SetPayload sets the payload to the delete endpoint errors response 71 func (o *DeleteEndpointErrors) SetPayload(payload int64) { 72 o.Payload = payload 73 } 74 75 // WriteResponse to the client 76 func (o *DeleteEndpointErrors) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 77 78 rw.WriteHeader(206) 79 payload := o.Payload 80 if err := producer.Produce(rw, payload); err != nil { 81 panic(err) // let the recovery middleware deal with this 82 } 83 } 84 85 // DeleteEndpointInvalidCode is the HTTP code returned for type DeleteEndpointInvalid 86 const DeleteEndpointInvalidCode int = 400 87 88 /* 89 DeleteEndpointInvalid Invalid endpoint delete request 90 91 swagger:response deleteEndpointInvalid 92 */ 93 type DeleteEndpointInvalid struct { 94 } 95 96 // NewDeleteEndpointInvalid creates DeleteEndpointInvalid with default headers values 97 func NewDeleteEndpointInvalid() *DeleteEndpointInvalid { 98 99 return &DeleteEndpointInvalid{} 100 } 101 102 // WriteResponse to the client 103 func (o *DeleteEndpointInvalid) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 104 105 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 106 107 rw.WriteHeader(400) 108 } 109 110 // DeleteEndpointNotFoundCode is the HTTP code returned for type DeleteEndpointNotFound 111 const DeleteEndpointNotFoundCode int = 404 112 113 /* 114 DeleteEndpointNotFound No endpoints with provided parameters found 115 116 swagger:response deleteEndpointNotFound 117 */ 118 type DeleteEndpointNotFound struct { 119 } 120 121 // NewDeleteEndpointNotFound creates DeleteEndpointNotFound with default headers values 122 func NewDeleteEndpointNotFound() *DeleteEndpointNotFound { 123 124 return &DeleteEndpointNotFound{} 125 } 126 127 // WriteResponse to the client 128 func (o *DeleteEndpointNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 129 130 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 131 132 rw.WriteHeader(404) 133 } 134 135 // DeleteEndpointTooManyRequestsCode is the HTTP code returned for type DeleteEndpointTooManyRequests 136 const DeleteEndpointTooManyRequestsCode int = 429 137 138 /* 139 DeleteEndpointTooManyRequests Rate-limiting too many requests in the given time frame 140 141 swagger:response deleteEndpointTooManyRequests 142 */ 143 type DeleteEndpointTooManyRequests struct { 144 } 145 146 // NewDeleteEndpointTooManyRequests creates DeleteEndpointTooManyRequests with default headers values 147 func NewDeleteEndpointTooManyRequests() *DeleteEndpointTooManyRequests { 148 149 return &DeleteEndpointTooManyRequests{} 150 } 151 152 // WriteResponse to the client 153 func (o *DeleteEndpointTooManyRequests) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 154 155 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 156 157 rw.WriteHeader(429) 158 }