2021-07-31 03:05:02 +00:00
// Code generated by go-swagger; DO NOT EDIT.
2021-08-05 19:37:53 +00:00
// (c) 2012-2020 by Taxnexus, Inc.
2021-07-31 03:05:02 +00:00
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package leads
// 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"
2021-08-01 00:08:25 +00:00
"code.tnxs.net/vernonkeenan/lib/api/crm/crm_models"
2021-07-31 03:05:02 +00:00
)
// DeleteLeadReader is a Reader for the DeleteLead structure.
type DeleteLeadReader struct {
formats strfmt . Registry
}
// ReadResponse reads a server response into the received o.
func ( o * DeleteLeadReader ) ReadResponse ( response runtime . ClientResponse , consumer runtime . Consumer ) ( interface { } , error ) {
switch response . Code ( ) {
case 200 :
result := NewDeleteLeadOK ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return result , nil
case 401 :
result := NewDeleteLeadUnauthorized ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 403 :
result := NewDeleteLeadForbidden ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 404 :
result := NewDeleteLeadNotFound ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 422 :
result := NewDeleteLeadUnprocessableEntity ( )
if err := result . readResponse ( response , consumer , o . formats ) ; err != nil {
return nil , err
}
return nil , result
case 500 :
result := NewDeleteLeadInternalServerError ( )
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 ( ) )
}
}
// NewDeleteLeadOK creates a DeleteLeadOK with default headers values
func NewDeleteLeadOK ( ) * DeleteLeadOK {
return & DeleteLeadOK { }
}
2023-03-22 20:49:01 +00:00
/ *
DeleteLeadOK describes a response with status code 200 , with default header values .
2021-07-31 03:05:02 +00:00
2023-03-28 17:47:34 +00:00
Response with Message Objects with Delete Status
2021-07-31 03:05:02 +00:00
* /
type DeleteLeadOK struct {
AccessControlAllowOrigin string
Payload * crm_models . DeleteResponse
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this delete lead o k response has a 2xx status code
func ( o * DeleteLeadOK ) IsSuccess ( ) bool {
return true
}
// IsRedirect returns true when this delete lead o k response has a 3xx status code
func ( o * DeleteLeadOK ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this delete lead o k response has a 4xx status code
func ( o * DeleteLeadOK ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this delete lead o k response has a 5xx status code
func ( o * DeleteLeadOK ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this delete lead o k response a status code equal to that given
func ( o * DeleteLeadOK ) IsCode ( code int ) bool {
return code == 200
}
// Code gets the status code for the delete lead o k response
func ( o * DeleteLeadOK ) Code ( ) int {
return 200
}
2021-07-31 03:05:02 +00:00
func ( o * DeleteLeadOK ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /leads][%d] deleteLeadOK %+v" , 200 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * DeleteLeadOK ) String ( ) string {
return fmt . Sprintf ( "[DELETE /leads][%d] deleteLeadOK %+v" , 200 , o . Payload )
}
2021-07-31 03:05:02 +00:00
func ( o * DeleteLeadOK ) GetPayload ( ) * crm_models . DeleteResponse {
return o . Payload
}
func ( o * DeleteLeadOK ) 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
}
// NewDeleteLeadUnauthorized creates a DeleteLeadUnauthorized with default headers values
func NewDeleteLeadUnauthorized ( ) * DeleteLeadUnauthorized {
return & DeleteLeadUnauthorized { }
}
2023-03-22 20:49:01 +00:00
/ *
DeleteLeadUnauthorized describes a response with status code 401 , with default header values .
2021-07-31 03:05:02 +00:00
Access unauthorized , invalid API - KEY was used
* /
type DeleteLeadUnauthorized struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this delete lead unauthorized response has a 2xx status code
func ( o * DeleteLeadUnauthorized ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this delete lead unauthorized response has a 3xx status code
func ( o * DeleteLeadUnauthorized ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this delete lead unauthorized response has a 4xx status code
func ( o * DeleteLeadUnauthorized ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this delete lead unauthorized response has a 5xx status code
func ( o * DeleteLeadUnauthorized ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this delete lead unauthorized response a status code equal to that given
func ( o * DeleteLeadUnauthorized ) IsCode ( code int ) bool {
return code == 401
}
// Code gets the status code for the delete lead unauthorized response
func ( o * DeleteLeadUnauthorized ) Code ( ) int {
return 401
}
2021-07-31 03:05:02 +00:00
func ( o * DeleteLeadUnauthorized ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /leads][%d] deleteLeadUnauthorized %+v" , 401 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * DeleteLeadUnauthorized ) String ( ) string {
return fmt . Sprintf ( "[DELETE /leads][%d] deleteLeadUnauthorized %+v" , 401 , o . Payload )
}
2021-07-31 03:05:02 +00:00
func ( o * DeleteLeadUnauthorized ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * DeleteLeadUnauthorized ) 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
}
// NewDeleteLeadForbidden creates a DeleteLeadForbidden with default headers values
func NewDeleteLeadForbidden ( ) * DeleteLeadForbidden {
return & DeleteLeadForbidden { }
}
2023-03-22 20:49:01 +00:00
/ *
DeleteLeadForbidden describes a response with status code 403 , with default header values .
2021-07-31 03:05:02 +00:00
Access forbidden , account lacks access
* /
type DeleteLeadForbidden struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this delete lead forbidden response has a 2xx status code
func ( o * DeleteLeadForbidden ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this delete lead forbidden response has a 3xx status code
func ( o * DeleteLeadForbidden ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this delete lead forbidden response has a 4xx status code
func ( o * DeleteLeadForbidden ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this delete lead forbidden response has a 5xx status code
func ( o * DeleteLeadForbidden ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this delete lead forbidden response a status code equal to that given
func ( o * DeleteLeadForbidden ) IsCode ( code int ) bool {
return code == 403
}
// Code gets the status code for the delete lead forbidden response
func ( o * DeleteLeadForbidden ) Code ( ) int {
return 403
}
2021-07-31 03:05:02 +00:00
func ( o * DeleteLeadForbidden ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /leads][%d] deleteLeadForbidden %+v" , 403 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * DeleteLeadForbidden ) String ( ) string {
return fmt . Sprintf ( "[DELETE /leads][%d] deleteLeadForbidden %+v" , 403 , o . Payload )
}
2021-07-31 03:05:02 +00:00
func ( o * DeleteLeadForbidden ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * DeleteLeadForbidden ) 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
}
// NewDeleteLeadNotFound creates a DeleteLeadNotFound with default headers values
func NewDeleteLeadNotFound ( ) * DeleteLeadNotFound {
return & DeleteLeadNotFound { }
}
2023-03-22 20:49:01 +00:00
/ *
DeleteLeadNotFound describes a response with status code 404 , with default header values .
2021-07-31 03:05:02 +00:00
Resource was not found
* /
type DeleteLeadNotFound struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this delete lead not found response has a 2xx status code
func ( o * DeleteLeadNotFound ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this delete lead not found response has a 3xx status code
func ( o * DeleteLeadNotFound ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this delete lead not found response has a 4xx status code
func ( o * DeleteLeadNotFound ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this delete lead not found response has a 5xx status code
func ( o * DeleteLeadNotFound ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this delete lead not found response a status code equal to that given
func ( o * DeleteLeadNotFound ) IsCode ( code int ) bool {
return code == 404
}
// Code gets the status code for the delete lead not found response
func ( o * DeleteLeadNotFound ) Code ( ) int {
return 404
}
2021-07-31 03:05:02 +00:00
func ( o * DeleteLeadNotFound ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /leads][%d] deleteLeadNotFound %+v" , 404 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * DeleteLeadNotFound ) String ( ) string {
return fmt . Sprintf ( "[DELETE /leads][%d] deleteLeadNotFound %+v" , 404 , o . Payload )
}
2021-07-31 03:05:02 +00:00
func ( o * DeleteLeadNotFound ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * DeleteLeadNotFound ) 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
}
// NewDeleteLeadUnprocessableEntity creates a DeleteLeadUnprocessableEntity with default headers values
func NewDeleteLeadUnprocessableEntity ( ) * DeleteLeadUnprocessableEntity {
return & DeleteLeadUnprocessableEntity { }
}
2023-03-22 20:49:01 +00:00
/ *
DeleteLeadUnprocessableEntity describes a response with status code 422 , with default header values .
2021-07-31 03:05:02 +00:00
Unprocessable Entity , likely a bad parameter
* /
type DeleteLeadUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this delete lead unprocessable entity response has a 2xx status code
func ( o * DeleteLeadUnprocessableEntity ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this delete lead unprocessable entity response has a 3xx status code
func ( o * DeleteLeadUnprocessableEntity ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this delete lead unprocessable entity response has a 4xx status code
func ( o * DeleteLeadUnprocessableEntity ) IsClientError ( ) bool {
return true
}
// IsServerError returns true when this delete lead unprocessable entity response has a 5xx status code
func ( o * DeleteLeadUnprocessableEntity ) IsServerError ( ) bool {
return false
}
// IsCode returns true when this delete lead unprocessable entity response a status code equal to that given
func ( o * DeleteLeadUnprocessableEntity ) IsCode ( code int ) bool {
return code == 422
}
// Code gets the status code for the delete lead unprocessable entity response
func ( o * DeleteLeadUnprocessableEntity ) Code ( ) int {
return 422
}
2021-07-31 03:05:02 +00:00
func ( o * DeleteLeadUnprocessableEntity ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /leads][%d] deleteLeadUnprocessableEntity %+v" , 422 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * DeleteLeadUnprocessableEntity ) String ( ) string {
return fmt . Sprintf ( "[DELETE /leads][%d] deleteLeadUnprocessableEntity %+v" , 422 , o . Payload )
}
2021-07-31 03:05:02 +00:00
func ( o * DeleteLeadUnprocessableEntity ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * DeleteLeadUnprocessableEntity ) 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
}
// NewDeleteLeadInternalServerError creates a DeleteLeadInternalServerError with default headers values
func NewDeleteLeadInternalServerError ( ) * DeleteLeadInternalServerError {
return & DeleteLeadInternalServerError { }
}
2023-03-22 20:49:01 +00:00
/ *
DeleteLeadInternalServerError describes a response with status code 500 , with default header values .
2021-07-31 03:05:02 +00:00
Server Internal Error
* /
type DeleteLeadInternalServerError struct {
AccessControlAllowOrigin string
Payload * crm_models . Error
}
2023-03-22 20:49:01 +00:00
// IsSuccess returns true when this delete lead internal server error response has a 2xx status code
func ( o * DeleteLeadInternalServerError ) IsSuccess ( ) bool {
return false
}
// IsRedirect returns true when this delete lead internal server error response has a 3xx status code
func ( o * DeleteLeadInternalServerError ) IsRedirect ( ) bool {
return false
}
// IsClientError returns true when this delete lead internal server error response has a 4xx status code
func ( o * DeleteLeadInternalServerError ) IsClientError ( ) bool {
return false
}
// IsServerError returns true when this delete lead internal server error response has a 5xx status code
func ( o * DeleteLeadInternalServerError ) IsServerError ( ) bool {
return true
}
// IsCode returns true when this delete lead internal server error response a status code equal to that given
func ( o * DeleteLeadInternalServerError ) IsCode ( code int ) bool {
return code == 500
}
// Code gets the status code for the delete lead internal server error response
func ( o * DeleteLeadInternalServerError ) Code ( ) int {
return 500
}
2021-07-31 03:05:02 +00:00
func ( o * DeleteLeadInternalServerError ) Error ( ) string {
return fmt . Sprintf ( "[DELETE /leads][%d] deleteLeadInternalServerError %+v" , 500 , o . Payload )
}
2023-03-22 20:49:01 +00:00
func ( o * DeleteLeadInternalServerError ) String ( ) string {
return fmt . Sprintf ( "[DELETE /leads][%d] deleteLeadInternalServerError %+v" , 500 , o . Payload )
}
2021-07-31 03:05:02 +00:00
func ( o * DeleteLeadInternalServerError ) GetPayload ( ) * crm_models . Error {
return o . Payload
}
func ( o * DeleteLeadInternalServerError ) 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
}