// 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 industry // 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/research/research_models" ) // GetIndustriesObservableReader is a Reader for the GetIndustriesObservable structure. type GetIndustriesObservableReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *GetIndustriesObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetIndustriesObservableOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 401: result := NewGetIndustriesObservableUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewGetIndustriesObservableForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewGetIndustriesObservableNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 422: result := NewGetIndustriesObservableUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewGetIndustriesObservableInternalServerError() 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()) } } // NewGetIndustriesObservableOK creates a GetIndustriesObservableOK with default headers values func NewGetIndustriesObservableOK() *GetIndustriesObservableOK { return &GetIndustriesObservableOK{} } /* GetIndustriesObservableOK describes a response with status code 200, with default header values. Taxnexus Response with an array of Industry objects */ type GetIndustriesObservableOK struct { AccessControlAllowOrigin string CacheControl string Payload []*research_models.Industry } func (o *GetIndustriesObservableOK) Error() string { return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableOK %+v", 200, o.Payload) } func (o *GetIndustriesObservableOK) GetPayload() []*research_models.Industry { return o.Payload } func (o *GetIndustriesObservableOK) 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 } // response payload if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetIndustriesObservableUnauthorized creates a GetIndustriesObservableUnauthorized with default headers values func NewGetIndustriesObservableUnauthorized() *GetIndustriesObservableUnauthorized { return &GetIndustriesObservableUnauthorized{} } /* GetIndustriesObservableUnauthorized describes a response with status code 401, with default header values. Access unauthorized, invalid API-KEY was used */ type GetIndustriesObservableUnauthorized struct { AccessControlAllowOrigin string Payload *research_models.Error } func (o *GetIndustriesObservableUnauthorized) Error() string { return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableUnauthorized %+v", 401, o.Payload) } func (o *GetIndustriesObservableUnauthorized) GetPayload() *research_models.Error { return o.Payload } func (o *GetIndustriesObservableUnauthorized) 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(research_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetIndustriesObservableForbidden creates a GetIndustriesObservableForbidden with default headers values func NewGetIndustriesObservableForbidden() *GetIndustriesObservableForbidden { return &GetIndustriesObservableForbidden{} } /* GetIndustriesObservableForbidden describes a response with status code 403, with default header values. Access forbidden, account lacks access */ type GetIndustriesObservableForbidden struct { AccessControlAllowOrigin string Payload *research_models.Error } func (o *GetIndustriesObservableForbidden) Error() string { return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableForbidden %+v", 403, o.Payload) } func (o *GetIndustriesObservableForbidden) GetPayload() *research_models.Error { return o.Payload } func (o *GetIndustriesObservableForbidden) 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(research_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetIndustriesObservableNotFound creates a GetIndustriesObservableNotFound with default headers values func NewGetIndustriesObservableNotFound() *GetIndustriesObservableNotFound { return &GetIndustriesObservableNotFound{} } /* GetIndustriesObservableNotFound describes a response with status code 404, with default header values. Resource was not found */ type GetIndustriesObservableNotFound struct { AccessControlAllowOrigin string Payload *research_models.Error } func (o *GetIndustriesObservableNotFound) Error() string { return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableNotFound %+v", 404, o.Payload) } func (o *GetIndustriesObservableNotFound) GetPayload() *research_models.Error { return o.Payload } func (o *GetIndustriesObservableNotFound) 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(research_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetIndustriesObservableUnprocessableEntity creates a GetIndustriesObservableUnprocessableEntity with default headers values func NewGetIndustriesObservableUnprocessableEntity() *GetIndustriesObservableUnprocessableEntity { return &GetIndustriesObservableUnprocessableEntity{} } /* GetIndustriesObservableUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity, likely a bad parameter */ type GetIndustriesObservableUnprocessableEntity struct { AccessControlAllowOrigin string Payload *research_models.Error } func (o *GetIndustriesObservableUnprocessableEntity) Error() string { return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableUnprocessableEntity %+v", 422, o.Payload) } func (o *GetIndustriesObservableUnprocessableEntity) GetPayload() *research_models.Error { return o.Payload } func (o *GetIndustriesObservableUnprocessableEntity) 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(research_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil } // NewGetIndustriesObservableInternalServerError creates a GetIndustriesObservableInternalServerError with default headers values func NewGetIndustriesObservableInternalServerError() *GetIndustriesObservableInternalServerError { return &GetIndustriesObservableInternalServerError{} } /* GetIndustriesObservableInternalServerError describes a response with status code 500, with default header values. Server Internal Error */ type GetIndustriesObservableInternalServerError struct { AccessControlAllowOrigin string Payload *research_models.Error } func (o *GetIndustriesObservableInternalServerError) Error() string { return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableInternalServerError %+v", 500, o.Payload) } func (o *GetIndustriesObservableInternalServerError) GetPayload() *research_models.Error { return o.Payload } func (o *GetIndustriesObservableInternalServerError) 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(research_models.Error) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { return err } return nil }