mirror of https://github.com/vernonkeenan/lib
538 lines
17 KiB
Go
538 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 topic
|
|
|
|
// 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"
|
|
)
|
|
|
|
// GetTopicsObservableReader is a Reader for the GetTopicsObservable structure.
|
|
type GetTopicsObservableReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetTopicsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetTopicsObservableOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetTopicsObservableUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewGetTopicsObservableForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetTopicsObservableNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewGetTopicsObservableUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetTopicsObservableInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetTopicsObservableOK creates a GetTopicsObservableOK with default headers values
|
|
func NewGetTopicsObservableOK() *GetTopicsObservableOK {
|
|
return &GetTopicsObservableOK{}
|
|
}
|
|
|
|
/*
|
|
GetTopicsObservableOK describes a response with status code 200, with default header values.
|
|
|
|
Response with an array of Topic objects
|
|
*/
|
|
type GetTopicsObservableOK struct {
|
|
AccessControlAllowOrigin string
|
|
CacheControl string
|
|
|
|
Payload []*research_models.Topic
|
|
}
|
|
|
|
// IsSuccess returns true when this get topics observable o k response has a 2xx status code
|
|
func (o *GetTopicsObservableOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get topics observable o k response has a 3xx status code
|
|
func (o *GetTopicsObservableOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get topics observable o k response has a 4xx status code
|
|
func (o *GetTopicsObservableOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get topics observable o k response has a 5xx status code
|
|
func (o *GetTopicsObservableOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get topics observable o k response a status code equal to that given
|
|
func (o *GetTopicsObservableOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get topics observable o k response
|
|
func (o *GetTopicsObservableOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetTopicsObservableOK) Error() string {
|
|
return fmt.Sprintf("[GET /topics/observable][%d] getTopicsObservableOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetTopicsObservableOK) String() string {
|
|
return fmt.Sprintf("[GET /topics/observable][%d] getTopicsObservableOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetTopicsObservableOK) GetPayload() []*research_models.Topic {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetTopicsObservableOK) 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
|
|
}
|
|
|
|
// NewGetTopicsObservableUnauthorized creates a GetTopicsObservableUnauthorized with default headers values
|
|
func NewGetTopicsObservableUnauthorized() *GetTopicsObservableUnauthorized {
|
|
return &GetTopicsObservableUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetTopicsObservableUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access unauthorized, invalid API-KEY was used
|
|
*/
|
|
type GetTopicsObservableUnauthorized struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get topics observable unauthorized response has a 2xx status code
|
|
func (o *GetTopicsObservableUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get topics observable unauthorized response has a 3xx status code
|
|
func (o *GetTopicsObservableUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get topics observable unauthorized response has a 4xx status code
|
|
func (o *GetTopicsObservableUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get topics observable unauthorized response has a 5xx status code
|
|
func (o *GetTopicsObservableUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get topics observable unauthorized response a status code equal to that given
|
|
func (o *GetTopicsObservableUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get topics observable unauthorized response
|
|
func (o *GetTopicsObservableUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetTopicsObservableUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /topics/observable][%d] getTopicsObservableUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetTopicsObservableUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /topics/observable][%d] getTopicsObservableUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetTopicsObservableUnauthorized) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetTopicsObservableUnauthorized) 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
|
|
}
|
|
|
|
// NewGetTopicsObservableForbidden creates a GetTopicsObservableForbidden with default headers values
|
|
func NewGetTopicsObservableForbidden() *GetTopicsObservableForbidden {
|
|
return &GetTopicsObservableForbidden{}
|
|
}
|
|
|
|
/*
|
|
GetTopicsObservableForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type GetTopicsObservableForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get topics observable forbidden response has a 2xx status code
|
|
func (o *GetTopicsObservableForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get topics observable forbidden response has a 3xx status code
|
|
func (o *GetTopicsObservableForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get topics observable forbidden response has a 4xx status code
|
|
func (o *GetTopicsObservableForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get topics observable forbidden response has a 5xx status code
|
|
func (o *GetTopicsObservableForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get topics observable forbidden response a status code equal to that given
|
|
func (o *GetTopicsObservableForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the get topics observable forbidden response
|
|
func (o *GetTopicsObservableForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *GetTopicsObservableForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /topics/observable][%d] getTopicsObservableForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetTopicsObservableForbidden) String() string {
|
|
return fmt.Sprintf("[GET /topics/observable][%d] getTopicsObservableForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetTopicsObservableForbidden) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetTopicsObservableForbidden) 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
|
|
}
|
|
|
|
// NewGetTopicsObservableNotFound creates a GetTopicsObservableNotFound with default headers values
|
|
func NewGetTopicsObservableNotFound() *GetTopicsObservableNotFound {
|
|
return &GetTopicsObservableNotFound{}
|
|
}
|
|
|
|
/*
|
|
GetTopicsObservableNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type GetTopicsObservableNotFound struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get topics observable not found response has a 2xx status code
|
|
func (o *GetTopicsObservableNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get topics observable not found response has a 3xx status code
|
|
func (o *GetTopicsObservableNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get topics observable not found response has a 4xx status code
|
|
func (o *GetTopicsObservableNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get topics observable not found response has a 5xx status code
|
|
func (o *GetTopicsObservableNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get topics observable not found response a status code equal to that given
|
|
func (o *GetTopicsObservableNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the get topics observable not found response
|
|
func (o *GetTopicsObservableNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *GetTopicsObservableNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /topics/observable][%d] getTopicsObservableNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetTopicsObservableNotFound) String() string {
|
|
return fmt.Sprintf("[GET /topics/observable][%d] getTopicsObservableNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetTopicsObservableNotFound) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetTopicsObservableNotFound) 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
|
|
}
|
|
|
|
// NewGetTopicsObservableUnprocessableEntity creates a GetTopicsObservableUnprocessableEntity with default headers values
|
|
func NewGetTopicsObservableUnprocessableEntity() *GetTopicsObservableUnprocessableEntity {
|
|
return &GetTopicsObservableUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
GetTopicsObservableUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type GetTopicsObservableUnprocessableEntity struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get topics observable unprocessable entity response has a 2xx status code
|
|
func (o *GetTopicsObservableUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get topics observable unprocessable entity response has a 3xx status code
|
|
func (o *GetTopicsObservableUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get topics observable unprocessable entity response has a 4xx status code
|
|
func (o *GetTopicsObservableUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get topics observable unprocessable entity response has a 5xx status code
|
|
func (o *GetTopicsObservableUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get topics observable unprocessable entity response a status code equal to that given
|
|
func (o *GetTopicsObservableUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the get topics observable unprocessable entity response
|
|
func (o *GetTopicsObservableUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *GetTopicsObservableUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[GET /topics/observable][%d] getTopicsObservableUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetTopicsObservableUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[GET /topics/observable][%d] getTopicsObservableUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetTopicsObservableUnprocessableEntity) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetTopicsObservableUnprocessableEntity) 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
|
|
}
|
|
|
|
// NewGetTopicsObservableInternalServerError creates a GetTopicsObservableInternalServerError with default headers values
|
|
func NewGetTopicsObservableInternalServerError() *GetTopicsObservableInternalServerError {
|
|
return &GetTopicsObservableInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetTopicsObservableInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type GetTopicsObservableInternalServerError struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *research_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get topics observable internal server error response has a 2xx status code
|
|
func (o *GetTopicsObservableInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get topics observable internal server error response has a 3xx status code
|
|
func (o *GetTopicsObservableInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get topics observable internal server error response has a 4xx status code
|
|
func (o *GetTopicsObservableInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get topics observable internal server error response has a 5xx status code
|
|
func (o *GetTopicsObservableInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get topics observable internal server error response a status code equal to that given
|
|
func (o *GetTopicsObservableInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the get topics observable internal server error response
|
|
func (o *GetTopicsObservableInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *GetTopicsObservableInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /topics/observable][%d] getTopicsObservableInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetTopicsObservableInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /topics/observable][%d] getTopicsObservableInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetTopicsObservableInternalServerError) GetPayload() *research_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetTopicsObservableInternalServerError) 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
|
|
}
|