2022-09-05 00:01:32 +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
2022-09-07 00:16:25 +00:00
package topic
2022-09-05 00:01:32 +00:00
// 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"
)
2022-09-07 00:16:25 +00:00
// GetTopicsReader is a Reader for the GetTopics structure.
type GetTopicsReader struct {
2022-09-05 00:01:32 +00:00
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
2022-09-05 00:01:32 +00:00
switch response . Code ( ) {
case 200 :
2022-09-07 00:16:25 +00:00
result := NewGetTopicsOK ( )
2022-09-05 00:01:32 +00:00
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
2022-09-07 00:16:25 +00:00
result := NewGetTopicsUnauthorized ( )
2022-09-05 00:01:32 +00:00
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
2022-09-07 00:16:25 +00:00
result := NewGetTopicsForbidden ( )
2022-09-05 00:01:32 +00:00
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
2022-09-07 00:16:25 +00:00
result := NewGetTopicsNotFound ( )
2022-09-05 00:01:32 +00:00
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
2022-09-07 00:16:25 +00:00
result := NewGetTopicsUnprocessableEntity ( )
2022-09-05 00:01:32 +00:00
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
2022-09-07 00:16:25 +00:00
result := NewGetTopicsInternalServerError ( )
2022-09-05 00:01:32 +00:00
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 ( ) )
}
}
2022-09-07 00:16:25 +00:00
// NewGetTopicsOK creates a GetTopicsOK with default headers values
func NewGetTopicsOK ( ) * GetTopicsOK {
return & GetTopicsOK { }
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
/ *
GetTopicsOK describes a response with status code 200 , with default header values .
2022-09-05 00:01:32 +00:00
2022-09-07 00:16:25 +00:00
Taxnexus Response with Topic objects
2022-09-05 00:01:32 +00:00
* /
2022-09-07 00:16:25 +00:00
type GetTopicsOK struct {
2022-09-05 00:01:32 +00:00
AccessControlAllowOrigin string
CacheControl string
2022-09-07 00:16:25 +00:00
Payload * research_models . TopicResponse
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get topics o k response has a 2xx status code
func ( o * GetTopicsOK ) IsSuccess ( ) bool {
return true
}
// IsRedirect returns true when this get topics o k response has a 3xx status code
func ( o * GetTopicsOK ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get topics o k response has a 4xx status code
func ( o * GetTopicsOK ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this get topics o k response has a 5xx status code
func ( o * GetTopicsOK ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get topics o k response a status code equal to that given
func ( o * GetTopicsOK ) IsCode ( code int ) bool {
return code == 200
}
// Code gets the status code for the get topics o k response
func ( o * GetTopicsOK ) Code ( ) int {
return 200
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsOK ) Error ( ) string {
return fmt . Sprintf ( "[GET /topics][%d] getTopicsOK %+v" , 200 , o . Payload )
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
func ( o * GetTopicsOK ) String ( ) string {
return fmt . Sprintf ( "[GET /topics][%d] getTopicsOK %+v" , 200 , o . Payload )
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsOK ) GetPayload ( ) * research_models . TopicResponse {
2022-09-05 00:01:32 +00:00
return o . Payload
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2022-09-05 00:01:32 +00:00
// 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
}
2022-09-07 00:16:25 +00:00
o . Payload = new ( research_models . TopicResponse )
2022-09-05 00:01:32 +00:00
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
2022-09-07 00:16:25 +00:00
// NewGetTopicsUnauthorized creates a GetTopicsUnauthorized with default headers values
func NewGetTopicsUnauthorized ( ) * GetTopicsUnauthorized {
return & GetTopicsUnauthorized { }
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
/ *
GetTopicsUnauthorized describes a response with status code 401 , with default header values .
2022-09-05 00:01:32 +00:00
Access unauthorized , invalid API - KEY was used
* /
2022-09-07 00:16:25 +00:00
type GetTopicsUnauthorized struct {
2022-09-05 00:01:32 +00:00
AccessControlAllowOrigin string
Payload * research_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get topics unauthorized response has a 2xx status code
func ( o * GetTopicsUnauthorized ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get topics unauthorized response has a 3xx status code
func ( o * GetTopicsUnauthorized ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get topics unauthorized response has a 4xx status code
func ( o * GetTopicsUnauthorized ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get topics unauthorized response has a 5xx status code
func ( o * GetTopicsUnauthorized ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get topics unauthorized response a status code equal to that given
func ( o * GetTopicsUnauthorized ) IsCode ( code int ) bool {
return code == 401
}
// Code gets the status code for the get topics unauthorized response
func ( o * GetTopicsUnauthorized ) Code ( ) int {
return 401
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[GET /topics][%d] getTopicsUnauthorized %+v" , 401 , o . Payload )
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
func ( o * GetTopicsUnauthorized ) String ( ) string {
return fmt . Sprintf ( "[GET /topics][%d] getTopicsUnauthorized %+v" , 401 , o . Payload )
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsUnauthorized ) GetPayload ( ) * research_models . Error {
2022-09-05 00:01:32 +00:00
return o . Payload
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsUnauthorized ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2022-09-05 00:01:32 +00:00
// 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
}
2022-09-07 00:16:25 +00:00
// NewGetTopicsForbidden creates a GetTopicsForbidden with default headers values
func NewGetTopicsForbidden ( ) * GetTopicsForbidden {
return & GetTopicsForbidden { }
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
/ *
GetTopicsForbidden describes a response with status code 403 , with default header values .
2022-09-05 00:01:32 +00:00
Access forbidden , account lacks access
* /
2022-09-07 00:16:25 +00:00
type GetTopicsForbidden struct {
2022-09-05 00:01:32 +00:00
AccessControlAllowOrigin string
Payload * research_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get topics forbidden response has a 2xx status code
func ( o * GetTopicsForbidden ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get topics forbidden response has a 3xx status code
func ( o * GetTopicsForbidden ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get topics forbidden response has a 4xx status code
func ( o * GetTopicsForbidden ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get topics forbidden response has a 5xx status code
func ( o * GetTopicsForbidden ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get topics forbidden response a status code equal to that given
func ( o * GetTopicsForbidden ) IsCode ( code int ) bool {
return code == 403
}
// Code gets the status code for the get topics forbidden response
func ( o * GetTopicsForbidden ) Code ( ) int {
return 403
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsForbidden ) Error ( ) string {
return fmt . Sprintf ( "[GET /topics][%d] getTopicsForbidden %+v" , 403 , o . Payload )
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
func ( o * GetTopicsForbidden ) String ( ) string {
return fmt . Sprintf ( "[GET /topics][%d] getTopicsForbidden %+v" , 403 , o . Payload )
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsForbidden ) GetPayload ( ) * research_models . Error {
2022-09-05 00:01:32 +00:00
return o . Payload
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsForbidden ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2022-09-05 00:01:32 +00:00
// 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
}
2022-09-07 00:16:25 +00:00
// NewGetTopicsNotFound creates a GetTopicsNotFound with default headers values
func NewGetTopicsNotFound ( ) * GetTopicsNotFound {
return & GetTopicsNotFound { }
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
/ *
GetTopicsNotFound describes a response with status code 404 , with default header values .
2022-09-05 00:01:32 +00:00
Resource was not found
* /
2022-09-07 00:16:25 +00:00
type GetTopicsNotFound struct {
2022-09-05 00:01:32 +00:00
AccessControlAllowOrigin string
Payload * research_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get topics not found response has a 2xx status code
func ( o * GetTopicsNotFound ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get topics not found response has a 3xx status code
func ( o * GetTopicsNotFound ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get topics not found response has a 4xx status code
func ( o * GetTopicsNotFound ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get topics not found response has a 5xx status code
func ( o * GetTopicsNotFound ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get topics not found response a status code equal to that given
func ( o * GetTopicsNotFound ) IsCode ( code int ) bool {
return code == 404
}
// Code gets the status code for the get topics not found response
func ( o * GetTopicsNotFound ) Code ( ) int {
return 404
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsNotFound ) Error ( ) string {
return fmt . Sprintf ( "[GET /topics][%d] getTopicsNotFound %+v" , 404 , o . Payload )
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
func ( o * GetTopicsNotFound ) String ( ) string {
return fmt . Sprintf ( "[GET /topics][%d] getTopicsNotFound %+v" , 404 , o . Payload )
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsNotFound ) GetPayload ( ) * research_models . Error {
2022-09-05 00:01:32 +00:00
return o . Payload
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsNotFound ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2022-09-05 00:01:32 +00:00
// 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
}
2022-09-07 00:16:25 +00:00
// NewGetTopicsUnprocessableEntity creates a GetTopicsUnprocessableEntity with default headers values
func NewGetTopicsUnprocessableEntity ( ) * GetTopicsUnprocessableEntity {
return & GetTopicsUnprocessableEntity { }
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
/ *
GetTopicsUnprocessableEntity describes a response with status code 422 , with default header values .
2022-09-05 00:01:32 +00:00
Unprocessable Entity , likely a bad parameter
* /
2022-09-07 00:16:25 +00:00
type GetTopicsUnprocessableEntity struct {
2022-09-05 00:01:32 +00:00
AccessControlAllowOrigin string
Payload * research_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get topics unprocessable entity response has a 2xx status code
func ( o * GetTopicsUnprocessableEntity ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get topics unprocessable entity response has a 3xx status code
func ( o * GetTopicsUnprocessableEntity ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get topics unprocessable entity response has a 4xx status code
func ( o * GetTopicsUnprocessableEntity ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get topics unprocessable entity response has a 5xx status code
func ( o * GetTopicsUnprocessableEntity ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get topics unprocessable entity response a status code equal to that given
func ( o * GetTopicsUnprocessableEntity ) IsCode ( code int ) bool {
return code == 422
}
// Code gets the status code for the get topics unprocessable entity response
func ( o * GetTopicsUnprocessableEntity ) Code ( ) int {
return 422
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[GET /topics][%d] getTopicsUnprocessableEntity %+v" , 422 , o . Payload )
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
func ( o * GetTopicsUnprocessableEntity ) String ( ) string {
return fmt . Sprintf ( "[GET /topics][%d] getTopicsUnprocessableEntity %+v" , 422 , o . Payload )
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsUnprocessableEntity ) GetPayload ( ) * research_models . Error {
2022-09-05 00:01:32 +00:00
return o . Payload
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsUnprocessableEntity ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2022-09-05 00:01:32 +00:00
// 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
}
2022-09-07 00:16:25 +00:00
// NewGetTopicsInternalServerError creates a GetTopicsInternalServerError with default headers values
func NewGetTopicsInternalServerError ( ) * GetTopicsInternalServerError {
return & GetTopicsInternalServerError { }
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
/ *
GetTopicsInternalServerError describes a response with status code 500 , with default header values .
2022-09-05 00:01:32 +00:00
Server Internal Error
* /
2022-09-07 00:16:25 +00:00
type GetTopicsInternalServerError struct {
2022-09-05 00:01:32 +00:00
AccessControlAllowOrigin string
Payload * research_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get topics internal server error response has a 2xx status code
func ( o * GetTopicsInternalServerError ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get topics internal server error response has a 3xx status code
func ( o * GetTopicsInternalServerError ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get topics internal server error response has a 4xx status code
func ( o * GetTopicsInternalServerError ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this get topics internal server error response has a 5xx status code
func ( o * GetTopicsInternalServerError ) IsServerError ( ) bool {
return true
}
// IsCode returns true when this get topics internal server error response a status code equal to that given
func ( o * GetTopicsInternalServerError ) IsCode ( code int ) bool {
return code == 500
}
// Code gets the status code for the get topics internal server error response
func ( o * GetTopicsInternalServerError ) Code ( ) int {
return 500
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[GET /topics][%d] getTopicsInternalServerError %+v" , 500 , o . Payload )
2022-09-05 00:01:32 +00:00
}
2023-03-22 20:49:01 +00:00
func ( o * GetTopicsInternalServerError ) String ( ) string {
return fmt . Sprintf ( "[GET /topics][%d] getTopicsInternalServerError %+v" , 500 , o . Payload )
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsInternalServerError ) GetPayload ( ) * research_models . Error {
2022-09-05 00:01:32 +00:00
return o . Payload
}
2022-09-07 00:16:25 +00:00
func ( o * GetTopicsInternalServerError ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
2022-09-05 00:01:32 +00:00
// 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
}