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"
)
// PostAssetsReader is a Reader for the PostAssets structure.
type PostAssetsReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * PostAssetsReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewPostAssetsOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewPostAssetsUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewPostAssetsForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewPostAssetsNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewPostAssetsUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewPostAssetsInternalServerError ( )
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 ( ) )
}
}
// NewPostAssetsOK creates a PostAssetsOK with default headers values
func NewPostAssetsOK ( ) * PostAssetsOK {
return & PostAssetsOK { }
}
2023-03-22 20:49:01 +00:00
/ *
PostAssetsOK 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 PostAssetsOK struct {
AccessControlAllowOrigin string
CacheControl string
Payload * crm_models . AssetResponse
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post assets o k response has a 2xx status code
func ( o * PostAssetsOK ) IsSuccess ( ) bool {
return true
}
// IsRedirect returns true when this post assets o k response has a 3xx status code
func ( o * PostAssetsOK ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this post assets o k response has a 4xx status code
func ( o * PostAssetsOK ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this post assets o k response has a 5xx status code
func ( o * PostAssetsOK ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this post assets o k response a status code equal to that given
func ( o * PostAssetsOK ) IsCode ( code int ) bool {
return code == 200
}
// Code gets the status code for the post assets o k response
func ( o * PostAssetsOK ) Code ( ) int {
return 200
}
2022-09-03 03:34:04 +00:00
func ( o * PostAssetsOK ) Error ( ) string {
return fmt . Sprintf ( "[POST /assets][%d] postAssetsOK %+v" , 200 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PostAssetsOK ) String ( ) string {
return fmt . Sprintf ( "[POST /assets][%d] postAssetsOK %+v" , 200 , o . Payload )
}
2022-09-03 03:34:04 +00:00
func ( o * PostAssetsOK ) GetPayload ( ) * crm_models . AssetResponse {
return o . Payload
}
func ( o * PostAssetsOK ) 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
}
// NewPostAssetsUnauthorized creates a PostAssetsUnauthorized with default headers values
func NewPostAssetsUnauthorized ( ) * PostAssetsUnauthorized {
return & PostAssetsUnauthorized { }
}
2023-03-22 20:49:01 +00:00
/ *
PostAssetsUnauthorized 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 PostAssetsUnauthorized struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post assets unauthorized response has a 2xx status code
func ( o * PostAssetsUnauthorized ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this post assets unauthorized response has a 3xx status code
func ( o * PostAssetsUnauthorized ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this post assets unauthorized response has a 4xx status code
func ( o * PostAssetsUnauthorized ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this post assets unauthorized response has a 5xx status code
func ( o * PostAssetsUnauthorized ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this post assets unauthorized response a status code equal to that given
func ( o * PostAssetsUnauthorized ) IsCode ( code int ) bool {
return code == 401
}
// Code gets the status code for the post assets unauthorized response
func ( o * PostAssetsUnauthorized ) Code ( ) int {
return 401
}
2022-09-03 03:34:04 +00:00
func ( o * PostAssetsUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[POST /assets][%d] postAssetsUnauthorized %+v" , 401 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PostAssetsUnauthorized ) String ( ) string {
return fmt . Sprintf ( "[POST /assets][%d] postAssetsUnauthorized %+v" , 401 , o . Payload )
}
2022-09-03 03:34:04 +00:00
func ( o * PostAssetsUnauthorized ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * PostAssetsUnauthorized ) 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
}
// NewPostAssetsForbidden creates a PostAssetsForbidden with default headers values
func NewPostAssetsForbidden ( ) * PostAssetsForbidden {
return & PostAssetsForbidden { }
}
2023-03-22 20:49:01 +00:00
/ *
PostAssetsForbidden 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 PostAssetsForbidden struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post assets forbidden response has a 2xx status code
func ( o * PostAssetsForbidden ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this post assets forbidden response has a 3xx status code
func ( o * PostAssetsForbidden ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this post assets forbidden response has a 4xx status code
func ( o * PostAssetsForbidden ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this post assets forbidden response has a 5xx status code
func ( o * PostAssetsForbidden ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this post assets forbidden response a status code equal to that given
func ( o * PostAssetsForbidden ) IsCode ( code int ) bool {
return code == 403
}
// Code gets the status code for the post assets forbidden response
func ( o * PostAssetsForbidden ) Code ( ) int {
return 403
}
2022-09-03 03:34:04 +00:00
func ( o * PostAssetsForbidden ) Error ( ) string {
return fmt . Sprintf ( "[POST /assets][%d] postAssetsForbidden %+v" , 403 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PostAssetsForbidden ) String ( ) string {
return fmt . Sprintf ( "[POST /assets][%d] postAssetsForbidden %+v" , 403 , o . Payload )
}
2022-09-03 03:34:04 +00:00
func ( o * PostAssetsForbidden ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * PostAssetsForbidden ) 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
}
// NewPostAssetsNotFound creates a PostAssetsNotFound with default headers values
func NewPostAssetsNotFound ( ) * PostAssetsNotFound {
return & PostAssetsNotFound { }
}
2023-03-22 20:49:01 +00:00
/ *
PostAssetsNotFound describes a response with status code 404 , with default header values .
2022-09-03 03:34:04 +00:00
Resource was not found
* /
type PostAssetsNotFound struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post assets not found response has a 2xx status code
func ( o * PostAssetsNotFound ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this post assets not found response has a 3xx status code
func ( o * PostAssetsNotFound ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this post assets not found response has a 4xx status code
func ( o * PostAssetsNotFound ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this post assets not found response has a 5xx status code
func ( o * PostAssetsNotFound ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this post assets not found response a status code equal to that given
func ( o * PostAssetsNotFound ) IsCode ( code int ) bool {
return code == 404
}
// Code gets the status code for the post assets not found response
func ( o * PostAssetsNotFound ) Code ( ) int {
return 404
}
2022-09-03 03:34:04 +00:00
func ( o * PostAssetsNotFound ) Error ( ) string {
return fmt . Sprintf ( "[POST /assets][%d] postAssetsNotFound %+v" , 404 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PostAssetsNotFound ) String ( ) string {
return fmt . Sprintf ( "[POST /assets][%d] postAssetsNotFound %+v" , 404 , o . Payload )
}
2022-09-03 03:34:04 +00:00
func ( o * PostAssetsNotFound ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * PostAssetsNotFound ) 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
}
// NewPostAssetsUnprocessableEntity creates a PostAssetsUnprocessableEntity with default headers values
func NewPostAssetsUnprocessableEntity ( ) * PostAssetsUnprocessableEntity {
return & PostAssetsUnprocessableEntity { }
}
2023-03-22 20:49:01 +00:00
/ *
PostAssetsUnprocessableEntity 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 PostAssetsUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post assets unprocessable entity response has a 2xx status code
func ( o * PostAssetsUnprocessableEntity ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this post assets unprocessable entity response has a 3xx status code
func ( o * PostAssetsUnprocessableEntity ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this post assets unprocessable entity response has a 4xx status code
func ( o * PostAssetsUnprocessableEntity ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this post assets unprocessable entity response has a 5xx status code
func ( o * PostAssetsUnprocessableEntity ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this post assets unprocessable entity response a status code equal to that given
func ( o * PostAssetsUnprocessableEntity ) IsCode ( code int ) bool {
return code == 422
}
// Code gets the status code for the post assets unprocessable entity response
func ( o * PostAssetsUnprocessableEntity ) Code ( ) int {
return 422
}
2022-09-03 03:34:04 +00:00
func ( o * PostAssetsUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[POST /assets][%d] postAssetsUnprocessableEntity %+v" , 422 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PostAssetsUnprocessableEntity ) String ( ) string {
return fmt . Sprintf ( "[POST /assets][%d] postAssetsUnprocessableEntity %+v" , 422 , o . Payload )
}
2022-09-03 03:34:04 +00:00
func ( o * PostAssetsUnprocessableEntity ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * PostAssetsUnprocessableEntity ) 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
}
// NewPostAssetsInternalServerError creates a PostAssetsInternalServerError with default headers values
func NewPostAssetsInternalServerError ( ) * PostAssetsInternalServerError {
return & PostAssetsInternalServerError { }
}
2023-03-22 20:49:01 +00:00
/ *
PostAssetsInternalServerError describes a response with status code 500 , with default header values .
2022-09-03 03:34:04 +00:00
Server Internal Error
* /
type PostAssetsInternalServerError struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this post assets internal server error response has a 2xx status code
func ( o * PostAssetsInternalServerError ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this post assets internal server error response has a 3xx status code
func ( o * PostAssetsInternalServerError ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this post assets internal server error response has a 4xx status code
func ( o * PostAssetsInternalServerError ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this post assets internal server error response has a 5xx status code
func ( o * PostAssetsInternalServerError ) IsServerError ( ) bool {
return true
}
// IsCode returns true when this post assets internal server error response a status code equal to that given
func ( o * PostAssetsInternalServerError ) IsCode ( code int ) bool {
return code == 500
}
// Code gets the status code for the post assets internal server error response
func ( o * PostAssetsInternalServerError ) Code ( ) int {
return 500
}
2022-09-03 03:34:04 +00:00
func ( o * PostAssetsInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[POST /assets][%d] postAssetsInternalServerError %+v" , 500 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * PostAssetsInternalServerError ) String ( ) string {
return fmt . Sprintf ( "[POST /assets][%d] postAssetsInternalServerError %+v" , 500 , o . Payload )
}
2022-09-03 03:34:04 +00:00
func ( o * PostAssetsInternalServerError ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * PostAssetsInternalServerError ) 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
}