lib/api/sfgate/sfgate_client/industry_services/post_industry_services_resp...

478 lines
16 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_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/vernonkeenan/lib/api/sfgate/sfgate_models"
)
// PostIndustryServicesReader is a Reader for the PostIndustryServices structure.
type PostIndustryServicesReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostIndustryServicesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewPostIndustryServicesCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostIndustryServicesUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostIndustryServicesForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostIndustryServicesNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostIndustryServicesUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostIndustryServicesInternalServerError()
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())
}
}
// NewPostIndustryServicesCreated creates a PostIndustryServicesCreated with default headers values
func NewPostIndustryServicesCreated() *PostIndustryServicesCreated {
return &PostIndustryServicesCreated{}
}
/*
PostIndustryServicesCreated describes a response with status code 201, with default header values.
Response from Salesforce
*/
type PostIndustryServicesCreated struct {
Payload *sfgate_models.SalesforcePostResponse
}
// IsSuccess returns true when this post industry services created response has a 2xx status code
func (o *PostIndustryServicesCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post industry services created response has a 3xx status code
func (o *PostIndustryServicesCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industry services created response has a 4xx status code
func (o *PostIndustryServicesCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this post industry services created response has a 5xx status code
func (o *PostIndustryServicesCreated) IsServerError() bool {
return false
}
// IsCode returns true when this post industry services created response a status code equal to that given
func (o *PostIndustryServicesCreated) IsCode(code int) bool {
return code == 201
}
// Code gets the status code for the post industry services created response
func (o *PostIndustryServicesCreated) Code() int {
return 201
}
func (o *PostIndustryServicesCreated) Error() string {
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesCreated %+v", 201, o.Payload)
}
func (o *PostIndustryServicesCreated) String() string {
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesCreated %+v", 201, o.Payload)
}
func (o *PostIndustryServicesCreated) GetPayload() *sfgate_models.SalesforcePostResponse {
return o.Payload
}
func (o *PostIndustryServicesCreated) 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
}
// NewPostIndustryServicesUnauthorized creates a PostIndustryServicesUnauthorized with default headers values
func NewPostIndustryServicesUnauthorized() *PostIndustryServicesUnauthorized {
return &PostIndustryServicesUnauthorized{}
}
/*
PostIndustryServicesUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type PostIndustryServicesUnauthorized struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industry services unauthorized response has a 2xx status code
func (o *PostIndustryServicesUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industry services unauthorized response has a 3xx status code
func (o *PostIndustryServicesUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industry services unauthorized response has a 4xx status code
func (o *PostIndustryServicesUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post industry services unauthorized response has a 5xx status code
func (o *PostIndustryServicesUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post industry services unauthorized response a status code equal to that given
func (o *PostIndustryServicesUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post industry services unauthorized response
func (o *PostIndustryServicesUnauthorized) Code() int {
return 401
}
func (o *PostIndustryServicesUnauthorized) Error() string {
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesUnauthorized %+v", 401, o.Payload)
}
func (o *PostIndustryServicesUnauthorized) String() string {
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesUnauthorized %+v", 401, o.Payload)
}
func (o *PostIndustryServicesUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryServicesUnauthorized) 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
}
// NewPostIndustryServicesForbidden creates a PostIndustryServicesForbidden with default headers values
func NewPostIndustryServicesForbidden() *PostIndustryServicesForbidden {
return &PostIndustryServicesForbidden{}
}
/*
PostIndustryServicesForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PostIndustryServicesForbidden struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industry services forbidden response has a 2xx status code
func (o *PostIndustryServicesForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industry services forbidden response has a 3xx status code
func (o *PostIndustryServicesForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industry services forbidden response has a 4xx status code
func (o *PostIndustryServicesForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post industry services forbidden response has a 5xx status code
func (o *PostIndustryServicesForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post industry services forbidden response a status code equal to that given
func (o *PostIndustryServicesForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post industry services forbidden response
func (o *PostIndustryServicesForbidden) Code() int {
return 403
}
func (o *PostIndustryServicesForbidden) Error() string {
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesForbidden %+v", 403, o.Payload)
}
func (o *PostIndustryServicesForbidden) String() string {
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesForbidden %+v", 403, o.Payload)
}
func (o *PostIndustryServicesForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryServicesForbidden) 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
}
// NewPostIndustryServicesNotFound creates a PostIndustryServicesNotFound with default headers values
func NewPostIndustryServicesNotFound() *PostIndustryServicesNotFound {
return &PostIndustryServicesNotFound{}
}
/*
PostIndustryServicesNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PostIndustryServicesNotFound struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industry services not found response has a 2xx status code
func (o *PostIndustryServicesNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industry services not found response has a 3xx status code
func (o *PostIndustryServicesNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industry services not found response has a 4xx status code
func (o *PostIndustryServicesNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post industry services not found response has a 5xx status code
func (o *PostIndustryServicesNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post industry services not found response a status code equal to that given
func (o *PostIndustryServicesNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post industry services not found response
func (o *PostIndustryServicesNotFound) Code() int {
return 404
}
func (o *PostIndustryServicesNotFound) Error() string {
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesNotFound %+v", 404, o.Payload)
}
func (o *PostIndustryServicesNotFound) String() string {
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesNotFound %+v", 404, o.Payload)
}
func (o *PostIndustryServicesNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryServicesNotFound) 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
}
// NewPostIndustryServicesUnprocessableEntity creates a PostIndustryServicesUnprocessableEntity with default headers values
func NewPostIndustryServicesUnprocessableEntity() *PostIndustryServicesUnprocessableEntity {
return &PostIndustryServicesUnprocessableEntity{}
}
/*
PostIndustryServicesUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PostIndustryServicesUnprocessableEntity struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industry services unprocessable entity response has a 2xx status code
func (o *PostIndustryServicesUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industry services unprocessable entity response has a 3xx status code
func (o *PostIndustryServicesUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industry services unprocessable entity response has a 4xx status code
func (o *PostIndustryServicesUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post industry services unprocessable entity response has a 5xx status code
func (o *PostIndustryServicesUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post industry services unprocessable entity response a status code equal to that given
func (o *PostIndustryServicesUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post industry services unprocessable entity response
func (o *PostIndustryServicesUnprocessableEntity) Code() int {
return 422
}
func (o *PostIndustryServicesUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostIndustryServicesUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostIndustryServicesUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryServicesUnprocessableEntity) 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
}
// NewPostIndustryServicesInternalServerError creates a PostIndustryServicesInternalServerError with default headers values
func NewPostIndustryServicesInternalServerError() *PostIndustryServicesInternalServerError {
return &PostIndustryServicesInternalServerError{}
}
/*
PostIndustryServicesInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PostIndustryServicesInternalServerError struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industry services internal server error response has a 2xx status code
func (o *PostIndustryServicesInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industry services internal server error response has a 3xx status code
func (o *PostIndustryServicesInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industry services internal server error response has a 4xx status code
func (o *PostIndustryServicesInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post industry services internal server error response has a 5xx status code
func (o *PostIndustryServicesInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post industry services internal server error response a status code equal to that given
func (o *PostIndustryServicesInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post industry services internal server error response
func (o *PostIndustryServicesInternalServerError) Code() int {
return 500
}
func (o *PostIndustryServicesInternalServerError) Error() string {
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesInternalServerError %+v", 500, o.Payload)
}
func (o *PostIndustryServicesInternalServerError) String() string {
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesInternalServerError %+v", 500, o.Payload)
}
func (o *PostIndustryServicesInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryServicesInternalServerError) 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
}