2023-04-17 22:11:43 +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 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 {
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 {
2023-04-30 02:07:31 +00:00
return fmt . Sprintf ( "[GET /emailmessages][%d] getEmailMessagesOK %+v" , 200 , o . Payload )
2023-04-17 22:11:43 +00:00
}
func ( o * GetEmailMessagesOK ) String ( ) string {
2023-04-30 02:07:31 +00:00
return fmt . Sprintf ( "[GET /emailmessages][%d] getEmailMessagesOK %+v" , 200 , o . Payload )
2023-04-17 22:11:43 +00:00
}
func ( o * GetEmailMessagesOK ) GetPayload ( ) * members_models . EmailMessagesResponse {
return o . Payload
}
func ( o * GetEmailMessagesOK ) readResponse ( response runtime . ClientResponse , consumer runtime . Consumer , formats strfmt . Registry ) error {
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 {
2023-04-30 02:07:31 +00:00
return fmt . Sprintf ( "[GET /emailmessages][%d] getEmailMessagesUnauthorized %+v" , 401 , o . Payload )
2023-04-17 22:11:43 +00:00
}
func ( o * GetEmailMessagesUnauthorized ) String ( ) string {
2023-04-30 02:07:31 +00:00
return fmt . Sprintf ( "[GET /emailmessages][%d] getEmailMessagesUnauthorized %+v" , 401 , o . Payload )
2023-04-17 22:11:43 +00:00
}
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 {
2023-04-30 02:07:31 +00:00
return fmt . Sprintf ( "[GET /emailmessages][%d] getEmailMessagesForbidden %+v" , 403 , o . Payload )
2023-04-17 22:11:43 +00:00
}
func ( o * GetEmailMessagesForbidden ) String ( ) string {
2023-04-30 02:07:31 +00:00
return fmt . Sprintf ( "[GET /emailmessages][%d] getEmailMessagesForbidden %+v" , 403 , o . Payload )
2023-04-17 22:11:43 +00:00
}
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 {
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 {
2023-04-30 02:07:31 +00:00
return fmt . Sprintf ( "[GET /emailmessages][%d] getEmailMessagesNotFound %+v" , 404 , o . Payload )
2023-04-17 22:11:43 +00:00
}
func ( o * GetEmailMessagesNotFound ) String ( ) string {
2023-04-30 02:07:31 +00:00
return fmt . Sprintf ( "[GET /emailmessages][%d] getEmailMessagesNotFound %+v" , 404 , o . Payload )
2023-04-17 22:11:43 +00:00
}
func ( o * GetEmailMessagesNotFound ) GetPayload ( ) * members_models . Error {
return o . Payload
}
func ( o * GetEmailMessagesNotFound ) 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
}
// NewGetEmailMessagesUnprocessableEntity creates a GetEmailMessagesUnprocessableEntity with default headers values
func NewGetEmailMessagesUnprocessableEntity ( ) * G etEmailMessagesUnprocessableEntity {
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 {
2023-04-30 02:07:31 +00:00
return fmt . Sprintf ( "[GET /emailmessages][%d] getEmailMessagesUnprocessableEntity %+v" , 422 , o . Payload )
2023-04-17 22:11:43 +00:00
}
func ( o * GetEmailMessagesUnprocessableEntity ) String ( ) string {
2023-04-30 02:07:31 +00:00
return fmt . Sprintf ( "[GET /emailmessages][%d] getEmailMessagesUnprocessableEntity %+v" , 422 , o . Payload )
2023-04-17 22:11:43 +00:00
}
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 {
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 {
2023-04-30 02:07:31 +00:00
return fmt . Sprintf ( "[GET /emailmessages][%d] getEmailMessagesInternalServerError %+v" , 500 , o . Payload )
2023-04-17 22:11:43 +00:00
}
func ( o * GetEmailMessagesInternalServerError ) String ( ) string {
2023-04-30 02:07:31 +00:00
return fmt . Sprintf ( "[GET /emailmessages][%d] getEmailMessagesInternalServerError %+v" , 500 , o . Payload )
2023-04-17 22:11:43 +00:00
}
func ( o * GetEmailMessagesInternalServerError ) GetPayload ( ) * members_models . Error {
return o . Payload
}
func ( o * GetEmailMessagesInternalServerError ) 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
}