github.com/looshlee/beatles@v0.0.0-20220727174639-742810ab631c/api/v1/server/restapi/ipam/delete_ip_a_m_ip_responses.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package ipam 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 // DeleteIPAMIPOKCode is the HTTP code returned for type DeleteIPAMIPOK 17 const DeleteIPAMIPOKCode int = 200 18 19 /*DeleteIPAMIPOK Success 20 21 swagger:response deleteIpAMIpOK 22 */ 23 type DeleteIPAMIPOK struct { 24 } 25 26 // NewDeleteIPAMIPOK creates DeleteIPAMIPOK with default headers values 27 func NewDeleteIPAMIPOK() *DeleteIPAMIPOK { 28 29 return &DeleteIPAMIPOK{} 30 } 31 32 // WriteResponse to the client 33 func (o *DeleteIPAMIPOK) 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 // DeleteIPAMIPInvalidCode is the HTTP code returned for type DeleteIPAMIPInvalid 41 const DeleteIPAMIPInvalidCode int = 400 42 43 /*DeleteIPAMIPInvalid Invalid IP address 44 45 swagger:response deleteIpAMIpInvalid 46 */ 47 type DeleteIPAMIPInvalid struct { 48 } 49 50 // NewDeleteIPAMIPInvalid creates DeleteIPAMIPInvalid with default headers values 51 func NewDeleteIPAMIPInvalid() *DeleteIPAMIPInvalid { 52 53 return &DeleteIPAMIPInvalid{} 54 } 55 56 // WriteResponse to the client 57 func (o *DeleteIPAMIPInvalid) 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 // DeleteIPAMIPNotFoundCode is the HTTP code returned for type DeleteIPAMIPNotFound 65 const DeleteIPAMIPNotFoundCode int = 404 66 67 /*DeleteIPAMIPNotFound IP address not found 68 69 swagger:response deleteIpAMIpNotFound 70 */ 71 type DeleteIPAMIPNotFound struct { 72 } 73 74 // NewDeleteIPAMIPNotFound creates DeleteIPAMIPNotFound with default headers values 75 func NewDeleteIPAMIPNotFound() *DeleteIPAMIPNotFound { 76 77 return &DeleteIPAMIPNotFound{} 78 } 79 80 // WriteResponse to the client 81 func (o *DeleteIPAMIPNotFound) 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 // DeleteIPAMIPFailureCode is the HTTP code returned for type DeleteIPAMIPFailure 89 const DeleteIPAMIPFailureCode int = 500 90 91 /*DeleteIPAMIPFailure Address release failure 92 93 swagger:response deleteIpAMIpFailure 94 */ 95 type DeleteIPAMIPFailure struct { 96 97 /* 98 In: Body 99 */ 100 Payload models.Error `json:"body,omitempty"` 101 } 102 103 // NewDeleteIPAMIPFailure creates DeleteIPAMIPFailure with default headers values 104 func NewDeleteIPAMIPFailure() *DeleteIPAMIPFailure { 105 106 return &DeleteIPAMIPFailure{} 107 } 108 109 // WithPayload adds the payload to the delete Ip a m Ip failure response 110 func (o *DeleteIPAMIPFailure) WithPayload(payload models.Error) *DeleteIPAMIPFailure { 111 o.Payload = payload 112 return o 113 } 114 115 // SetPayload sets the payload to the delete Ip a m Ip failure response 116 func (o *DeleteIPAMIPFailure) SetPayload(payload models.Error) { 117 o.Payload = payload 118 } 119 120 // WriteResponse to the client 121 func (o *DeleteIPAMIPFailure) 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 } 129 130 // DeleteIPAMIPDisabledCode is the HTTP code returned for type DeleteIPAMIPDisabled 131 const DeleteIPAMIPDisabledCode int = 501 132 133 /*DeleteIPAMIPDisabled Allocation for address family disabled 134 135 swagger:response deleteIpAMIpDisabled 136 */ 137 type DeleteIPAMIPDisabled struct { 138 } 139 140 // NewDeleteIPAMIPDisabled creates DeleteIPAMIPDisabled with default headers values 141 func NewDeleteIPAMIPDisabled() *DeleteIPAMIPDisabled { 142 143 return &DeleteIPAMIPDisabled{} 144 } 145 146 // WriteResponse to the client 147 func (o *DeleteIPAMIPDisabled) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { 148 149 rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses 150 151 rw.WriteHeader(501) 152 }