func (o *GetCredentialsNotFoundBody) validateTypeEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCredentialsNotFoundBodyTypeTypePropEnum); err != nil {
		return err
	}
	return nil
}
prop value enum
package o_auth
import (
	"encoding/json"
	"fmt"
	"io"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/validate"
	strfmt "github.com/go-openapi/strfmt"
	"github.com/manifoldco/grafton/generated/connector/models"
)
type GetCredentialsReader struct {
	formats strfmt.Registry
}
func (o *GetCredentialsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetCredentialsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetCredentialsBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewGetCredentialsUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetCredentialsNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetCredentialsInternalServerError()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	default:
		return nil, runtime.NewAPIError("unknown error", response, response.Code())
	}
}
func NewGetCredentialsOK() *GetCredentialsOK {
	return &GetCredentialsOK{}
}
type GetCredentialsOK struct {
	Payload []*models.OAuthCredentialGetResponse
}
func (o *GetCredentialsOK) Error() string {
	return fmt.Sprintf("[GET /credentials/][%d] getCredentialsOK  %+v", 200, o.Payload)
}
func (o *GetCredentialsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetCredentialsBadRequest() *GetCredentialsBadRequest {
	return &GetCredentialsBadRequest{}
}
type GetCredentialsBadRequest struct {
	Payload GetCredentialsBadRequestBody
}
func (o *GetCredentialsBadRequest) Error() string {
	return fmt.Sprintf("[GET /credentials/][%d] getCredentialsBadRequest  %+v", 400, o.Payload)
}
func (o *GetCredentialsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetCredentialsUnauthorized() *GetCredentialsUnauthorized {
	return &GetCredentialsUnauthorized{}
}
type GetCredentialsUnauthorized struct {
	Payload GetCredentialsUnauthorizedBody
}
func (o *GetCredentialsUnauthorized) Error() string {
	return fmt.Sprintf("[GET /credentials/][%d] getCredentialsUnauthorized  %+v", 401, o.Payload)
}
func (o *GetCredentialsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetCredentialsNotFound() *GetCredentialsNotFound {
	return &GetCredentialsNotFound{}
}
type GetCredentialsNotFound struct {
	Payload GetCredentialsNotFoundBody
}
func (o *GetCredentialsNotFound) Error() string {
	return fmt.Sprintf("[GET /credentials/][%d] getCredentialsNotFound  %+v", 404, o.Payload)
}
func (o *GetCredentialsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetCredentialsInternalServerError() *GetCredentialsInternalServerError {
	return &GetCredentialsInternalServerError{}
}
type GetCredentialsInternalServerError struct {
	Payload GetCredentialsInternalServerErrorBody
}
func (o *GetCredentialsInternalServerError) Error() string {
	return fmt.Sprintf("[GET /credentials/][%d] getCredentialsInternalServerError  %+v", 500, o.Payload)
}
func (o *GetCredentialsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
type GetCredentialsBadRequestBody struct {
	Message []string `json:"message"`
	Type *string `json:"type"`
}
func (o *GetCredentialsBadRequestBody) Validate(formats strfmt.Registry) error {
	var res []error
	if err := o.validateMessage(formats); err != nil {
		res = append(res, err)
	}
	if err := o.validateType(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (o *GetCredentialsBadRequestBody) validateMessage(formats strfmt.Registry) error {
	if err := validate.Required("getCredentialsBadRequest"+"."+"message", "body", o.Message); err != nil {
		return err
	}
	return nil
}
var getCredentialsBadRequestBodyTypeTypePropEnum []interface{}
func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["bad_request","unauthorized","not_found","method_not_allowed","internal","invalid_grant","unsupported_grant_type"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCredentialsBadRequestBodyTypeTypePropEnum = append(getCredentialsBadRequestBodyTypeTypePropEnum, v)
	}
}
const (
	GetCredentialsBadRequestBodyTypeBadRequest string = "bad_request"
	GetCredentialsBadRequestBodyTypeUnauthorized string = "unauthorized"
	GetCredentialsBadRequestBodyTypeNotFound string = "not_found"
	GetCredentialsBadRequestBodyTypeMethodNotAllowed string = "method_not_allowed"
	GetCredentialsBadRequestBodyTypeInternal string = "internal"
	GetCredentialsBadRequestBodyTypeInvalidGrant string = "invalid_grant"
	GetCredentialsBadRequestBodyTypeUnsupportedGrantType string = "unsupported_grant_type"
)
func (o *GetCredentialsBadRequestBody) validateTypeEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCredentialsBadRequestBodyTypeTypePropEnum); err != nil {
		return err
	}
	return nil
}
func (o *GetCredentialsBadRequestBody) validateType(formats strfmt.Registry) error {
	if err := validate.Required("getCredentialsBadRequest"+"."+"type", "body", o.Type); err != nil {
		return err
	}
	if err := o.validateTypeEnum("getCredentialsBadRequest"+"."+"type", "body", *o.Type); err != nil {
		return err
	}
	return nil
}
type GetCredentialsInternalServerErrorBody struct {
	Message []string `json:"message"`
	Type *string `json:"type"`
}
func (o *GetCredentialsInternalServerErrorBody) Validate(formats strfmt.Registry) error {
	var res []error
	if err := o.validateMessage(formats); err != nil {
		res = append(res, err)
	}
	if err := o.validateType(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (o *GetCredentialsInternalServerErrorBody) validateMessage(formats strfmt.Registry) error {
	if err := validate.Required("getCredentialsInternalServerError"+"."+"message", "body", o.Message); err != nil {
		return err
	}
	return nil
}
var getCredentialsInternalServerErrorBodyTypeTypePropEnum []interface{}
func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["bad_request","unauthorized","not_found","method_not_allowed","internal","invalid_grant","unsupported_grant_type"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCredentialsInternalServerErrorBodyTypeTypePropEnum = append(getCredentialsInternalServerErrorBodyTypeTypePropEnum, v)
	}
}
const (
	GetCredentialsInternalServerErrorBodyTypeBadRequest string = "bad_request"
	GetCredentialsInternalServerErrorBodyTypeUnauthorized string = "unauthorized"
	GetCredentialsInternalServerErrorBodyTypeNotFound string = "not_found"
	GetCredentialsInternalServerErrorBodyTypeMethodNotAllowed string = "method_not_allowed"
	GetCredentialsInternalServerErrorBodyTypeInternal string = "internal"
	GetCredentialsInternalServerErrorBodyTypeInvalidGrant string = "invalid_grant"
	GetCredentialsInternalServerErrorBodyTypeUnsupportedGrantType string = "unsupported_grant_type"
)
func (o *GetCredentialsInternalServerErrorBody) validateTypeEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getCredentialsInternalServerErrorBodyTypeTypePropEnum); err != nil {
		return err
	}
	return nil
}
func (o *GetCredentialsInternalServerErrorBody) validateType(formats strfmt.Registry) error {
	if err := validate.Required("getCredentialsInternalServerError"+"."+"type", "body", o.Type); err != nil {
		return err
	}
	if err := o.validateTypeEnum("getCredentialsInternalServerError"+"."+"type", "body", *o.Type); err != nil {
		return err
	}
	return nil
}
type GetCredentialsNotFoundBody struct {
	Message []string `json:"message"`
	Type *string `json:"type"`
}
func (o *GetCredentialsNotFoundBody) Validate(formats strfmt.Registry) error {
	var res []error
	if err := o.validateMessage(formats); err != nil {
		res = append(res, err)
	}
	if err := o.validateType(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (o *GetCredentialsNotFoundBody) validateMessage(formats strfmt.Registry) error {
	if err := validate.Required("getCredentialsNotFound"+"."+"message", "body", o.Message); err != nil {
		return err
	}
	return nil
}
var getCredentialsNotFoundBodyTypeTypePropEnum []interface{}
func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["bad_request","unauthorized","not_found","method_not_allowed","internal","invalid_grant","unsupported_grant_type"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		getCredentialsNotFoundBodyTypeTypePropEnum = append(getCredentialsNotFoundBodyTypeTypePropEnum, v)
	}
}
const (
	GetCredentialsNotFoundBodyTypeBadRequest string = "bad_request"
	GetCredentialsNotFoundBodyTypeUnauthorized string = "unauthorized"
	GetCredentialsNotFoundBodyTypeNotFound string = "not_found"
	GetCredentialsNotFoundBodyTypeMethodNotAllowed string = "method_not_allowed"
	GetCredentialsNotFoundBodyTypeInternal string = "internal"
	GetCredentialsNotFoundBodyTypeInvalidGrant string = "invalid_grant"
	GetCredentialsNotFoundBodyTypeUnsupportedGrantType string = "unsupported_grant_type"
)