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

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

// PutResearchProjectCompaniesReader is a Reader for the PutResearchProjectCompanies structure.
type PutResearchProjectCompaniesReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *PutResearchProjectCompaniesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPutResearchProjectCompaniesOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 401:
		result := NewPutResearchProjectCompaniesUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewPutResearchProjectCompaniesForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPutResearchProjectCompaniesNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 422:
		result := NewPutResearchProjectCompaniesUnprocessableEntity()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPutResearchProjectCompaniesInternalServerError()
		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())
	}
}

// NewPutResearchProjectCompaniesOK creates a PutResearchProjectCompaniesOK with default headers values
func NewPutResearchProjectCompaniesOK() *PutResearchProjectCompaniesOK {
	return &PutResearchProjectCompaniesOK{}
}

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

ResearchProjectCompany Response Object
*/
type PutResearchProjectCompaniesOK struct {
	Payload *sfgate_models.ResearchProjectCompanyResponse
}

// IsSuccess returns true when this put research project companies o k response has a 2xx status code
func (o *PutResearchProjectCompaniesOK) IsSuccess() bool {
	return true
}

// IsRedirect returns true when this put research project companies o k response has a 3xx status code
func (o *PutResearchProjectCompaniesOK) IsRedirect() bool {
	return false
}

// IsClientError returns true when this put research project companies o k response has a 4xx status code
func (o *PutResearchProjectCompaniesOK) IsClientError() bool {
	return false
}

// IsServerError returns true when this put research project companies o k response has a 5xx status code
func (o *PutResearchProjectCompaniesOK) IsServerError() bool {
	return false
}

// IsCode returns true when this put research project companies o k response a status code equal to that given
func (o *PutResearchProjectCompaniesOK) IsCode(code int) bool {
	return code == 200
}

// Code gets the status code for the put research project companies o k response
func (o *PutResearchProjectCompaniesOK) Code() int {
	return 200
}

func (o *PutResearchProjectCompaniesOK) Error() string {
	return fmt.Sprintf("[PUT /researchprojectcompanies][%d] putResearchProjectCompaniesOK  %+v", 200, o.Payload)
}

func (o *PutResearchProjectCompaniesOK) String() string {
	return fmt.Sprintf("[PUT /researchprojectcompanies][%d] putResearchProjectCompaniesOK  %+v", 200, o.Payload)
}

func (o *PutResearchProjectCompaniesOK) GetPayload() *sfgate_models.ResearchProjectCompanyResponse {
	return o.Payload
}

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

	o.Payload = new(sfgate_models.ResearchProjectCompanyResponse)

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

	return nil
}

// NewPutResearchProjectCompaniesUnauthorized creates a PutResearchProjectCompaniesUnauthorized with default headers values
func NewPutResearchProjectCompaniesUnauthorized() *PutResearchProjectCompaniesUnauthorized {
	return &PutResearchProjectCompaniesUnauthorized{}
}

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

Access unauthorized, invalid API-KEY was used
*/
type PutResearchProjectCompaniesUnauthorized struct {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this put research project companies unauthorized response has a 2xx status code
func (o *PutResearchProjectCompaniesUnauthorized) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this put research project companies unauthorized response has a 3xx status code
func (o *PutResearchProjectCompaniesUnauthorized) IsRedirect() bool {
	return false
}

// IsClientError returns true when this put research project companies unauthorized response has a 4xx status code
func (o *PutResearchProjectCompaniesUnauthorized) IsClientError() bool {
	return true
}

// IsServerError returns true when this put research project companies unauthorized response has a 5xx status code
func (o *PutResearchProjectCompaniesUnauthorized) IsServerError() bool {
	return false
}

// IsCode returns true when this put research project companies unauthorized response a status code equal to that given
func (o *PutResearchProjectCompaniesUnauthorized) IsCode(code int) bool {
	return code == 401
}

// Code gets the status code for the put research project companies unauthorized response
func (o *PutResearchProjectCompaniesUnauthorized) Code() int {
	return 401
}

func (o *PutResearchProjectCompaniesUnauthorized) Error() string {
	return fmt.Sprintf("[PUT /researchprojectcompanies][%d] putResearchProjectCompaniesUnauthorized  %+v", 401, o.Payload)
}

func (o *PutResearchProjectCompaniesUnauthorized) String() string {
	return fmt.Sprintf("[PUT /researchprojectcompanies][%d] putResearchProjectCompaniesUnauthorized  %+v", 401, o.Payload)
}

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

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

// NewPutResearchProjectCompaniesForbidden creates a PutResearchProjectCompaniesForbidden with default headers values
func NewPutResearchProjectCompaniesForbidden() *PutResearchProjectCompaniesForbidden {
	return &PutResearchProjectCompaniesForbidden{}
}

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

Access forbidden, account lacks access
*/
type PutResearchProjectCompaniesForbidden struct {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this put research project companies forbidden response has a 2xx status code
func (o *PutResearchProjectCompaniesForbidden) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this put research project companies forbidden response has a 3xx status code
func (o *PutResearchProjectCompaniesForbidden) IsRedirect() bool {
	return false
}

// IsClientError returns true when this put research project companies forbidden response has a 4xx status code
func (o *PutResearchProjectCompaniesForbidden) IsClientError() bool {
	return true
}

// IsServerError returns true when this put research project companies forbidden response has a 5xx status code
func (o *PutResearchProjectCompaniesForbidden) IsServerError() bool {
	return false
}

// IsCode returns true when this put research project companies forbidden response a status code equal to that given
func (o *PutResearchProjectCompaniesForbidden) IsCode(code int) bool {
	return code == 403
}

// Code gets the status code for the put research project companies forbidden response
func (o *PutResearchProjectCompaniesForbidden) Code() int {
	return 403
}

func (o *PutResearchProjectCompaniesForbidden) Error() string {
	return fmt.Sprintf("[PUT /researchprojectcompanies][%d] putResearchProjectCompaniesForbidden  %+v", 403, o.Payload)
}

func (o *PutResearchProjectCompaniesForbidden) String() string {
	return fmt.Sprintf("[PUT /researchprojectcompanies][%d] putResearchProjectCompaniesForbidden  %+v", 403, o.Payload)
}

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

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

// NewPutResearchProjectCompaniesNotFound creates a PutResearchProjectCompaniesNotFound with default headers values
func NewPutResearchProjectCompaniesNotFound() *PutResearchProjectCompaniesNotFound {
	return &PutResearchProjectCompaniesNotFound{}
}

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

Resource was not found
*/
type PutResearchProjectCompaniesNotFound struct {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this put research project companies not found response has a 2xx status code
func (o *PutResearchProjectCompaniesNotFound) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this put research project companies not found response has a 3xx status code
func (o *PutResearchProjectCompaniesNotFound) IsRedirect() bool {
	return false
}

// IsClientError returns true when this put research project companies not found response has a 4xx status code
func (o *PutResearchProjectCompaniesNotFound) IsClientError() bool {
	return true
}

// IsServerError returns true when this put research project companies not found response has a 5xx status code
func (o *PutResearchProjectCompaniesNotFound) IsServerError() bool {
	return false
}

// IsCode returns true when this put research project companies not found response a status code equal to that given
func (o *PutResearchProjectCompaniesNotFound) IsCode(code int) bool {
	return code == 404
}

// Code gets the status code for the put research project companies not found response
func (o *PutResearchProjectCompaniesNotFound) Code() int {
	return 404
}

func (o *PutResearchProjectCompaniesNotFound) Error() string {
	return fmt.Sprintf("[PUT /researchprojectcompanies][%d] putResearchProjectCompaniesNotFound  %+v", 404, o.Payload)
}

func (o *PutResearchProjectCompaniesNotFound) String() string {
	return fmt.Sprintf("[PUT /researchprojectcompanies][%d] putResearchProjectCompaniesNotFound  %+v", 404, o.Payload)
}

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

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

// NewPutResearchProjectCompaniesUnprocessableEntity creates a PutResearchProjectCompaniesUnprocessableEntity with default headers values
func NewPutResearchProjectCompaniesUnprocessableEntity() *PutResearchProjectCompaniesUnprocessableEntity {
	return &PutResearchProjectCompaniesUnprocessableEntity{}
}

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

Unprocessable Entity, likely a bad parameter
*/
type PutResearchProjectCompaniesUnprocessableEntity struct {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this put research project companies unprocessable entity response has a 2xx status code
func (o *PutResearchProjectCompaniesUnprocessableEntity) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this put research project companies unprocessable entity response has a 3xx status code
func (o *PutResearchProjectCompaniesUnprocessableEntity) IsRedirect() bool {
	return false
}

// IsClientError returns true when this put research project companies unprocessable entity response has a 4xx status code
func (o *PutResearchProjectCompaniesUnprocessableEntity) IsClientError() bool {
	return true
}

// IsServerError returns true when this put research project companies unprocessable entity response has a 5xx status code
func (o *PutResearchProjectCompaniesUnprocessableEntity) IsServerError() bool {
	return false
}

// IsCode returns true when this put research project companies unprocessable entity response a status code equal to that given
func (o *PutResearchProjectCompaniesUnprocessableEntity) IsCode(code int) bool {
	return code == 422
}

// Code gets the status code for the put research project companies unprocessable entity response
func (o *PutResearchProjectCompaniesUnprocessableEntity) Code() int {
	return 422
}

func (o *PutResearchProjectCompaniesUnprocessableEntity) Error() string {
	return fmt.Sprintf("[PUT /researchprojectcompanies][%d] putResearchProjectCompaniesUnprocessableEntity  %+v", 422, o.Payload)
}

func (o *PutResearchProjectCompaniesUnprocessableEntity) String() string {
	return fmt.Sprintf("[PUT /researchprojectcompanies][%d] putResearchProjectCompaniesUnprocessableEntity  %+v", 422, o.Payload)
}

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

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

// NewPutResearchProjectCompaniesInternalServerError creates a PutResearchProjectCompaniesInternalServerError with default headers values
func NewPutResearchProjectCompaniesInternalServerError() *PutResearchProjectCompaniesInternalServerError {
	return &PutResearchProjectCompaniesInternalServerError{}
}

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

Server Internal Error
*/
type PutResearchProjectCompaniesInternalServerError struct {
	Payload *sfgate_models.Error
}

// IsSuccess returns true when this put research project companies internal server error response has a 2xx status code
func (o *PutResearchProjectCompaniesInternalServerError) IsSuccess() bool {
	return false
}

// IsRedirect returns true when this put research project companies internal server error response has a 3xx status code
func (o *PutResearchProjectCompaniesInternalServerError) IsRedirect() bool {
	return false
}

// IsClientError returns true when this put research project companies internal server error response has a 4xx status code
func (o *PutResearchProjectCompaniesInternalServerError) IsClientError() bool {
	return false
}

// IsServerError returns true when this put research project companies internal server error response has a 5xx status code
func (o *PutResearchProjectCompaniesInternalServerError) IsServerError() bool {
	return true
}

// IsCode returns true when this put research project companies internal server error response a status code equal to that given
func (o *PutResearchProjectCompaniesInternalServerError) IsCode(code int) bool {
	return code == 500
}

// Code gets the status code for the put research project companies internal server error response
func (o *PutResearchProjectCompaniesInternalServerError) Code() int {
	return 500
}

func (o *PutResearchProjectCompaniesInternalServerError) Error() string {
	return fmt.Sprintf("[PUT /researchprojectcompanies][%d] putResearchProjectCompaniesInternalServerError  %+v", 500, o.Payload)
}

func (o *PutResearchProjectCompaniesInternalServerError) String() string {
	return fmt.Sprintf("[PUT /researchprojectcompanies][%d] putResearchProjectCompaniesInternalServerError  %+v", 500, o.Payload)
}

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

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