// Code generated by go-swagger; DO NOT EDIT. // (c) 2012-2020 by Taxnexus, Inc. // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed package industryproducts // 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/vernonkeenan/lib/api/sfgate/sfgate_models" ) // GetIndustryProductsReader is a Reader for the GetIndustryProducts structure. type GetIndustryProductsReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *GetIndustryProductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetIndustryProductsOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 401: result := NewGetIndustryProductsUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewGetIndustryProductsForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewGetIndustryProductsNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 422: result := NewGetIndustryProductsUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewGetIndustryProductsInternalServerError() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result default: return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) } } // NewGetIndustryProductsOK creates a GetIndustryProductsOK with default headers values func NewGetIndustryProductsOK() *GetIndustryProductsOK { return &GetIndustryProductsOK{} } /* GetIndustryProductsOK describes a response with status code 200, with default header values. Taxnexus Response with Industry objects */ type GetIndustryProductsOK struct { AccessControlAllowOrigin string CacheControl string Payload *sfgate_models.IndustryProductResponse } func (o *GetIndustryProductsOK) Error() string { return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsOK %+v", 200, o.Payload) } func (o *GetIndustryProductsOK) GetPayload() *sfgate_models.IndustryProductResponse { return o.Payload } func (o *GetIndustryProductsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Access-Control-Allow-Origin hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") if hdrAccessControlAllowOrigin != "" { o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin } // hydrates response header Cache-Control hdrCacheControl := response.GetHeader("Cache-Control") if hdrCacheControl != "" { o.CacheControl = hdrCacheControl } o.Payload = new(sfgate_models.IndustryProductResponse) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetIndustryProductsUnauthorized creates a GetIndustryProductsUnauthorized with default headers values func NewGetIndustryProductsUnauthorized() *GetIndustryProductsUnauthorized { return &GetIndustryProductsUnauthorized{} } /* GetIndustryProductsUnauthorized describes a response with status code 401, with default header values. Access unauthorized, invalid API-KEY was used */ type GetIndustryProductsUnauthorized struct { AccessControlAllowOrigin string Payload *sfgate_models.Error } func (o *GetIndustryProductsUnauthorized) Error() string { return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsUnauthorized %+v", 401, o.Payload) } func (o *GetIndustryProductsUnauthorized) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetIndustryProductsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Access-Control-Allow-Origin hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") if hdrAccessControlAllowOrigin != "" { o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin } o.Payload = new(sfgate_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetIndustryProductsForbidden creates a GetIndustryProductsForbidden with default headers values func NewGetIndustryProductsForbidden() *GetIndustryProductsForbidden { return &GetIndustryProductsForbidden{} } /* GetIndustryProductsForbidden describes a response with status code 403, with default header values. Access forbidden, account lacks access */ type GetIndustryProductsForbidden struct { AccessControlAllowOrigin string Payload *sfgate_models.Error } func (o *GetIndustryProductsForbidden) Error() string { return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsForbidden %+v", 403, o.Payload) } func (o *GetIndustryProductsForbidden) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetIndustryProductsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Access-Control-Allow-Origin hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") if hdrAccessControlAllowOrigin != "" { o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin } o.Payload = new(sfgate_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetIndustryProductsNotFound creates a GetIndustryProductsNotFound with default headers values func NewGetIndustryProductsNotFound() *GetIndustryProductsNotFound { return &GetIndustryProductsNotFound{} } /* GetIndustryProductsNotFound describes a response with status code 404, with default header values. Resource was not found */ type GetIndustryProductsNotFound struct { AccessControlAllowOrigin string Payload *sfgate_models.Error } func (o *GetIndustryProductsNotFound) Error() string { return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsNotFound %+v", 404, o.Payload) } func (o *GetIndustryProductsNotFound) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetIndustryProductsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Access-Control-Allow-Origin hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") if hdrAccessControlAllowOrigin != "" { o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin } o.Payload = new(sfgate_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetIndustryProductsUnprocessableEntity creates a GetIndustryProductsUnprocessableEntity with default headers values func NewGetIndustryProductsUnprocessableEntity() *GetIndustryProductsUnprocessableEntity { return &GetIndustryProductsUnprocessableEntity{} } /* GetIndustryProductsUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity, likely a bad parameter */ type GetIndustryProductsUnprocessableEntity struct { AccessControlAllowOrigin string Payload *sfgate_models.Error } func (o *GetIndustryProductsUnprocessableEntity) Error() string { return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsUnprocessableEntity %+v", 422, o.Payload) } func (o *GetIndustryProductsUnprocessableEntity) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetIndustryProductsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Access-Control-Allow-Origin hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") if hdrAccessControlAllowOrigin != "" { o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin } o.Payload = new(sfgate_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetIndustryProductsInternalServerError creates a GetIndustryProductsInternalServerError with default headers values func NewGetIndustryProductsInternalServerError() *GetIndustryProductsInternalServerError { return &GetIndustryProductsInternalServerError{} } /* GetIndustryProductsInternalServerError describes a response with status code 500, with default header values. Server Internal Error */ type GetIndustryProductsInternalServerError struct { AccessControlAllowOrigin string Payload *sfgate_models.Error } func (o *GetIndustryProductsInternalServerError) Error() string { return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsInternalServerError %+v", 500, o.Payload) } func (o *GetIndustryProductsInternalServerError) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetIndustryProductsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { // hydrates response header Access-Control-Allow-Origin hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin") if hdrAccessControlAllowOrigin != "" { o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin } o.Payload = new(sfgate_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil }