// Code generated by go-swagger; DO NOT EDIT. package reseller_management // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" "github.com/Cyclops-Labs/cyclops-4-hpc.git/services/customerdb/models" ) // GetResellerReader is a Reader for the GetReseller structure. type GetResellerReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *GetResellerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetResellerOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 404: result := NewGetResellerNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewGetResellerInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("unknown error", response, response.Code()) } } // NewGetResellerOK creates a GetResellerOK with default headers values func NewGetResellerOK() *GetResellerOK { return &GetResellerOK{} } /*GetResellerOK handles this case with default header values. Reseller with the id given in the system returned */ type GetResellerOK struct { Payload *models.Reseller } func (o *GetResellerOK) Error() string { return fmt.Sprintf("[GET /reseller/{id}][%d] getResellerOK %+v", 200, o.Payload) } func (o *GetResellerOK) GetPayload() *models.Reseller { return o.Payload } func (o *GetResellerOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.Reseller) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetResellerNotFound creates a GetResellerNotFound with default headers values func NewGetResellerNotFound() *GetResellerNotFound { return &GetResellerNotFound{} } /*GetResellerNotFound handles this case with default header values. The reseller with the given id wasn't found */ type GetResellerNotFound struct { Payload *models.ErrorResponse } func (o *GetResellerNotFound) Error() string { return fmt.Sprintf("[GET /reseller/{id}][%d] getResellerNotFound %+v", 404, o.Payload) } func (o *GetResellerNotFound) GetPayload() *models.ErrorResponse { return o.Payload } func (o *GetResellerNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ErrorResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetResellerInternalServerError creates a GetResellerInternalServerError with default headers values func NewGetResellerInternalServerError() *GetResellerInternalServerError { return &GetResellerInternalServerError{} } /*GetResellerInternalServerError handles this case with default header values. Something unexpected happend, error raised */ type GetResellerInternalServerError struct { Payload *models.ErrorResponse } func (o *GetResellerInternalServerError) Error() string { return fmt.Sprintf("[GET /reseller/{id}][%d] getResellerInternalServerError %+v", 500, o.Payload) } func (o *GetResellerInternalServerError) GetPayload() *models.ErrorResponse { return o.Payload } func (o *GetResellerInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { o.Payload = new(models.ErrorResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil }