2021-07-31 03:05:02 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-08-05 19:37:53 +00:00
// (c) 2012-2020 by Taxnexus, Inc.
2021-07-31 03:05:02 +00:00
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package template
// 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"
2021-08-01 00:08:25 +00:00
"code.tnxs.net/vernonkeenan/lib/api/devops/devops_models"
2021-07-31 03:05:02 +00:00
)
// GetTemplatesObservableReader is a Reader for the GetTemplatesObservable structure.
type GetTemplatesObservableReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * GetTemplatesObservableReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewGetTemplatesObservableOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewGetTemplatesObservableUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewGetTemplatesObservableForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewGetTemplatesObservableNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewGetTemplatesObservableUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewGetTemplatesObservableInternalServerError ( )
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 ( ) )
}
}
// NewGetTemplatesObservableOK creates a GetTemplatesObservableOK with default headers values
func NewGetTemplatesObservableOK ( ) * GetTemplatesObservableOK {
return & GetTemplatesObservableOK { }
}
2023-03-22 20:49:01 +00:00
/ *
GetTemplatesObservableOK describes a response with status code 200 , with default header values .
2021-07-31 03:05:02 +00:00
Simple Template record response
* /
type GetTemplatesObservableOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload [ ] * devops_models . Template
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get templates observable o k response has a 2xx status code
func ( o * GetTemplatesObservableOK ) IsSuccess ( ) bool {
return true
}
// IsRedirect returns true when this get templates observable o k response has a 3xx status code
func ( o * GetTemplatesObservableOK ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get templates observable o k response has a 4xx status code
func ( o * GetTemplatesObservableOK ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this get templates observable o k response has a 5xx status code
func ( o * GetTemplatesObservableOK ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get templates observable o k response a status code equal to that given
func ( o * GetTemplatesObservableOK ) IsCode ( code int ) bool {
return code == 200
}
// Code gets the status code for the get templates observable o k response
func ( o * GetTemplatesObservableOK ) Code ( ) int {
return 200
}
2021-07-31 03:05:02 +00:00
func ( o * GetTemplatesObservableOK ) Error ( ) string {
return fmt . Sprintf ( "[GET /templates/observable][%d] getTemplatesObservableOK %+v" , 200 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetTemplatesObservableOK ) String ( ) string {
return fmt . Sprintf ( "[GET /templates/observable][%d] getTemplatesObservableOK %+v" , 200 , o . Payload )
}
2021-07-31 03:05:02 +00:00
func ( o * GetTemplatesObservableOK ) GetPayload ( ) [ ] * devops_models . Template {
return o . Payload
}
func ( o * GetTemplatesObservableOK ) 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
}
// NewGetTemplatesObservableUnauthorized creates a GetTemplatesObservableUnauthorized with default headers values
func NewGetTemplatesObservableUnauthorized ( ) * GetTemplatesObservableUnauthorized {
return & GetTemplatesObservableUnauthorized { }
}
2023-03-22 20:49:01 +00:00
/ *
GetTemplatesObservableUnauthorized describes a response with status code 401 , with default header values .
2021-07-31 03:05:02 +00:00
Access Unauthorized , invalid API - KEY was used
* /
type GetTemplatesObservableUnauthorized struct {
AccessControlAllowOrigin string
CacheControl string
Payload * devops_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get templates observable unauthorized response has a 2xx status code
func ( o * GetTemplatesObservableUnauthorized ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get templates observable unauthorized response has a 3xx status code
func ( o * GetTemplatesObservableUnauthorized ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get templates observable unauthorized response has a 4xx status code
func ( o * GetTemplatesObservableUnauthorized ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get templates observable unauthorized response has a 5xx status code
func ( o * GetTemplatesObservableUnauthorized ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get templates observable unauthorized response a status code equal to that given
func ( o * GetTemplatesObservableUnauthorized ) IsCode ( code int ) bool {
return code == 401
}
// Code gets the status code for the get templates observable unauthorized response
func ( o * GetTemplatesObservableUnauthorized ) Code ( ) int {
return 401
}
2021-07-31 03:05:02 +00:00
func ( o * GetTemplatesObservableUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[GET /templates/observable][%d] getTemplatesObservableUnauthorized %+v" , 401 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetTemplatesObservableUnauthorized ) String ( ) string {
return fmt . Sprintf ( "[GET /templates/observable][%d] getTemplatesObservableUnauthorized %+v" , 401 , o . Payload )
}
2021-07-31 03:05:02 +00:00
func ( o * GetTemplatesObservableUnauthorized ) GetPayload ( ) * devops_models . Error {
return o . Payload
}
func ( o * GetTemplatesObservableUnauthorized ) 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
}
o . Payload = new ( devops_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetTemplatesObservableForbidden creates a GetTemplatesObservableForbidden with default headers values
func NewGetTemplatesObservableForbidden ( ) * GetTemplatesObservableForbidden {
return & GetTemplatesObservableForbidden { }
}
2023-03-22 20:49:01 +00:00
/ *
GetTemplatesObservableForbidden describes a response with status code 403 , with default header values .
2021-07-31 03:05:02 +00:00
Access forbidden , account lacks access
* /
type GetTemplatesObservableForbidden struct {
AccessControlAllowOrigin string
Payload * devops_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get templates observable forbidden response has a 2xx status code
func ( o * GetTemplatesObservableForbidden ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get templates observable forbidden response has a 3xx status code
func ( o * GetTemplatesObservableForbidden ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get templates observable forbidden response has a 4xx status code
func ( o * GetTemplatesObservableForbidden ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get templates observable forbidden response has a 5xx status code
func ( o * GetTemplatesObservableForbidden ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get templates observable forbidden response a status code equal to that given
func ( o * GetTemplatesObservableForbidden ) IsCode ( code int ) bool {
return code == 403
}
// Code gets the status code for the get templates observable forbidden response
func ( o * GetTemplatesObservableForbidden ) Code ( ) int {
return 403
}
2021-07-31 03:05:02 +00:00
func ( o * GetTemplatesObservableForbidden ) Error ( ) string {
return fmt . Sprintf ( "[GET /templates/observable][%d] getTemplatesObservableForbidden %+v" , 403 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetTemplatesObservableForbidden ) String ( ) string {
return fmt . Sprintf ( "[GET /templates/observable][%d] getTemplatesObservableForbidden %+v" , 403 , o . Payload )
}
2021-07-31 03:05:02 +00:00
func ( o * GetTemplatesObservableForbidden ) GetPayload ( ) * devops_models . Error {
return o . Payload
}
func ( o * GetTemplatesObservableForbidden ) 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 ( devops_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetTemplatesObservableNotFound creates a GetTemplatesObservableNotFound with default headers values
func NewGetTemplatesObservableNotFound ( ) * GetTemplatesObservableNotFound {
return & GetTemplatesObservableNotFound { }
}
2023-03-22 20:49:01 +00:00
/ *
GetTemplatesObservableNotFound describes a response with status code 404 , with default header values .
2021-07-31 03:05:02 +00:00
Resource was not found
* /
type GetTemplatesObservableNotFound struct {
AccessControlAllowOrigin string
Payload * devops_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get templates observable not found response has a 2xx status code
func ( o * GetTemplatesObservableNotFound ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get templates observable not found response has a 3xx status code
func ( o * GetTemplatesObservableNotFound ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get templates observable not found response has a 4xx status code
func ( o * GetTemplatesObservableNotFound ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get templates observable not found response has a 5xx status code
func ( o * GetTemplatesObservableNotFound ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get templates observable not found response a status code equal to that given
func ( o * GetTemplatesObservableNotFound ) IsCode ( code int ) bool {
return code == 404
}
// Code gets the status code for the get templates observable not found response
func ( o * GetTemplatesObservableNotFound ) Code ( ) int {
return 404
}
2021-07-31 03:05:02 +00:00
func ( o * GetTemplatesObservableNotFound ) Error ( ) string {
return fmt . Sprintf ( "[GET /templates/observable][%d] getTemplatesObservableNotFound %+v" , 404 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetTemplatesObservableNotFound ) String ( ) string {
return fmt . Sprintf ( "[GET /templates/observable][%d] getTemplatesObservableNotFound %+v" , 404 , o . Payload )
}
2021-07-31 03:05:02 +00:00
func ( o * GetTemplatesObservableNotFound ) GetPayload ( ) * devops_models . Error {
return o . Payload
}
func ( o * GetTemplatesObservableNotFound ) 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 ( devops_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetTemplatesObservableUnprocessableEntity creates a GetTemplatesObservableUnprocessableEntity with default headers values
func NewGetTemplatesObservableUnprocessableEntity ( ) * GetTemplatesObservableUnprocessableEntity {
return & GetTemplatesObservableUnprocessableEntity { }
}
2023-03-22 20:49:01 +00:00
/ *
GetTemplatesObservableUnprocessableEntity describes a response with status code 422 , with default header values .
2021-07-31 03:05:02 +00:00
Unprocessable Entity , likely a bad parameter
* /
type GetTemplatesObservableUnprocessableEntity struct {
AccessControlAllowOrigin string
CacheControl string
Payload * devops_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get templates observable unprocessable entity response has a 2xx status code
func ( o * GetTemplatesObservableUnprocessableEntity ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get templates observable unprocessable entity response has a 3xx status code
func ( o * GetTemplatesObservableUnprocessableEntity ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get templates observable unprocessable entity response has a 4xx status code
func ( o * GetTemplatesObservableUnprocessableEntity ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this get templates observable unprocessable entity response has a 5xx status code
func ( o * GetTemplatesObservableUnprocessableEntity ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this get templates observable unprocessable entity response a status code equal to that given
func ( o * GetTemplatesObservableUnprocessableEntity ) IsCode ( code int ) bool {
return code == 422
}
// Code gets the status code for the get templates observable unprocessable entity response
func ( o * GetTemplatesObservableUnprocessableEntity ) Code ( ) int {
return 422
}
2021-07-31 03:05:02 +00:00
func ( o * GetTemplatesObservableUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[GET /templates/observable][%d] getTemplatesObservableUnprocessableEntity %+v" , 422 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetTemplatesObservableUnprocessableEntity ) String ( ) string {
return fmt . Sprintf ( "[GET /templates/observable][%d] getTemplatesObservableUnprocessableEntity %+v" , 422 , o . Payload )
}
2021-07-31 03:05:02 +00:00
func ( o * GetTemplatesObservableUnprocessableEntity ) GetPayload ( ) * devops_models . Error {
return o . Payload
}
func ( o * GetTemplatesObservableUnprocessableEntity ) 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
}
o . Payload = new ( devops_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewGetTemplatesObservableInternalServerError creates a GetTemplatesObservableInternalServerError with default headers values
func NewGetTemplatesObservableInternalServerError ( ) * GetTemplatesObservableInternalServerError {
return & GetTemplatesObservableInternalServerError { }
}
2023-03-22 20:49:01 +00:00
/ *
GetTemplatesObservableInternalServerError describes a response with status code 500 , with default header values .
2021-07-31 03:05:02 +00:00
Server Internal Error
* /
type GetTemplatesObservableInternalServerError struct {
AccessControlAllowOrigin string
Payload * devops_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this get templates observable internal server error response has a 2xx status code
func ( o * GetTemplatesObservableInternalServerError ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this get templates observable internal server error response has a 3xx status code
func ( o * GetTemplatesObservableInternalServerError ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this get templates observable internal server error response has a 4xx status code
func ( o * GetTemplatesObservableInternalServerError ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this get templates observable internal server error response has a 5xx status code
func ( o * GetTemplatesObservableInternalServerError ) IsServerError ( ) bool {
return true
}
// IsCode returns true when this get templates observable internal server error response a status code equal to that given
func ( o * GetTemplatesObservableInternalServerError ) IsCode ( code int ) bool {
return code == 500
}
// Code gets the status code for the get templates observable internal server error response
func ( o * GetTemplatesObservableInternalServerError ) Code ( ) int {
return 500
}
2021-07-31 03:05:02 +00:00
func ( o * GetTemplatesObservableInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[GET /templates/observable][%d] getTemplatesObservableInternalServerError %+v" , 500 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * GetTemplatesObservableInternalServerError ) String ( ) string {
return fmt . Sprintf ( "[GET /templates/observable][%d] getTemplatesObservableInternalServerError %+v" , 500 , o . Payload )
}
2021-07-31 03:05:02 +00:00
func ( o * GetTemplatesObservableInternalServerError ) GetPayload ( ) * devops_models . Error {
return o . Payload
}
func ( o * GetTemplatesObservableInternalServerError ) 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 ( devops_models . Error )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}