lib/api/sfgate/sfgate_client/industry_companies/post_industry_companies_res...

523 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 industry_companies
// 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"
)
// PostIndustryCompaniesReader is a Reader for the PostIndustryCompanies structure.
type PostIndustryCompaniesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostIndustryCompaniesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewPostIndustryCompaniesCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostIndustryCompaniesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostIndustryCompaniesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostIndustryCompaniesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostIndustryCompaniesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostIndustryCompaniesInternalServerError()
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())
}
}
// NewPostIndustryCompaniesCreated creates a PostIndustryCompaniesCreated with default headers values
func NewPostIndustryCompaniesCreated() *PostIndustryCompaniesCreated {
return &PostIndustryCompaniesCreated{}
}
/*
PostIndustryCompaniesCreated describes a response with status code 201, with default header values.
Response from Salesforce
*/
type PostIndustryCompaniesCreated struct {
Payload *sfgate_models.SalesforcePostResponse
}
// IsSuccess returns true when this post industry companies created response has a 2xx status code
func (o *PostIndustryCompaniesCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post industry companies created response has a 3xx status code
func (o *PostIndustryCompaniesCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industry companies created response has a 4xx status code
func (o *PostIndustryCompaniesCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this post industry companies created response has a 5xx status code
func (o *PostIndustryCompaniesCreated) IsServerError() bool {
return false
}
// IsCode returns true when this post industry companies created response a status code equal to that given
func (o *PostIndustryCompaniesCreated) IsCode(code int) bool {
return code == 201
}
// Code gets the status code for the post industry companies created response
func (o *PostIndustryCompaniesCreated) Code() int {
return 201
}
func (o *PostIndustryCompaniesCreated) Error() string {
return fmt.Sprintf("[POST /industrycompanies][%d] postIndustryCompaniesCreated %+v", 201, o.Payload)
}
func (o *PostIndustryCompaniesCreated) String() string {
return fmt.Sprintf("[POST /industrycompanies][%d] postIndustryCompaniesCreated %+v", 201, o.Payload)
}
func (o *PostIndustryCompaniesCreated) GetPayload() *sfgate_models.SalesforcePostResponse {
return o.Payload
}
func (o *PostIndustryCompaniesCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.SalesforcePostResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostIndustryCompaniesUnauthorized creates a PostIndustryCompaniesUnauthorized with default headers values
func NewPostIndustryCompaniesUnauthorized() *PostIndustryCompaniesUnauthorized {
return &PostIndustryCompaniesUnauthorized{}
}
/*
PostIndustryCompaniesUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type PostIndustryCompaniesUnauthorized struct {
AccessControlAllowOrigin string
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industry companies unauthorized response has a 2xx status code
func (o *PostIndustryCompaniesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industry companies unauthorized response has a 3xx status code
func (o *PostIndustryCompaniesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industry companies unauthorized response has a 4xx status code
func (o *PostIndustryCompaniesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post industry companies unauthorized response has a 5xx status code
func (o *PostIndustryCompaniesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post industry companies unauthorized response a status code equal to that given
func (o *PostIndustryCompaniesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post industry companies unauthorized response
func (o *PostIndustryCompaniesUnauthorized) Code() int {
return 401
}
func (o *PostIndustryCompaniesUnauthorized) Error() string {
return fmt.Sprintf("[POST /industrycompanies][%d] postIndustryCompaniesUnauthorized %+v", 401, o.Payload)
}
func (o *PostIndustryCompaniesUnauthorized) String() string {
return fmt.Sprintf("[POST /industrycompanies][%d] postIndustryCompaniesUnauthorized %+v", 401, o.Payload)
}
func (o *PostIndustryCompaniesUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryCompaniesUnauthorized) 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(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostIndustryCompaniesForbidden creates a PostIndustryCompaniesForbidden with default headers values
func NewPostIndustryCompaniesForbidden() *PostIndustryCompaniesForbidden {
return &PostIndustryCompaniesForbidden{}
}
/*
PostIndustryCompaniesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PostIndustryCompaniesForbidden struct {
AccessControlAllowOrigin string
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industry companies forbidden response has a 2xx status code
func (o *PostIndustryCompaniesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industry companies forbidden response has a 3xx status code
func (o *PostIndustryCompaniesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industry companies forbidden response has a 4xx status code
func (o *PostIndustryCompaniesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post industry companies forbidden response has a 5xx status code
func (o *PostIndustryCompaniesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post industry companies forbidden response a status code equal to that given
func (o *PostIndustryCompaniesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post industry companies forbidden response
func (o *PostIndustryCompaniesForbidden) Code() int {
return 403
}
func (o *PostIndustryCompaniesForbidden) Error() string {
return fmt.Sprintf("[POST /industrycompanies][%d] postIndustryCompaniesForbidden %+v", 403, o.Payload)
}
func (o *PostIndustryCompaniesForbidden) String() string {
return fmt.Sprintf("[POST /industrycompanies][%d] postIndustryCompaniesForbidden %+v", 403, o.Payload)
}
func (o *PostIndustryCompaniesForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryCompaniesForbidden) 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(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostIndustryCompaniesNotFound creates a PostIndustryCompaniesNotFound with default headers values
func NewPostIndustryCompaniesNotFound() *PostIndustryCompaniesNotFound {
return &PostIndustryCompaniesNotFound{}
}
/*
PostIndustryCompaniesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PostIndustryCompaniesNotFound struct {
AccessControlAllowOrigin string
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industry companies not found response has a 2xx status code
func (o *PostIndustryCompaniesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industry companies not found response has a 3xx status code
func (o *PostIndustryCompaniesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industry companies not found response has a 4xx status code
func (o *PostIndustryCompaniesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post industry companies not found response has a 5xx status code
func (o *PostIndustryCompaniesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post industry companies not found response a status code equal to that given
func (o *PostIndustryCompaniesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post industry companies not found response
func (o *PostIndustryCompaniesNotFound) Code() int {
return 404
}
func (o *PostIndustryCompaniesNotFound) Error() string {
return fmt.Sprintf("[POST /industrycompanies][%d] postIndustryCompaniesNotFound %+v", 404, o.Payload)
}
func (o *PostIndustryCompaniesNotFound) String() string {
return fmt.Sprintf("[POST /industrycompanies][%d] postIndustryCompaniesNotFound %+v", 404, o.Payload)
}
func (o *PostIndustryCompaniesNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryCompaniesNotFound) 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(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostIndustryCompaniesUnprocessableEntity creates a PostIndustryCompaniesUnprocessableEntity with default headers values
func NewPostIndustryCompaniesUnprocessableEntity() *PostIndustryCompaniesUnprocessableEntity {
return &PostIndustryCompaniesUnprocessableEntity{}
}
/*
PostIndustryCompaniesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PostIndustryCompaniesUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industry companies unprocessable entity response has a 2xx status code
func (o *PostIndustryCompaniesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industry companies unprocessable entity response has a 3xx status code
func (o *PostIndustryCompaniesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industry companies unprocessable entity response has a 4xx status code
func (o *PostIndustryCompaniesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post industry companies unprocessable entity response has a 5xx status code
func (o *PostIndustryCompaniesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post industry companies unprocessable entity response a status code equal to that given
func (o *PostIndustryCompaniesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post industry companies unprocessable entity response
func (o *PostIndustryCompaniesUnprocessableEntity) Code() int {
return 422
}
func (o *PostIndustryCompaniesUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /industrycompanies][%d] postIndustryCompaniesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostIndustryCompaniesUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /industrycompanies][%d] postIndustryCompaniesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostIndustryCompaniesUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryCompaniesUnprocessableEntity) 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(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostIndustryCompaniesInternalServerError creates a PostIndustryCompaniesInternalServerError with default headers values
func NewPostIndustryCompaniesInternalServerError() *PostIndustryCompaniesInternalServerError {
return &PostIndustryCompaniesInternalServerError{}
}
/*
PostIndustryCompaniesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PostIndustryCompaniesInternalServerError struct {
AccessControlAllowOrigin string
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industry companies internal server error response has a 2xx status code
func (o *PostIndustryCompaniesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industry companies internal server error response has a 3xx status code
func (o *PostIndustryCompaniesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industry companies internal server error response has a 4xx status code
func (o *PostIndustryCompaniesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post industry companies internal server error response has a 5xx status code
func (o *PostIndustryCompaniesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post industry companies internal server error response a status code equal to that given
func (o *PostIndustryCompaniesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post industry companies internal server error response
func (o *PostIndustryCompaniesInternalServerError) Code() int {
return 500
}
func (o *PostIndustryCompaniesInternalServerError) Error() string {
return fmt.Sprintf("[POST /industrycompanies][%d] postIndustryCompaniesInternalServerError %+v", 500, o.Payload)
}
func (o *PostIndustryCompaniesInternalServerError) String() string {
return fmt.Sprintf("[POST /industrycompanies][%d] postIndustryCompaniesInternalServerError %+v", 500, o.Payload)
}
func (o *PostIndustryCompaniesInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryCompaniesInternalServerError) 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(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}