mirror of https://github.com/vernonkeenan/lib
316 lines
9.4 KiB
Go
316 lines
9.4 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 accounts
|
||
|
|
||
|
// 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"
|
||
|
)
|
||
|
|
||
|
// DeleteAccountReader is a Reader for the DeleteAccount structure.
|
||
|
type DeleteAccountReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *DeleteAccountReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 200:
|
||
|
result := NewDeleteAccountOK()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 401:
|
||
|
result := NewDeleteAccountUnauthorized()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 403:
|
||
|
result := NewDeleteAccountForbidden()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 404:
|
||
|
result := NewDeleteAccountNotFound()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 422:
|
||
|
result := NewDeleteAccountUnprocessableEntity()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewDeleteAccountInternalServerError()
|
||
|
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())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewDeleteAccountOK creates a DeleteAccountOK with default headers values
|
||
|
func NewDeleteAccountOK() *DeleteAccountOK {
|
||
|
return &DeleteAccountOK{}
|
||
|
}
|
||
|
|
||
|
/* DeleteAccountOK describes a response with status code 200, with default header values.
|
||
|
|
||
|
Taxnexus Response with Message Objects with Delete Status
|
||
|
*/
|
||
|
type DeleteAccountOK struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *sfgate_models.DeleteResponse
|
||
|
}
|
||
|
|
||
|
func (o *DeleteAccountOK) Error() string {
|
||
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
func (o *DeleteAccountOK) GetPayload() *sfgate_models.DeleteResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *DeleteAccountOK) 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.DeleteResponse)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewDeleteAccountUnauthorized creates a DeleteAccountUnauthorized with default headers values
|
||
|
func NewDeleteAccountUnauthorized() *DeleteAccountUnauthorized {
|
||
|
return &DeleteAccountUnauthorized{}
|
||
|
}
|
||
|
|
||
|
/* DeleteAccountUnauthorized describes a response with status code 401, with default header values.
|
||
|
|
||
|
Access unauthorized, invalid API-KEY was used
|
||
|
*/
|
||
|
type DeleteAccountUnauthorized struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *sfgate_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *DeleteAccountUnauthorized) Error() string {
|
||
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
func (o *DeleteAccountUnauthorized) GetPayload() *sfgate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *DeleteAccountUnauthorized) 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
|
||
|
}
|
||
|
|
||
|
// NewDeleteAccountForbidden creates a DeleteAccountForbidden with default headers values
|
||
|
func NewDeleteAccountForbidden() *DeleteAccountForbidden {
|
||
|
return &DeleteAccountForbidden{}
|
||
|
}
|
||
|
|
||
|
/* DeleteAccountForbidden describes a response with status code 403, with default header values.
|
||
|
|
||
|
Access forbidden, account lacks access
|
||
|
*/
|
||
|
type DeleteAccountForbidden struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *sfgate_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *DeleteAccountForbidden) Error() string {
|
||
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
func (o *DeleteAccountForbidden) GetPayload() *sfgate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *DeleteAccountForbidden) 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
|
||
|
}
|
||
|
|
||
|
// NewDeleteAccountNotFound creates a DeleteAccountNotFound with default headers values
|
||
|
func NewDeleteAccountNotFound() *DeleteAccountNotFound {
|
||
|
return &DeleteAccountNotFound{}
|
||
|
}
|
||
|
|
||
|
/* DeleteAccountNotFound describes a response with status code 404, with default header values.
|
||
|
|
||
|
Resource was not found
|
||
|
*/
|
||
|
type DeleteAccountNotFound struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *sfgate_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *DeleteAccountNotFound) Error() string {
|
||
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
func (o *DeleteAccountNotFound) GetPayload() *sfgate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *DeleteAccountNotFound) 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
|
||
|
}
|
||
|
|
||
|
// NewDeleteAccountUnprocessableEntity creates a DeleteAccountUnprocessableEntity with default headers values
|
||
|
func NewDeleteAccountUnprocessableEntity() *DeleteAccountUnprocessableEntity {
|
||
|
return &DeleteAccountUnprocessableEntity{}
|
||
|
}
|
||
|
|
||
|
/* DeleteAccountUnprocessableEntity describes a response with status code 422, with default header values.
|
||
|
|
||
|
Unprocessable Entity, likely a bad parameter
|
||
|
*/
|
||
|
type DeleteAccountUnprocessableEntity struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *sfgate_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *DeleteAccountUnprocessableEntity) Error() string {
|
||
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
func (o *DeleteAccountUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *DeleteAccountUnprocessableEntity) 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
|
||
|
}
|
||
|
|
||
|
// NewDeleteAccountInternalServerError creates a DeleteAccountInternalServerError with default headers values
|
||
|
func NewDeleteAccountInternalServerError() *DeleteAccountInternalServerError {
|
||
|
return &DeleteAccountInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/* DeleteAccountInternalServerError describes a response with status code 500, with default header values.
|
||
|
|
||
|
Server Internal Error
|
||
|
*/
|
||
|
type DeleteAccountInternalServerError struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *sfgate_models.Error
|
||
|
}
|
||
|
|
||
|
func (o *DeleteAccountInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
func (o *DeleteAccountInternalServerError) GetPayload() *sfgate_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *DeleteAccountInternalServerError) 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
|
||
|
}
|