lib/api/sfgate/sfgate_client/accounts/delete_account_responses.go

316 lines
9.4 KiB
Go
Raw Permalink Normal View History

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
2021-08-14 22:34:08 +00:00
package accounts
2021-07-31 03:05:02 +00:00
// 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-14 22:34:08 +00:00
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
2021-07-31 03:05:02 +00:00
)
2021-08-14 22:34:08 +00:00
// DeleteAccountReader is a Reader for the DeleteAccount structure.
type DeleteAccountReader struct {
2021-07-31 03:05:02 +00:00
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
2021-07-31 03:05:02 +00:00
switch response.Code() {
case 200:
2021-08-14 22:34:08 +00:00
result := NewDeleteAccountOK()
2021-07-31 03:05:02 +00:00
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
2021-08-14 22:34:08 +00:00
result := NewDeleteAccountUnauthorized()
2021-07-31 03:05:02 +00:00
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
2021-08-14 22:34:08 +00:00
result := NewDeleteAccountForbidden()
2021-07-31 03:05:02 +00:00
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
2021-08-14 22:34:08 +00:00
result := NewDeleteAccountNotFound()
2021-07-31 03:05:02 +00:00
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
2021-08-14 22:34:08 +00:00
result := NewDeleteAccountUnprocessableEntity()
2021-07-31 03:05:02 +00:00
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
2021-08-14 22:34:08 +00:00
result := NewDeleteAccountInternalServerError()
2021-07-31 03:05:02 +00:00
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())
}
}
2021-08-14 22:34:08 +00:00
// NewDeleteAccountOK creates a DeleteAccountOK with default headers values
func NewDeleteAccountOK() *DeleteAccountOK {
return &DeleteAccountOK{}
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
/* DeleteAccountOK describes a response with status code 200, with default header values.
2021-07-31 03:05:02 +00:00
2021-08-14 22:34:08 +00:00
Taxnexus Response with Message Objects with Delete Status
2021-07-31 03:05:02 +00:00
*/
2021-08-14 22:34:08 +00:00
type DeleteAccountOK struct {
2021-07-31 03:05:02 +00:00
AccessControlAllowOrigin string
2021-08-14 22:34:08 +00:00
Payload *sfgate_models.DeleteResponse
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountOK) Error() string {
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountOK %+v", 200, o.Payload)
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountOK) GetPayload() *sfgate_models.DeleteResponse {
2021-07-31 03:05:02 +00:00
return o.Payload
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2021-07-31 03:05:02 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-08-14 22:34:08 +00:00
o.Payload = new(sfgate_models.DeleteResponse)
2021-07-31 03:05:02 +00:00
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
2021-08-14 22:34:08 +00:00
// NewDeleteAccountUnauthorized creates a DeleteAccountUnauthorized with default headers values
func NewDeleteAccountUnauthorized() *DeleteAccountUnauthorized {
return &DeleteAccountUnauthorized{}
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
/* DeleteAccountUnauthorized 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
*/
2021-08-14 22:34:08 +00:00
type DeleteAccountUnauthorized struct {
2021-07-31 03:05:02 +00:00
AccessControlAllowOrigin string
2021-08-14 22:34:08 +00:00
Payload *sfgate_models.Error
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountUnauthorized) Error() string {
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountUnauthorized %+v", 401, o.Payload)
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountUnauthorized) GetPayload() *sfgate_models.Error {
2021-07-31 03:05:02 +00:00
return o.Payload
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2021-07-31 03:05:02 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-08-14 22:34:08 +00:00
o.Payload = new(sfgate_models.Error)
2021-07-31 03:05:02 +00:00
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
2021-08-14 22:34:08 +00:00
// NewDeleteAccountForbidden creates a DeleteAccountForbidden with default headers values
func NewDeleteAccountForbidden() *DeleteAccountForbidden {
return &DeleteAccountForbidden{}
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
/* DeleteAccountForbidden describes a response with status code 403, with default header values.
2021-07-31 03:05:02 +00:00
Access forbidden, account lacks access
*/
2021-08-14 22:34:08 +00:00
type DeleteAccountForbidden struct {
2021-07-31 03:05:02 +00:00
AccessControlAllowOrigin string
2021-08-14 22:34:08 +00:00
Payload *sfgate_models.Error
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountForbidden) Error() string {
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountForbidden %+v", 403, o.Payload)
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountForbidden) GetPayload() *sfgate_models.Error {
2021-07-31 03:05:02 +00:00
return o.Payload
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2021-07-31 03:05:02 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-08-14 22:34:08 +00:00
o.Payload = new(sfgate_models.Error)
2021-07-31 03:05:02 +00:00
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
2021-08-14 22:34:08 +00:00
// NewDeleteAccountNotFound creates a DeleteAccountNotFound with default headers values
func NewDeleteAccountNotFound() *DeleteAccountNotFound {
return &DeleteAccountNotFound{}
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
/* DeleteAccountNotFound describes a response with status code 404, with default header values.
2021-07-31 03:05:02 +00:00
Resource was not found
*/
2021-08-14 22:34:08 +00:00
type DeleteAccountNotFound struct {
2021-07-31 03:05:02 +00:00
AccessControlAllowOrigin string
2021-08-14 22:34:08 +00:00
Payload *sfgate_models.Error
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountNotFound) Error() string {
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountNotFound %+v", 404, o.Payload)
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountNotFound) GetPayload() *sfgate_models.Error {
2021-07-31 03:05:02 +00:00
return o.Payload
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2021-07-31 03:05:02 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-08-14 22:34:08 +00:00
o.Payload = new(sfgate_models.Error)
2021-07-31 03:05:02 +00:00
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
2021-08-14 22:34:08 +00:00
// NewDeleteAccountUnprocessableEntity creates a DeleteAccountUnprocessableEntity with default headers values
func NewDeleteAccountUnprocessableEntity() *DeleteAccountUnprocessableEntity {
return &DeleteAccountUnprocessableEntity{}
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
/* DeleteAccountUnprocessableEntity 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
*/
2021-08-14 22:34:08 +00:00
type DeleteAccountUnprocessableEntity struct {
2021-07-31 03:05:02 +00:00
AccessControlAllowOrigin string
2021-08-14 22:34:08 +00:00
Payload *sfgate_models.Error
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountUnprocessableEntity) Error() string {
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountUnprocessableEntity %+v", 422, o.Payload)
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountUnprocessableEntity) GetPayload() *sfgate_models.Error {
2021-07-31 03:05:02 +00:00
return o.Payload
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2021-07-31 03:05:02 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-08-14 22:34:08 +00:00
o.Payload = new(sfgate_models.Error)
2021-07-31 03:05:02 +00:00
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
2021-08-14 22:34:08 +00:00
// NewDeleteAccountInternalServerError creates a DeleteAccountInternalServerError with default headers values
func NewDeleteAccountInternalServerError() *DeleteAccountInternalServerError {
return &DeleteAccountInternalServerError{}
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
/* DeleteAccountInternalServerError describes a response with status code 500, with default header values.
2021-07-31 03:05:02 +00:00
Server Internal Error
*/
2021-08-14 22:34:08 +00:00
type DeleteAccountInternalServerError struct {
2021-07-31 03:05:02 +00:00
AccessControlAllowOrigin string
2021-08-14 22:34:08 +00:00
Payload *sfgate_models.Error
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountInternalServerError) Error() string {
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountInternalServerError %+v", 500, o.Payload)
2021-07-31 03:05:02 +00:00
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountInternalServerError) GetPayload() *sfgate_models.Error {
2021-07-31 03:05:02 +00:00
return o.Payload
}
2021-08-14 22:34:08 +00:00
func (o *DeleteAccountInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
2021-07-31 03:05:02 +00:00
// hydrates response header Access-Control-Allow-Origin
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
if hdrAccessControlAllowOrigin != "" {
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
}
2021-08-14 22:34:08 +00:00
o.Payload = new(sfgate_models.Error)
2021-07-31 03:05:02 +00:00
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}