lib/api/sfgate/sfgate_client/industry_products/post_industryproducts_respo...

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_products
// 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"
)
// PostIndustryproductsReader is a Reader for the PostIndustryproducts structure.
type PostIndustryproductsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostIndustryproductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 201:
result := NewPostIndustryproductsCreated()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostIndustryproductsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostIndustryproductsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostIndustryproductsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostIndustryproductsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostIndustryproductsInternalServerError()
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())
}
}
// NewPostIndustryproductsCreated creates a PostIndustryproductsCreated with default headers values
func NewPostIndustryproductsCreated() *PostIndustryproductsCreated {
return &PostIndustryproductsCreated{}
}
/*
PostIndustryproductsCreated describes a response with status code 201, with default header values.
Response from Salesforce
*/
type PostIndustryproductsCreated struct {
Payload *sfgate_models.SalesforcePostResponse
}
// IsSuccess returns true when this post industryproducts created response has a 2xx status code
func (o *PostIndustryproductsCreated) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post industryproducts created response has a 3xx status code
func (o *PostIndustryproductsCreated) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industryproducts created response has a 4xx status code
func (o *PostIndustryproductsCreated) IsClientError() bool {
return false
}
// IsServerError returns true when this post industryproducts created response has a 5xx status code
func (o *PostIndustryproductsCreated) IsServerError() bool {
return false
}
// IsCode returns true when this post industryproducts created response a status code equal to that given
func (o *PostIndustryproductsCreated) IsCode(code int) bool {
return code == 201
}
// Code gets the status code for the post industryproducts created response
func (o *PostIndustryproductsCreated) Code() int {
return 201
}
func (o *PostIndustryproductsCreated) Error() string {
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsCreated %+v", 201, o.Payload)
}
func (o *PostIndustryproductsCreated) String() string {
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsCreated %+v", 201, o.Payload)
}
func (o *PostIndustryproductsCreated) GetPayload() *sfgate_models.SalesforcePostResponse {
return o.Payload
}
func (o *PostIndustryproductsCreated) 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
}
// NewPostIndustryproductsUnauthorized creates a PostIndustryproductsUnauthorized with default headers values
func NewPostIndustryproductsUnauthorized() *PostIndustryproductsUnauthorized {
return &PostIndustryproductsUnauthorized{}
}
/*
PostIndustryproductsUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type PostIndustryproductsUnauthorized struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industryproducts unauthorized response has a 2xx status code
func (o *PostIndustryproductsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industryproducts unauthorized response has a 3xx status code
func (o *PostIndustryproductsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industryproducts unauthorized response has a 4xx status code
func (o *PostIndustryproductsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post industryproducts unauthorized response has a 5xx status code
func (o *PostIndustryproductsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post industryproducts unauthorized response a status code equal to that given
func (o *PostIndustryproductsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post industryproducts unauthorized response
func (o *PostIndustryproductsUnauthorized) Code() int {
return 401
}
func (o *PostIndustryproductsUnauthorized) Error() string {
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsUnauthorized %+v", 401, o.Payload)
}
func (o *PostIndustryproductsUnauthorized) String() string {
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsUnauthorized %+v", 401, o.Payload)
}
func (o *PostIndustryproductsUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryproductsUnauthorized) 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
}
// NewPostIndustryproductsForbidden creates a PostIndustryproductsForbidden with default headers values
func NewPostIndustryproductsForbidden() *PostIndustryproductsForbidden {
return &PostIndustryproductsForbidden{}
}
/*
PostIndustryproductsForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PostIndustryproductsForbidden struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industryproducts forbidden response has a 2xx status code
func (o *PostIndustryproductsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industryproducts forbidden response has a 3xx status code
func (o *PostIndustryproductsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industryproducts forbidden response has a 4xx status code
func (o *PostIndustryproductsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post industryproducts forbidden response has a 5xx status code
func (o *PostIndustryproductsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post industryproducts forbidden response a status code equal to that given
func (o *PostIndustryproductsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post industryproducts forbidden response
func (o *PostIndustryproductsForbidden) Code() int {
return 403
}
func (o *PostIndustryproductsForbidden) Error() string {
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsForbidden %+v", 403, o.Payload)
}
func (o *PostIndustryproductsForbidden) String() string {
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsForbidden %+v", 403, o.Payload)
}
func (o *PostIndustryproductsForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryproductsForbidden) 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
}
// NewPostIndustryproductsNotFound creates a PostIndustryproductsNotFound with default headers values
func NewPostIndustryproductsNotFound() *PostIndustryproductsNotFound {
return &PostIndustryproductsNotFound{}
}
/*
PostIndustryproductsNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PostIndustryproductsNotFound struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industryproducts not found response has a 2xx status code
func (o *PostIndustryproductsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industryproducts not found response has a 3xx status code
func (o *PostIndustryproductsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industryproducts not found response has a 4xx status code
func (o *PostIndustryproductsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post industryproducts not found response has a 5xx status code
func (o *PostIndustryproductsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post industryproducts not found response a status code equal to that given
func (o *PostIndustryproductsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post industryproducts not found response
func (o *PostIndustryproductsNotFound) Code() int {
return 404
}
func (o *PostIndustryproductsNotFound) Error() string {
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsNotFound %+v", 404, o.Payload)
}
func (o *PostIndustryproductsNotFound) String() string {
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsNotFound %+v", 404, o.Payload)
}
func (o *PostIndustryproductsNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryproductsNotFound) 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
}
// NewPostIndustryproductsUnprocessableEntity creates a PostIndustryproductsUnprocessableEntity with default headers values
func NewPostIndustryproductsUnprocessableEntity() *PostIndustryproductsUnprocessableEntity {
return &PostIndustryproductsUnprocessableEntity{}
}
/*
PostIndustryproductsUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PostIndustryproductsUnprocessableEntity struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industryproducts unprocessable entity response has a 2xx status code
func (o *PostIndustryproductsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industryproducts unprocessable entity response has a 3xx status code
func (o *PostIndustryproductsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industryproducts unprocessable entity response has a 4xx status code
func (o *PostIndustryproductsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post industryproducts unprocessable entity response has a 5xx status code
func (o *PostIndustryproductsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post industryproducts unprocessable entity response a status code equal to that given
func (o *PostIndustryproductsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post industryproducts unprocessable entity response
func (o *PostIndustryproductsUnprocessableEntity) Code() int {
return 422
}
func (o *PostIndustryproductsUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostIndustryproductsUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostIndustryproductsUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryproductsUnprocessableEntity) 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
}
// NewPostIndustryproductsInternalServerError creates a PostIndustryproductsInternalServerError with default headers values
func NewPostIndustryproductsInternalServerError() *PostIndustryproductsInternalServerError {
return &PostIndustryproductsInternalServerError{}
}
/*
PostIndustryproductsInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PostIndustryproductsInternalServerError struct {
Payload *sfgate_models.Error
}
// IsSuccess returns true when this post industryproducts internal server error response has a 2xx status code
func (o *PostIndustryproductsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post industryproducts internal server error response has a 3xx status code
func (o *PostIndustryproductsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post industryproducts internal server error response has a 4xx status code
func (o *PostIndustryproductsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post industryproducts internal server error response has a 5xx status code
func (o *PostIndustryproductsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post industryproducts internal server error response a status code equal to that given
func (o *PostIndustryproductsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post industryproducts internal server error response
func (o *PostIndustryproductsInternalServerError) Code() int {
return 500
}
func (o *PostIndustryproductsInternalServerError) Error() string {
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsInternalServerError %+v", 500, o.Payload)
}
func (o *PostIndustryproductsInternalServerError) String() string {
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsInternalServerError %+v", 500, o.Payload)
}
func (o *PostIndustryproductsInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *PostIndustryproductsInternalServerError) 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
}