mirror of https://github.com/vernonkeenan/lib
523 lines
17 KiB
Go
523 lines
17 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/research/research_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 200:
|
|
result := NewPostIndustryServicesOK()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewPostIndustryServicesOK creates a PostIndustryServicesOK with default headers values
|
|
func NewPostIndustryServicesOK() *PostIndustryServicesOK {
|
|
return &PostIndustryServicesOK{}
|
|
}
|
|
|
|
/*
|
|
PostIndustryServicesOK describes a response with status code 200, with default header values.
|
|
|
|
Response with IndustryService objects
|
|
*/
|
|
type PostIndustryServicesOK struct {
|
|
Payload *research_models.IndustryServiceResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this post industry services o k response has a 2xx status code
|
|
func (o *PostIndustryServicesOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this post industry services o k response has a 3xx status code
|
|
func (o *PostIndustryServicesOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this post industry services o k response has a 4xx status code
|
|
func (o *PostIndustryServicesOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this post industry services o k response has a 5xx status code
|
|
func (o *PostIndustryServicesOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this post industry services o k response a status code equal to that given
|
|
func (o *PostIndustryServicesOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the post industry services o k response
|
|
func (o *PostIndustryServicesOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *PostIndustryServicesOK) Error() string {
|
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustryServicesOK) String() string {
|
|
return fmt.Sprintf("[POST /industryservices][%d] postIndustryServicesOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *PostIndustryServicesOK) GetPayload() *research_models.IndustryServiceResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustryServicesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(research_models.IndustryServiceResponse)
|
|
|
|
// 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 {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_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() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustryServicesUnauthorized) 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(research_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 {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_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() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustryServicesForbidden) 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(research_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 {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_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() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustryServicesNotFound) 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(research_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 {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_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() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustryServicesUnprocessableEntity) 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(research_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 {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_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() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *PostIndustryServicesInternalServerError) 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(research_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|