mirror of https://github.com/vernonkeenan/lib
324 lines
10 KiB
Go
324 lines
10 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 200:
|
|
result := NewPostIndustryproductsOK()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewPostIndustryproductsOK creates a PostIndustryproductsOK with default headers values
|
|
func NewPostIndustryproductsOK() *PostIndustryproductsOK {
|
|
return &PostIndustryproductsOK{}
|
|
}
|
|
|
|
/* PostIndustryproductsOK describes a response with status code 200, with default header values.
|
|
|
|
Taxnexus Response with Industry objects
|
|
*/
|
|
type PostIndustryproductsOK struct {
|
|
AccessControlAllowOrigin string
|
|
CacheControl string
|
|
|
|
Payload *sfgate_models.IndustryProductResponse
|
|
}
|
|
|
|
func (o *PostIndustryproductsOK) Error() string {
|
|
return fmt.Sprintf("[POST /industryproducts][%d] postIndustryproductsOK %+v", 200, o.Payload)
|
|
}
|
|
func (o *PostIndustryproductsOK) GetPayload() *sfgate_models.IndustryProductResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustryproductsOK) 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
|
|
}
|
|
|
|
// hydrates response header Cache-Control
|
|
hdrCacheControl := response.GetHeader("Cache-Control")
|
|
|
|
if hdrCacheControl != "" {
|
|
o.CacheControl = hdrCacheControl
|
|
}
|
|
|
|
o.Payload = new(sfgate_models.IndustryProductResponse)
|
|
|
|
// 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 {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
func (o *PostIndustryproductsUnauthorized) Error() 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 {
|
|
|
|
// 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
|
|
}
|
|
|
|
// 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 {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
func (o *PostIndustryproductsForbidden) Error() 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 {
|
|
|
|
// 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
|
|
}
|
|
|
|
// 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 {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
func (o *PostIndustryproductsNotFound) Error() 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 {
|
|
|
|
// 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
|
|
}
|
|
|
|
// 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 {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
func (o *PostIndustryproductsUnprocessableEntity) Error() 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 {
|
|
|
|
// 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
|
|
}
|
|
|
|
// 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 {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
func (o *PostIndustryproductsInternalServerError) Error() 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 {
|
|
|
|
// 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
|
|
}
|