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 assets
|
|
|
|
// 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"
|
|
)
|
|
|
|
// GetAssetsObservableReader is a Reader for the GetAssetsObservable structure.
|
|
type GetAssetsObservableReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetAssetsObservableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetAssetsObservableOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetAssetsObservableUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewGetAssetsObservableForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetAssetsObservableNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewGetAssetsObservableUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetAssetsObservableInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetAssetsObservableOK creates a GetAssetsObservableOK with default headers values
|
|
func NewGetAssetsObservableOK() *GetAssetsObservableOK {
|
|
return &GetAssetsObservableOK{}
|
|
}
|
|
|
|
/*
|
|
GetAssetsObservableOK describes a response with status code 200, with default header values.
|
|
|
|
Taxnexus Response with an array of Asset objects
|
|
*/
|
|
type GetAssetsObservableOK struct {
|
|
AccessControlAllowOrigin string
|
|
CacheControl string
|
|
|
|
Payload []*crm_models.Asset
|
|
}
|
|
|
|
// IsSuccess returns true when this get assets observable o k response has a 2xx status code
|
|
func (o *GetAssetsObservableOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get assets observable o k response has a 3xx status code
|
|
func (o *GetAssetsObservableOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get assets observable o k response has a 4xx status code
|
|
func (o *GetAssetsObservableOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get assets observable o k response has a 5xx status code
|
|
func (o *GetAssetsObservableOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get assets observable o k response a status code equal to that given
|
|
func (o *GetAssetsObservableOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get assets observable o k response
|
|
func (o *GetAssetsObservableOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetAssetsObservableOK) Error() string {
|
|
return fmt.Sprintf("[GET /assets/observable][%d] getAssetsObservableOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetAssetsObservableOK) String() string {
|
|
return fmt.Sprintf("[GET /assets/observable][%d] getAssetsObservableOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetAssetsObservableOK) GetPayload() []*crm_models.Asset {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetAssetsObservableOK) 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
|
|
}
|
|
|
|
// NewGetAssetsObservableUnauthorized creates a GetAssetsObservableUnauthorized with default headers values
|
|
func NewGetAssetsObservableUnauthorized() *GetAssetsObservableUnauthorized {
|
|
return &GetAssetsObservableUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetAssetsObservableUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access unauthorized, invalid API-KEY was used
|
|
*/
|
|
type GetAssetsObservableUnauthorized struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *crm_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get assets observable unauthorized response has a 2xx status code
|
|
func (o *GetAssetsObservableUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get assets observable unauthorized response has a 3xx status code
|
|
func (o *GetAssetsObservableUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get assets observable unauthorized response has a 4xx status code
|
|
func (o *GetAssetsObservableUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get assets observable unauthorized response has a 5xx status code
|
|
func (o *GetAssetsObservableUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get assets observable unauthorized response a status code equal to that given
|
|
func (o *GetAssetsObservableUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get assets observable unauthorized response
|
|
func (o *GetAssetsObservableUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetAssetsObservableUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /assets/observable][%d] getAssetsObservableUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetAssetsObservableUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /assets/observable][%d] getAssetsObservableUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetAssetsObservableUnauthorized) GetPayload() *crm_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetAssetsObservableUnauthorized) 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
|
|
}
|
|
|
|
// NewGetAssetsObservableForbidden creates a GetAssetsObservableForbidden with default headers values
|
|
func NewGetAssetsObservableForbidden() *GetAssetsObservableForbidden {
|
|
return &GetAssetsObservableForbidden{}
|
|
}
|
|
|
|
/*
|
|
GetAssetsObservableForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type GetAssetsObservableForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *crm_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get assets observable forbidden response has a 2xx status code
|
|
func (o *GetAssetsObservableForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get assets observable forbidden response has a 3xx status code
|
|
func (o *GetAssetsObservableForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get assets observable forbidden response has a 4xx status code
|
|
func (o *GetAssetsObservableForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get assets observable forbidden response has a 5xx status code
|
|
func (o *GetAssetsObservableForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get assets observable forbidden response a status code equal to that given
|
|
func (o *GetAssetsObservableForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the get assets observable forbidden response
|
|
func (o *GetAssetsObservableForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *GetAssetsObservableForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /assets/observable][%d] getAssetsObservableForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetAssetsObservableForbidden) String() string {
|
|
return fmt.Sprintf("[GET /assets/observable][%d] getAssetsObservableForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetAssetsObservableForbidden) GetPayload() *crm_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetAssetsObservableForbidden) 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
|
|
}
|
|
|
|
// NewGetAssetsObservableNotFound creates a GetAssetsObservableNotFound with default headers values
|
|
func NewGetAssetsObservableNotFound() *GetAssetsObservableNotFound {
|
|
return &GetAssetsObservableNotFound{}
|
|
}
|
|
|
|
/*
|
|
GetAssetsObservableNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type GetAssetsObservableNotFound struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *crm_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get assets observable not found response has a 2xx status code
|
|
func (o *GetAssetsObservableNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get assets observable not found response has a 3xx status code
|
|
func (o *GetAssetsObservableNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get assets observable not found response has a 4xx status code
|
|
func (o *GetAssetsObservableNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get assets observable not found response has a 5xx status code
|
|
func (o *GetAssetsObservableNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get assets observable not found response a status code equal to that given
|
|
func (o *GetAssetsObservableNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the get assets observable not found response
|
|
func (o *GetAssetsObservableNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *GetAssetsObservableNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /assets/observable][%d] getAssetsObservableNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetAssetsObservableNotFound) String() string {
|
|
return fmt.Sprintf("[GET /assets/observable][%d] getAssetsObservableNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetAssetsObservableNotFound) GetPayload() *crm_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetAssetsObservableNotFound) 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
|
|
}
|
|
|
|
// NewGetAssetsObservableUnprocessableEntity creates a GetAssetsObservableUnprocessableEntity with default headers values
|
|
func NewGetAssetsObservableUnprocessableEntity() *GetAssetsObservableUnprocessableEntity {
|
|
return &GetAssetsObservableUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
GetAssetsObservableUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type GetAssetsObservableUnprocessableEntity struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *crm_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get assets observable unprocessable entity response has a 2xx status code
|
|
func (o *GetAssetsObservableUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get assets observable unprocessable entity response has a 3xx status code
|
|
func (o *GetAssetsObservableUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get assets observable unprocessable entity response has a 4xx status code
|
|
func (o *GetAssetsObservableUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get assets observable unprocessable entity response has a 5xx status code
|
|
func (o *GetAssetsObservableUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get assets observable unprocessable entity response a status code equal to that given
|
|
func (o *GetAssetsObservableUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the get assets observable unprocessable entity response
|
|
func (o *GetAssetsObservableUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *GetAssetsObservableUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[GET /assets/observable][%d] getAssetsObservableUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetAssetsObservableUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[GET /assets/observable][%d] getAssetsObservableUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetAssetsObservableUnprocessableEntity) GetPayload() *crm_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetAssetsObservableUnprocessableEntity) 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
|
|
}
|
|
|
|
// NewGetAssetsObservableInternalServerError creates a GetAssetsObservableInternalServerError with default headers values
|
|
func NewGetAssetsObservableInternalServerError() *GetAssetsObservableInternalServerError {
|
|
return &GetAssetsObservableInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetAssetsObservableInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type GetAssetsObservableInternalServerError struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *crm_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get assets observable internal server error response has a 2xx status code
|
|
func (o *GetAssetsObservableInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get assets observable internal server error response has a 3xx status code
|
|
func (o *GetAssetsObservableInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get assets observable internal server error response has a 4xx status code
|
|
func (o *GetAssetsObservableInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get assets observable internal server error response has a 5xx status code
|
|
func (o *GetAssetsObservableInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get assets observable internal server error response a status code equal to that given
|
|
func (o *GetAssetsObservableInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the get assets observable internal server error response
|
|
func (o *GetAssetsObservableInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *GetAssetsObservableInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /assets/observable][%d] getAssetsObservableInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetAssetsObservableInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /assets/observable][%d] getAssetsObservableInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetAssetsObservableInternalServerError) GetPayload() *crm_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetAssetsObservableInternalServerError) 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
|
|
}
|