func (o *PutResourcesIDBadRequestBody) 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 put resources ID bad request 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 PutResourcesIDReader struct {
	formats strfmt.Registry
}
func (o *PutResourcesIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 201:
		result := NewPutResourcesIDCreated()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 202:
		result := NewPutResourcesIDAccepted()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 204:
		result := NewPutResourcesIDNoContent()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewPutResourcesIDBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewPutResourcesIDUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 409:
		result := NewPutResourcesIDConflict()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewPutResourcesIDInternalServerError()
		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 NewPutResourcesIDCreated() *PutResourcesIDCreated {
	return &PutResourcesIDCreated{}
}
type PutResourcesIDCreated struct {
	Payload PutResourcesIDCreatedBody
}
func (o *PutResourcesIDCreated) Error() string {
	return fmt.Sprintf("[PUT /resources/{id}][%d] putResourcesIdCreated  %+v", 201, o.Payload)
}
func (o *PutResourcesIDCreated) 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 NewPutResourcesIDAccepted() *PutResourcesIDAccepted {
	return &PutResourcesIDAccepted{}
}
type PutResourcesIDAccepted struct {
	Payload PutResourcesIDAcceptedBody
}
func (o *PutResourcesIDAccepted) Error() string {
	return fmt.Sprintf("[PUT /resources/{id}][%d] putResourcesIdAccepted  %+v", 202, o.Payload)
}
func (o *PutResourcesIDAccepted) 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 NewPutResourcesIDNoContent() *PutResourcesIDNoContent {
	return &PutResourcesIDNoContent{}
}
type PutResourcesIDNoContent struct {
}
func (o *PutResourcesIDNoContent) Error() string {
	return fmt.Sprintf("[PUT /resources/{id}][%d] putResourcesIdNoContent ", 204)
}
func (o *PutResourcesIDNoContent) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	return nil
}
func NewPutResourcesIDBadRequest() *PutResourcesIDBadRequest {
	return &PutResourcesIDBadRequest{}
}
type PutResourcesIDBadRequest struct {
	Payload PutResourcesIDBadRequestBody
}
func (o *PutResourcesIDBadRequest) Error() string {
	return fmt.Sprintf("[PUT /resources/{id}][%d] putResourcesIdBadRequest  %+v", 400, o.Payload)
}
func (o *PutResourcesIDBadRequest) 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 NewPutResourcesIDUnauthorized() *PutResourcesIDUnauthorized {
	return &PutResourcesIDUnauthorized{}
}
type PutResourcesIDUnauthorized struct {
	Payload PutResourcesIDUnauthorizedBody
}
func (o *PutResourcesIDUnauthorized) Error() string {
	return fmt.Sprintf("[PUT /resources/{id}][%d] putResourcesIdUnauthorized  %+v", 401, o.Payload)
}
func (o *PutResourcesIDUnauthorized) 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 NewPutResourcesIDConflict() *PutResourcesIDConflict {
	return &PutResourcesIDConflict{}
}
type PutResourcesIDConflict struct {
	Payload PutResourcesIDConflictBody
}
func (o *PutResourcesIDConflict) Error() string {
	return fmt.Sprintf("[PUT /resources/{id}][%d] putResourcesIdConflict  %+v", 409, o.Payload)
}
func (o *PutResourcesIDConflict) 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 NewPutResourcesIDInternalServerError() *PutResourcesIDInternalServerError {
	return &PutResourcesIDInternalServerError{}
}
type PutResourcesIDInternalServerError struct {
	Payload PutResourcesIDInternalServerErrorBody
}
func (o *PutResourcesIDInternalServerError) Error() string {
	return fmt.Sprintf("[PUT /resources/{id}][%d] putResourcesIdInternalServerError  %+v", 500, o.Payload)
}
func (o *PutResourcesIDInternalServerError) 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 PutResourcesIDAcceptedBody struct {
	Message *string `json:"message"`
}
func (o *PutResourcesIDAcceptedBody) 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 *PutResourcesIDAcceptedBody) validateMessage(formats strfmt.Registry) error {
	if err := validate.Required("putResourcesIdAccepted"+"."+"message", "body", o.Message); err != nil {
		return err
	}
	if err := validate.MinLength("putResourcesIdAccepted"+"."+"message", "body", string(*o.Message), 3); err != nil {
		return err
	}
	if err := validate.MaxLength("putResourcesIdAccepted"+"."+"message", "body", string(*o.Message), 256); err != nil {
		return err
	}
	return nil
}
type PutResourcesIDBadRequestBody struct {
	Message *string `json:"message"`
}