2022-09-05 00:01:32 +00:00
// 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 industries
// 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"
)
// PostIndustriesReader is a Reader for the PostIndustries structure.
type PostIndustriesReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * PostIndustriesReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
2023-03-28 17:47:34 +00:00
case 201 :
result := NewPostIndustriesCreated ( )
2022-09-05 00:01:32 +00:00
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewPostIndustriesUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewPostIndustriesForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewPostIndustriesNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewPostIndustriesUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewPostIndustriesInternalServerError ( )
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 ( ) )
}
}
2023-03-28 17:47:34 +00:00
// NewPostIndustriesCreated creates a PostIndustriesCreated with default headers values
func NewPostIndustriesCreated ( ) * PostIndustriesCreated {
return & PostIndustriesCreated { }
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
/ *
2023-03-28 17:47:34 +00:00
PostIndustriesCreated describes a response with status code 201 , with default header values .
2022-09-05 00:01:32 +00:00
2023-03-28 17:47:34 +00:00
Response from Salesforce
2022-09-05 00:01:32 +00:00
* /
2023-03-28 17:47:34 +00:00
type PostIndustriesCreated struct {
Payload * sfgate_models . SalesforcePostResponse
2022-09-05 00:01:32 +00:00
}
2023-03-28 17:47:34 +00:00
// IsSuccess returns true when this post industries created response has a 2xx status code
func ( o * PostIndustriesCreated ) IsSuccess ( ) bool {
2023-03-22 20:49:01 +00:00
return true
}
2023-03-28 17:47:34 +00:00
// IsRedirect returns true when this post industries created response has a 3xx status code
func ( o * PostIndustriesCreated ) IsRedirect ( ) bool {
2023-03-22 20:49:01 +00:00
return false
}
2023-03-28 17:47:34 +00:00
// IsClientError returns true when this post industries created response has a 4xx status code
func ( o * PostIndustriesCreated ) IsClientError ( ) bool {
2023-03-22 20:49:01 +00:00
return false
}
2023-03-28 17:47:34 +00:00
// IsServerError returns true when this post industries created response has a 5xx status code
func ( o * PostIndustriesCreated ) IsServerError ( ) bool {
2023-03-22 20:49:01 +00:00
return false
}
2023-03-28 17:47:34 +00:00
// IsCode returns true when this post industries created response a status code equal to that given
func ( o * PostIndustriesCreated ) IsCode ( code int ) bool {
return code == 201
2023-03-22 20:49:01 +00:00
}
2023-03-28 17:47:34 +00:00
// Code gets the status code for the post industries created response
func ( o * PostIndustriesCreated ) Code ( ) int {
return 201
2023-03-22 20:49:01 +00:00
}
2023-03-28 17:47:34 +00:00
func ( o * PostIndustriesCreated ) Error ( ) string {
return fmt . Sprintf ( "[POST /industries][%d] postIndustriesCreated %+v" , 201 , o . Payload )
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
2023-03-28 17:47:34 +00:00
func ( o * PostIndustriesCreated ) String ( ) string {
return fmt . Sprintf ( "[POST /industries][%d] postIndustriesCreated %+v" , 201 , o . Payload )
2023-03-22 20:49:01 +00:00
}
2023-03-28 17:47:34 +00:00
func ( o * PostIndustriesCreated ) GetPayload ( ) * sfgate_models . SalesforcePostResponse {
2022-09-05 00:01:32 +00:00
return o . Payload
}
2023-03-28 17:47:34 +00:00
func ( o * PostIndustriesCreated ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2022-09-05 00:01:32 +00:00
2023-03-28 17:47:34 +00:00
o . Payload = new ( sfgate_models . SalesforcePostResponse )
2022-09-05 00:01:32 +00:00
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewPostIndustriesUnauthorized creates a PostIndustriesUnauthorized with default headers values
func NewPostIndustriesUnauthorized ( ) * PostIndustriesUnauthorized {
return & PostIndustriesUnauthorized { }
}
2023-03-22 20:49:01 +00:00
/ *
PostIndustriesUnauthorized describes a response with status code 401 , with default header values .
2022-09-05 00:01:32 +00:00
Access unauthorized , invalid API - KEY was used
* /
type PostIndustriesUnauthorized struct {
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post industries unauthorized response has a 2xx status code
func ( o * PostIndustriesUnauthorized ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this post industries unauthorized response has a 3xx status code
func ( o * PostIndustriesUnauthorized ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this post industries unauthorized response has a 4xx status code
func ( o * PostIndustriesUnauthorized ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this post industries unauthorized response has a 5xx status code
func ( o * PostIndustriesUnauthorized ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this post industries unauthorized response a status code equal to that given
func ( o * PostIndustriesUnauthorized ) IsCode ( code int ) bool {
return code == 401
}
// Code gets the status code for the post industries unauthorized response
func ( o * PostIndustriesUnauthorized ) Code ( ) int {
return 401
}
2022-09-05 00:01:32 +00:00
func ( o * PostIndustriesUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[POST /industries][%d] postIndustriesUnauthorized %+v" , 401 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PostIndustriesUnauthorized ) String ( ) string {
return fmt . Sprintf ( "[POST /industries][%d] postIndustriesUnauthorized %+v" , 401 , o . Payload )
}
2022-09-05 00:01:32 +00:00
func ( o * PostIndustriesUnauthorized ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * PostIndustriesUnauthorized ) 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
}
// NewPostIndustriesForbidden creates a PostIndustriesForbidden with default headers values
func NewPostIndustriesForbidden ( ) * PostIndustriesForbidden {
return & PostIndustriesForbidden { }
}
2023-03-22 20:49:01 +00:00
/ *
PostIndustriesForbidden describes a response with status code 403 , with default header values .
2022-09-05 00:01:32 +00:00
Access forbidden , account lacks access
* /
type PostIndustriesForbidden struct {
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post industries forbidden response has a 2xx status code
func ( o * PostIndustriesForbidden ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this post industries forbidden response has a 3xx status code
func ( o * PostIndustriesForbidden ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this post industries forbidden response has a 4xx status code
func ( o * PostIndustriesForbidden ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this post industries forbidden response has a 5xx status code
func ( o * PostIndustriesForbidden ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this post industries forbidden response a status code equal to that given
func ( o * PostIndustriesForbidden ) IsCode ( code int ) bool {
return code == 403
}
// Code gets the status code for the post industries forbidden response
func ( o * PostIndustriesForbidden ) Code ( ) int {
return 403
}
2022-09-05 00:01:32 +00:00
func ( o * PostIndustriesForbidden ) Error ( ) string {
return fmt . Sprintf ( "[POST /industries][%d] postIndustriesForbidden %+v" , 403 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PostIndustriesForbidden ) String ( ) string {
return fmt . Sprintf ( "[POST /industries][%d] postIndustriesForbidden %+v" , 403 , o . Payload )
}
2022-09-05 00:01:32 +00:00
func ( o * PostIndustriesForbidden ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * PostIndustriesForbidden ) 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
}
// NewPostIndustriesNotFound creates a PostIndustriesNotFound with default headers values
func NewPostIndustriesNotFound ( ) * PostIndustriesNotFound {
return & PostIndustriesNotFound { }
}
2023-03-22 20:49:01 +00:00
/ *
PostIndustriesNotFound describes a response with status code 404 , with default header values .
2022-09-05 00:01:32 +00:00
Resource was not found
* /
type PostIndustriesNotFound struct {
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post industries not found response has a 2xx status code
func ( o * PostIndustriesNotFound ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this post industries not found response has a 3xx status code
func ( o * PostIndustriesNotFound ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this post industries not found response has a 4xx status code
func ( o * PostIndustriesNotFound ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this post industries not found response has a 5xx status code
func ( o * PostIndustriesNotFound ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this post industries not found response a status code equal to that given
func ( o * PostIndustriesNotFound ) IsCode ( code int ) bool {
return code == 404
}
// Code gets the status code for the post industries not found response
func ( o * PostIndustriesNotFound ) Code ( ) int {
return 404
}
2022-09-05 00:01:32 +00:00
func ( o * PostIndustriesNotFound ) Error ( ) string {
return fmt . Sprintf ( "[POST /industries][%d] postIndustriesNotFound %+v" , 404 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PostIndustriesNotFound ) String ( ) string {
return fmt . Sprintf ( "[POST /industries][%d] postIndustriesNotFound %+v" , 404 , o . Payload )
}
2022-09-05 00:01:32 +00:00
func ( o * PostIndustriesNotFound ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * PostIndustriesNotFound ) 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
}
// NewPostIndustriesUnprocessableEntity creates a PostIndustriesUnprocessableEntity with default headers values
func NewPostIndustriesUnprocessableEntity ( ) * PostIndustriesUnprocessableEntity {
return & PostIndustriesUnprocessableEntity { }
}
2023-03-22 20:49:01 +00:00
/ *
PostIndustriesUnprocessableEntity describes a response with status code 422 , with default header values .
2022-09-05 00:01:32 +00:00
Unprocessable Entity , likely a bad parameter
* /
type PostIndustriesUnprocessableEntity struct {
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post industries unprocessable entity response has a 2xx status code
func ( o * PostIndustriesUnprocessableEntity ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this post industries unprocessable entity response has a 3xx status code
func ( o * PostIndustriesUnprocessableEntity ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this post industries unprocessable entity response has a 4xx status code
func ( o * PostIndustriesUnprocessableEntity ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this post industries unprocessable entity response has a 5xx status code
func ( o * PostIndustriesUnprocessableEntity ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this post industries unprocessable entity response a status code equal to that given
func ( o * PostIndustriesUnprocessableEntity ) IsCode ( code int ) bool {
return code == 422
}
// Code gets the status code for the post industries unprocessable entity response
func ( o * PostIndustriesUnprocessableEntity ) Code ( ) int {
return 422
}
2022-09-05 00:01:32 +00:00
func ( o * PostIndustriesUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[POST /industries][%d] postIndustriesUnprocessableEntity %+v" , 422 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PostIndustriesUnprocessableEntity ) String ( ) string {
return fmt . Sprintf ( "[POST /industries][%d] postIndustriesUnprocessableEntity %+v" , 422 , o . Payload )
}
2022-09-05 00:01:32 +00:00
func ( o * PostIndustriesUnprocessableEntity ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * PostIndustriesUnprocessableEntity ) 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
}
// NewPostIndustriesInternalServerError creates a PostIndustriesInternalServerError with default headers values
func NewPostIndustriesInternalServerError ( ) * PostIndustriesInternalServerError {
return & PostIndustriesInternalServerError { }
}
2023-03-22 20:49:01 +00:00
/ *
PostIndustriesInternalServerError describes a response with status code 500 , with default header values .
2022-09-05 00:01:32 +00:00
Server Internal Error
* /
type PostIndustriesInternalServerError struct {
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post industries internal server error response has a 2xx status code
func ( o * PostIndustriesInternalServerError ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this post industries internal server error response has a 3xx status code
func ( o * PostIndustriesInternalServerError ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this post industries internal server error response has a 4xx status code
func ( o * PostIndustriesInternalServerError ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this post industries internal server error response has a 5xx status code
func ( o * PostIndustriesInternalServerError ) IsServerError ( ) bool {
return true
}
// IsCode returns true when this post industries internal server error response a status code equal to that given
func ( o * PostIndustriesInternalServerError ) IsCode ( code int ) bool {
return code == 500
}
// Code gets the status code for the post industries internal server error response
func ( o * PostIndustriesInternalServerError ) Code ( ) int {
return 500
}
2022-09-05 00:01:32 +00:00
func ( o * PostIndustriesInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[POST /industries][%d] postIndustriesInternalServerError %+v" , 500 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PostIndustriesInternalServerError ) String ( ) string {
return fmt . Sprintf ( "[POST /industries][%d] postIndustriesInternalServerError %+v" , 500 , o . Payload )
}
2022-09-05 00:01:32 +00:00
func ( o * PostIndustriesInternalServerError ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * PostIndustriesInternalServerError ) 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
}