lib/api/crm/crm_client/assets/delete_asset_responses.go

316 lines
9.1 KiB
Go
Raw Normal View History

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"
)
// DeleteAssetReader is a Reader for the DeleteAsset structure.
type DeleteAssetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DeleteAssetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewDeleteAssetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewDeleteAssetUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewDeleteAssetForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewDeleteAssetNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewDeleteAssetUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewDeleteAssetInternalServerError()
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())
}
}
// NewDeleteAssetOK creates a DeleteAssetOK with default headers values
func NewDeleteAssetOK() *DeleteAssetOK {
return &DeleteAssetOK{}
}
/* DeleteAssetOK describes a response with status code 200, with default header values.
Taxnexus Response with Message Objects with Delete Status
*/
type DeleteAssetOK struct {
AccessControlAllowOrigin string
Payload *crm_models.DeleteResponse
}
func (o *DeleteAssetOK) Error() string {
return fmt.Sprintf("[DELETE /assets][%d] deleteAssetOK %+v", 200, o.Payload)
}
func (o *DeleteAssetOK) GetPayload() *crm_models.DeleteResponse {
return o.Payload
}
func (o *DeleteAssetOK) 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.DeleteResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteAssetUnauthorized creates a DeleteAssetUnauthorized with default headers values
func NewDeleteAssetUnauthorized() *DeleteAssetUnauthorized {
return &DeleteAssetUnauthorized{}
}
/* DeleteAssetUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type DeleteAssetUnauthorized struct {
AccessControlAllowOrigin string
Payload *crm_models.Error
}
func (o *DeleteAssetUnauthorized) Error() string {
return fmt.Sprintf("[DELETE /assets][%d] deleteAssetUnauthorized %+v", 401, o.Payload)
}
func (o *DeleteAssetUnauthorized) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteAssetUnauthorized) 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
}
// NewDeleteAssetForbidden creates a DeleteAssetForbidden with default headers values
func NewDeleteAssetForbidden() *DeleteAssetForbidden {
return &DeleteAssetForbidden{}
}
/* DeleteAssetForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type DeleteAssetForbidden struct {
AccessControlAllowOrigin string
Payload *crm_models.Error
}
func (o *DeleteAssetForbidden) Error() string {
return fmt.Sprintf("[DELETE /assets][%d] deleteAssetForbidden %+v", 403, o.Payload)
}
func (o *DeleteAssetForbidden) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteAssetForbidden) 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
}
// NewDeleteAssetNotFound creates a DeleteAssetNotFound with default headers values
func NewDeleteAssetNotFound() *DeleteAssetNotFound {
return &DeleteAssetNotFound{}
}
/* DeleteAssetNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type DeleteAssetNotFound struct {
AccessControlAllowOrigin string
Payload *crm_models.Error
}
func (o *DeleteAssetNotFound) Error() string {
return fmt.Sprintf("[DELETE /assets][%d] deleteAssetNotFound %+v", 404, o.Payload)
}
func (o *DeleteAssetNotFound) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteAssetNotFound) 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
}
// NewDeleteAssetUnprocessableEntity creates a DeleteAssetUnprocessableEntity with default headers values
func NewDeleteAssetUnprocessableEntity() *DeleteAssetUnprocessableEntity {
return &DeleteAssetUnprocessableEntity{}
}
/* DeleteAssetUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type DeleteAssetUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *crm_models.Error
}
func (o *DeleteAssetUnprocessableEntity) Error() string {
return fmt.Sprintf("[DELETE /assets][%d] deleteAssetUnprocessableEntity %+v", 422, o.Payload)
}
func (o *DeleteAssetUnprocessableEntity) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteAssetUnprocessableEntity) 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
}
// NewDeleteAssetInternalServerError creates a DeleteAssetInternalServerError with default headers values
func NewDeleteAssetInternalServerError() *DeleteAssetInternalServerError {
return &DeleteAssetInternalServerError{}
}
/* DeleteAssetInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type DeleteAssetInternalServerError struct {
AccessControlAllowOrigin string
Payload *crm_models.Error
}
func (o *DeleteAssetInternalServerError) Error() string {
return fmt.Sprintf("[DELETE /assets][%d] deleteAssetInternalServerError %+v", 500, o.Payload)
}
func (o *DeleteAssetInternalServerError) GetPayload() *crm_models.Error {
return o.Payload
}
func (o *DeleteAssetInternalServerError) 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
}