mirror of https://github.com/vernonkeenan/lib
514 lines
16 KiB
Go
514 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 emails
|
||
|
|
||
|
// 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"
|
||
|
)
|
||
|
|
||
|
// GetEmailMessagesReader is a Reader for the GetEmailMessages structure.
|
||
|
type GetEmailMessagesReader struct {
|
||
|
formats strfmt.Registry
|
||
|
}
|
||
|
|
||
|
// ReadResponse reads a server response into the received o.
|
||
|
func (o *GetEmailMessagesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||
|
switch response.Code() {
|
||
|
case 200:
|
||
|
result := NewGetEmailMessagesOK()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return result, nil
|
||
|
case 401:
|
||
|
result := NewGetEmailMessagesUnauthorized()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 403:
|
||
|
result := NewGetEmailMessagesForbidden()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 404:
|
||
|
result := NewGetEmailMessagesNotFound()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 422:
|
||
|
result := NewGetEmailMessagesUnprocessableEntity()
|
||
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return nil, result
|
||
|
case 500:
|
||
|
result := NewGetEmailMessagesInternalServerError()
|
||
|
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())
|
||
|
}
|
||
|
}
|
||
|
|
||
|
// NewGetEmailMessagesOK creates a GetEmailMessagesOK with default headers values
|
||
|
func NewGetEmailMessagesOK() *GetEmailMessagesOK {
|
||
|
return &GetEmailMessagesOK{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetEmailMessagesOK describes a response with status code 200, with default header values.
|
||
|
|
||
|
Array of Email Messages
|
||
|
*/
|
||
|
type GetEmailMessagesOK struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *members_models.EmailMessagesResponse
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get email messages o k response has a 2xx status code
|
||
|
func (o *GetEmailMessagesOK) IsSuccess() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get email messages o k response has a 3xx status code
|
||
|
func (o *GetEmailMessagesOK) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get email messages o k response has a 4xx status code
|
||
|
func (o *GetEmailMessagesOK) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get email messages o k response has a 5xx status code
|
||
|
func (o *GetEmailMessagesOK) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get email messages o k response a status code equal to that given
|
||
|
func (o *GetEmailMessagesOK) IsCode(code int) bool {
|
||
|
return code == 200
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get email messages o k response
|
||
|
func (o *GetEmailMessagesOK) Code() int {
|
||
|
return 200
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesOK) Error() string {
|
||
|
return fmt.Sprintf("[GET /emails][%d] getEmailMessagesOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesOK) String() string {
|
||
|
return fmt.Sprintf("[GET /emails][%d] getEmailMessagesOK %+v", 200, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesOK) GetPayload() *members_models.EmailMessagesResponse {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesOK) 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.EmailMessagesResponse)
|
||
|
|
||
|
// response payload
|
||
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
// NewGetEmailMessagesUnauthorized creates a GetEmailMessagesUnauthorized with default headers values
|
||
|
func NewGetEmailMessagesUnauthorized() *GetEmailMessagesUnauthorized {
|
||
|
return &GetEmailMessagesUnauthorized{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetEmailMessagesUnauthorized describes a response with status code 401, with default header values.
|
||
|
|
||
|
Access Unauthorized, invalid API-KEY was used
|
||
|
*/
|
||
|
type GetEmailMessagesUnauthorized struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get email messages unauthorized response has a 2xx status code
|
||
|
func (o *GetEmailMessagesUnauthorized) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get email messages unauthorized response has a 3xx status code
|
||
|
func (o *GetEmailMessagesUnauthorized) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get email messages unauthorized response has a 4xx status code
|
||
|
func (o *GetEmailMessagesUnauthorized) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get email messages unauthorized response has a 5xx status code
|
||
|
func (o *GetEmailMessagesUnauthorized) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get email messages unauthorized response a status code equal to that given
|
||
|
func (o *GetEmailMessagesUnauthorized) IsCode(code int) bool {
|
||
|
return code == 401
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get email messages unauthorized response
|
||
|
func (o *GetEmailMessagesUnauthorized) Code() int {
|
||
|
return 401
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesUnauthorized) Error() string {
|
||
|
return fmt.Sprintf("[GET /emails][%d] getEmailMessagesUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesUnauthorized) String() string {
|
||
|
return fmt.Sprintf("[GET /emails][%d] getEmailMessagesUnauthorized %+v", 401, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesUnauthorized) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesUnauthorized) 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
|
||
|
}
|
||
|
|
||
|
// NewGetEmailMessagesForbidden creates a GetEmailMessagesForbidden with default headers values
|
||
|
func NewGetEmailMessagesForbidden() *GetEmailMessagesForbidden {
|
||
|
return &GetEmailMessagesForbidden{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetEmailMessagesForbidden describes a response with status code 403, with default header values.
|
||
|
|
||
|
Access forbidden, account lacks access
|
||
|
*/
|
||
|
type GetEmailMessagesForbidden struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get email messages forbidden response has a 2xx status code
|
||
|
func (o *GetEmailMessagesForbidden) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get email messages forbidden response has a 3xx status code
|
||
|
func (o *GetEmailMessagesForbidden) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get email messages forbidden response has a 4xx status code
|
||
|
func (o *GetEmailMessagesForbidden) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get email messages forbidden response has a 5xx status code
|
||
|
func (o *GetEmailMessagesForbidden) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get email messages forbidden response a status code equal to that given
|
||
|
func (o *GetEmailMessagesForbidden) IsCode(code int) bool {
|
||
|
return code == 403
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get email messages forbidden response
|
||
|
func (o *GetEmailMessagesForbidden) Code() int {
|
||
|
return 403
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesForbidden) Error() string {
|
||
|
return fmt.Sprintf("[GET /emails][%d] getEmailMessagesForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesForbidden) String() string {
|
||
|
return fmt.Sprintf("[GET /emails][%d] getEmailMessagesForbidden %+v", 403, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesForbidden) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesForbidden) 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
|
||
|
}
|
||
|
|
||
|
// NewGetEmailMessagesNotFound creates a GetEmailMessagesNotFound with default headers values
|
||
|
func NewGetEmailMessagesNotFound() *GetEmailMessagesNotFound {
|
||
|
return &GetEmailMessagesNotFound{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetEmailMessagesNotFound describes a response with status code 404, with default header values.
|
||
|
|
||
|
Resource was not found
|
||
|
*/
|
||
|
type GetEmailMessagesNotFound struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get email messages not found response has a 2xx status code
|
||
|
func (o *GetEmailMessagesNotFound) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get email messages not found response has a 3xx status code
|
||
|
func (o *GetEmailMessagesNotFound) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get email messages not found response has a 4xx status code
|
||
|
func (o *GetEmailMessagesNotFound) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get email messages not found response has a 5xx status code
|
||
|
func (o *GetEmailMessagesNotFound) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get email messages not found response a status code equal to that given
|
||
|
func (o *GetEmailMessagesNotFound) IsCode(code int) bool {
|
||
|
return code == 404
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get email messages not found response
|
||
|
func (o *GetEmailMessagesNotFound) Code() int {
|
||
|
return 404
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesNotFound) Error() string {
|
||
|
return fmt.Sprintf("[GET /emails][%d] getEmailMessagesNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesNotFound) String() string {
|
||
|
return fmt.Sprintf("[GET /emails][%d] getEmailMessagesNotFound %+v", 404, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesNotFound) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesNotFound) 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
|
||
|
}
|
||
|
|
||
|
// NewGetEmailMessagesUnprocessableEntity creates a GetEmailMessagesUnprocessableEntity with default headers values
|
||
|
func NewGetEmailMessagesUnprocessableEntity() *GetEmailMessagesUnprocessableEntity {
|
||
|
return &GetEmailMessagesUnprocessableEntity{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetEmailMessagesUnprocessableEntity describes a response with status code 422, with default header values.
|
||
|
|
||
|
Unprocessable Entity, likely a bad parameter
|
||
|
*/
|
||
|
type GetEmailMessagesUnprocessableEntity struct {
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get email messages unprocessable entity response has a 2xx status code
|
||
|
func (o *GetEmailMessagesUnprocessableEntity) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get email messages unprocessable entity response has a 3xx status code
|
||
|
func (o *GetEmailMessagesUnprocessableEntity) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get email messages unprocessable entity response has a 4xx status code
|
||
|
func (o *GetEmailMessagesUnprocessableEntity) IsClientError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get email messages unprocessable entity response has a 5xx status code
|
||
|
func (o *GetEmailMessagesUnprocessableEntity) IsServerError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get email messages unprocessable entity response a status code equal to that given
|
||
|
func (o *GetEmailMessagesUnprocessableEntity) IsCode(code int) bool {
|
||
|
return code == 422
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get email messages unprocessable entity response
|
||
|
func (o *GetEmailMessagesUnprocessableEntity) Code() int {
|
||
|
return 422
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesUnprocessableEntity) Error() string {
|
||
|
return fmt.Sprintf("[GET /emails][%d] getEmailMessagesUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesUnprocessableEntity) String() string {
|
||
|
return fmt.Sprintf("[GET /emails][%d] getEmailMessagesUnprocessableEntity %+v", 422, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesUnprocessableEntity) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesUnprocessableEntity) 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
|
||
|
}
|
||
|
|
||
|
// NewGetEmailMessagesInternalServerError creates a GetEmailMessagesInternalServerError with default headers values
|
||
|
func NewGetEmailMessagesInternalServerError() *GetEmailMessagesInternalServerError {
|
||
|
return &GetEmailMessagesInternalServerError{}
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
GetEmailMessagesInternalServerError describes a response with status code 500, with default header values.
|
||
|
|
||
|
Server Internal Error
|
||
|
*/
|
||
|
type GetEmailMessagesInternalServerError struct {
|
||
|
AccessControlAllowOrigin string
|
||
|
|
||
|
Payload *members_models.Error
|
||
|
}
|
||
|
|
||
|
// IsSuccess returns true when this get email messages internal server error response has a 2xx status code
|
||
|
func (o *GetEmailMessagesInternalServerError) IsSuccess() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsRedirect returns true when this get email messages internal server error response has a 3xx status code
|
||
|
func (o *GetEmailMessagesInternalServerError) IsRedirect() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsClientError returns true when this get email messages internal server error response has a 4xx status code
|
||
|
func (o *GetEmailMessagesInternalServerError) IsClientError() bool {
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
// IsServerError returns true when this get email messages internal server error response has a 5xx status code
|
||
|
func (o *GetEmailMessagesInternalServerError) IsServerError() bool {
|
||
|
return true
|
||
|
}
|
||
|
|
||
|
// IsCode returns true when this get email messages internal server error response a status code equal to that given
|
||
|
func (o *GetEmailMessagesInternalServerError) IsCode(code int) bool {
|
||
|
return code == 500
|
||
|
}
|
||
|
|
||
|
// Code gets the status code for the get email messages internal server error response
|
||
|
func (o *GetEmailMessagesInternalServerError) Code() int {
|
||
|
return 500
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesInternalServerError) Error() string {
|
||
|
return fmt.Sprintf("[GET /emails][%d] getEmailMessagesInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesInternalServerError) String() string {
|
||
|
return fmt.Sprintf("[GET /emails][%d] getEmailMessagesInternalServerError %+v", 500, o.Payload)
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesInternalServerError) GetPayload() *members_models.Error {
|
||
|
return o.Payload
|
||
|
}
|
||
|
|
||
|
func (o *GetEmailMessagesInternalServerError) 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
|
||
|
}
|