// Code generated by go-swagger; DO NOT EDIT. // All Code Copyright(c) 2018-2020 by Taxnexus, Inc. // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed package county // 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" "code.tnxs.net/taxnexus/lib/api/render/render_models" ) // GetRenderCountyReader is a Reader for the GetRenderCounty structure. type GetRenderCountyReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *GetRenderCountyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetRenderCountyOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 401: result := NewGetRenderCountyUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewGetRenderCountyForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewGetRenderCountyNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 422: result := NewGetRenderCountyUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewGetRenderCountyInternalServerError() 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()) } } // NewGetRenderCountyOK creates a GetRenderCountyOK with default headers values func NewGetRenderCountyOK() *GetRenderCountyOK { return &GetRenderCountyOK{} } /*GetRenderCountyOK handles this case with default header values. Rendered documents response */ type GetRenderCountyOK struct { AccessControlAllowOrigin string Payload *render_models.DocumentResponse } func (o *GetRenderCountyOK) Error() string { return fmt.Sprintf("[GET /counties][%d] getRenderCountyOK %+v", 200, o.Payload) } func (o *GetRenderCountyOK) GetPayload() *render_models.DocumentResponse { return o.Payload } func (o *GetRenderCountyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response header Access-Control-Allow-Origin o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") o.Payload = new(render_models.DocumentResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetRenderCountyUnauthorized creates a GetRenderCountyUnauthorized with default headers values func NewGetRenderCountyUnauthorized() *GetRenderCountyUnauthorized { return &GetRenderCountyUnauthorized{} } /*GetRenderCountyUnauthorized handles this case with default header values. Access unauthorized, invalid API-KEY was used */ type GetRenderCountyUnauthorized struct { AccessControlAllowOrigin string Payload *render_models.Error } func (o *GetRenderCountyUnauthorized) Error() string { return fmt.Sprintf("[GET /counties][%d] getRenderCountyUnauthorized %+v", 401, o.Payload) } func (o *GetRenderCountyUnauthorized) GetPayload() *render_models.Error { return o.Payload } func (o *GetRenderCountyUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response header Access-Control-Allow-Origin o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") o.Payload = new(render_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetRenderCountyForbidden creates a GetRenderCountyForbidden with default headers values func NewGetRenderCountyForbidden() *GetRenderCountyForbidden { return &GetRenderCountyForbidden{} } /*GetRenderCountyForbidden handles this case with default header values. Access forbidden, account lacks access */ type GetRenderCountyForbidden struct { AccessControlAllowOrigin string Payload *render_models.Error } func (o *GetRenderCountyForbidden) Error() string { return fmt.Sprintf("[GET /counties][%d] getRenderCountyForbidden %+v", 403, o.Payload) } func (o *GetRenderCountyForbidden) GetPayload() *render_models.Error { return o.Payload } func (o *GetRenderCountyForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response header Access-Control-Allow-Origin o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") o.Payload = new(render_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetRenderCountyNotFound creates a GetRenderCountyNotFound with default headers values func NewGetRenderCountyNotFound() *GetRenderCountyNotFound { return &GetRenderCountyNotFound{} } /*GetRenderCountyNotFound handles this case with default header values. Resource was not found */ type GetRenderCountyNotFound struct { AccessControlAllowOrigin string Payload *render_models.Error } func (o *GetRenderCountyNotFound) Error() string { return fmt.Sprintf("[GET /counties][%d] getRenderCountyNotFound %+v", 404, o.Payload) } func (o *GetRenderCountyNotFound) GetPayload() *render_models.Error { return o.Payload } func (o *GetRenderCountyNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response header Access-Control-Allow-Origin o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") o.Payload = new(render_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetRenderCountyUnprocessableEntity creates a GetRenderCountyUnprocessableEntity with default headers values func NewGetRenderCountyUnprocessableEntity() *GetRenderCountyUnprocessableEntity { return &GetRenderCountyUnprocessableEntity{} } /*GetRenderCountyUnprocessableEntity handles this case with default header values. Unprocessable Entity, likely a bad parameter */ type GetRenderCountyUnprocessableEntity struct { AccessControlAllowOrigin string Payload *render_models.Error } func (o *GetRenderCountyUnprocessableEntity) Error() string { return fmt.Sprintf("[GET /counties][%d] getRenderCountyUnprocessableEntity %+v", 422, o.Payload) } func (o *GetRenderCountyUnprocessableEntity) GetPayload() *render_models.Error { return o.Payload } func (o *GetRenderCountyUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response header Access-Control-Allow-Origin o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") o.Payload = new(render_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetRenderCountyInternalServerError creates a GetRenderCountyInternalServerError with default headers values func NewGetRenderCountyInternalServerError() *GetRenderCountyInternalServerError { return &GetRenderCountyInternalServerError{} } /*GetRenderCountyInternalServerError handles this case with default header values. Server Internal Error */ type GetRenderCountyInternalServerError struct { AccessControlAllowOrigin string Payload *render_models.Error } func (o *GetRenderCountyInternalServerError) Error() string { return fmt.Sprintf("[GET /counties][%d] getRenderCountyInternalServerError %+v", 500, o.Payload) } func (o *GetRenderCountyInternalServerError) GetPayload() *render_models.Error { return o.Payload } func (o *GetRenderCountyInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // response header Access-Control-Allow-Origin o.AccessControlAllowOrigin = response.GetHeader("Access-Control-Allow-Origin") o.Payload = new(render_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil }