2021-08-05 19:37:53 +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 templates
// 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/sfgate/sfgate_models"
)
// GetTemplatesReader is a Reader for the GetTemplates structure.
type GetTemplatesReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * GetTemplatesReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewGetTemplatesOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewGetTemplatesUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewGetTemplatesForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewGetTemplatesNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewGetTemplatesUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewGetTemplatesInternalServerError ( )
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 ( ) )
}
}
// NewGetTemplatesOK creates a GetTemplatesOK with default headers values
func NewGetTemplatesOK ( ) * GetTemplatesOK {
return & GetTemplatesOK { }
}
2023-03-22 20:49:01 +00:00
/ *
GetTemplatesOK describes a response with status code 200 , with default header values .
2021-08-05 19:37:53 +00:00
2023-03-28 17:47:34 +00:00
Response with Template objects
2021-08-05 19:37:53 +00:00
* /
type GetTemplatesOK struct {
Payload * sfgate_models . TemplateResponse
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get templates o k response has a 2xx status code
func ( o * GetTemplatesOK ) IsSuccess ( ) bool {
return true
}
// IsRedirect returns true when this get templates o k response has a 3xx status code
func ( o * GetTemplatesOK ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get templates o k response has a 4xx status code
func ( o * GetTemplatesOK ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this get templates o k response has a 5xx status code
func ( o * GetTemplatesOK ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get templates o k response a status code equal to that given
func ( o * GetTemplatesOK ) IsCode ( code int ) bool {
return code == 200
}
// Code gets the status code for the get templates o k response
func ( o * GetTemplatesOK ) Code ( ) int {
return 200
}
2021-08-05 19:37:53 +00:00
func ( o * GetTemplatesOK ) Error ( ) string {
return fmt . Sprintf ( "[GET /templates][%d] getTemplatesOK %+v" , 200 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetTemplatesOK ) String ( ) string {
return fmt . Sprintf ( "[GET /templates][%d] getTemplatesOK %+v" , 200 , o . Payload )
}
2021-08-05 19:37:53 +00:00
func ( o * GetTemplatesOK ) GetPayload ( ) * sfgate_models . TemplateResponse {
return o . Payload
}
func ( o * GetTemplatesOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( sfgate_models . TemplateResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetTemplatesUnauthorized creates a GetTemplatesUnauthorized with default headers values
func NewGetTemplatesUnauthorized ( ) * GetTemplatesUnauthorized {
return & GetTemplatesUnauthorized { }
}
2023-03-22 20:49:01 +00:00
/ *
GetTemplatesUnauthorized describes a response with status code 401 , with default header values .
2021-08-05 19:37:53 +00:00
Access unauthorized , invalid API - KEY was used
* /
type GetTemplatesUnauthorized struct {
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get templates unauthorized response has a 2xx status code
func ( o * GetTemplatesUnauthorized ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get templates unauthorized response has a 3xx status code
func ( o * GetTemplatesUnauthorized ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get templates unauthorized response has a 4xx status code
func ( o * GetTemplatesUnauthorized ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get templates unauthorized response has a 5xx status code
func ( o * GetTemplatesUnauthorized ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get templates unauthorized response a status code equal to that given
func ( o * GetTemplatesUnauthorized ) IsCode ( code int ) bool {
return code == 401
}
// Code gets the status code for the get templates unauthorized response
func ( o * GetTemplatesUnauthorized ) Code ( ) int {
return 401
}
2021-08-05 19:37:53 +00:00
func ( o * GetTemplatesUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[GET /templates][%d] getTemplatesUnauthorized %+v" , 401 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetTemplatesUnauthorized ) String ( ) string {
return fmt . Sprintf ( "[GET /templates][%d] getTemplatesUnauthorized %+v" , 401 , o . Payload )
}
2021-08-05 19:37:53 +00:00
func ( o * GetTemplatesUnauthorized ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * GetTemplatesUnauthorized ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( sfgate_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetTemplatesForbidden creates a GetTemplatesForbidden with default headers values
func NewGetTemplatesForbidden ( ) * GetTemplatesForbidden {
return & GetTemplatesForbidden { }
}
2023-03-22 20:49:01 +00:00
/ *
GetTemplatesForbidden describes a response with status code 403 , with default header values .
2021-08-05 19:37:53 +00:00
Access forbidden , account lacks access
* /
type GetTemplatesForbidden struct {
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get templates forbidden response has a 2xx status code
func ( o * GetTemplatesForbidden ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get templates forbidden response has a 3xx status code
func ( o * GetTemplatesForbidden ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get templates forbidden response has a 4xx status code
func ( o * GetTemplatesForbidden ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get templates forbidden response has a 5xx status code
func ( o * GetTemplatesForbidden ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get templates forbidden response a status code equal to that given
func ( o * GetTemplatesForbidden ) IsCode ( code int ) bool {
return code == 403
}
// Code gets the status code for the get templates forbidden response
func ( o * GetTemplatesForbidden ) Code ( ) int {
return 403
}
2021-08-05 19:37:53 +00:00
func ( o * GetTemplatesForbidden ) Error ( ) string {
return fmt . Sprintf ( "[GET /templates][%d] getTemplatesForbidden %+v" , 403 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetTemplatesForbidden ) String ( ) string {
return fmt . Sprintf ( "[GET /templates][%d] getTemplatesForbidden %+v" , 403 , o . Payload )
}
2021-08-05 19:37:53 +00:00
func ( o * GetTemplatesForbidden ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * GetTemplatesForbidden ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( sfgate_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetTemplatesNotFound creates a GetTemplatesNotFound with default headers values
func NewGetTemplatesNotFound ( ) * GetTemplatesNotFound {
return & GetTemplatesNotFound { }
}
2023-03-22 20:49:01 +00:00
/ *
GetTemplatesNotFound describes a response with status code 404 , with default header values .
2021-08-05 19:37:53 +00:00
Resource was not found
* /
type GetTemplatesNotFound struct {
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get templates not found response has a 2xx status code
func ( o * GetTemplatesNotFound ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get templates not found response has a 3xx status code
func ( o * GetTemplatesNotFound ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get templates not found response has a 4xx status code
func ( o * GetTemplatesNotFound ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get templates not found response has a 5xx status code
func ( o * GetTemplatesNotFound ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get templates not found response a status code equal to that given
func ( o * GetTemplatesNotFound ) IsCode ( code int ) bool {
return code == 404
}
// Code gets the status code for the get templates not found response
func ( o * GetTemplatesNotFound ) Code ( ) int {
return 404
}
2021-08-05 19:37:53 +00:00
func ( o * GetTemplatesNotFound ) Error ( ) string {
return fmt . Sprintf ( "[GET /templates][%d] getTemplatesNotFound %+v" , 404 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetTemplatesNotFound ) String ( ) string {
return fmt . Sprintf ( "[GET /templates][%d] getTemplatesNotFound %+v" , 404 , o . Payload )
}
2021-08-05 19:37:53 +00:00
func ( o * GetTemplatesNotFound ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * GetTemplatesNotFound ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( sfgate_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetTemplatesUnprocessableEntity creates a GetTemplatesUnprocessableEntity with default headers values
func NewGetTemplatesUnprocessableEntity ( ) * GetTemplatesUnprocessableEntity {
return & GetTemplatesUnprocessableEntity { }
}
2023-03-22 20:49:01 +00:00
/ *
GetTemplatesUnprocessableEntity describes a response with status code 422 , with default header values .
2021-08-05 19:37:53 +00:00
Unprocessable Entity , likely a bad parameter
* /
type GetTemplatesUnprocessableEntity struct {
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get templates unprocessable entity response has a 2xx status code
func ( o * GetTemplatesUnprocessableEntity ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get templates unprocessable entity response has a 3xx status code
func ( o * GetTemplatesUnprocessableEntity ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get templates unprocessable entity response has a 4xx status code
func ( o * GetTemplatesUnprocessableEntity ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get templates unprocessable entity response has a 5xx status code
func ( o * GetTemplatesUnprocessableEntity ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get templates unprocessable entity response a status code equal to that given
func ( o * GetTemplatesUnprocessableEntity ) IsCode ( code int ) bool {
return code == 422
}
// Code gets the status code for the get templates unprocessable entity response
func ( o * GetTemplatesUnprocessableEntity ) Code ( ) int {
return 422
}
2021-08-05 19:37:53 +00:00
func ( o * GetTemplatesUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[GET /templates][%d] getTemplatesUnprocessableEntity %+v" , 422 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetTemplatesUnprocessableEntity ) String ( ) string {
return fmt . Sprintf ( "[GET /templates][%d] getTemplatesUnprocessableEntity %+v" , 422 , o . Payload )
}
2021-08-05 19:37:53 +00:00
func ( o * GetTemplatesUnprocessableEntity ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * GetTemplatesUnprocessableEntity ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( sfgate_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetTemplatesInternalServerError creates a GetTemplatesInternalServerError with default headers values
func NewGetTemplatesInternalServerError ( ) * GetTemplatesInternalServerError {
return & GetTemplatesInternalServerError { }
}
2023-03-22 20:49:01 +00:00
/ *
GetTemplatesInternalServerError describes a response with status code 500 , with default header values .
2021-08-05 19:37:53 +00:00
Server Internal Error
* /
type GetTemplatesInternalServerError struct {
Payload * sfgate_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get templates internal server error response has a 2xx status code
func ( o * GetTemplatesInternalServerError ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get templates internal server error response has a 3xx status code
func ( o * GetTemplatesInternalServerError ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get templates internal server error response has a 4xx status code
func ( o * GetTemplatesInternalServerError ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this get templates internal server error response has a 5xx status code
func ( o * GetTemplatesInternalServerError ) IsServerError ( ) bool {
return true
}
// IsCode returns true when this get templates internal server error response a status code equal to that given
func ( o * GetTemplatesInternalServerError ) IsCode ( code int ) bool {
return code == 500
}
// Code gets the status code for the get templates internal server error response
func ( o * GetTemplatesInternalServerError ) Code ( ) int {
return 500
}
2021-08-05 19:37:53 +00:00
func ( o * GetTemplatesInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[GET /templates][%d] getTemplatesInternalServerError %+v" , 500 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetTemplatesInternalServerError ) String ( ) string {
return fmt . Sprintf ( "[GET /templates][%d] getTemplatesInternalServerError %+v" , 500 , o . Payload )
}
2021-08-05 19:37:53 +00:00
func ( o * GetTemplatesInternalServerError ) GetPayload ( ) * sfgate_models . Error {
return o . Payload
}
func ( o * GetTemplatesInternalServerError ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
o . Payload = new ( sfgate_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}