// 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 company_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/work/lib/api/research/research_models"
)

// DeleteCompanyServiceReader is a Reader for the DeleteCompanyService structure.
type DeleteCompanyServiceReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *DeleteCompanyServiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewDeleteCompanyServiceOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewDeleteCompanyServiceUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewDeleteCompanyServiceForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewDeleteCompanyServiceNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewDeleteCompanyServiceUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewDeleteCompanyServiceInternalServerError()
		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())
	}
}

// NewDeleteCompanyServiceOK creates a DeleteCompanyServiceOK with default headers values
func NewDeleteCompanyServiceOK() *DeleteCompanyServiceOK {
	return &DeleteCompanyServiceOK{}
}

/*
DeleteCompanyServiceOK describes a response with status code 200, with default header values.

Response with Message Objects with Delete Status
*/
type DeleteCompanyServiceOK struct {
	AccessControlAllowOrigin string

	Payload *research_models.DeleteResponse
}

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

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

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

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

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

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

func (o *DeleteCompanyServiceOK) Error() string {
	return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceOK  %+v", 200, o.Payload)
}

func (o *DeleteCompanyServiceOK) String() string {
	return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceOK  %+v", 200, o.Payload)
}

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

func (o *DeleteCompanyServiceOK) 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 && err != io.EOF {
		return err
	}

	return nil
}

// NewDeleteCompanyServiceUnauthorized creates a DeleteCompanyServiceUnauthorized with default headers values
func NewDeleteCompanyServiceUnauthorized() *DeleteCompanyServiceUnauthorized {
	return &DeleteCompanyServiceUnauthorized{}
}

/*
DeleteCompanyServiceUnauthorized describes a response with status code 401, with default header values.

Access unauthorized, invalid API-KEY was used
*/
type DeleteCompanyServiceUnauthorized struct {
	AccessControlAllowOrigin string

	Payload *research_models.Error
}

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

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

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

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

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

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

func (o *DeleteCompanyServiceUnauthorized) Error() string {
	return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceUnauthorized  %+v", 401, o.Payload)
}

func (o *DeleteCompanyServiceUnauthorized) String() string {
	return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceUnauthorized  %+v", 401, o.Payload)
}

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

func (o *DeleteCompanyServiceUnauthorized) 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
}

// NewDeleteCompanyServiceForbidden creates a DeleteCompanyServiceForbidden with default headers values
func NewDeleteCompanyServiceForbidden() *DeleteCompanyServiceForbidden {
	return &DeleteCompanyServiceForbidden{}
}

/*
DeleteCompanyServiceForbidden describes a response with status code 403, with default header values.

Access forbidden, account lacks access
*/
type DeleteCompanyServiceForbidden struct {
	AccessControlAllowOrigin string

	Payload *research_models.Error
}

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

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

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

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

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

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

func (o *DeleteCompanyServiceForbidden) Error() string {
	return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceForbidden  %+v", 403, o.Payload)
}

func (o *DeleteCompanyServiceForbidden) String() string {
	return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceForbidden  %+v", 403, o.Payload)
}

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

func (o *DeleteCompanyServiceForbidden) 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
}

// NewDeleteCompanyServiceNotFound creates a DeleteCompanyServiceNotFound with default headers values
func NewDeleteCompanyServiceNotFound() *DeleteCompanyServiceNotFound {
	return &DeleteCompanyServiceNotFound{}
}

/*
DeleteCompanyServiceNotFound describes a response with status code 404, with default header values.

Resource was not found
*/
type DeleteCompanyServiceNotFound struct {
	AccessControlAllowOrigin string

	Payload *research_models.Error
}

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

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

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

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

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

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

func (o *DeleteCompanyServiceNotFound) Error() string {
	return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceNotFound  %+v", 404, o.Payload)
}

func (o *DeleteCompanyServiceNotFound) String() string {
	return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceNotFound  %+v", 404, o.Payload)
}

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

func (o *DeleteCompanyServiceNotFound) 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
}

// NewDeleteCompanyServiceUnprocessableEntity creates a DeleteCompanyServiceUnprocessableEntity with default headers values
func NewDeleteCompanyServiceUnprocessableEntity() *DeleteCompanyServiceUnprocessableEntity {
	return &DeleteCompanyServiceUnprocessableEntity{}
}

/*
DeleteCompanyServiceUnprocessableEntity describes a response with status code 422, with default header values.

Unprocessable Entity, likely a bad parameter
*/
type DeleteCompanyServiceUnprocessableEntity struct {
	AccessControlAllowOrigin string

	Payload *research_models.Error
}

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

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

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

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

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

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

func (o *DeleteCompanyServiceUnprocessableEntity) Error() string {
	return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *DeleteCompanyServiceUnprocessableEntity) String() string {
	return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceUnprocessableEntity  %+v", 422, o.Payload)
}

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

func (o *DeleteCompanyServiceUnprocessableEntity) 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
}

// NewDeleteCompanyServiceInternalServerError creates a DeleteCompanyServiceInternalServerError with default headers values
func NewDeleteCompanyServiceInternalServerError() *DeleteCompanyServiceInternalServerError {
	return &DeleteCompanyServiceInternalServerError{}
}

/*
DeleteCompanyServiceInternalServerError describes a response with status code 500, with default header values.

Server Internal Error
*/
type DeleteCompanyServiceInternalServerError struct {
	AccessControlAllowOrigin string

	Payload *research_models.Error
}

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

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

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

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

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

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

func (o *DeleteCompanyServiceInternalServerError) Error() string {
	return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceInternalServerError  %+v", 500, o.Payload)
}

func (o *DeleteCompanyServiceInternalServerError) String() string {
	return fmt.Sprintf("[DELETE /companyservices][%d] deleteCompanyServiceInternalServerError  %+v", 500, o.Payload)
}

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

func (o *DeleteCompanyServiceInternalServerError) 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
}
