mirror of https://github.com/vernonkeenan/lib
532 lines
16 KiB
Go
532 lines
16 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"
|
|
)
|
|
|
|
// 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.
|
|
|
|
Response with Message Objects with Delete Status
|
|
*/
|
|
type DeleteAssetOK struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *crm_models.DeleteResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this delete asset o k response has a 2xx status code
|
|
func (o *DeleteAssetOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this delete asset o k response has a 3xx status code
|
|
func (o *DeleteAssetOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete asset o k response has a 4xx status code
|
|
func (o *DeleteAssetOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this delete asset o k response has a 5xx status code
|
|
func (o *DeleteAssetOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete asset o k response a status code equal to that given
|
|
func (o *DeleteAssetOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the delete asset o k response
|
|
func (o *DeleteAssetOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *DeleteAssetOK) Error() string {
|
|
return fmt.Sprintf("[DELETE /assets][%d] deleteAssetOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteAssetOK) String() 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
|
|
}
|
|
|
|
// IsSuccess returns true when this delete asset unauthorized response has a 2xx status code
|
|
func (o *DeleteAssetUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete asset unauthorized response has a 3xx status code
|
|
func (o *DeleteAssetUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete asset unauthorized response has a 4xx status code
|
|
func (o *DeleteAssetUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete asset unauthorized response has a 5xx status code
|
|
func (o *DeleteAssetUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete asset unauthorized response a status code equal to that given
|
|
func (o *DeleteAssetUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the delete asset unauthorized response
|
|
func (o *DeleteAssetUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *DeleteAssetUnauthorized) Error() string {
|
|
return fmt.Sprintf("[DELETE /assets][%d] deleteAssetUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteAssetUnauthorized) String() 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
|
|
}
|
|
|
|
// IsSuccess returns true when this delete asset forbidden response has a 2xx status code
|
|
func (o *DeleteAssetForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete asset forbidden response has a 3xx status code
|
|
func (o *DeleteAssetForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete asset forbidden response has a 4xx status code
|
|
func (o *DeleteAssetForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete asset forbidden response has a 5xx status code
|
|
func (o *DeleteAssetForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete asset forbidden response a status code equal to that given
|
|
func (o *DeleteAssetForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the delete asset forbidden response
|
|
func (o *DeleteAssetForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *DeleteAssetForbidden) Error() string {
|
|
return fmt.Sprintf("[DELETE /assets][%d] deleteAssetForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteAssetForbidden) String() 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
|
|
}
|
|
|
|
// IsSuccess returns true when this delete asset not found response has a 2xx status code
|
|
func (o *DeleteAssetNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete asset not found response has a 3xx status code
|
|
func (o *DeleteAssetNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete asset not found response has a 4xx status code
|
|
func (o *DeleteAssetNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete asset not found response has a 5xx status code
|
|
func (o *DeleteAssetNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete asset not found response a status code equal to that given
|
|
func (o *DeleteAssetNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the delete asset not found response
|
|
func (o *DeleteAssetNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *DeleteAssetNotFound) Error() string {
|
|
return fmt.Sprintf("[DELETE /assets][%d] deleteAssetNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteAssetNotFound) String() 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
|
|
}
|
|
|
|
// IsSuccess returns true when this delete asset unprocessable entity response has a 2xx status code
|
|
func (o *DeleteAssetUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete asset unprocessable entity response has a 3xx status code
|
|
func (o *DeleteAssetUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete asset unprocessable entity response has a 4xx status code
|
|
func (o *DeleteAssetUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete asset unprocessable entity response has a 5xx status code
|
|
func (o *DeleteAssetUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete asset unprocessable entity response a status code equal to that given
|
|
func (o *DeleteAssetUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the delete asset unprocessable entity response
|
|
func (o *DeleteAssetUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *DeleteAssetUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[DELETE /assets][%d] deleteAssetUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteAssetUnprocessableEntity) String() 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
|
|
}
|
|
|
|
// IsSuccess returns true when this delete asset internal server error response has a 2xx status code
|
|
func (o *DeleteAssetInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete asset internal server error response has a 3xx status code
|
|
func (o *DeleteAssetInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete asset internal server error response has a 4xx status code
|
|
func (o *DeleteAssetInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this delete asset internal server error response has a 5xx status code
|
|
func (o *DeleteAssetInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this delete asset internal server error response a status code equal to that given
|
|
func (o *DeleteAssetInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the delete asset internal server error response
|
|
func (o *DeleteAssetInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *DeleteAssetInternalServerError) Error() string {
|
|
return fmt.Sprintf("[DELETE /assets][%d] deleteAssetInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *DeleteAssetInternalServerError) String() 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
|
|
}
|