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 industry
|
|
|
|
// 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"
|
|
)
|
|
|
|
// GetIndustriesReader is a Reader for the GetIndustries structure.
|
|
type GetIndustriesReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetIndustriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetIndustriesOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetIndustriesUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewGetIndustriesForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetIndustriesNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewGetIndustriesUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetIndustriesInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetIndustriesOK creates a GetIndustriesOK with default headers values
|
|
func NewGetIndustriesOK() *GetIndustriesOK {
|
|
return &GetIndustriesOK{}
|
|
}
|
|
|
|
/*
|
|
GetIndustriesOK describes a response with status code 200, with default header values.
|
|
|
|
Response with Industry objects
|
|
*/
|
|
type GetIndustriesOK struct {
|
|
Payload *research_models.IndustryResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this get industries o k response has a 2xx status code
|
|
func (o *GetIndustriesOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get industries o k response has a 3xx status code
|
|
func (o *GetIndustriesOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get industries o k response has a 4xx status code
|
|
func (o *GetIndustriesOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get industries o k response has a 5xx status code
|
|
func (o *GetIndustriesOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get industries o k response a status code equal to that given
|
|
func (o *GetIndustriesOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get industries o k response
|
|
func (o *GetIndustriesOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetIndustriesOK) Error() string {
|
|
return fmt.Sprintf("[GET /industries][%d] getIndustriesOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetIndustriesOK) String() string {
|
|
return fmt.Sprintf("[GET /industries][%d] getIndustriesOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetIndustriesOK) GetPayload() *research_models.IndustryResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetIndustriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(research_models.IndustryResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetIndustriesUnauthorized creates a GetIndustriesUnauthorized with default headers values
|
|
func NewGetIndustriesUnauthorized() *GetIndustriesUnauthorized {
|
|
return &GetIndustriesUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetIndustriesUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access unauthorized, invalid API-KEY was used
|
|
*/
|
|
type GetIndustriesUnauthorized struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get industries unauthorized response has a 2xx status code
|
|
func (o *GetIndustriesUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get industries unauthorized response has a 3xx status code
|
|
func (o *GetIndustriesUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get industries unauthorized response has a 4xx status code
|
|
func (o *GetIndustriesUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get industries unauthorized response has a 5xx status code
|
|
func (o *GetIndustriesUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get industries unauthorized response a status code equal to that given
|
|
func (o *GetIndustriesUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get industries unauthorized response
|
|
func (o *GetIndustriesUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetIndustriesUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /industries][%d] getIndustriesUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetIndustriesUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /industries][%d] getIndustriesUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetIndustriesUnauthorized) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetIndustriesUnauthorized) 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
|
|
}
|
|
|
|
// NewGetIndustriesForbidden creates a GetIndustriesForbidden with default headers values
|
|
func NewGetIndustriesForbidden() *GetIndustriesForbidden {
|
|
return &GetIndustriesForbidden{}
|
|
}
|
|
|
|
/*
|
|
GetIndustriesForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type GetIndustriesForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get industries forbidden response has a 2xx status code
|
|
func (o *GetIndustriesForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get industries forbidden response has a 3xx status code
|
|
func (o *GetIndustriesForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get industries forbidden response has a 4xx status code
|
|
func (o *GetIndustriesForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get industries forbidden response has a 5xx status code
|
|
func (o *GetIndustriesForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get industries forbidden response a status code equal to that given
|
|
func (o *GetIndustriesForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the get industries forbidden response
|
|
func (o *GetIndustriesForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *GetIndustriesForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /industries][%d] getIndustriesForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetIndustriesForbidden) String() string {
|
|
return fmt.Sprintf("[GET /industries][%d] getIndustriesForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetIndustriesForbidden) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetIndustriesForbidden) 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
|
|
}
|
|
|
|
// NewGetIndustriesNotFound creates a GetIndustriesNotFound with default headers values
|
|
func NewGetIndustriesNotFound() *GetIndustriesNotFound {
|
|
return &GetIndustriesNotFound{}
|
|
}
|
|
|
|
/*
|
|
GetIndustriesNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type GetIndustriesNotFound struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get industries not found response has a 2xx status code
|
|
func (o *GetIndustriesNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get industries not found response has a 3xx status code
|
|
func (o *GetIndustriesNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get industries not found response has a 4xx status code
|
|
func (o *GetIndustriesNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get industries not found response has a 5xx status code
|
|
func (o *GetIndustriesNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get industries not found response a status code equal to that given
|
|
func (o *GetIndustriesNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the get industries not found response
|
|
func (o *GetIndustriesNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *GetIndustriesNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /industries][%d] getIndustriesNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetIndustriesNotFound) String() string {
|
|
return fmt.Sprintf("[GET /industries][%d] getIndustriesNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetIndustriesNotFound) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetIndustriesNotFound) 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
|
|
}
|
|
|
|
// NewGetIndustriesUnprocessableEntity creates a GetIndustriesUnprocessableEntity with default headers values
|
|
func NewGetIndustriesUnprocessableEntity() *GetIndustriesUnprocessableEntity {
|
|
return &GetIndustriesUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
GetIndustriesUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type GetIndustriesUnprocessableEntity struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get industries unprocessable entity response has a 2xx status code
|
|
func (o *GetIndustriesUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get industries unprocessable entity response has a 3xx status code
|
|
func (o *GetIndustriesUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get industries unprocessable entity response has a 4xx status code
|
|
func (o *GetIndustriesUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get industries unprocessable entity response has a 5xx status code
|
|
func (o *GetIndustriesUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get industries unprocessable entity response a status code equal to that given
|
|
func (o *GetIndustriesUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the get industries unprocessable entity response
|
|
func (o *GetIndustriesUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *GetIndustriesUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[GET /industries][%d] getIndustriesUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetIndustriesUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[GET /industries][%d] getIndustriesUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetIndustriesUnprocessableEntity) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetIndustriesUnprocessableEntity) 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
|
|
}
|
|
|
|
// NewGetIndustriesInternalServerError creates a GetIndustriesInternalServerError with default headers values
|
|
func NewGetIndustriesInternalServerError() *GetIndustriesInternalServerError {
|
|
return &GetIndustriesInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetIndustriesInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type GetIndustriesInternalServerError struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get industries internal server error response has a 2xx status code
|
|
func (o *GetIndustriesInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get industries internal server error response has a 3xx status code
|
|
func (o *GetIndustriesInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get industries internal server error response has a 4xx status code
|
|
func (o *GetIndustriesInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get industries internal server error response has a 5xx status code
|
|
func (o *GetIndustriesInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get industries internal server error response a status code equal to that given
|
|
func (o *GetIndustriesInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the get industries internal server error response
|
|
func (o *GetIndustriesInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *GetIndustriesInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /industries][%d] getIndustriesInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetIndustriesInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /industries][%d] getIndustriesInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetIndustriesInternalServerError) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetIndustriesInternalServerError) 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
|
|
}
|