2022-09-03 03:34:04 +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 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"
)
// PutAssetReader is a Reader for the PutAsset structure.
type PutAssetReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * PutAssetReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewPutAssetOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewPutAssetUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewPutAssetForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewPutAssetNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewPutAssetUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewPutAssetInternalServerError ( )
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 ( ) )
}
}
// NewPutAssetOK creates a PutAssetOK with default headers values
func NewPutAssetOK ( ) * PutAssetOK {
return & PutAssetOK { }
}
2023-03-22 20:49:01 +00:00
/ *
PutAssetOK describes a response with status code 200 , with default header values .
2022-09-03 03:34:04 +00:00
Taxnexus Response with Asset objects with Contacts
* /
type PutAssetOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload * crm_models . AssetResponse
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this put asset o k response has a 2xx status code
func ( o * PutAssetOK ) IsSuccess ( ) bool {
return true
}
// IsRedirect returns true when this put asset o k response has a 3xx status code
func ( o * PutAssetOK ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this put asset o k response has a 4xx status code
func ( o * PutAssetOK ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this put asset o k response has a 5xx status code
func ( o * PutAssetOK ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this put asset o k response a status code equal to that given
func ( o * PutAssetOK ) IsCode ( code int ) bool {
return code == 200
}
// Code gets the status code for the put asset o k response
func ( o * PutAssetOK ) Code ( ) int {
return 200
}
2022-09-03 03:34:04 +00:00
func ( o * PutAssetOK ) Error ( ) string {
return fmt . Sprintf ( "[PUT /assets][%d] putAssetOK %+v" , 200 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PutAssetOK ) String ( ) string {
return fmt . Sprintf ( "[PUT /assets][%d] putAssetOK %+v" , 200 , o . Payload )
}
2022-09-03 03:34:04 +00:00
func ( o * PutAssetOK ) GetPayload ( ) * crm_models . AssetResponse {
return o . Payload
}
func ( o * PutAssetOK ) 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 ( crm_models . AssetResponse )
// response payload
if err := consumer . Consume ( response . Body ( ) , o . Payload ) ; err != nil && err != io . EOF {
return err
}
return nil
}
// NewPutAssetUnauthorized creates a PutAssetUnauthorized with default headers values
func NewPutAssetUnauthorized ( ) * PutAssetUnauthorized {
return & PutAssetUnauthorized { }
}
2023-03-22 20:49:01 +00:00
/ *
PutAssetUnauthorized describes a response with status code 401 , with default header values .
2022-09-03 03:34:04 +00:00
Access unauthorized , invalid API - KEY was used
* /
type PutAssetUnauthorized struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this put asset unauthorized response has a 2xx status code
func ( o * PutAssetUnauthorized ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this put asset unauthorized response has a 3xx status code
func ( o * PutAssetUnauthorized ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this put asset unauthorized response has a 4xx status code
func ( o * PutAssetUnauthorized ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this put asset unauthorized response has a 5xx status code
func ( o * PutAssetUnauthorized ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this put asset unauthorized response a status code equal to that given
func ( o * PutAssetUnauthorized ) IsCode ( code int ) bool {
return code == 401
}
// Code gets the status code for the put asset unauthorized response
func ( o * PutAssetUnauthorized ) Code ( ) int {
return 401
}
2022-09-03 03:34:04 +00:00
func ( o * PutAssetUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[PUT /assets][%d] putAssetUnauthorized %+v" , 401 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PutAssetUnauthorized ) String ( ) string {
return fmt . Sprintf ( "[PUT /assets][%d] putAssetUnauthorized %+v" , 401 , o . Payload )
}
2022-09-03 03:34:04 +00:00
func ( o * PutAssetUnauthorized ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * PutAssetUnauthorized ) 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
}
// NewPutAssetForbidden creates a PutAssetForbidden with default headers values
func NewPutAssetForbidden ( ) * PutAssetForbidden {
return & PutAssetForbidden { }
}
2023-03-22 20:49:01 +00:00
/ *
PutAssetForbidden describes a response with status code 403 , with default header values .
2022-09-03 03:34:04 +00:00
Access forbidden , account lacks access
* /
type PutAssetForbidden struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this put asset forbidden response has a 2xx status code
func ( o * PutAssetForbidden ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this put asset forbidden response has a 3xx status code
func ( o * PutAssetForbidden ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this put asset forbidden response has a 4xx status code
func ( o * PutAssetForbidden ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this put asset forbidden response has a 5xx status code
func ( o * PutAssetForbidden ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this put asset forbidden response a status code equal to that given
func ( o * PutAssetForbidden ) IsCode ( code int ) bool {
return code == 403
}
// Code gets the status code for the put asset forbidden response
func ( o * PutAssetForbidden ) Code ( ) int {
return 403
}
2022-09-03 03:34:04 +00:00
func ( o * PutAssetForbidden ) Error ( ) string {
return fmt . Sprintf ( "[PUT /assets][%d] putAssetForbidden %+v" , 403 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PutAssetForbidden ) String ( ) string {
return fmt . Sprintf ( "[PUT /assets][%d] putAssetForbidden %+v" , 403 , o . Payload )
}
2022-09-03 03:34:04 +00:00
func ( o * PutAssetForbidden ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * PutAssetForbidden ) 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
}
// NewPutAssetNotFound creates a PutAssetNotFound with default headers values
func NewPutAssetNotFound ( ) * PutAssetNotFound {
return & PutAssetNotFound { }
}
2023-03-22 20:49:01 +00:00
/ *
PutAssetNotFound describes a response with status code 404 , with default header values .
2022-09-03 03:34:04 +00:00
Resource was not found
* /
type PutAssetNotFound struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this put asset not found response has a 2xx status code
func ( o * PutAssetNotFound ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this put asset not found response has a 3xx status code
func ( o * PutAssetNotFound ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this put asset not found response has a 4xx status code
func ( o * PutAssetNotFound ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this put asset not found response has a 5xx status code
func ( o * PutAssetNotFound ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this put asset not found response a status code equal to that given
func ( o * PutAssetNotFound ) IsCode ( code int ) bool {
return code == 404
}
// Code gets the status code for the put asset not found response
func ( o * PutAssetNotFound ) Code ( ) int {
return 404
}
2022-09-03 03:34:04 +00:00
func ( o * PutAssetNotFound ) Error ( ) string {
return fmt . Sprintf ( "[PUT /assets][%d] putAssetNotFound %+v" , 404 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PutAssetNotFound ) String ( ) string {
return fmt . Sprintf ( "[PUT /assets][%d] putAssetNotFound %+v" , 404 , o . Payload )
}
2022-09-03 03:34:04 +00:00
func ( o * PutAssetNotFound ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * PutAssetNotFound ) 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
}
// NewPutAssetUnprocessableEntity creates a PutAssetUnprocessableEntity with default headers values
func NewPutAssetUnprocessableEntity ( ) * PutAssetUnprocessableEntity {
return & PutAssetUnprocessableEntity { }
}
2023-03-22 20:49:01 +00:00
/ *
PutAssetUnprocessableEntity describes a response with status code 422 , with default header values .
2022-09-03 03:34:04 +00:00
Unprocessable Entity , likely a bad parameter
* /
type PutAssetUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this put asset unprocessable entity response has a 2xx status code
func ( o * PutAssetUnprocessableEntity ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this put asset unprocessable entity response has a 3xx status code
func ( o * PutAssetUnprocessableEntity ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this put asset unprocessable entity response has a 4xx status code
func ( o * PutAssetUnprocessableEntity ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this put asset unprocessable entity response has a 5xx status code
func ( o * PutAssetUnprocessableEntity ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this put asset unprocessable entity response a status code equal to that given
func ( o * PutAssetUnprocessableEntity ) IsCode ( code int ) bool {
return code == 422
}
// Code gets the status code for the put asset unprocessable entity response
func ( o * PutAssetUnprocessableEntity ) Code ( ) int {
return 422
}
2022-09-03 03:34:04 +00:00
func ( o * PutAssetUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[PUT /assets][%d] putAssetUnprocessableEntity %+v" , 422 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PutAssetUnprocessableEntity ) String ( ) string {
return fmt . Sprintf ( "[PUT /assets][%d] putAssetUnprocessableEntity %+v" , 422 , o . Payload )
}
2022-09-03 03:34:04 +00:00
func ( o * PutAssetUnprocessableEntity ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * PutAssetUnprocessableEntity ) 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
}
// NewPutAssetInternalServerError creates a PutAssetInternalServerError with default headers values
func NewPutAssetInternalServerError ( ) * PutAssetInternalServerError {
return & PutAssetInternalServerError { }
}
2023-03-22 20:49:01 +00:00
/ *
PutAssetInternalServerError describes a response with status code 500 , with default header values .
2022-09-03 03:34:04 +00:00
Server Internal Error
* /
type PutAssetInternalServerError struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this put asset internal server error response has a 2xx status code
func ( o * PutAssetInternalServerError ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this put asset internal server error response has a 3xx status code
func ( o * PutAssetInternalServerError ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this put asset internal server error response has a 4xx status code
func ( o * PutAssetInternalServerError ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this put asset internal server error response has a 5xx status code
func ( o * PutAssetInternalServerError ) IsServerError ( ) bool {
return true
}
// IsCode returns true when this put asset internal server error response a status code equal to that given
func ( o * PutAssetInternalServerError ) IsCode ( code int ) bool {
return code == 500
}
// Code gets the status code for the put asset internal server error response
func ( o * PutAssetInternalServerError ) Code ( ) int {
return 500
}
2022-09-03 03:34:04 +00:00
func ( o * PutAssetInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[PUT /assets][%d] putAssetInternalServerError %+v" , 500 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PutAssetInternalServerError ) String ( ) string {
return fmt . Sprintf ( "[PUT /assets][%d] putAssetInternalServerError %+v" , 500 , o . Payload )
}
2022-09-03 03:34:04 +00:00
func ( o * PutAssetInternalServerError ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * PutAssetInternalServerError ) 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
}