mirror of https://github.com/vernonkeenan/lib
476 lines
15 KiB
Go
476 lines
15 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
|
|
|
|
import (
|
|
"encoding/json"
|
|
stderrors "errors"
|
|
"fmt"
|
|
"io"
|
|
|
|
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// 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) (any, 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("[DELETE /accounts] deleteAccount", 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.
|
|
//
|
|
// Response with Message Objects with Delete Status
|
|
type DeleteAccountOK struct {
|
|
Payload *sfgate_models.DeleteResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this delete account o k response has a 2xx status code
|
|
func (o *DeleteAccountOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this delete account o k response has a 3xx status code
|
|
func (o *DeleteAccountOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete account o k response has a 4xx status code
|
|
func (o *DeleteAccountOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this delete account o k response has a 5xx status code
|
|
func (o *DeleteAccountOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete account o k response a status code equal to that given
|
|
func (o *DeleteAccountOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the delete account o k response
|
|
func (o *DeleteAccountOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *DeleteAccountOK) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountOK %s", 200, payload)
|
|
}
|
|
|
|
func (o *DeleteAccountOK) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountOK %s", 200, 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 {
|
|
|
|
o.Payload = new(sfgate_models.DeleteResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(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 {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this delete account unauthorized response has a 2xx status code
|
|
func (o *DeleteAccountUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete account unauthorized response has a 3xx status code
|
|
func (o *DeleteAccountUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete account unauthorized response has a 4xx status code
|
|
func (o *DeleteAccountUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete account unauthorized response has a 5xx status code
|
|
func (o *DeleteAccountUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete account unauthorized response a status code equal to that given
|
|
func (o *DeleteAccountUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the delete account unauthorized response
|
|
func (o *DeleteAccountUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *DeleteAccountUnauthorized) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountUnauthorized %s", 401, payload)
|
|
}
|
|
|
|
func (o *DeleteAccountUnauthorized) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountUnauthorized %s", 401, 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 {
|
|
|
|
o.Payload = new(sfgate_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(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 {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this delete account forbidden response has a 2xx status code
|
|
func (o *DeleteAccountForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete account forbidden response has a 3xx status code
|
|
func (o *DeleteAccountForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete account forbidden response has a 4xx status code
|
|
func (o *DeleteAccountForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete account forbidden response has a 5xx status code
|
|
func (o *DeleteAccountForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete account forbidden response a status code equal to that given
|
|
func (o *DeleteAccountForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the delete account forbidden response
|
|
func (o *DeleteAccountForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *DeleteAccountForbidden) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountForbidden %s", 403, payload)
|
|
}
|
|
|
|
func (o *DeleteAccountForbidden) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountForbidden %s", 403, 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 {
|
|
|
|
o.Payload = new(sfgate_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(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 {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this delete account not found response has a 2xx status code
|
|
func (o *DeleteAccountNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete account not found response has a 3xx status code
|
|
func (o *DeleteAccountNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete account not found response has a 4xx status code
|
|
func (o *DeleteAccountNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete account not found response has a 5xx status code
|
|
func (o *DeleteAccountNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete account not found response a status code equal to that given
|
|
func (o *DeleteAccountNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the delete account not found response
|
|
func (o *DeleteAccountNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *DeleteAccountNotFound) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountNotFound %s", 404, payload)
|
|
}
|
|
|
|
func (o *DeleteAccountNotFound) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountNotFound %s", 404, 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 {
|
|
|
|
o.Payload = new(sfgate_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(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 {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this delete account unprocessable entity response has a 2xx status code
|
|
func (o *DeleteAccountUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete account unprocessable entity response has a 3xx status code
|
|
func (o *DeleteAccountUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete account unprocessable entity response has a 4xx status code
|
|
func (o *DeleteAccountUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this delete account unprocessable entity response has a 5xx status code
|
|
func (o *DeleteAccountUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this delete account unprocessable entity response a status code equal to that given
|
|
func (o *DeleteAccountUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the delete account unprocessable entity response
|
|
func (o *DeleteAccountUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *DeleteAccountUnprocessableEntity) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountUnprocessableEntity %s", 422, payload)
|
|
}
|
|
|
|
func (o *DeleteAccountUnprocessableEntity) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountUnprocessableEntity %s", 422, 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 {
|
|
|
|
o.Payload = new(sfgate_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(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 {
|
|
Payload *sfgate_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this delete account internal server error response has a 2xx status code
|
|
func (o *DeleteAccountInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this delete account internal server error response has a 3xx status code
|
|
func (o *DeleteAccountInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this delete account internal server error response has a 4xx status code
|
|
func (o *DeleteAccountInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this delete account internal server error response has a 5xx status code
|
|
func (o *DeleteAccountInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this delete account internal server error response a status code equal to that given
|
|
func (o *DeleteAccountInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the delete account internal server error response
|
|
func (o *DeleteAccountInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *DeleteAccountInternalServerError) Error() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountInternalServerError %s", 500, payload)
|
|
}
|
|
|
|
func (o *DeleteAccountInternalServerError) String() string {
|
|
payload, _ := json.Marshal(o.Payload)
|
|
return fmt.Sprintf("[DELETE /accounts][%d] deleteAccountInternalServerError %s", 500, 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 {
|
|
|
|
o.Payload = new(sfgate_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && !stderrors.Is(err, io.EOF) {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|