func (o *GetResourcesIDUsersNotFoundBody) 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
}
Validate validates this get resources ID users not found body
package resource
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 GetResourcesIDUsersReader struct {
	formats strfmt.Registry
}
func (o *GetResourcesIDUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetResourcesIDUsersOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetResourcesIDUsersBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewGetResourcesIDUsersUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetResourcesIDUsersNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetResourcesIDUsersInternalServerError()
		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 NewGetResourcesIDUsersOK() *GetResourcesIDUsersOK {
	return &GetResourcesIDUsersOK{}
}
type GetResourcesIDUsersOK struct {
	Payload []*models.Profile
}
func (o *GetResourcesIDUsersOK) Error() string {
	return fmt.Sprintf("[GET /resources/{id}/users][%d] getResourcesIdUsersOK  %+v", 200, o.Payload)
}
func (o *GetResourcesIDUsersOK) 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 NewGetResourcesIDUsersBadRequest() *GetResourcesIDUsersBadRequest {
	return &GetResourcesIDUsersBadRequest{}
}
type GetResourcesIDUsersBadRequest struct {
	Payload GetResourcesIDUsersBadRequestBody
}
func (o *GetResourcesIDUsersBadRequest) Error() string {
	return fmt.Sprintf("[GET /resources/{id}/users][%d] getResourcesIdUsersBadRequest  %+v", 400, o.Payload)
}
func (o *GetResourcesIDUsersBadRequest) 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 NewGetResourcesIDUsersUnauthorized() *GetResourcesIDUsersUnauthorized {
	return &GetResourcesIDUsersUnauthorized{}
}
type GetResourcesIDUsersUnauthorized struct {
	Payload GetResourcesIDUsersUnauthorizedBody
}
func (o *GetResourcesIDUsersUnauthorized) Error() string {
	return fmt.Sprintf("[GET /resources/{id}/users][%d] getResourcesIdUsersUnauthorized  %+v", 401, o.Payload)
}
func (o *GetResourcesIDUsersUnauthorized) 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 NewGetResourcesIDUsersNotFound() *GetResourcesIDUsersNotFound {
	return &GetResourcesIDUsersNotFound{}
}
type GetResourcesIDUsersNotFound struct {
	Payload GetResourcesIDUsersNotFoundBody
}
func (o *GetResourcesIDUsersNotFound) Error() string {
	return fmt.Sprintf("[GET /resources/{id}/users][%d] getResourcesIdUsersNotFound  %+v", 404, o.Payload)
}
func (o *GetResourcesIDUsersNotFound) 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 NewGetResourcesIDUsersInternalServerError() *GetResourcesIDUsersInternalServerError {
	return &GetResourcesIDUsersInternalServerError{}
}
type GetResourcesIDUsersInternalServerError struct {
	Payload GetResourcesIDUsersInternalServerErrorBody
}
func (o *GetResourcesIDUsersInternalServerError) Error() string {
	return fmt.Sprintf("[GET /resources/{id}/users][%d] getResourcesIdUsersInternalServerError  %+v", 500, o.Payload)
}
func (o *GetResourcesIDUsersInternalServerError) 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 GetResourcesIDUsersBadRequestBody struct {
	Message []string `json:"message"`
	Type *string `json:"type"`
}
func (o *GetResourcesIDUsersBadRequestBody) 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 *GetResourcesIDUsersBadRequestBody) validateMessage(formats strfmt.Registry) error {
	if err := validate.Required("getResourcesIdUsersBadRequest"+"."+"message", "body", o.Message); err != nil {
		return err
	}
	return nil
}
var getResourcesIdUsersBadRequestBodyTypeTypePropEnum []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 {
		getResourcesIdUsersBadRequestBodyTypeTypePropEnum = append(getResourcesIdUsersBadRequestBodyTypeTypePropEnum, v)
	}
}
const (
	GetResourcesIDUsersBadRequestBodyTypeBadRequest string = "bad_request"
	GetResourcesIDUsersBadRequestBodyTypeUnauthorized string = "unauthorized"
	GetResourcesIDUsersBadRequestBodyTypeNotFound string = "not_found"
	GetResourcesIDUsersBadRequestBodyTypeMethodNotAllowed string = "method_not_allowed"
	GetResourcesIDUsersBadRequestBodyTypeInternal string = "internal"
	GetResourcesIDUsersBadRequestBodyTypeInvalidGrant string = "invalid_grant"
	GetResourcesIDUsersBadRequestBodyTypeUnsupportedGrantType string = "unsupported_grant_type"
)
func (o *GetResourcesIDUsersBadRequestBody) validateTypeEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getResourcesIdUsersBadRequestBodyTypeTypePropEnum); err != nil {
		return err
	}
	return nil
}
func (o *GetResourcesIDUsersBadRequestBody) validateType(formats strfmt.Registry) error {
	if err := validate.Required("getResourcesIdUsersBadRequest"+"."+"type", "body", o.Type); err != nil {
		return err
	}
	if err := o.validateTypeEnum("getResourcesIdUsersBadRequest"+"."+"type", "body", *o.Type); err != nil {
		return err
	}
	return nil
}
type GetResourcesIDUsersInternalServerErrorBody struct {
	Message []string `json:"message"`
	Type *string `json:"type"`
}
func (o *GetResourcesIDUsersInternalServerErrorBody) 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 *GetResourcesIDUsersInternalServerErrorBody) validateMessage(formats strfmt.Registry) error {
	if err := validate.Required("getResourcesIdUsersInternalServerError"+"."+"message", "body", o.Message); err != nil {
		return err
	}
	return nil
}
var getResourcesIdUsersInternalServerErrorBodyTypeTypePropEnum []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 {
		getResourcesIdUsersInternalServerErrorBodyTypeTypePropEnum = append(getResourcesIdUsersInternalServerErrorBodyTypeTypePropEnum, v)
	}
}
const (
	GetResourcesIDUsersInternalServerErrorBodyTypeBadRequest string = "bad_request"
	GetResourcesIDUsersInternalServerErrorBodyTypeUnauthorized string = "unauthorized"
	GetResourcesIDUsersInternalServerErrorBodyTypeNotFound string = "not_found"
	GetResourcesIDUsersInternalServerErrorBodyTypeMethodNotAllowed string = "method_not_allowed"
	GetResourcesIDUsersInternalServerErrorBodyTypeInternal string = "internal"
	GetResourcesIDUsersInternalServerErrorBodyTypeInvalidGrant string = "invalid_grant"
	GetResourcesIDUsersInternalServerErrorBodyTypeUnsupportedGrantType string = "unsupported_grant_type"
)
func (o *GetResourcesIDUsersInternalServerErrorBody) validateTypeEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, getResourcesIdUsersInternalServerErrorBodyTypeTypePropEnum); err != nil {
		return err
	}
	return nil
}
func (o *GetResourcesIDUsersInternalServerErrorBody) validateType(formats strfmt.Registry) error {
	if err := validate.Required("getResourcesIdUsersInternalServerError"+"."+"type", "body", o.Type); err != nil {
		return err
	}
	if err := o.validateTypeEnum("getResourcesIdUsersInternalServerError"+"."+"type", "body", *o.Type); err != nil {
		return err
	}
	return nil
}
type GetResourcesIDUsersNotFoundBody struct {
	Message []string `json:"message"`
	Type *string `json:"type"`
}