mirror of https://github.com/vernonkeenan/lib
523 lines
16 KiB
Go
523 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 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() {
|
|
case 201:
|
|
result := NewPostIndustriesCreated()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewPostIndustriesCreated creates a PostIndustriesCreated with default headers values
|
|
func NewPostIndustriesCreated() *PostIndustriesCreated {
|
|
return &PostIndustriesCreated{}
|
|
}
|
|
|
|
/*
|
|
PostIndustriesCreated describes a response with status code 201, with default header values.
|
|
|
|
Response from Salesforce
|
|
*/
|
|
type PostIndustriesCreated struct {
|
|
Payload *sfgate_models.SalesforcePostResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this post industries created response has a 2xx status code
|
|
func (o *PostIndustriesCreated) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this post industries created response has a 3xx status code
|
|
func (o *PostIndustriesCreated) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post industries created response has a 4xx status code
|
|
func (o *PostIndustriesCreated) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this post industries created response has a 5xx status code
|
|
func (o *PostIndustriesCreated) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
// Code gets the status code for the post industries created response
|
|
func (o *PostIndustriesCreated) Code() int {
|
|
return 201
|
|
}
|
|
|
|
func (o *PostIndustriesCreated) Error() string {
|
|
return fmt.Sprintf("[POST /industries][%d] postIndustriesCreated %+v", 201, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustriesCreated) String() string {
|
|
return fmt.Sprintf("[POST /industries][%d] postIndustriesCreated %+v", 201, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustriesCreated) GetPayload() *sfgate_models.SalesforcePostResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustriesCreated) 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
|
|
}
|
|
|
|
// NewPostIndustriesUnauthorized creates a PostIndustriesUnauthorized with default headers values
|
|
func NewPostIndustriesUnauthorized() *PostIndustriesUnauthorized {
|
|
return &PostIndustriesUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
PostIndustriesUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access unauthorized, invalid API-KEY was used
|
|
*/
|
|
type PostIndustriesUnauthorized struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
func (o *PostIndustriesUnauthorized) Error() string {
|
|
return fmt.Sprintf("[POST /industries][%d] postIndustriesUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustriesUnauthorized) String() string {
|
|
return fmt.Sprintf("[POST /industries][%d] postIndustriesUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustriesUnauthorized) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustriesUnauthorized) 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
|
|
}
|
|
|
|
// NewPostIndustriesForbidden creates a PostIndustriesForbidden with default headers values
|
|
func NewPostIndustriesForbidden() *PostIndustriesForbidden {
|
|
return &PostIndustriesForbidden{}
|
|
}
|
|
|
|
/*
|
|
PostIndustriesForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type PostIndustriesForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
func (o *PostIndustriesForbidden) Error() string {
|
|
return fmt.Sprintf("[POST /industries][%d] postIndustriesForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustriesForbidden) String() string {
|
|
return fmt.Sprintf("[POST /industries][%d] postIndustriesForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustriesForbidden) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustriesForbidden) 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
|
|
}
|
|
|
|
// NewPostIndustriesNotFound creates a PostIndustriesNotFound with default headers values
|
|
func NewPostIndustriesNotFound() *PostIndustriesNotFound {
|
|
return &PostIndustriesNotFound{}
|
|
}
|
|
|
|
/*
|
|
PostIndustriesNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type PostIndustriesNotFound struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
func (o *PostIndustriesNotFound) Error() string {
|
|
return fmt.Sprintf("[POST /industries][%d] postIndustriesNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustriesNotFound) String() string {
|
|
return fmt.Sprintf("[POST /industries][%d] postIndustriesNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustriesNotFound) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustriesNotFound) 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
|
|
}
|
|
|
|
// NewPostIndustriesUnprocessableEntity creates a PostIndustriesUnprocessableEntity with default headers values
|
|
func NewPostIndustriesUnprocessableEntity() *PostIndustriesUnprocessableEntity {
|
|
return &PostIndustriesUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
PostIndustriesUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type PostIndustriesUnprocessableEntity struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
func (o *PostIndustriesUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[POST /industries][%d] postIndustriesUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustriesUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[POST /industries][%d] postIndustriesUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustriesUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustriesUnprocessableEntity) 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
|
|
}
|
|
|
|
// NewPostIndustriesInternalServerError creates a PostIndustriesInternalServerError with default headers values
|
|
func NewPostIndustriesInternalServerError() *PostIndustriesInternalServerError {
|
|
return &PostIndustriesInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
PostIndustriesInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type PostIndustriesInternalServerError struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
func (o *PostIndustriesInternalServerError) Error() string {
|
|
return fmt.Sprintf("[POST /industries][%d] postIndustriesInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustriesInternalServerError) String() string {
|
|
return fmt.Sprintf("[POST /industries][%d] postIndustriesInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustriesInternalServerError) GetPayload() *sfgate_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustriesInternalServerError) 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
|
|
}
|