mirror of https://github.com/vernonkeenan/lib
538 lines
18 KiB
Go
538 lines
18 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 contracts
|
|
|
|
// 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/crm/crm_models"
|
|
)
|
|
|
|
// GetContractsObservableReader is a Reader for the GetContractsObservable structure.
|
|
type GetContractsObservableReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetContractsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetContractsObservableOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetContractsObservableUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewGetContractsObservableForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetContractsObservableNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewGetContractsObservableUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetContractsObservableInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetContractsObservableOK creates a GetContractsObservableOK with default headers values
|
|
func NewGetContractsObservableOK() *GetContractsObservableOK {
|
|
return &GetContractsObservableOK{}
|
|
}
|
|
|
|
/*
|
|
GetContractsObservableOK describes a response with status code 200, with default header values.
|
|
|
|
Taxnexus Response with an array of Contract objects
|
|
*/
|
|
type GetContractsObservableOK struct {
|
|
AccessControlAllowOrigin string
|
|
CacheControl string
|
|
|
|
Payload []*crm_models.Contract
|
|
}
|
|
|
|
// IsSuccess returns true when this get contracts observable o k response has a 2xx status code
|
|
func (o *GetContractsObservableOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get contracts observable o k response has a 3xx status code
|
|
func (o *GetContractsObservableOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get contracts observable o k response has a 4xx status code
|
|
func (o *GetContractsObservableOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get contracts observable o k response has a 5xx status code
|
|
func (o *GetContractsObservableOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get contracts observable o k response a status code equal to that given
|
|
func (o *GetContractsObservableOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get contracts observable o k response
|
|
func (o *GetContractsObservableOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetContractsObservableOK) Error() string {
|
|
return fmt.Sprintf("[GET /contracts/observable][%d] getContractsObservableOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetContractsObservableOK) String() string {
|
|
return fmt.Sprintf("[GET /contracts/observable][%d] getContractsObservableOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetContractsObservableOK) GetPayload() []*crm_models.Contract {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetContractsObservableOK) 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
|
|
}
|
|
|
|
// NewGetContractsObservableUnauthorized creates a GetContractsObservableUnauthorized with default headers values
|
|
func NewGetContractsObservableUnauthorized() *GetContractsObservableUnauthorized {
|
|
return &GetContractsObservableUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetContractsObservableUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access unauthorized, invalid API-KEY was used
|
|
*/
|
|
type GetContractsObservableUnauthorized struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *crm_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get contracts observable unauthorized response has a 2xx status code
|
|
func (o *GetContractsObservableUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get contracts observable unauthorized response has a 3xx status code
|
|
func (o *GetContractsObservableUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get contracts observable unauthorized response has a 4xx status code
|
|
func (o *GetContractsObservableUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get contracts observable unauthorized response has a 5xx status code
|
|
func (o *GetContractsObservableUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get contracts observable unauthorized response a status code equal to that given
|
|
func (o *GetContractsObservableUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get contracts observable unauthorized response
|
|
func (o *GetContractsObservableUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetContractsObservableUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /contracts/observable][%d] getContractsObservableUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetContractsObservableUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /contracts/observable][%d] getContractsObservableUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetContractsObservableUnauthorized) GetPayload() *crm_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetContractsObservableUnauthorized) 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(crm_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetContractsObservableForbidden creates a GetContractsObservableForbidden with default headers values
|
|
func NewGetContractsObservableForbidden() *GetContractsObservableForbidden {
|
|
return &GetContractsObservableForbidden{}
|
|
}
|
|
|
|
/*
|
|
GetContractsObservableForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type GetContractsObservableForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *crm_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get contracts observable forbidden response has a 2xx status code
|
|
func (o *GetContractsObservableForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get contracts observable forbidden response has a 3xx status code
|
|
func (o *GetContractsObservableForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get contracts observable forbidden response has a 4xx status code
|
|
func (o *GetContractsObservableForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get contracts observable forbidden response has a 5xx status code
|
|
func (o *GetContractsObservableForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get contracts observable forbidden response a status code equal to that given
|
|
func (o *GetContractsObservableForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the get contracts observable forbidden response
|
|
func (o *GetContractsObservableForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *GetContractsObservableForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /contracts/observable][%d] getContractsObservableForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetContractsObservableForbidden) String() string {
|
|
return fmt.Sprintf("[GET /contracts/observable][%d] getContractsObservableForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetContractsObservableForbidden) GetPayload() *crm_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetContractsObservableForbidden) 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(crm_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetContractsObservableNotFound creates a GetContractsObservableNotFound with default headers values
|
|
func NewGetContractsObservableNotFound() *GetContractsObservableNotFound {
|
|
return &GetContractsObservableNotFound{}
|
|
}
|
|
|
|
/*
|
|
GetContractsObservableNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type GetContractsObservableNotFound struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *crm_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get contracts observable not found response has a 2xx status code
|
|
func (o *GetContractsObservableNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get contracts observable not found response has a 3xx status code
|
|
func (o *GetContractsObservableNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get contracts observable not found response has a 4xx status code
|
|
func (o *GetContractsObservableNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get contracts observable not found response has a 5xx status code
|
|
func (o *GetContractsObservableNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get contracts observable not found response a status code equal to that given
|
|
func (o *GetContractsObservableNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the get contracts observable not found response
|
|
func (o *GetContractsObservableNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *GetContractsObservableNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /contracts/observable][%d] getContractsObservableNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetContractsObservableNotFound) String() string {
|
|
return fmt.Sprintf("[GET /contracts/observable][%d] getContractsObservableNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetContractsObservableNotFound) GetPayload() *crm_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetContractsObservableNotFound) 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(crm_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetContractsObservableUnprocessableEntity creates a GetContractsObservableUnprocessableEntity with default headers values
|
|
func NewGetContractsObservableUnprocessableEntity() *GetContractsObservableUnprocessableEntity {
|
|
return &GetContractsObservableUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
GetContractsObservableUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type GetContractsObservableUnprocessableEntity struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *crm_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get contracts observable unprocessable entity response has a 2xx status code
|
|
func (o *GetContractsObservableUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get contracts observable unprocessable entity response has a 3xx status code
|
|
func (o *GetContractsObservableUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get contracts observable unprocessable entity response has a 4xx status code
|
|
func (o *GetContractsObservableUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get contracts observable unprocessable entity response has a 5xx status code
|
|
func (o *GetContractsObservableUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get contracts observable unprocessable entity response a status code equal to that given
|
|
func (o *GetContractsObservableUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the get contracts observable unprocessable entity response
|
|
func (o *GetContractsObservableUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *GetContractsObservableUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[GET /contracts/observable][%d] getContractsObservableUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetContractsObservableUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[GET /contracts/observable][%d] getContractsObservableUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetContractsObservableUnprocessableEntity) GetPayload() *crm_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetContractsObservableUnprocessableEntity) 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(crm_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetContractsObservableInternalServerError creates a GetContractsObservableInternalServerError with default headers values
|
|
func NewGetContractsObservableInternalServerError() *GetContractsObservableInternalServerError {
|
|
return &GetContractsObservableInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetContractsObservableInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type GetContractsObservableInternalServerError struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *crm_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get contracts observable internal server error response has a 2xx status code
|
|
func (o *GetContractsObservableInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get contracts observable internal server error response has a 3xx status code
|
|
func (o *GetContractsObservableInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get contracts observable internal server error response has a 4xx status code
|
|
func (o *GetContractsObservableInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get contracts observable internal server error response has a 5xx status code
|
|
func (o *GetContractsObservableInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get contracts observable internal server error response a status code equal to that given
|
|
func (o *GetContractsObservableInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the get contracts observable internal server error response
|
|
func (o *GetContractsObservableInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *GetContractsObservableInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /contracts/observable][%d] getContractsObservableInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetContractsObservableInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /contracts/observable][%d] getContractsObservableInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetContractsObservableInternalServerError) GetPayload() *crm_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetContractsObservableInternalServerError) 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(crm_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|