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

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

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

// DeleteIndustryCompanyReader is a Reader for the DeleteIndustryCompany structure.
type DeleteIndustryCompanyReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *DeleteIndustryCompanyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error) {
	switch response.Code() {
	case 200:
		result := NewDeleteIndustryCompanyOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewDeleteIndustryCompanyUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewDeleteIndustryCompanyForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewDeleteIndustryCompanyNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewDeleteIndustryCompanyUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewDeleteIndustryCompanyInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("[DELETE /industrycompanies] deleteIndustryCompany", response, response.Code())
	}
}

// NewDeleteIndustryCompanyOK creates a DeleteIndustryCompanyOK with default headers values
func NewDeleteIndustryCompanyOK() *DeleteIndustryCompanyOK {
	return &DeleteIndustryCompanyOK{}
}

// DeleteIndustryCompanyOK describes a response with status code 200, with default header values.
//
// Response with Message Objects with Delete Status
type DeleteIndustryCompanyOK struct {
	AccessControlAllowOrigin string

	Payload *research_models.DeleteResponse
}

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

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

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

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

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

// Code gets the status code for the delete industry company o k response
func (o *DeleteIndustryCompanyOK) Code() int {
	return 200
}

func (o *DeleteIndustryCompanyOK) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /industrycompanies][%d] deleteIndustryCompanyOK %s", 200, payload)
}

func (o *DeleteIndustryCompanyOK) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /industrycompanies][%d] deleteIndustryCompanyOK %s", 200, payload)
}

func (o *DeleteIndustryCompanyOK) GetPayload() *research_models.DeleteResponse {
	return o.Payload
}

func (o *DeleteIndustryCompanyOK) 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.DeleteResponse)

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

	return nil
}

// NewDeleteIndustryCompanyUnauthorized creates a DeleteIndustryCompanyUnauthorized with default headers values
func NewDeleteIndustryCompanyUnauthorized() *DeleteIndustryCompanyUnauthorized {
	return &DeleteIndustryCompanyUnauthorized{}
}

// DeleteIndustryCompanyUnauthorized describes a response with status code 401, with default header values.
//
// Access unauthorized, invalid API-KEY was used
type DeleteIndustryCompanyUnauthorized struct {
	AccessControlAllowOrigin string

	Payload *research_models.Error
}

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

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

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

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

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

// Code gets the status code for the delete industry company unauthorized response
func (o *DeleteIndustryCompanyUnauthorized) Code() int {
	return 401
}

func (o *DeleteIndustryCompanyUnauthorized) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /industrycompanies][%d] deleteIndustryCompanyUnauthorized %s", 401, payload)
}

func (o *DeleteIndustryCompanyUnauthorized) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /industrycompanies][%d] deleteIndustryCompanyUnauthorized %s", 401, payload)
}

func (o *DeleteIndustryCompanyUnauthorized) GetPayload() *research_models.Error {
	return o.Payload
}

func (o *DeleteIndustryCompanyUnauthorized) 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 && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}

// NewDeleteIndustryCompanyForbidden creates a DeleteIndustryCompanyForbidden with default headers values
func NewDeleteIndustryCompanyForbidden() *DeleteIndustryCompanyForbidden {
	return &DeleteIndustryCompanyForbidden{}
}

// DeleteIndustryCompanyForbidden describes a response with status code 403, with default header values.
//
// Access forbidden, account lacks access
type DeleteIndustryCompanyForbidden struct {
	AccessControlAllowOrigin string

	Payload *research_models.Error
}

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

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

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

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

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

// Code gets the status code for the delete industry company forbidden response
func (o *DeleteIndustryCompanyForbidden) Code() int {
	return 403
}

func (o *DeleteIndustryCompanyForbidden) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /industrycompanies][%d] deleteIndustryCompanyForbidden %s", 403, payload)
}

func (o *DeleteIndustryCompanyForbidden) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /industrycompanies][%d] deleteIndustryCompanyForbidden %s", 403, payload)
}

func (o *DeleteIndustryCompanyForbidden) GetPayload() *research_models.Error {
	return o.Payload
}

func (o *DeleteIndustryCompanyForbidden) 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 && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}

// NewDeleteIndustryCompanyNotFound creates a DeleteIndustryCompanyNotFound with default headers values
func NewDeleteIndustryCompanyNotFound() *DeleteIndustryCompanyNotFound {
	return &DeleteIndustryCompanyNotFound{}
}

// DeleteIndustryCompanyNotFound describes a response with status code 404, with default header values.
//
// Resource was not found
type DeleteIndustryCompanyNotFound struct {
	AccessControlAllowOrigin string

	Payload *research_models.Error
}

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

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

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

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

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

// Code gets the status code for the delete industry company not found response
func (o *DeleteIndustryCompanyNotFound) Code() int {
	return 404
}

func (o *DeleteIndustryCompanyNotFound) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /industrycompanies][%d] deleteIndustryCompanyNotFound %s", 404, payload)
}

func (o *DeleteIndustryCompanyNotFound) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /industrycompanies][%d] deleteIndustryCompanyNotFound %s", 404, payload)
}

func (o *DeleteIndustryCompanyNotFound) GetPayload() *research_models.Error {
	return o.Payload
}

func (o *DeleteIndustryCompanyNotFound) 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 && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}

// NewDeleteIndustryCompanyUnprocessableEntity creates a DeleteIndustryCompanyUnprocessableEntity with default headers values
func NewDeleteIndustryCompanyUnprocessableEntity() *DeleteIndustryCompanyUnprocessableEntity {
	return &DeleteIndustryCompanyUnprocessableEntity{}
}

// DeleteIndustryCompanyUnprocessableEntity describes a response with status code 422, with default header values.
//
// Unprocessable Entity, likely a bad parameter
type DeleteIndustryCompanyUnprocessableEntity struct {
	AccessControlAllowOrigin string

	Payload *research_models.Error
}

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

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

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

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

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

// Code gets the status code for the delete industry company unprocessable entity response
func (o *DeleteIndustryCompanyUnprocessableEntity) Code() int {
	return 422
}

func (o *DeleteIndustryCompanyUnprocessableEntity) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /industrycompanies][%d] deleteIndustryCompanyUnprocessableEntity %s", 422, payload)
}

func (o *DeleteIndustryCompanyUnprocessableEntity) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /industrycompanies][%d] deleteIndustryCompanyUnprocessableEntity %s", 422, payload)
}

func (o *DeleteIndustryCompanyUnprocessableEntity) GetPayload() *research_models.Error {
	return o.Payload
}

func (o *DeleteIndustryCompanyUnprocessableEntity) 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 && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}

// NewDeleteIndustryCompanyInternalServerError creates a DeleteIndustryCompanyInternalServerError with default headers values
func NewDeleteIndustryCompanyInternalServerError() *DeleteIndustryCompanyInternalServerError {
	return &DeleteIndustryCompanyInternalServerError{}
}

// DeleteIndustryCompanyInternalServerError describes a response with status code 500, with default header values.
//
// Server Internal Error
type DeleteIndustryCompanyInternalServerError struct {
	AccessControlAllowOrigin string

	Payload *research_models.Error
}

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

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

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

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

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

// Code gets the status code for the delete industry company internal server error response
func (o *DeleteIndustryCompanyInternalServerError) Code() int {
	return 500
}

func (o *DeleteIndustryCompanyInternalServerError) Error() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /industrycompanies][%d] deleteIndustryCompanyInternalServerError %s", 500, payload)
}

func (o *DeleteIndustryCompanyInternalServerError) String() string {
	payload, _ := json.Marshal(o.Payload)
	return fmt.Sprintf("[DELETE /industrycompanies][%d] deleteIndustryCompanyInternalServerError %s", 500, payload)
}

func (o *DeleteIndustryCompanyInternalServerError) GetPayload() *research_models.Error {
	return o.Payload
}

func (o *DeleteIndustryCompanyInternalServerError) 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 && !stderrors.Is(err, io.EOF) {
		return err
	}

	return nil
}
