// 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

import (
	"encoding/json"
	stderrors "errors"
	"fmt"
	"io"

	"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
)

// 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) (any, 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("[GET /industryservices] getIndustryServices", 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 *sfgate_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 {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesOK %s", 200, payload)
}

func (o *GetIndustryServicesOK) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesOK %s", 200, payload)
}

func (o *GetIndustryServicesOK) GetPayload() *sfgate_models.IndustryServiceResponse {
	return o.Payload
}

func (o *GetIndustryServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(sfgate_models.IndustryServiceResponse)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(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 {
	Payload *sfgate_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 {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnauthorized %s", 401, payload)
}

func (o *GetIndustryServicesUnauthorized) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnauthorized %s", 401, payload)
}

func (o *GetIndustryServicesUnauthorized) GetPayload() *sfgate_models.Error {
	return o.Payload
}

func (o *GetIndustryServicesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(sfgate_models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(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 {
	Payload *sfgate_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 {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesForbidden %s", 403, payload)
}

func (o *GetIndustryServicesForbidden) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesForbidden %s", 403, payload)
}

func (o *GetIndustryServicesForbidden) GetPayload() *sfgate_models.Error {
	return o.Payload
}

func (o *GetIndustryServicesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(sfgate_models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(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 {
	Payload *sfgate_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 {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesNotFound %s", 404, payload)
}

func (o *GetIndustryServicesNotFound) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesNotFound %s", 404, payload)
}

func (o *GetIndustryServicesNotFound) GetPayload() *sfgate_models.Error {
	return o.Payload
}

func (o *GetIndustryServicesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(sfgate_models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(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 {
	Payload *sfgate_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 {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnprocessableEntity %s", 422, payload)
}

func (o *GetIndustryServicesUnprocessableEntity) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesUnprocessableEntity %s", 422, payload)
}

func (o *GetIndustryServicesUnprocessableEntity) GetPayload() *sfgate_models.Error {
	return o.Payload
}

func (o *GetIndustryServicesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(sfgate_models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(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 {
	Payload *sfgate_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 {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesInternalServerError %s", 500, payload)
}

func (o *GetIndustryServicesInternalServerError) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[GET /industryservices][%d] getIndustryServicesInternalServerError %s", 500, payload)
}

func (o *GetIndustryServicesInternalServerError) GetPayload() *sfgate_models.Error {
	return o.Payload
}

func (o *GetIndustryServicesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(sfgate_models.Error)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}
