lib/api/sfgate/sfgate_client/research_projects/post_research_project_compa...

478 lines
17 KiB
Go

// 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"
)
// PostResearchProjectCompaniesReader is a Reader for the PostResearchProjectCompanies structure.
type PostResearchProjectCompaniesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostResearchProjectCompaniesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPostResearchProjectCompaniesOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostResearchProjectCompaniesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostResearchProjectCompaniesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostResearchProjectCompaniesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostResearchProjectCompaniesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostResearchProjectCompaniesInternalServerError()
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())
}
}
// NewPostResearchProjectCompaniesOK creates a PostResearchProjectCompaniesOK with default headers values
func NewPostResearchProjectCompaniesOK() *PostResearchProjectCompaniesOK {
return &PostResearchProjectCompaniesOK{}
}
/*
PostResearchProjectCompaniesOK describes a response with status code 200, with default header values.
ResearchProjectCompany Response Object
*/
type PostResearchProjectCompaniesOK struct {
Payload *sfgate_models.ResearchProjectCompanyResponse
}
// IsSuccess returns true when this post research project companies o k response has a 2xx status code
func (o *PostResearchProjectCompaniesOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post research project companies o k response has a 3xx status code
func (o *PostResearchProjectCompaniesOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this post research project companies o k response has a 4xx status code
func (o *PostResearchProjectCompaniesOK) IsClientError() bool {
return false
}
// IsServerError returns true when this post research project companies o k response has a 5xx status code
func (o *PostResearchProjectCompaniesOK) IsServerError() bool {
return false
}
// IsCode returns true when this post research project companies o k response a status code equal to that given
func (o *PostResearchProjectCompaniesOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the post research project companies o k response
func (o *PostResearchProjectCompaniesOK) Code() int {
return 200
}
func (o *PostResearchProjectCompaniesOK) Error() string {
return fmt.Sprintf("[POST /researchprojectcompanies][%d] postResearchProjectCompaniesOK %+v", 200, o.Payload)
}
func (o *PostResearchProjectCompaniesOK) String() string {
return fmt.Sprintf("[POST /researchprojectcompanies][%d] postResearchProjectCompaniesOK %+v", 200, o.Payload)
}
func (o *PostResearchProjectCompaniesOK) GetPayload() *sfgate_models.ResearchProjectCompanyResponse {
return o.Payload
}
func (o *PostResearchProjectCompaniesOK) 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
}
// NewPostResearchProjectCompaniesUnauthorized creates a PostResearchProjectCompaniesUnauthorized with default headers values
func NewPostResearchProjectCompaniesUnauthorized() *PostResearchProjectCompaniesUnauthorized {
return &PostResearchProjectCompaniesUnauthorized{}
}
/*
PostResearchProjectCompaniesUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type PostResearchProjectCompaniesUnauthorized struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post research project companies unauthorized response has a 2xx status code
func (o *PostResearchProjectCompaniesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post research project companies unauthorized response has a 3xx status code
func (o *PostResearchProjectCompaniesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post research project companies unauthorized response has a 4xx status code
func (o *PostResearchProjectCompaniesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post research project companies unauthorized response has a 5xx status code
func (o *PostResearchProjectCompaniesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post research project companies unauthorized response a status code equal to that given
func (o *PostResearchProjectCompaniesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post research project companies unauthorized response
func (o *PostResearchProjectCompaniesUnauthorized) Code() int {
return 401
}
func (o *PostResearchProjectCompaniesUnauthorized) Error() string {
return fmt.Sprintf("[POST /researchprojectcompanies][%d] postResearchProjectCompaniesUnauthorized %+v", 401, o.Payload)
}
func (o *PostResearchProjectCompaniesUnauthorized) String() string {
return fmt.Sprintf("[POST /researchprojectcompanies][%d] postResearchProjectCompaniesUnauthorized %+v", 401, o.Payload)
}
func (o *PostResearchProjectCompaniesUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostResearchProjectCompaniesUnauthorized) 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
}
// NewPostResearchProjectCompaniesForbidden creates a PostResearchProjectCompaniesForbidden with default headers values
func NewPostResearchProjectCompaniesForbidden() *PostResearchProjectCompaniesForbidden {
return &PostResearchProjectCompaniesForbidden{}
}
/*
PostResearchProjectCompaniesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PostResearchProjectCompaniesForbidden struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post research project companies forbidden response has a 2xx status code
func (o *PostResearchProjectCompaniesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post research project companies forbidden response has a 3xx status code
func (o *PostResearchProjectCompaniesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post research project companies forbidden response has a 4xx status code
func (o *PostResearchProjectCompaniesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post research project companies forbidden response has a 5xx status code
func (o *PostResearchProjectCompaniesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post research project companies forbidden response a status code equal to that given
func (o *PostResearchProjectCompaniesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post research project companies forbidden response
func (o *PostResearchProjectCompaniesForbidden) Code() int {
return 403
}
func (o *PostResearchProjectCompaniesForbidden) Error() string {
return fmt.Sprintf("[POST /researchprojectcompanies][%d] postResearchProjectCompaniesForbidden %+v", 403, o.Payload)
}
func (o *PostResearchProjectCompaniesForbidden) String() string {
return fmt.Sprintf("[POST /researchprojectcompanies][%d] postResearchProjectCompaniesForbidden %+v", 403, o.Payload)
}
func (o *PostResearchProjectCompaniesForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostResearchProjectCompaniesForbidden) 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
}
// NewPostResearchProjectCompaniesNotFound creates a PostResearchProjectCompaniesNotFound with default headers values
func NewPostResearchProjectCompaniesNotFound() *PostResearchProjectCompaniesNotFound {
return &PostResearchProjectCompaniesNotFound{}
}
/*
PostResearchProjectCompaniesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PostResearchProjectCompaniesNotFound struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post research project companies not found response has a 2xx status code
func (o *PostResearchProjectCompaniesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post research project companies not found response has a 3xx status code
func (o *PostResearchProjectCompaniesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post research project companies not found response has a 4xx status code
func (o *PostResearchProjectCompaniesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post research project companies not found response has a 5xx status code
func (o *PostResearchProjectCompaniesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post research project companies not found response a status code equal to that given
func (o *PostResearchProjectCompaniesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post research project companies not found response
func (o *PostResearchProjectCompaniesNotFound) Code() int {
return 404
}
func (o *PostResearchProjectCompaniesNotFound) Error() string {
return fmt.Sprintf("[POST /researchprojectcompanies][%d] postResearchProjectCompaniesNotFound %+v", 404, o.Payload)
}
func (o *PostResearchProjectCompaniesNotFound) String() string {
return fmt.Sprintf("[POST /researchprojectcompanies][%d] postResearchProjectCompaniesNotFound %+v", 404, o.Payload)
}
func (o *PostResearchProjectCompaniesNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostResearchProjectCompaniesNotFound) 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
}
// NewPostResearchProjectCompaniesUnprocessableEntity creates a PostResearchProjectCompaniesUnprocessableEntity with default headers values
func NewPostResearchProjectCompaniesUnprocessableEntity() *PostResearchProjectCompaniesUnprocessableEntity {
return &PostResearchProjectCompaniesUnprocessableEntity{}
}
/*
PostResearchProjectCompaniesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PostResearchProjectCompaniesUnprocessableEntity struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post research project companies unprocessable entity response has a 2xx status code
func (o *PostResearchProjectCompaniesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post research project companies unprocessable entity response has a 3xx status code
func (o *PostResearchProjectCompaniesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post research project companies unprocessable entity response has a 4xx status code
func (o *PostResearchProjectCompaniesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post research project companies unprocessable entity response has a 5xx status code
func (o *PostResearchProjectCompaniesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post research project companies unprocessable entity response a status code equal to that given
func (o *PostResearchProjectCompaniesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post research project companies unprocessable entity response
func (o *PostResearchProjectCompaniesUnprocessableEntity) Code() int {
return 422
}
func (o *PostResearchProjectCompaniesUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /researchprojectcompanies][%d] postResearchProjectCompaniesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostResearchProjectCompaniesUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /researchprojectcompanies][%d] postResearchProjectCompaniesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostResearchProjectCompaniesUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostResearchProjectCompaniesUnprocessableEntity) 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
}
// NewPostResearchProjectCompaniesInternalServerError creates a PostResearchProjectCompaniesInternalServerError with default headers values
func NewPostResearchProjectCompaniesInternalServerError() *PostResearchProjectCompaniesInternalServerError {
return &PostResearchProjectCompaniesInternalServerError{}
}
/*
PostResearchProjectCompaniesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PostResearchProjectCompaniesInternalServerError struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post research project companies internal server error response has a 2xx status code
func (o *PostResearchProjectCompaniesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post research project companies internal server error response has a 3xx status code
func (o *PostResearchProjectCompaniesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post research project companies internal server error response has a 4xx status code
func (o *PostResearchProjectCompaniesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post research project companies internal server error response has a 5xx status code
func (o *PostResearchProjectCompaniesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post research project companies internal server error response a status code equal to that given
func (o *PostResearchProjectCompaniesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post research project companies internal server error response
func (o *PostResearchProjectCompaniesInternalServerError) Code() int {
return 500
}
func (o *PostResearchProjectCompaniesInternalServerError) Error() string {
return fmt.Sprintf("[POST /researchprojectcompanies][%d] postResearchProjectCompaniesInternalServerError %+v", 500, o.Payload)
}
func (o *PostResearchProjectCompaniesInternalServerError) String() string {
return fmt.Sprintf("[POST /researchprojectcompanies][%d] postResearchProjectCompaniesInternalServerError %+v", 500, o.Payload)
}
func (o *PostResearchProjectCompaniesInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostResearchProjectCompaniesInternalServerError) 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
}