lib/api/sfgate/sfgate_client/contacts/delete_contacts_responses.go

523 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 contacts
// 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/sfgate/sfgate_models"
)
// DeleteContactsReader is a Reader for the DeleteContacts structure.
type DeleteContactsReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *DeleteContactsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewDeleteContactsOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewDeleteContactsUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewDeleteContactsForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewDeleteContactsNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewDeleteContactsUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewDeleteContactsInternalServerError()
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())
}
}
// NewDeleteContactsOK creates a DeleteContactsOK with default headers values
func NewDeleteContactsOK() *DeleteContactsOK {
return &DeleteContactsOK{}
}
/*
DeleteContactsOK describes a response with status code 200, with default header values.
Response with Contact objects
*/
type DeleteContactsOK struct {
Payload *sfgate_models.ContactResponse
}
// IsSuccess returns true when this delete contacts o k response has a 2xx status code
func (o *DeleteContactsOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this delete contacts o k response has a 3xx status code
func (o *DeleteContactsOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this delete contacts o k response has a 4xx status code
func (o *DeleteContactsOK) IsClientError() bool {
return false
}
// IsServerError returns true when this delete contacts o k response has a 5xx status code
func (o *DeleteContactsOK) IsServerError() bool {
return false
}
// IsCode returns true when this delete contacts o k response a status code equal to that given
func (o *DeleteContactsOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the delete contacts o k response
func (o *DeleteContactsOK) Code() int {
return 200
}
func (o *DeleteContactsOK) Error() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactsOK %+v", 200, o.Payload)
}
func (o *DeleteContactsOK) String() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactsOK %+v", 200, o.Payload)
}
func (o *DeleteContactsOK) GetPayload() *sfgate_models.ContactResponse {
return o.Payload
}
func (o *DeleteContactsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(sfgate_models.ContactResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteContactsUnauthorized creates a DeleteContactsUnauthorized with default headers values
func NewDeleteContactsUnauthorized() *DeleteContactsUnauthorized {
return &DeleteContactsUnauthorized{}
}
/*
DeleteContactsUnauthorized describes a response with status code 401, with default header values.
Access unauthorized, invalid API-KEY was used
*/
type DeleteContactsUnauthorized struct {
AccessControlAllowOrigin string
Payload *sfgate_models.Error
}
// IsSuccess returns true when this delete contacts unauthorized response has a 2xx status code
func (o *DeleteContactsUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this delete contacts unauthorized response has a 3xx status code
func (o *DeleteContactsUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this delete contacts unauthorized response has a 4xx status code
func (o *DeleteContactsUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this delete contacts unauthorized response has a 5xx status code
func (o *DeleteContactsUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this delete contacts unauthorized response a status code equal to that given
func (o *DeleteContactsUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the delete contacts unauthorized response
func (o *DeleteContactsUnauthorized) Code() int {
return 401
}
func (o *DeleteContactsUnauthorized) Error() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactsUnauthorized %+v", 401, o.Payload)
}
func (o *DeleteContactsUnauthorized) String() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactsUnauthorized %+v", 401, o.Payload)
}
func (o *DeleteContactsUnauthorized) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *DeleteContactsUnauthorized) 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(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteContactsForbidden creates a DeleteContactsForbidden with default headers values
func NewDeleteContactsForbidden() *DeleteContactsForbidden {
return &DeleteContactsForbidden{}
}
/*
DeleteContactsForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type DeleteContactsForbidden struct {
AccessControlAllowOrigin string
Payload *sfgate_models.Error
}
// IsSuccess returns true when this delete contacts forbidden response has a 2xx status code
func (o *DeleteContactsForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this delete contacts forbidden response has a 3xx status code
func (o *DeleteContactsForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this delete contacts forbidden response has a 4xx status code
func (o *DeleteContactsForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this delete contacts forbidden response has a 5xx status code
func (o *DeleteContactsForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this delete contacts forbidden response a status code equal to that given
func (o *DeleteContactsForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the delete contacts forbidden response
func (o *DeleteContactsForbidden) Code() int {
return 403
}
func (o *DeleteContactsForbidden) Error() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactsForbidden %+v", 403, o.Payload)
}
func (o *DeleteContactsForbidden) String() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactsForbidden %+v", 403, o.Payload)
}
func (o *DeleteContactsForbidden) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *DeleteContactsForbidden) 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(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteContactsNotFound creates a DeleteContactsNotFound with default headers values
func NewDeleteContactsNotFound() *DeleteContactsNotFound {
return &DeleteContactsNotFound{}
}
/*
DeleteContactsNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type DeleteContactsNotFound struct {
AccessControlAllowOrigin string
Payload *sfgate_models.Error
}
// IsSuccess returns true when this delete contacts not found response has a 2xx status code
func (o *DeleteContactsNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this delete contacts not found response has a 3xx status code
func (o *DeleteContactsNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this delete contacts not found response has a 4xx status code
func (o *DeleteContactsNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this delete contacts not found response has a 5xx status code
func (o *DeleteContactsNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this delete contacts not found response a status code equal to that given
func (o *DeleteContactsNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the delete contacts not found response
func (o *DeleteContactsNotFound) Code() int {
return 404
}
func (o *DeleteContactsNotFound) Error() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactsNotFound %+v", 404, o.Payload)
}
func (o *DeleteContactsNotFound) String() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactsNotFound %+v", 404, o.Payload)
}
func (o *DeleteContactsNotFound) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *DeleteContactsNotFound) 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(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteContactsUnprocessableEntity creates a DeleteContactsUnprocessableEntity with default headers values
func NewDeleteContactsUnprocessableEntity() *DeleteContactsUnprocessableEntity {
return &DeleteContactsUnprocessableEntity{}
}
/*
DeleteContactsUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type DeleteContactsUnprocessableEntity struct {
AccessControlAllowOrigin string
Payload *sfgate_models.Error
}
// IsSuccess returns true when this delete contacts unprocessable entity response has a 2xx status code
func (o *DeleteContactsUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this delete contacts unprocessable entity response has a 3xx status code
func (o *DeleteContactsUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this delete contacts unprocessable entity response has a 4xx status code
func (o *DeleteContactsUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this delete contacts unprocessable entity response has a 5xx status code
func (o *DeleteContactsUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this delete contacts unprocessable entity response a status code equal to that given
func (o *DeleteContactsUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the delete contacts unprocessable entity response
func (o *DeleteContactsUnprocessableEntity) Code() int {
return 422
}
func (o *DeleteContactsUnprocessableEntity) Error() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *DeleteContactsUnprocessableEntity) String() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactsUnprocessableEntity %+v", 422, o.Payload)
}
func (o *DeleteContactsUnprocessableEntity) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *DeleteContactsUnprocessableEntity) 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(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewDeleteContactsInternalServerError creates a DeleteContactsInternalServerError with default headers values
func NewDeleteContactsInternalServerError() *DeleteContactsInternalServerError {
return &DeleteContactsInternalServerError{}
}
/*
DeleteContactsInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type DeleteContactsInternalServerError struct {
AccessControlAllowOrigin string
Payload *sfgate_models.Error
}
// IsSuccess returns true when this delete contacts internal server error response has a 2xx status code
func (o *DeleteContactsInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this delete contacts internal server error response has a 3xx status code
func (o *DeleteContactsInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this delete contacts internal server error response has a 4xx status code
func (o *DeleteContactsInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this delete contacts internal server error response has a 5xx status code
func (o *DeleteContactsInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this delete contacts internal server error response a status code equal to that given
func (o *DeleteContactsInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the delete contacts internal server error response
func (o *DeleteContactsInternalServerError) Code() int {
return 500
}
func (o *DeleteContactsInternalServerError) Error() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactsInternalServerError %+v", 500, o.Payload)
}
func (o *DeleteContactsInternalServerError) String() string {
return fmt.Sprintf("[DELETE /contacts][%d] deleteContactsInternalServerError %+v", 500, o.Payload)
}
func (o *DeleteContactsInternalServerError) GetPayload() *sfgate_models.Error {
return o.Payload
}
func (o *DeleteContactsInternalServerError) 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(sfgate_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}