lib/api/research/research_client/industry_services/get_industry_services_respo...

523 lines
17 KiB
Go

// 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_services
// 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"
)
// GetIndustryServicesReader is a Reader for the GetIndustryServices structure.
type GetIndustryServicesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetIndustryServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetIndustryServicesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetIndustryServicesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetIndustryServicesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetIndustryServicesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetIndustryServicesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetIndustryServicesInternalServerError()
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())
}
}
// NewGetIndustryServicesOK creates a GetIndustryServicesOK with default headers values
func NewGetIndustryServicesOK() *GetIndustryServicesOK {
return &GetIndustryServicesOK{}
}
/*
GetIndustryServicesOK describes a response with status code 200, with default header values.
Response with IndustryService objects
*/
type GetIndustryServicesOK struct {
Payload *research_models.IndustryServiceResponse
}
// IsSuccess returns true when this get industry services o k response has a 2xx status code
func (o *GetIndustryServicesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get industry services o k response has a 3xx status code
func (o *GetIndustryServicesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get industry services o k response has a 4xx status code
func (o *GetIndustryServicesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get industry services o k response has a 5xx status code
func (o *GetIndustryServicesOK) IsServerError() bool {
return false
}
// IsCode returns true when this get industry services o k response a status code equal to that given
func (o *GetIndustryServicesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get industry services o k response
func (o *GetIndustryServicesOK) Code() int {
return 200
}
func (o *GetIndustryServicesOK) Error() string {
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesOK %+v", 200, o.Payload)
}
func (o *GetIndustryServicesOK) String() string {
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesOK %+v", 200, o.Payload)
}
func (o *GetIndustryServicesOK) GetPayload() *research_models.IndustryServiceResponse {
return o.Payload
}
func (o *GetIndustryServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(research_models.IndustryServiceResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetIndustryServicesUnauthorized creates a GetIndustryServicesUnauthorized with default headers values
func NewGetIndustryServicesUnauthorized() *GetIndustryServicesUnauthorized {
return &GetIndustryServicesUnauthorized{}
}
/*
GetIndustryServicesUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type GetIndustryServicesUnauthorized struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
// IsSuccess returns true when this get industry services unauthorized response has a 2xx status code
func (o *GetIndustryServicesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get industry services unauthorized response has a 3xx status code
func (o *GetIndustryServicesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get industry services unauthorized response has a 4xx status code
func (o *GetIndustryServicesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get industry services unauthorized response has a 5xx status code
func (o *GetIndustryServicesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get industry services unauthorized response a status code equal to that given
func (o *GetIndustryServicesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get industry services unauthorized response
func (o *GetIndustryServicesUnauthorized) Code() int {
return 401
}
func (o *GetIndustryServicesUnauthorized) Error() string {
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnauthorized %+v", 401, o.Payload)
}
func (o *GetIndustryServicesUnauthorized) String() string {
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnauthorized %+v", 401, o.Payload)
}
func (o *GetIndustryServicesUnauthorized) GetPayload() *research_models.Error {
return o.Payload
}
func (o *GetIndustryServicesUnauthorized) 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
}
// NewGetIndustryServicesForbidden creates a GetIndustryServicesForbidden with default headers values
func NewGetIndustryServicesForbidden() *GetIndustryServicesForbidden {
return &GetIndustryServicesForbidden{}
}
/*
GetIndustryServicesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type GetIndustryServicesForbidden struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
// IsSuccess returns true when this get industry services forbidden response has a 2xx status code
func (o *GetIndustryServicesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get industry services forbidden response has a 3xx status code
func (o *GetIndustryServicesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get industry services forbidden response has a 4xx status code
func (o *GetIndustryServicesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get industry services forbidden response has a 5xx status code
func (o *GetIndustryServicesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get industry services forbidden response a status code equal to that given
func (o *GetIndustryServicesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get industry services forbidden response
func (o *GetIndustryServicesForbidden) Code() int {
return 403
}
func (o *GetIndustryServicesForbidden) Error() string {
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesForbidden %+v", 403, o.Payload)
}
func (o *GetIndustryServicesForbidden) String() string {
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesForbidden %+v", 403, o.Payload)
}
func (o *GetIndustryServicesForbidden) GetPayload() *research_models.Error {
return o.Payload
}
func (o *GetIndustryServicesForbidden) 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
}
// NewGetIndustryServicesNotFound creates a GetIndustryServicesNotFound with default headers values
func NewGetIndustryServicesNotFound() *GetIndustryServicesNotFound {
return &GetIndustryServicesNotFound{}
}
/*
GetIndustryServicesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type GetIndustryServicesNotFound struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
// IsSuccess returns true when this get industry services not found response has a 2xx status code
func (o *GetIndustryServicesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get industry services not found response has a 3xx status code
func (o *GetIndustryServicesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get industry services not found response has a 4xx status code
func (o *GetIndustryServicesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get industry services not found response has a 5xx status code
func (o *GetIndustryServicesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get industry services not found response a status code equal to that given
func (o *GetIndustryServicesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get industry services not found response
func (o *GetIndustryServicesNotFound) Code() int {
return 404
}
func (o *GetIndustryServicesNotFound) Error() string {
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesNotFound %+v", 404, o.Payload)
}
func (o *GetIndustryServicesNotFound) String() string {
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesNotFound %+v", 404, o.Payload)
}
func (o *GetIndustryServicesNotFound) GetPayload() *research_models.Error {
return o.Payload
}
func (o *GetIndustryServicesNotFound) 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
}
// NewGetIndustryServicesUnprocessableEntity creates a GetIndustryServicesUnprocessableEntity with default headers values
func NewGetIndustryServicesUnprocessableEntity() *GetIndustryServicesUnprocessableEntity {
return &GetIndustryServicesUnprocessableEntity{}
}
/*
GetIndustryServicesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type GetIndustryServicesUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
// IsSuccess returns true when this get industry services unprocessable entity response has a 2xx status code
func (o *GetIndustryServicesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get industry services unprocessable entity response has a 3xx status code
func (o *GetIndustryServicesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get industry services unprocessable entity response has a 4xx status code
func (o *GetIndustryServicesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get industry services unprocessable entity response has a 5xx status code
func (o *GetIndustryServicesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get industry services unprocessable entity response a status code equal to that given
func (o *GetIndustryServicesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get industry services unprocessable entity response
func (o *GetIndustryServicesUnprocessableEntity) Code() int {
return 422
}
func (o *GetIndustryServicesUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetIndustryServicesUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *GetIndustryServicesUnprocessableEntity) GetPayload() *research_models.Error {
return o.Payload
}
func (o *GetIndustryServicesUnprocessableEntity) 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
}
// NewGetIndustryServicesInternalServerError creates a GetIndustryServicesInternalServerError with default headers values
func NewGetIndustryServicesInternalServerError() *GetIndustryServicesInternalServerError {
return &GetIndustryServicesInternalServerError{}
}
/*
GetIndustryServicesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type GetIndustryServicesInternalServerError struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
// IsSuccess returns true when this get industry services internal server error response has a 2xx status code
func (o *GetIndustryServicesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get industry services internal server error response has a 3xx status code
func (o *GetIndustryServicesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get industry services internal server error response has a 4xx status code
func (o *GetIndustryServicesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get industry services internal server error response has a 5xx status code
func (o *GetIndustryServicesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get industry services internal server error response a status code equal to that given
func (o *GetIndustryServicesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get industry services internal server error response
func (o *GetIndustryServicesInternalServerError) Code() int {
return 500
}
func (o *GetIndustryServicesInternalServerError) Error() string {
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesInternalServerError %+v", 500, o.Payload)
}
func (o *GetIndustryServicesInternalServerError) String() string {
return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesInternalServerError %+v", 500, o.Payload)
}
func (o *GetIndustryServicesInternalServerError) GetPayload() *research_models.Error {
return o.Payload
}
func (o *GetIndustryServicesInternalServerError) 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
}