github.com/looshlee/beatles@v0.0.0-20220727174639-742810ab631c/api/v1/client/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 "fmt" 10 "io" 11 12 "github.com/go-openapi/runtime" 13 14 strfmt "github.com/go-openapi/strfmt" 15 16 models "github.com/cilium/cilium/api/v1/models" 17 ) 18 19 // DeleteIPAMIPReader is a Reader for the DeleteIPAMIP structure. 20 type DeleteIPAMIPReader struct { 21 formats strfmt.Registry 22 } 23 24 // ReadResponse reads a server response into the received o. 25 func (o *DeleteIPAMIPReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { 26 switch response.Code() { 27 28 case 200: 29 result := NewDeleteIPAMIPOK() 30 if err := result.readResponse(response, consumer, o.formats); err != nil { 31 return nil, err 32 } 33 return result, nil 34 35 case 400: 36 result := NewDeleteIPAMIPInvalid() 37 if err := result.readResponse(response, consumer, o.formats); err != nil { 38 return nil, err 39 } 40 return nil, result 41 42 case 404: 43 result := NewDeleteIPAMIPNotFound() 44 if err := result.readResponse(response, consumer, o.formats); err != nil { 45 return nil, err 46 } 47 return nil, result 48 49 case 500: 50 result := NewDeleteIPAMIPFailure() 51 if err := result.readResponse(response, consumer, o.formats); err != nil { 52 return nil, err 53 } 54 return nil, result 55 56 case 501: 57 result := NewDeleteIPAMIPDisabled() 58 if err := result.readResponse(response, consumer, o.formats); err != nil { 59 return nil, err 60 } 61 return nil, result 62 63 default: 64 return nil, runtime.NewAPIError("unknown error", response, response.Code()) 65 } 66 } 67 68 // NewDeleteIPAMIPOK creates a DeleteIPAMIPOK with default headers values 69 func NewDeleteIPAMIPOK() *DeleteIPAMIPOK { 70 return &DeleteIPAMIPOK{} 71 } 72 73 /*DeleteIPAMIPOK handles this case with default header values. 74 75 Success 76 */ 77 type DeleteIPAMIPOK struct { 78 } 79 80 func (o *DeleteIPAMIPOK) Error() string { 81 return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpAMIpOK ", 200) 82 } 83 84 func (o *DeleteIPAMIPOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { 85 86 return nil 87 } 88 89 // NewDeleteIPAMIPInvalid creates a DeleteIPAMIPInvalid with default headers values 90 func NewDeleteIPAMIPInvalid() *DeleteIPAMIPInvalid { 91 return &DeleteIPAMIPInvalid{} 92 } 93 94 /*DeleteIPAMIPInvalid handles this case with default header values. 95 96 Invalid IP address 97 */ 98 type DeleteIPAMIPInvalid struct { 99 } 100 101 func (o *DeleteIPAMIPInvalid) Error() string { 102 return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpAMIpInvalid ", 400) 103 } 104 105 func (o *DeleteIPAMIPInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { 106 107 return nil 108 } 109 110 // NewDeleteIPAMIPNotFound creates a DeleteIPAMIPNotFound with default headers values 111 func NewDeleteIPAMIPNotFound() *DeleteIPAMIPNotFound { 112 return &DeleteIPAMIPNotFound{} 113 } 114 115 /*DeleteIPAMIPNotFound handles this case with default header values. 116 117 IP address not found 118 */ 119 type DeleteIPAMIPNotFound struct { 120 } 121 122 func (o *DeleteIPAMIPNotFound) Error() string { 123 return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpAMIpNotFound ", 404) 124 } 125 126 func (o *DeleteIPAMIPNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { 127 128 return nil 129 } 130 131 // NewDeleteIPAMIPFailure creates a DeleteIPAMIPFailure with default headers values 132 func NewDeleteIPAMIPFailure() *DeleteIPAMIPFailure { 133 return &DeleteIPAMIPFailure{} 134 } 135 136 /*DeleteIPAMIPFailure handles this case with default header values. 137 138 Address release failure 139 */ 140 type DeleteIPAMIPFailure struct { 141 Payload models.Error 142 } 143 144 func (o *DeleteIPAMIPFailure) Error() string { 145 return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpAMIpFailure %+v", 500, o.Payload) 146 } 147 148 func (o *DeleteIPAMIPFailure) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { 149 150 // response payload 151 if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { 152 return err 153 } 154 155 return nil 156 } 157 158 // NewDeleteIPAMIPDisabled creates a DeleteIPAMIPDisabled with default headers values 159 func NewDeleteIPAMIPDisabled() *DeleteIPAMIPDisabled { 160 return &DeleteIPAMIPDisabled{} 161 } 162 163 /*DeleteIPAMIPDisabled handles this case with default header values. 164 165 Allocation for address family disabled 166 */ 167 type DeleteIPAMIPDisabled struct { 168 } 169 170 func (o *DeleteIPAMIPDisabled) Error() string { 171 return fmt.Sprintf("[DELETE /ipam/{ip}][%d] deleteIpAMIpDisabled ", 501) 172 } 173 174 func (o *DeleteIPAMIPDisabled) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { 175 176 return nil 177 }