github.com/kubearmor/cilium@v1.6.12/api/v1/client/endpoint/get_endpoint_id_log_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 "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 // GetEndpointIDLogReader is a Reader for the GetEndpointIDLog structure. 20 type GetEndpointIDLogReader struct { 21 formats strfmt.Registry 22 } 23 24 // ReadResponse reads a server response into the received o. 25 func (o *GetEndpointIDLogReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { 26 switch response.Code() { 27 28 case 200: 29 result := NewGetEndpointIDLogOK() 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 := NewGetEndpointIDLogInvalid() 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 := NewGetEndpointIDLogNotFound() 44 if err := result.readResponse(response, consumer, o.formats); err != nil { 45 return nil, err 46 } 47 return nil, result 48 49 default: 50 return nil, runtime.NewAPIError("unknown error", response, response.Code()) 51 } 52 } 53 54 // NewGetEndpointIDLogOK creates a GetEndpointIDLogOK with default headers values 55 func NewGetEndpointIDLogOK() *GetEndpointIDLogOK { 56 return &GetEndpointIDLogOK{} 57 } 58 59 /*GetEndpointIDLogOK handles this case with default header values. 60 61 Success 62 */ 63 type GetEndpointIDLogOK struct { 64 Payload models.EndpointStatusLog 65 } 66 67 func (o *GetEndpointIDLogOK) Error() string { 68 return fmt.Sprintf("[GET /endpoint/{id}/log][%d] getEndpointIdLogOK %+v", 200, o.Payload) 69 } 70 71 func (o *GetEndpointIDLogOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { 72 73 // response payload 74 if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { 75 return err 76 } 77 78 return nil 79 } 80 81 // NewGetEndpointIDLogInvalid creates a GetEndpointIDLogInvalid with default headers values 82 func NewGetEndpointIDLogInvalid() *GetEndpointIDLogInvalid { 83 return &GetEndpointIDLogInvalid{} 84 } 85 86 /*GetEndpointIDLogInvalid handles this case with default header values. 87 88 Invalid identity provided 89 */ 90 type GetEndpointIDLogInvalid struct { 91 } 92 93 func (o *GetEndpointIDLogInvalid) Error() string { 94 return fmt.Sprintf("[GET /endpoint/{id}/log][%d] getEndpointIdLogInvalid ", 400) 95 } 96 97 func (o *GetEndpointIDLogInvalid) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { 98 99 return nil 100 } 101 102 // NewGetEndpointIDLogNotFound creates a GetEndpointIDLogNotFound with default headers values 103 func NewGetEndpointIDLogNotFound() *GetEndpointIDLogNotFound { 104 return &GetEndpointIDLogNotFound{} 105 } 106 107 /*GetEndpointIDLogNotFound handles this case with default header values. 108 109 Endpoint not found 110 */ 111 type GetEndpointIDLogNotFound struct { 112 } 113 114 func (o *GetEndpointIDLogNotFound) Error() string { 115 return fmt.Sprintf("[GET /endpoint/{id}/log][%d] getEndpointIdLogNotFound ", 404) 116 } 117 118 func (o *GetEndpointIDLogNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { 119 120 return nil 121 }