// Code generated by go-swagger; DO NOT EDIT.

// (c) 2012-2023 by Vernon Keenan
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package industry_products

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

Response with Industry objects
*/
type GetIndustryProductsOK struct {
	Payload *sfgate_models.IndustryProductResponse
}

// IsSuccess returns true when this get industry products o k response has a 2xx status code
func (o *GetIndustryProductsOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this get industry products o k response has a 3xx status code
func (o *GetIndustryProductsOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get industry products o k response has a 4xx status code
func (o *GetIndustryProductsOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this get industry products o k response has a 5xx status code
func (o *GetIndustryProductsOK) IsServerError() bool {
	return false
}

// IsCode returns true when this get industry products o k response a status code equal to that given
func (o *GetIndustryProductsOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the get industry products o k response
func (o *GetIndustryProductsOK) Code() int {
	return 200
}

func (o *GetIndustryProductsOK) Error() string {
	return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsOK  %+v", 200, o.Payload)
}

func (o *GetIndustryProductsOK) String() 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 {

	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 {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this get industry products unauthorized response has a 2xx status code
func (o *GetIndustryProductsUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get industry products unauthorized response has a 3xx status code
func (o *GetIndustryProductsUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get industry products unauthorized response has a 4xx status code
func (o *GetIndustryProductsUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this get industry products unauthorized response has a 5xx status code
func (o *GetIndustryProductsUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this get industry products unauthorized response a status code equal to that given
func (o *GetIndustryProductsUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the get industry products unauthorized response
func (o *GetIndustryProductsUnauthorized) Code() int {
	return 401
}

func (o *GetIndustryProductsUnauthorized) Error() string {
	return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsUnauthorized  %+v", 401, o.Payload)
}

func (o *GetIndustryProductsUnauthorized) String() 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 {

	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 {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this get industry products forbidden response has a 2xx status code
func (o *GetIndustryProductsForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get industry products forbidden response has a 3xx status code
func (o *GetIndustryProductsForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get industry products forbidden response has a 4xx status code
func (o *GetIndustryProductsForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this get industry products forbidden response has a 5xx status code
func (o *GetIndustryProductsForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this get industry products forbidden response a status code equal to that given
func (o *GetIndustryProductsForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the get industry products forbidden response
func (o *GetIndustryProductsForbidden) Code() int {
	return 403
}

func (o *GetIndustryProductsForbidden) Error() string {
	return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsForbidden  %+v", 403, o.Payload)
}

func (o *GetIndustryProductsForbidden) String() 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 {

	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 {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this get industry products not found response has a 2xx status code
func (o *GetIndustryProductsNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get industry products not found response has a 3xx status code
func (o *GetIndustryProductsNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get industry products not found response has a 4xx status code
func (o *GetIndustryProductsNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this get industry products not found response has a 5xx status code
func (o *GetIndustryProductsNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this get industry products not found response a status code equal to that given
func (o *GetIndustryProductsNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the get industry products not found response
func (o *GetIndustryProductsNotFound) Code() int {
	return 404
}

func (o *GetIndustryProductsNotFound) Error() string {
	return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsNotFound  %+v", 404, o.Payload)
}

func (o *GetIndustryProductsNotFound) String() 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 {

	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 {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this get industry products unprocessable entity response has a 2xx status code
func (o *GetIndustryProductsUnprocessableEntity) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get industry products unprocessable entity response has a 3xx status code
func (o *GetIndustryProductsUnprocessableEntity) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get industry products unprocessable entity response has a 4xx status code
func (o *GetIndustryProductsUnprocessableEntity) IsClientError() bool {
	return true
}

// IsServerError returns true when this get industry products unprocessable entity response has a 5xx status code
func (o *GetIndustryProductsUnprocessableEntity) IsServerError() bool {
	return false
}

// IsCode returns true when this get industry products unprocessable entity response a status code equal to that given
func (o *GetIndustryProductsUnprocessableEntity) IsCode(code int) bool {
	return code == 422
}

// Code gets the status code for the get industry products unprocessable entity response
func (o *GetIndustryProductsUnprocessableEntity) Code() int {
	return 422
}

func (o *GetIndustryProductsUnprocessableEntity) Error() string {
	return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *GetIndustryProductsUnprocessableEntity) String() 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 {

	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 {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this get industry products internal server error response has a 2xx status code
func (o *GetIndustryProductsInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this get industry products internal server error response has a 3xx status code
func (o *GetIndustryProductsInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this get industry products internal server error response has a 4xx status code
func (o *GetIndustryProductsInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this get industry products internal server error response has a 5xx status code
func (o *GetIndustryProductsInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this get industry products internal server error response a status code equal to that given
func (o *GetIndustryProductsInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the get industry products internal server error response
func (o *GetIndustryProductsInternalServerError) Code() int {
	return 500
}

func (o *GetIndustryProductsInternalServerError) Error() string {
	return fmt.Sprintf("[GET /industryproducts][%d] getIndustryProductsInternalServerError  %+v", 500, o.Payload)
}

func (o *GetIndustryProductsInternalServerError) String() 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 {

	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
}
