// 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 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/vernonkeenan/lib/api/sfgate/sfgate_models" ) // GetResearchProjectCompaniesReader is a Reader for the GetResearchProjectCompanies structure. type GetResearchProjectCompaniesReader struct { formats strfmt.Registry } // ReadResponse reads a server response into the received o. func (o *GetResearchProjectCompaniesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { switch response.Code() { case 200: result := NewGetResearchProjectCompaniesOK() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return result, nil case 401: result := NewGetResearchProjectCompaniesUnauthorized() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 403: result := NewGetResearchProjectCompaniesForbidden() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 404: result := NewGetResearchProjectCompaniesNotFound() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 422: result := NewGetResearchProjectCompaniesUnprocessableEntity() if err := result.readResponse(response, consumer, o.formats); err != nil { return nil, err } return nil, result case 500: result := NewGetResearchProjectCompaniesInternalServerError() 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()) } } // NewGetResearchProjectCompaniesOK creates a GetResearchProjectCompaniesOK with default headers values func NewGetResearchProjectCompaniesOK() *GetResearchProjectCompaniesOK { return &GetResearchProjectCompaniesOK{} } /* GetResearchProjectCompaniesOK describes a response with status code 200, with default header values. ResearchProjectCompany Response Object */ type GetResearchProjectCompaniesOK struct { Payload *sfgate_models.ResearchProjectCompanyResponse } // IsSuccess returns true when this get research project companies o k response has a 2xx status code func (o *GetResearchProjectCompaniesOK) IsSuccess() bool { return true } // IsRedirect returns true when this get research project companies o k response has a 3xx status code func (o *GetResearchProjectCompaniesOK) IsRedirect() bool { return false } // IsClientError returns true when this get research project companies o k response has a 4xx status code func (o *GetResearchProjectCompaniesOK) IsClientError() bool { return false } // IsServerError returns true when this get research project companies o k response has a 5xx status code func (o *GetResearchProjectCompaniesOK) IsServerError() bool { return false } // IsCode returns true when this get research project companies o k response a status code equal to that given func (o *GetResearchProjectCompaniesOK) IsCode(code int) bool { return code == 200 } // Code gets the status code for the get research project companies o k response func (o *GetResearchProjectCompaniesOK) Code() int { return 200 } func (o *GetResearchProjectCompaniesOK) Error() string { return fmt.Sprintf("[GET /researchprojectcompanies][%d] getResearchProjectCompaniesOK %+v", 200, o.Payload) } func (o *GetResearchProjectCompaniesOK) String() string { return fmt.Sprintf("[GET /researchprojectcompanies][%d] getResearchProjectCompaniesOK %+v", 200, o.Payload) } func (o *GetResearchProjectCompaniesOK) GetPayload() *sfgate_models.ResearchProjectCompanyResponse { return o.Payload } func (o *GetResearchProjectCompaniesOK) 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 } // NewGetResearchProjectCompaniesUnauthorized creates a GetResearchProjectCompaniesUnauthorized with default headers values func NewGetResearchProjectCompaniesUnauthorized() *GetResearchProjectCompaniesUnauthorized { return &GetResearchProjectCompaniesUnauthorized{} } /* GetResearchProjectCompaniesUnauthorized describes a response with status code 401, with default header values. Access unauthorized, invalid API-KEY was used */ type GetResearchProjectCompaniesUnauthorized struct { Payload *sfgate_models.Error } // IsSuccess returns true when this get research project companies unauthorized response has a 2xx status code func (o *GetResearchProjectCompaniesUnauthorized) IsSuccess() bool { return false } // IsRedirect returns true when this get research project companies unauthorized response has a 3xx status code func (o *GetResearchProjectCompaniesUnauthorized) IsRedirect() bool { return false } // IsClientError returns true when this get research project companies unauthorized response has a 4xx status code func (o *GetResearchProjectCompaniesUnauthorized) IsClientError() bool { return true } // IsServerError returns true when this get research project companies unauthorized response has a 5xx status code func (o *GetResearchProjectCompaniesUnauthorized) IsServerError() bool { return false } // IsCode returns true when this get research project companies unauthorized response a status code equal to that given func (o *GetResearchProjectCompaniesUnauthorized) IsCode(code int) bool { return code == 401 } // Code gets the status code for the get research project companies unauthorized response func (o *GetResearchProjectCompaniesUnauthorized) Code() int { return 401 } func (o *GetResearchProjectCompaniesUnauthorized) Error() string { return fmt.Sprintf("[GET /researchprojectcompanies][%d] getResearchProjectCompaniesUnauthorized %+v", 401, o.Payload) } func (o *GetResearchProjectCompaniesUnauthorized) String() string { return fmt.Sprintf("[GET /researchprojectcompanies][%d] getResearchProjectCompaniesUnauthorized %+v", 401, o.Payload) } func (o *GetResearchProjectCompaniesUnauthorized) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetResearchProjectCompaniesUnauthorized) 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 } // NewGetResearchProjectCompaniesForbidden creates a GetResearchProjectCompaniesForbidden with default headers values func NewGetResearchProjectCompaniesForbidden() *GetResearchProjectCompaniesForbidden { return &GetResearchProjectCompaniesForbidden{} } /* GetResearchProjectCompaniesForbidden describes a response with status code 403, with default header values. Access forbidden, account lacks access */ type GetResearchProjectCompaniesForbidden struct { Payload *sfgate_models.Error } // IsSuccess returns true when this get research project companies forbidden response has a 2xx status code func (o *GetResearchProjectCompaniesForbidden) IsSuccess() bool { return false } // IsRedirect returns true when this get research project companies forbidden response has a 3xx status code func (o *GetResearchProjectCompaniesForbidden) IsRedirect() bool { return false } // IsClientError returns true when this get research project companies forbidden response has a 4xx status code func (o *GetResearchProjectCompaniesForbidden) IsClientError() bool { return true } // IsServerError returns true when this get research project companies forbidden response has a 5xx status code func (o *GetResearchProjectCompaniesForbidden) IsServerError() bool { return false } // IsCode returns true when this get research project companies forbidden response a status code equal to that given func (o *GetResearchProjectCompaniesForbidden) IsCode(code int) bool { return code == 403 } // Code gets the status code for the get research project companies forbidden response func (o *GetResearchProjectCompaniesForbidden) Code() int { return 403 } func (o *GetResearchProjectCompaniesForbidden) Error() string { return fmt.Sprintf("[GET /researchprojectcompanies][%d] getResearchProjectCompaniesForbidden %+v", 403, o.Payload) } func (o *GetResearchProjectCompaniesForbidden) String() string { return fmt.Sprintf("[GET /researchprojectcompanies][%d] getResearchProjectCompaniesForbidden %+v", 403, o.Payload) } func (o *GetResearchProjectCompaniesForbidden) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetResearchProjectCompaniesForbidden) 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 } // NewGetResearchProjectCompaniesNotFound creates a GetResearchProjectCompaniesNotFound with default headers values func NewGetResearchProjectCompaniesNotFound() *GetResearchProjectCompaniesNotFound { return &GetResearchProjectCompaniesNotFound{} } /* GetResearchProjectCompaniesNotFound describes a response with status code 404, with default header values. Resource was not found */ type GetResearchProjectCompaniesNotFound struct { Payload *sfgate_models.Error } // IsSuccess returns true when this get research project companies not found response has a 2xx status code func (o *GetResearchProjectCompaniesNotFound) IsSuccess() bool { return false } // IsRedirect returns true when this get research project companies not found response has a 3xx status code func (o *GetResearchProjectCompaniesNotFound) IsRedirect() bool { return false } // IsClientError returns true when this get research project companies not found response has a 4xx status code func (o *GetResearchProjectCompaniesNotFound) IsClientError() bool { return true } // IsServerError returns true when this get research project companies not found response has a 5xx status code func (o *GetResearchProjectCompaniesNotFound) IsServerError() bool { return false } // IsCode returns true when this get research project companies not found response a status code equal to that given func (o *GetResearchProjectCompaniesNotFound) IsCode(code int) bool { return code == 404 } // Code gets the status code for the get research project companies not found response func (o *GetResearchProjectCompaniesNotFound) Code() int { return 404 } func (o *GetResearchProjectCompaniesNotFound) Error() string { return fmt.Sprintf("[GET /researchprojectcompanies][%d] getResearchProjectCompaniesNotFound %+v", 404, o.Payload) } func (o *GetResearchProjectCompaniesNotFound) String() string { return fmt.Sprintf("[GET /researchprojectcompanies][%d] getResearchProjectCompaniesNotFound %+v", 404, o.Payload) } func (o *GetResearchProjectCompaniesNotFound) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetResearchProjectCompaniesNotFound) 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 } // NewGetResearchProjectCompaniesUnprocessableEntity creates a GetResearchProjectCompaniesUnprocessableEntity with default headers values func NewGetResearchProjectCompaniesUnprocessableEntity() *GetResearchProjectCompaniesUnprocessableEntity { return &GetResearchProjectCompaniesUnprocessableEntity{} } /* GetResearchProjectCompaniesUnprocessableEntity describes a response with status code 422, with default header values. Unprocessable Entity, likely a bad parameter */ type GetResearchProjectCompaniesUnprocessableEntity struct { Payload *sfgate_models.Error } // IsSuccess returns true when this get research project companies unprocessable entity response has a 2xx status code func (o *GetResearchProjectCompaniesUnprocessableEntity) IsSuccess() bool { return false } // IsRedirect returns true when this get research project companies unprocessable entity response has a 3xx status code func (o *GetResearchProjectCompaniesUnprocessableEntity) IsRedirect() bool { return false } // IsClientError returns true when this get research project companies unprocessable entity response has a 4xx status code func (o *GetResearchProjectCompaniesUnprocessableEntity) IsClientError() bool { return true } // IsServerError returns true when this get research project companies unprocessable entity response has a 5xx status code func (o *GetResearchProjectCompaniesUnprocessableEntity) IsServerError() bool { return false } // IsCode returns true when this get research project companies unprocessable entity response a status code equal to that given func (o *GetResearchProjectCompaniesUnprocessableEntity) IsCode(code int) bool { return code == 422 } // Code gets the status code for the get research project companies unprocessable entity response func (o *GetResearchProjectCompaniesUnprocessableEntity) Code() int { return 422 } func (o *GetResearchProjectCompaniesUnprocessableEntity) Error() string { return fmt.Sprintf("[GET /researchprojectcompanies][%d] getResearchProjectCompaniesUnprocessableEntity %+v", 422, o.Payload) } func (o *GetResearchProjectCompaniesUnprocessableEntity) String() string { return fmt.Sprintf("[GET /researchprojectcompanies][%d] getResearchProjectCompaniesUnprocessableEntity %+v", 422, o.Payload) } func (o *GetResearchProjectCompaniesUnprocessableEntity) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetResearchProjectCompaniesUnprocessableEntity) 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 } // NewGetResearchProjectCompaniesInternalServerError creates a GetResearchProjectCompaniesInternalServerError with default headers values func NewGetResearchProjectCompaniesInternalServerError() *GetResearchProjectCompaniesInternalServerError { return &GetResearchProjectCompaniesInternalServerError{} } /* GetResearchProjectCompaniesInternalServerError describes a response with status code 500, with default header values. Server Internal Error */ type GetResearchProjectCompaniesInternalServerError struct { Payload *sfgate_models.Error } // IsSuccess returns true when this get research project companies internal server error response has a 2xx status code func (o *GetResearchProjectCompaniesInternalServerError) IsSuccess() bool { return false } // IsRedirect returns true when this get research project companies internal server error response has a 3xx status code func (o *GetResearchProjectCompaniesInternalServerError) IsRedirect() bool { return false } // IsClientError returns true when this get research project companies internal server error response has a 4xx status code func (o *GetResearchProjectCompaniesInternalServerError) IsClientError() bool { return false } // IsServerError returns true when this get research project companies internal server error response has a 5xx status code func (o *GetResearchProjectCompaniesInternalServerError) IsServerError() bool { return true } // IsCode returns true when this get research project companies internal server error response a status code equal to that given func (o *GetResearchProjectCompaniesInternalServerError) IsCode(code int) bool { return code == 500 } // Code gets the status code for the get research project companies internal server error response func (o *GetResearchProjectCompaniesInternalServerError) Code() int { return 500 } func (o *GetResearchProjectCompaniesInternalServerError) Error() string { return fmt.Sprintf("[GET /researchprojectcompanies][%d] getResearchProjectCompaniesInternalServerError %+v", 500, o.Payload) } func (o *GetResearchProjectCompaniesInternalServerError) String() string { return fmt.Sprintf("[GET /researchprojectcompanies][%d] getResearchProjectCompaniesInternalServerError %+v", 500, o.Payload) } func (o *GetResearchProjectCompaniesInternalServerError) GetPayload() *sfgate_models.Error { return o.Payload } func (o *GetResearchProjectCompaniesInternalServerError) 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 }