package organization_authorization

import (
	"fmt"
	"io"

	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"

	"github.com/freman/genesysapi/models"
)

type GetOrgauthorizationTrusteeReader struct {
	formats strfmt.Registry
}

func (o *GetOrgauthorizationTrusteeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetOrgauthorizationTrusteeOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetOrgauthorizationTrusteeBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewGetOrgauthorizationTrusteeUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetOrgauthorizationTrusteeForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetOrgauthorizationTrusteeNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 408:
		result := NewGetOrgauthorizationTrusteeRequestTimeout()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 413:
		result := NewGetOrgauthorizationTrusteeRequestEntityTooLarge()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 415:
		result := NewGetOrgauthorizationTrusteeUnsupportedMediaType()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 429:
		result := NewGetOrgauthorizationTrusteeTooManyRequests()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetOrgauthorizationTrusteeInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 503:
		result := NewGetOrgauthorizationTrusteeServiceUnavailable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 504:
		result := NewGetOrgauthorizationTrusteeGatewayTimeout()
		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())
	}
}

func NewGetOrgauthorizationTrusteeOK() *GetOrgauthorizationTrusteeOK {
	return &GetOrgauthorizationTrusteeOK{}
}

type GetOrgauthorizationTrusteeOK struct {
	Payload *models.Trustee
}

func (o *GetOrgauthorizationTrusteeOK) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeOK  %+v", 200, o.Payload)
}

func (o *GetOrgauthorizationTrusteeOK) GetPayload() *models.Trustee {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.Trustee)

	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

func NewGetOrgauthorizationTrusteeBadRequest() *GetOrgauthorizationTrusteeBadRequest {
	return &GetOrgauthorizationTrusteeBadRequest{}
}

type GetOrgauthorizationTrusteeBadRequest struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeBadRequest) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeBadRequest  %+v", 400, o.Payload)
}

func (o *GetOrgauthorizationTrusteeBadRequest) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

func NewGetOrgauthorizationTrusteeUnauthorized() *GetOrgauthorizationTrusteeUnauthorized {
	return &GetOrgauthorizationTrusteeUnauthorized{}
}

type GetOrgauthorizationTrusteeUnauthorized struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeUnauthorized) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeUnauthorized  %+v", 401, o.Payload)
}

func (o *GetOrgauthorizationTrusteeUnauthorized) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

func NewGetOrgauthorizationTrusteeForbidden() *GetOrgauthorizationTrusteeForbidden {
	return &GetOrgauthorizationTrusteeForbidden{}
}

type GetOrgauthorizationTrusteeForbidden struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeForbidden) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeForbidden  %+v", 403, o.Payload)
}

func (o *GetOrgauthorizationTrusteeForbidden) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

func NewGetOrgauthorizationTrusteeNotFound() *GetOrgauthorizationTrusteeNotFound {
	return &GetOrgauthorizationTrusteeNotFound{}
}

type GetOrgauthorizationTrusteeNotFound struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeNotFound) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeNotFound  %+v", 404, o.Payload)
}

func (o *GetOrgauthorizationTrusteeNotFound) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

func NewGetOrgauthorizationTrusteeRequestTimeout() *GetOrgauthorizationTrusteeRequestTimeout {
	return &GetOrgauthorizationTrusteeRequestTimeout{}
}

type GetOrgauthorizationTrusteeRequestTimeout struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeRequestTimeout) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeRequestTimeout  %+v", 408, o.Payload)
}

func (o *GetOrgauthorizationTrusteeRequestTimeout) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeRequestTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

func NewGetOrgauthorizationTrusteeRequestEntityTooLarge() *GetOrgauthorizationTrusteeRequestEntityTooLarge {
	return &GetOrgauthorizationTrusteeRequestEntityTooLarge{}
}

type GetOrgauthorizationTrusteeRequestEntityTooLarge struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeRequestEntityTooLarge) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeRequestEntityTooLarge  %+v", 413, o.Payload)
}

func (o *GetOrgauthorizationTrusteeRequestEntityTooLarge) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeRequestEntityTooLarge) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

func NewGetOrgauthorizationTrusteeUnsupportedMediaType() *GetOrgauthorizationTrusteeUnsupportedMediaType {
	return &GetOrgauthorizationTrusteeUnsupportedMediaType{}
}

type GetOrgauthorizationTrusteeUnsupportedMediaType struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeUnsupportedMediaType) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeUnsupportedMediaType  %+v", 415, o.Payload)
}

func (o *GetOrgauthorizationTrusteeUnsupportedMediaType) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeUnsupportedMediaType) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

func NewGetOrgauthorizationTrusteeTooManyRequests() *GetOrgauthorizationTrusteeTooManyRequests {
	return &GetOrgauthorizationTrusteeTooManyRequests{}
}

type GetOrgauthorizationTrusteeTooManyRequests struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeTooManyRequests) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeTooManyRequests  %+v", 429, o.Payload)
}

func (o *GetOrgauthorizationTrusteeTooManyRequests) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

func NewGetOrgauthorizationTrusteeInternalServerError() *GetOrgauthorizationTrusteeInternalServerError {
	return &GetOrgauthorizationTrusteeInternalServerError{}
}

type GetOrgauthorizationTrusteeInternalServerError struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeInternalServerError) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeInternalServerError  %+v", 500, o.Payload)
}

func (o *GetOrgauthorizationTrusteeInternalServerError) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

func NewGetOrgauthorizationTrusteeServiceUnavailable() *GetOrgauthorizationTrusteeServiceUnavailable {
	return &GetOrgauthorizationTrusteeServiceUnavailable{}
}

type GetOrgauthorizationTrusteeServiceUnavailable struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeServiceUnavailable) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeServiceUnavailable  %+v", 503, o.Payload)
}

func (o *GetOrgauthorizationTrusteeServiceUnavailable) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeServiceUnavailable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

func NewGetOrgauthorizationTrusteeGatewayTimeout() *GetOrgauthorizationTrusteeGatewayTimeout {
	return &GetOrgauthorizationTrusteeGatewayTimeout{}
}

type GetOrgauthorizationTrusteeGatewayTimeout struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeGatewayTimeout) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeGatewayTimeout  %+v", 504, o.Payload)
}

func (o *GetOrgauthorizationTrusteeGatewayTimeout) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeGatewayTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}
// Code generated by go-swagger; DO NOT EDIT.

package organization_authorization

// 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"

	"github.com/freman/genesysapi/models"
)

// GetOrgauthorizationTrusteeReader is a Reader for the GetOrgauthorizationTrustee structure.
type GetOrgauthorizationTrusteeReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetOrgauthorizationTrusteeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetOrgauthorizationTrusteeOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetOrgauthorizationTrusteeBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewGetOrgauthorizationTrusteeUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewGetOrgauthorizationTrusteeForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetOrgauthorizationTrusteeNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 408:
		result := NewGetOrgauthorizationTrusteeRequestTimeout()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 413:
		result := NewGetOrgauthorizationTrusteeRequestEntityTooLarge()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 415:
		result := NewGetOrgauthorizationTrusteeUnsupportedMediaType()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 429:
		result := NewGetOrgauthorizationTrusteeTooManyRequests()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetOrgauthorizationTrusteeInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 503:
		result := NewGetOrgauthorizationTrusteeServiceUnavailable()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 504:
		result := NewGetOrgauthorizationTrusteeGatewayTimeout()
		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())
	}
}

// NewGetOrgauthorizationTrusteeOK creates a GetOrgauthorizationTrusteeOK with default headers values
func NewGetOrgauthorizationTrusteeOK() *GetOrgauthorizationTrusteeOK {
	return &GetOrgauthorizationTrusteeOK{}
}

/*GetOrgauthorizationTrusteeOK handles this case with default header values.

successful operation
*/
type GetOrgauthorizationTrusteeOK struct {
	Payload *models.Trustee
}

func (o *GetOrgauthorizationTrusteeOK) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeOK  %+v", 200, o.Payload)
}

func (o *GetOrgauthorizationTrusteeOK) GetPayload() *models.Trustee {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.Trustee)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetOrgauthorizationTrusteeBadRequest creates a GetOrgauthorizationTrusteeBadRequest with default headers values
func NewGetOrgauthorizationTrusteeBadRequest() *GetOrgauthorizationTrusteeBadRequest {
	return &GetOrgauthorizationTrusteeBadRequest{}
}

/*GetOrgauthorizationTrusteeBadRequest handles this case with default header values.

The request could not be understood by the server due to malformed syntax.
*/
type GetOrgauthorizationTrusteeBadRequest struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeBadRequest) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeBadRequest  %+v", 400, o.Payload)
}

func (o *GetOrgauthorizationTrusteeBadRequest) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetOrgauthorizationTrusteeUnauthorized creates a GetOrgauthorizationTrusteeUnauthorized with default headers values
func NewGetOrgauthorizationTrusteeUnauthorized() *GetOrgauthorizationTrusteeUnauthorized {
	return &GetOrgauthorizationTrusteeUnauthorized{}
}

/*GetOrgauthorizationTrusteeUnauthorized handles this case with default header values.

No authentication bearer token specified in authorization header.
*/
type GetOrgauthorizationTrusteeUnauthorized struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeUnauthorized) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeUnauthorized  %+v", 401, o.Payload)
}

func (o *GetOrgauthorizationTrusteeUnauthorized) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetOrgauthorizationTrusteeForbidden creates a GetOrgauthorizationTrusteeForbidden with default headers values
func NewGetOrgauthorizationTrusteeForbidden() *GetOrgauthorizationTrusteeForbidden {
	return &GetOrgauthorizationTrusteeForbidden{}
}

/*GetOrgauthorizationTrusteeForbidden handles this case with default header values.

You are not authorized to perform the requested action.
*/
type GetOrgauthorizationTrusteeForbidden struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeForbidden) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeForbidden  %+v", 403, o.Payload)
}

func (o *GetOrgauthorizationTrusteeForbidden) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetOrgauthorizationTrusteeNotFound creates a GetOrgauthorizationTrusteeNotFound with default headers values
func NewGetOrgauthorizationTrusteeNotFound() *GetOrgauthorizationTrusteeNotFound {
	return &GetOrgauthorizationTrusteeNotFound{}
}

/*GetOrgauthorizationTrusteeNotFound handles this case with default header values.

The requested resource was not found.
*/
type GetOrgauthorizationTrusteeNotFound struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeNotFound) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeNotFound  %+v", 404, o.Payload)
}

func (o *GetOrgauthorizationTrusteeNotFound) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetOrgauthorizationTrusteeRequestTimeout creates a GetOrgauthorizationTrusteeRequestTimeout with default headers values
func NewGetOrgauthorizationTrusteeRequestTimeout() *GetOrgauthorizationTrusteeRequestTimeout {
	return &GetOrgauthorizationTrusteeRequestTimeout{}
}

/*GetOrgauthorizationTrusteeRequestTimeout handles this case with default header values.

The client did not produce a request within the server timeout limit. This can be caused by a slow network connection and/or large payloads.
*/
type GetOrgauthorizationTrusteeRequestTimeout struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeRequestTimeout) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeRequestTimeout  %+v", 408, o.Payload)
}

func (o *GetOrgauthorizationTrusteeRequestTimeout) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeRequestTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetOrgauthorizationTrusteeRequestEntityTooLarge creates a GetOrgauthorizationTrusteeRequestEntityTooLarge with default headers values
func NewGetOrgauthorizationTrusteeRequestEntityTooLarge() *GetOrgauthorizationTrusteeRequestEntityTooLarge {
	return &GetOrgauthorizationTrusteeRequestEntityTooLarge{}
}

/*GetOrgauthorizationTrusteeRequestEntityTooLarge handles this case with default header values.

The request is over the size limit. Content-Length: %s
*/
type GetOrgauthorizationTrusteeRequestEntityTooLarge struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeRequestEntityTooLarge) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeRequestEntityTooLarge  %+v", 413, o.Payload)
}

func (o *GetOrgauthorizationTrusteeRequestEntityTooLarge) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeRequestEntityTooLarge) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetOrgauthorizationTrusteeUnsupportedMediaType creates a GetOrgauthorizationTrusteeUnsupportedMediaType with default headers values
func NewGetOrgauthorizationTrusteeUnsupportedMediaType() *GetOrgauthorizationTrusteeUnsupportedMediaType {
	return &GetOrgauthorizationTrusteeUnsupportedMediaType{}
}

/*GetOrgauthorizationTrusteeUnsupportedMediaType handles this case with default header values.

Unsupported Media Type - Unsupported or incorrect media type, such as an incorrect Content-Type value in the header.
*/
type GetOrgauthorizationTrusteeUnsupportedMediaType struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeUnsupportedMediaType) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeUnsupportedMediaType  %+v", 415, o.Payload)
}

func (o *GetOrgauthorizationTrusteeUnsupportedMediaType) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeUnsupportedMediaType) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetOrgauthorizationTrusteeTooManyRequests creates a GetOrgauthorizationTrusteeTooManyRequests with default headers values
func NewGetOrgauthorizationTrusteeTooManyRequests() *GetOrgauthorizationTrusteeTooManyRequests {
	return &GetOrgauthorizationTrusteeTooManyRequests{}
}

/*GetOrgauthorizationTrusteeTooManyRequests handles this case with default header values.

Rate limit exceeded the maximum. Retry the request in [%s] seconds
*/
type GetOrgauthorizationTrusteeTooManyRequests struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeTooManyRequests) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeTooManyRequests  %+v", 429, o.Payload)
}

func (o *GetOrgauthorizationTrusteeTooManyRequests) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeTooManyRequests) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetOrgauthorizationTrusteeInternalServerError creates a GetOrgauthorizationTrusteeInternalServerError with default headers values
func NewGetOrgauthorizationTrusteeInternalServerError() *GetOrgauthorizationTrusteeInternalServerError {
	return &GetOrgauthorizationTrusteeInternalServerError{}
}

/*GetOrgauthorizationTrusteeInternalServerError handles this case with default header values.

The server encountered an unexpected condition which prevented it from fulfilling the request.
*/
type GetOrgauthorizationTrusteeInternalServerError struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeInternalServerError) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeInternalServerError  %+v", 500, o.Payload)
}

func (o *GetOrgauthorizationTrusteeInternalServerError) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetOrgauthorizationTrusteeServiceUnavailable creates a GetOrgauthorizationTrusteeServiceUnavailable with default headers values
func NewGetOrgauthorizationTrusteeServiceUnavailable() *GetOrgauthorizationTrusteeServiceUnavailable {
	return &GetOrgauthorizationTrusteeServiceUnavailable{}
}

/*GetOrgauthorizationTrusteeServiceUnavailable handles this case with default header values.

Service Unavailable - The server is currently unavailable (because it is overloaded or down for maintenance).
*/
type GetOrgauthorizationTrusteeServiceUnavailable struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeServiceUnavailable) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeServiceUnavailable  %+v", 503, o.Payload)
}

func (o *GetOrgauthorizationTrusteeServiceUnavailable) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeServiceUnavailable) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

// NewGetOrgauthorizationTrusteeGatewayTimeout creates a GetOrgauthorizationTrusteeGatewayTimeout with default headers values
func NewGetOrgauthorizationTrusteeGatewayTimeout() *GetOrgauthorizationTrusteeGatewayTimeout {
	return &GetOrgauthorizationTrusteeGatewayTimeout{}
}

/*GetOrgauthorizationTrusteeGatewayTimeout handles this case with default header values.

The request timed out.
*/
type GetOrgauthorizationTrusteeGatewayTimeout struct {
	Payload *models.ErrorBody
}

func (o *GetOrgauthorizationTrusteeGatewayTimeout) Error() string {
	return fmt.Sprintf("[GET /api/v2/orgauthorization/trustees/{trusteeOrgId}][%d] getOrgauthorizationTrusteeGatewayTimeout  %+v", 504, o.Payload)
}

func (o *GetOrgauthorizationTrusteeGatewayTimeout) GetPayload() *models.ErrorBody {
	return o.Payload
}

func (o *GetOrgauthorizationTrusteeGatewayTimeout) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	o.Payload = new(models.ErrorBody)

	// response payload
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}
