func (o *PatchResourcesIDInternalServerErrorBody) Validate(formats strfmt.Registry) error {
	var res []error
	if err := o.validateMessage(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
Validate validates this patch resources ID internal server error body
package resource
import (
	"fmt"
	"io"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/validate"
	strfmt "github.com/go-openapi/strfmt"
)
type PatchResourcesIDReader struct {
	formats strfmt.Registry
}
func (o *PatchResourcesIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewPatchResourcesIDOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 202:
		result := NewPatchResourcesIDAccepted()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 204:
		result := NewPatchResourcesIDNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPatchResourcesIDBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPatchResourcesIDUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewPatchResourcesIDNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPatchResourcesIDInternalServerError()
		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 NewPatchResourcesIDOK() *PatchResourcesIDOK {
	return &PatchResourcesIDOK{}
}
type PatchResourcesIDOK struct {
	Payload PatchResourcesIDOKBody
}
func (o *PatchResourcesIDOK) Error() string {
	return fmt.Sprintf("[PATCH /resources/{id}][%d] patchResourcesIdOK  %+v", 200, o.Payload)
}
func (o *PatchResourcesIDOK) 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 NewPatchResourcesIDAccepted() *PatchResourcesIDAccepted {
	return &PatchResourcesIDAccepted{}
}
type PatchResourcesIDAccepted struct {
	Payload PatchResourcesIDAcceptedBody
}
func (o *PatchResourcesIDAccepted) Error() string {
	return fmt.Sprintf("[PATCH /resources/{id}][%d] patchResourcesIdAccepted  %+v", 202, o.Payload)
}
func (o *PatchResourcesIDAccepted) 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 NewPatchResourcesIDNoContent() *PatchResourcesIDNoContent {
	return &PatchResourcesIDNoContent{}
}
type PatchResourcesIDNoContent struct {
}
func (o *PatchResourcesIDNoContent) Error() string {
	return fmt.Sprintf("[PATCH /resources/{id}][%d] patchResourcesIdNoContent ", 204)
}
func (o *PatchResourcesIDNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	return nil
}
func NewPatchResourcesIDBadRequest() *PatchResourcesIDBadRequest {
	return &PatchResourcesIDBadRequest{}
}
type PatchResourcesIDBadRequest struct {
	Payload PatchResourcesIDBadRequestBody
}
func (o *PatchResourcesIDBadRequest) Error() string {
	return fmt.Sprintf("[PATCH /resources/{id}][%d] patchResourcesIdBadRequest  %+v", 400, o.Payload)
}
func (o *PatchResourcesIDBadRequest) 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 NewPatchResourcesIDUnauthorized() *PatchResourcesIDUnauthorized {
	return &PatchResourcesIDUnauthorized{}
}
type PatchResourcesIDUnauthorized struct {
	Payload PatchResourcesIDUnauthorizedBody
}
func (o *PatchResourcesIDUnauthorized) Error() string {
	return fmt.Sprintf("[PATCH /resources/{id}][%d] patchResourcesIdUnauthorized  %+v", 401, o.Payload)
}
func (o *PatchResourcesIDUnauthorized) 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 NewPatchResourcesIDNotFound() *PatchResourcesIDNotFound {
	return &PatchResourcesIDNotFound{}
}
type PatchResourcesIDNotFound struct {
	Payload PatchResourcesIDNotFoundBody
}
func (o *PatchResourcesIDNotFound) Error() string {
	return fmt.Sprintf("[PATCH /resources/{id}][%d] patchResourcesIdNotFound  %+v", 404, o.Payload)
}
func (o *PatchResourcesIDNotFound) 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 NewPatchResourcesIDInternalServerError() *PatchResourcesIDInternalServerError {
	return &PatchResourcesIDInternalServerError{}
}
type PatchResourcesIDInternalServerError struct {
	Payload PatchResourcesIDInternalServerErrorBody
}
func (o *PatchResourcesIDInternalServerError) Error() string {
	return fmt.Sprintf("[PATCH /resources/{id}][%d] patchResourcesIdInternalServerError  %+v", 500, o.Payload)
}
func (o *PatchResourcesIDInternalServerError) 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 PatchResourcesIDAcceptedBody struct {
	Message *string `json:"message"`
}
func (o *PatchResourcesIDAcceptedBody) Validate(formats strfmt.Registry) error {
	var res []error
	if err := o.validateMessage(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (o *PatchResourcesIDAcceptedBody) validateMessage(formats strfmt.Registry) error {
	if err := validate.Required("patchResourcesIdAccepted"+"."+"message", "body", o.Message); err != nil {
		return err
	}
	if err := validate.MinLength("patchResourcesIdAccepted"+"."+"message", "body", string(*o.Message), 3); err != nil {
		return err
	}
	if err := validate.MaxLength("patchResourcesIdAccepted"+"."+"message", "body", string(*o.Message), 256); err != nil {
		return err
	}
	return nil
}
type PatchResourcesIDBadRequestBody struct {
	Message *string `json:"message"`
}
func (o *PatchResourcesIDBadRequestBody) Validate(formats strfmt.Registry) error {
	var res []error
	if err := o.validateMessage(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (o *PatchResourcesIDBadRequestBody) validateMessage(formats strfmt.Registry) error {
	if err := validate.Required("patchResourcesIdBadRequest"+"."+"message", "body", o.Message); err != nil {
		return err
	}
	if err := validate.MinLength("patchResourcesIdBadRequest"+"."+"message", "body", string(*o.Message), 3); err != nil {
		return err
	}
	if err := validate.MaxLength("patchResourcesIdBadRequest"+"."+"message", "body", string(*o.Message), 256); err != nil {
		return err
	}
	return nil
}
type PatchResourcesIDInternalServerErrorBody struct {
	Message *string `json:"message"`
}