lib/api/research/research_client/industry/get_industries_observable_r...

538 lines
18 KiB
Go
Raw Permalink Normal View History

2022-09-07 00:16:25 +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 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"
)
// GetIndustriesObservableReader is a Reader for the GetIndustriesObservable structure.
type GetIndustriesObservableReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *GetIndustriesObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewGetIndustriesObservableOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewGetIndustriesObservableUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewGetIndustriesObservableForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewGetIndustriesObservableNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewGetIndustriesObservableUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewGetIndustriesObservableInternalServerError()
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())
}
}
// NewGetIndustriesObservableOK creates a GetIndustriesObservableOK with default headers values
func NewGetIndustriesObservableOK() *GetIndustriesObservableOK {
return &GetIndustriesObservableOK{}
}
2023-03-22 20:49:01 +00:00
/*
GetIndustriesObservableOK describes a response with status code 200, with default header values.
2022-09-07 00:16:25 +00:00
2023-03-28 17:47:34 +00:00
Response with an array of Industry objects
2022-09-07 00:16:25 +00:00
*/
type GetIndustriesObservableOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload []*research_models.Industry
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get industries observable o k response has a 2xx status code
func (o *GetIndustriesObservableOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this get industries observable o k response has a 3xx status code
func (o *GetIndustriesObservableOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this get industries observable o k response has a 4xx status code
func (o *GetIndustriesObservableOK) IsClientError() bool {
return false
}
// IsServerError returns true when this get industries observable o k response has a 5xx status code
func (o *GetIndustriesObservableOK) IsServerError() bool {
return false
}
// IsCode returns true when this get industries observable o k response a status code equal to that given
func (o *GetIndustriesObservableOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the get industries observable o k response
func (o *GetIndustriesObservableOK) Code() int {
return 200
}
2022-09-07 00:16:25 +00:00
func (o *GetIndustriesObservableOK) Error() string {
return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableOK %+v", 200, o.Payload)
}
2023-03-22 20:49:01 +00:00
func (o *GetIndustriesObservableOK) String() string {
return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableOK %+v", 200, o.Payload)
}
2022-09-07 00:16:25 +00:00
func (o *GetIndustriesObservableOK) GetPayload() []*research_models.Industry {
return o.Payload
}
func (o *GetIndustriesObservableOK) 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
}
// response payload
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewGetIndustriesObservableUnauthorized creates a GetIndustriesObservableUnauthorized with default headers values
func NewGetIndustriesObservableUnauthorized() *GetIndustriesObservableUnauthorized {
return &GetIndustriesObservableUnauthorized{}
}
2023-03-22 20:49:01 +00:00
/*
GetIndustriesObservableUnauthorized describes a response with status code 401, with default header values.
2022-09-07 00:16:25 +00:00
Access unauthorized, invalid API-KEY was used
*/
type GetIndustriesObservableUnauthorized struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get industries observable unauthorized response has a 2xx status code
func (o *GetIndustriesObservableUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get industries observable unauthorized response has a 3xx status code
func (o *GetIndustriesObservableUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this get industries observable unauthorized response has a 4xx status code
func (o *GetIndustriesObservableUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this get industries observable unauthorized response has a 5xx status code
func (o *GetIndustriesObservableUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this get industries observable unauthorized response a status code equal to that given
func (o *GetIndustriesObservableUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the get industries observable unauthorized response
func (o *GetIndustriesObservableUnauthorized) Code() int {
return 401
}
2022-09-07 00:16:25 +00:00
func (o *GetIndustriesObservableUnauthorized) Error() string {
return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableUnauthorized %+v", 401, o.Payload)
}
2023-03-22 20:49:01 +00:00
func (o *GetIndustriesObservableUnauthorized) String() string {
return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableUnauthorized %+v", 401, o.Payload)
}
2022-09-07 00:16:25 +00:00
func (o *GetIndustriesObservableUnauthorized) GetPayload() *research_models.Error {
return o.Payload
}
func (o *GetIndustriesObservableUnauthorized) 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
}
// NewGetIndustriesObservableForbidden creates a GetIndustriesObservableForbidden with default headers values
func NewGetIndustriesObservableForbidden() *GetIndustriesObservableForbidden {
return &GetIndustriesObservableForbidden{}
}
2023-03-22 20:49:01 +00:00
/*
GetIndustriesObservableForbidden describes a response with status code 403, with default header values.
2022-09-07 00:16:25 +00:00
Access forbidden, account lacks access
*/
type GetIndustriesObservableForbidden struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get industries observable forbidden response has a 2xx status code
func (o *GetIndustriesObservableForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get industries observable forbidden response has a 3xx status code
func (o *GetIndustriesObservableForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this get industries observable forbidden response has a 4xx status code
func (o *GetIndustriesObservableForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this get industries observable forbidden response has a 5xx status code
func (o *GetIndustriesObservableForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this get industries observable forbidden response a status code equal to that given
func (o *GetIndustriesObservableForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the get industries observable forbidden response
func (o *GetIndustriesObservableForbidden) Code() int {
return 403
}
2022-09-07 00:16:25 +00:00
func (o *GetIndustriesObservableForbidden) Error() string {
return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableForbidden %+v", 403, o.Payload)
}
2023-03-22 20:49:01 +00:00
func (o *GetIndustriesObservableForbidden) String() string {
return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableForbidden %+v", 403, o.Payload)
}
2022-09-07 00:16:25 +00:00
func (o *GetIndustriesObservableForbidden) GetPayload() *research_models.Error {
return o.Payload
}
func (o *GetIndustriesObservableForbidden) 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
}
// NewGetIndustriesObservableNotFound creates a GetIndustriesObservableNotFound with default headers values
func NewGetIndustriesObservableNotFound() *GetIndustriesObservableNotFound {
return &GetIndustriesObservableNotFound{}
}
2023-03-22 20:49:01 +00:00
/*
GetIndustriesObservableNotFound describes a response with status code 404, with default header values.
2022-09-07 00:16:25 +00:00
Resource was not found
*/
type GetIndustriesObservableNotFound struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get industries observable not found response has a 2xx status code
func (o *GetIndustriesObservableNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get industries observable not found response has a 3xx status code
func (o *GetIndustriesObservableNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this get industries observable not found response has a 4xx status code
func (o *GetIndustriesObservableNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this get industries observable not found response has a 5xx status code
func (o *GetIndustriesObservableNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this get industries observable not found response a status code equal to that given
func (o *GetIndustriesObservableNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the get industries observable not found response
func (o *GetIndustriesObservableNotFound) Code() int {
return 404
}
2022-09-07 00:16:25 +00:00
func (o *GetIndustriesObservableNotFound) Error() string {
return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableNotFound %+v", 404, o.Payload)
}
2023-03-22 20:49:01 +00:00
func (o *GetIndustriesObservableNotFound) String() string {
return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableNotFound %+v", 404, o.Payload)
}
2022-09-07 00:16:25 +00:00
func (o *GetIndustriesObservableNotFound) GetPayload() *research_models.Error {
return o.Payload
}
func (o *GetIndustriesObservableNotFound) 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
}
// NewGetIndustriesObservableUnprocessableEntity creates a GetIndustriesObservableUnprocessableEntity with default headers values
func NewGetIndustriesObservableUnprocessableEntity() *GetIndustriesObservableUnprocessableEntity {
return &GetIndustriesObservableUnprocessableEntity{}
}
2023-03-22 20:49:01 +00:00
/*
GetIndustriesObservableUnprocessableEntity describes a response with status code 422, with default header values.
2022-09-07 00:16:25 +00:00
Unprocessable Entity, likely a bad parameter
*/
type GetIndustriesObservableUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get industries observable unprocessable entity response has a 2xx status code
func (o *GetIndustriesObservableUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get industries observable unprocessable entity response has a 3xx status code
func (o *GetIndustriesObservableUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this get industries observable unprocessable entity response has a 4xx status code
func (o *GetIndustriesObservableUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this get industries observable unprocessable entity response has a 5xx status code
func (o *GetIndustriesObservableUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this get industries observable unprocessable entity response a status code equal to that given
func (o *GetIndustriesObservableUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the get industries observable unprocessable entity response
func (o *GetIndustriesObservableUnprocessableEntity) Code() int {
return 422
}
2022-09-07 00:16:25 +00:00
func (o *GetIndustriesObservableUnprocessableEntity) Error() string {
return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableUnprocessableEntity %+v", 422, o.Payload)
}
2023-03-22 20:49:01 +00:00
func (o *GetIndustriesObservableUnprocessableEntity) String() string {
return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableUnprocessableEntity %+v", 422, o.Payload)
}
2022-09-07 00:16:25 +00:00
func (o *GetIndustriesObservableUnprocessableEntity) GetPayload() *research_models.Error {
return o.Payload
}
func (o *GetIndustriesObservableUnprocessableEntity) 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
}
// NewGetIndustriesObservableInternalServerError creates a GetIndustriesObservableInternalServerError with default headers values
func NewGetIndustriesObservableInternalServerError() *GetIndustriesObservableInternalServerError {
return &GetIndustriesObservableInternalServerError{}
}
2023-03-22 20:49:01 +00:00
/*
GetIndustriesObservableInternalServerError describes a response with status code 500, with default header values.
2022-09-07 00:16:25 +00:00
Server Internal Error
*/
type GetIndustriesObservableInternalServerError struct {
AccessControlAllowOrigin string
Payload *research_models.Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get industries observable internal server error response has a 2xx status code
func (o *GetIndustriesObservableInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this get industries observable internal server error response has a 3xx status code
func (o *GetIndustriesObservableInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this get industries observable internal server error response has a 4xx status code
func (o *GetIndustriesObservableInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this get industries observable internal server error response has a 5xx status code
func (o *GetIndustriesObservableInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this get industries observable internal server error response a status code equal to that given
func (o *GetIndustriesObservableInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the get industries observable internal server error response
func (o *GetIndustriesObservableInternalServerError) Code() int {
return 500
}
2022-09-07 00:16:25 +00:00
func (o *GetIndustriesObservableInternalServerError) Error() string {
return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableInternalServerError %+v", 500, o.Payload)
}
2023-03-22 20:49:01 +00:00
func (o *GetIndustriesObservableInternalServerError) String() string {
return fmt.Sprintf("[GET /industries/observable][%d] getIndustriesObservableInternalServerError %+v", 500, o.Payload)
}
2022-09-07 00:16:25 +00:00
func (o *GetIndustriesObservableInternalServerError) GetPayload() *research_models.Error {
return o.Payload
}
func (o *GetIndustriesObservableInternalServerError) 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
}