lib/api/members/members_client/users/post_users_onboard_response...

505 lines
16 KiB
Go
Raw Normal View History

2023-04-11 14:59:35 +00:00
// 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 users
// 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/members/members_models"
)
// PostUsersOnboardReader is a Reader for the PostUsersOnboard structure.
type PostUsersOnboardReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *PostUsersOnboardReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewPostUsersOnboardOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 401:
result := NewPostUsersOnboardUnauthorized()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 403:
result := NewPostUsersOnboardForbidden()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 404:
result := NewPostUsersOnboardNotFound()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 422:
result := NewPostUsersOnboardUnprocessableEntity()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
case 500:
result := NewPostUsersOnboardInternalServerError()
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())
}
}
// NewPostUsersOnboardOK creates a PostUsersOnboardOK with default headers values
func NewPostUsersOnboardOK() *PostUsersOnboardOK {
return &PostUsersOnboardOK{}
}
/*
PostUsersOnboardOK describes a response with status code 200, with default header values.
Response with User objects
*/
type PostUsersOnboardOK struct {
Payload *members_models.UserResponse
}
// IsSuccess returns true when this post users onboard o k response has a 2xx status code
func (o *PostUsersOnboardOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this post users onboard o k response has a 3xx status code
func (o *PostUsersOnboardOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this post users onboard o k response has a 4xx status code
func (o *PostUsersOnboardOK) IsClientError() bool {
return false
}
// IsServerError returns true when this post users onboard o k response has a 5xx status code
func (o *PostUsersOnboardOK) IsServerError() bool {
return false
}
// IsCode returns true when this post users onboard o k response a status code equal to that given
func (o *PostUsersOnboardOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the post users onboard o k response
func (o *PostUsersOnboardOK) Code() int {
return 200
}
func (o *PostUsersOnboardOK) Error() string {
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardOK %+v", 200, o.Payload)
}
func (o *PostUsersOnboardOK) String() string {
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardOK %+v", 200, o.Payload)
}
func (o *PostUsersOnboardOK) GetPayload() *members_models.UserResponse {
return o.Payload
}
func (o *PostUsersOnboardOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.UserResponse)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostUsersOnboardUnauthorized creates a PostUsersOnboardUnauthorized with default headers values
func NewPostUsersOnboardUnauthorized() *PostUsersOnboardUnauthorized {
return &PostUsersOnboardUnauthorized{}
}
/*
PostUsersOnboardUnauthorized describes a response with status code 401, with default header values.
Access Unauthorized, invalid API-KEY was used
*/
type PostUsersOnboardUnauthorized struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post users onboard unauthorized response has a 2xx status code
func (o *PostUsersOnboardUnauthorized) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post users onboard unauthorized response has a 3xx status code
func (o *PostUsersOnboardUnauthorized) IsRedirect() bool {
return false
}
// IsClientError returns true when this post users onboard unauthorized response has a 4xx status code
func (o *PostUsersOnboardUnauthorized) IsClientError() bool {
return true
}
// IsServerError returns true when this post users onboard unauthorized response has a 5xx status code
func (o *PostUsersOnboardUnauthorized) IsServerError() bool {
return false
}
// IsCode returns true when this post users onboard unauthorized response a status code equal to that given
func (o *PostUsersOnboardUnauthorized) IsCode(code int) bool {
return code == 401
}
// Code gets the status code for the post users onboard unauthorized response
func (o *PostUsersOnboardUnauthorized) Code() int {
return 401
}
func (o *PostUsersOnboardUnauthorized) Error() string {
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardUnauthorized %+v", 401, o.Payload)
}
func (o *PostUsersOnboardUnauthorized) String() string {
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardUnauthorized %+v", 401, o.Payload)
}
func (o *PostUsersOnboardUnauthorized) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostUsersOnboardUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostUsersOnboardForbidden creates a PostUsersOnboardForbidden with default headers values
func NewPostUsersOnboardForbidden() *PostUsersOnboardForbidden {
return &PostUsersOnboardForbidden{}
}
/*
PostUsersOnboardForbidden describes a response with status code 403, with default header values.
Access forbidden, account lacks access
*/
type PostUsersOnboardForbidden struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this post users onboard forbidden response has a 2xx status code
func (o *PostUsersOnboardForbidden) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post users onboard forbidden response has a 3xx status code
func (o *PostUsersOnboardForbidden) IsRedirect() bool {
return false
}
// IsClientError returns true when this post users onboard forbidden response has a 4xx status code
func (o *PostUsersOnboardForbidden) IsClientError() bool {
return true
}
// IsServerError returns true when this post users onboard forbidden response has a 5xx status code
func (o *PostUsersOnboardForbidden) IsServerError() bool {
return false
}
// IsCode returns true when this post users onboard forbidden response a status code equal to that given
func (o *PostUsersOnboardForbidden) IsCode(code int) bool {
return code == 403
}
// Code gets the status code for the post users onboard forbidden response
func (o *PostUsersOnboardForbidden) Code() int {
return 403
}
func (o *PostUsersOnboardForbidden) Error() string {
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardForbidden %+v", 403, o.Payload)
}
func (o *PostUsersOnboardForbidden) String() string {
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardForbidden %+v", 403, o.Payload)
}
func (o *PostUsersOnboardForbidden) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostUsersOnboardForbidden) 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(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostUsersOnboardNotFound creates a PostUsersOnboardNotFound with default headers values
func NewPostUsersOnboardNotFound() *PostUsersOnboardNotFound {
return &PostUsersOnboardNotFound{}
}
/*
PostUsersOnboardNotFound describes a response with status code 404, with default header values.
Resource was not found
*/
type PostUsersOnboardNotFound struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this post users onboard not found response has a 2xx status code
func (o *PostUsersOnboardNotFound) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post users onboard not found response has a 3xx status code
func (o *PostUsersOnboardNotFound) IsRedirect() bool {
return false
}
// IsClientError returns true when this post users onboard not found response has a 4xx status code
func (o *PostUsersOnboardNotFound) IsClientError() bool {
return true
}
// IsServerError returns true when this post users onboard not found response has a 5xx status code
func (o *PostUsersOnboardNotFound) IsServerError() bool {
return false
}
// IsCode returns true when this post users onboard not found response a status code equal to that given
func (o *PostUsersOnboardNotFound) IsCode(code int) bool {
return code == 404
}
// Code gets the status code for the post users onboard not found response
func (o *PostUsersOnboardNotFound) Code() int {
return 404
}
func (o *PostUsersOnboardNotFound) Error() string {
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardNotFound %+v", 404, o.Payload)
}
func (o *PostUsersOnboardNotFound) String() string {
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardNotFound %+v", 404, o.Payload)
}
func (o *PostUsersOnboardNotFound) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostUsersOnboardNotFound) 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(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostUsersOnboardUnprocessableEntity creates a PostUsersOnboardUnprocessableEntity with default headers values
func NewPostUsersOnboardUnprocessableEntity() *PostUsersOnboardUnprocessableEntity {
return &PostUsersOnboardUnprocessableEntity{}
}
/*
PostUsersOnboardUnprocessableEntity describes a response with status code 422, with default header values.
Unprocessable Entity, likely a bad parameter
*/
type PostUsersOnboardUnprocessableEntity struct {
Payload *members_models.Error
}
// IsSuccess returns true when this post users onboard unprocessable entity response has a 2xx status code
func (o *PostUsersOnboardUnprocessableEntity) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post users onboard unprocessable entity response has a 3xx status code
func (o *PostUsersOnboardUnprocessableEntity) IsRedirect() bool {
return false
}
// IsClientError returns true when this post users onboard unprocessable entity response has a 4xx status code
func (o *PostUsersOnboardUnprocessableEntity) IsClientError() bool {
return true
}
// IsServerError returns true when this post users onboard unprocessable entity response has a 5xx status code
func (o *PostUsersOnboardUnprocessableEntity) IsServerError() bool {
return false
}
// IsCode returns true when this post users onboard unprocessable entity response a status code equal to that given
func (o *PostUsersOnboardUnprocessableEntity) IsCode(code int) bool {
return code == 422
}
// Code gets the status code for the post users onboard unprocessable entity response
func (o *PostUsersOnboardUnprocessableEntity) Code() int {
return 422
}
func (o *PostUsersOnboardUnprocessableEntity) Error() string {
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostUsersOnboardUnprocessableEntity) String() string {
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardUnprocessableEntity %+v", 422, o.Payload)
}
func (o *PostUsersOnboardUnprocessableEntity) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostUsersOnboardUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
o.Payload = new(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}
// NewPostUsersOnboardInternalServerError creates a PostUsersOnboardInternalServerError with default headers values
func NewPostUsersOnboardInternalServerError() *PostUsersOnboardInternalServerError {
return &PostUsersOnboardInternalServerError{}
}
/*
PostUsersOnboardInternalServerError describes a response with status code 500, with default header values.
Server Internal Error
*/
type PostUsersOnboardInternalServerError struct {
AccessControlAllowOrigin string
Payload *members_models.Error
}
// IsSuccess returns true when this post users onboard internal server error response has a 2xx status code
func (o *PostUsersOnboardInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this post users onboard internal server error response has a 3xx status code
func (o *PostUsersOnboardInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this post users onboard internal server error response has a 4xx status code
func (o *PostUsersOnboardInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this post users onboard internal server error response has a 5xx status code
func (o *PostUsersOnboardInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this post users onboard internal server error response a status code equal to that given
func (o *PostUsersOnboardInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the post users onboard internal server error response
func (o *PostUsersOnboardInternalServerError) Code() int {
return 500
}
func (o *PostUsersOnboardInternalServerError) Error() string {
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardInternalServerError %+v", 500, o.Payload)
}
func (o *PostUsersOnboardInternalServerError) String() string {
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardInternalServerError %+v", 500, o.Payload)
}
func (o *PostUsersOnboardInternalServerError) GetPayload() *members_models.Error {
return o.Payload
}
func (o *PostUsersOnboardInternalServerError) 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(members_models.Error)
// response payload
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
return err
}
return nil
}