func (o *CreateRelationTupleBadRequestBody) UnmarshalBinary(b []byte) error {
	var res CreateRelationTupleBadRequestBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}
UnmarshalBinary interface implementation
package write
import (
	"context"
	"fmt"
	"io"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/ory/keto/internal/httpclient/models"
)
type CreateRelationTupleReader struct {
	formats strfmt.Registry
}
func (o *CreateRelationTupleReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 201:
		result := NewCreateRelationTupleCreated()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewCreateRelationTupleBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewCreateRelationTupleInternalServerError()
		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 NewCreateRelationTupleCreated() *CreateRelationTupleCreated {
	return &CreateRelationTupleCreated{}
}
type CreateRelationTupleCreated struct {
	Payload *models.RelationQuery
}
func (o *CreateRelationTupleCreated) Error() string {
	return fmt.Sprintf("[PUT /relation-tuples][%d] createRelationTupleCreated  %+v", 201, o.Payload)
}
func (o *CreateRelationTupleCreated) GetPayload() *models.RelationQuery {
	return o.Payload
}
func (o *CreateRelationTupleCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(models.RelationQuery)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewCreateRelationTupleBadRequest() *CreateRelationTupleBadRequest {
	return &CreateRelationTupleBadRequest{}
}
type CreateRelationTupleBadRequest struct {
	Payload *CreateRelationTupleBadRequestBody
}
func (o *CreateRelationTupleBadRequest) Error() string {
	return fmt.Sprintf("[PUT /relation-tuples][%d] createRelationTupleBadRequest  %+v", 400, o.Payload)
}
func (o *CreateRelationTupleBadRequest) GetPayload() *CreateRelationTupleBadRequestBody {
	return o.Payload
}
func (o *CreateRelationTupleBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(CreateRelationTupleBadRequestBody)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewCreateRelationTupleInternalServerError() *CreateRelationTupleInternalServerError {
	return &CreateRelationTupleInternalServerError{}
}
type CreateRelationTupleInternalServerError struct {
	Payload *CreateRelationTupleInternalServerErrorBody
}
func (o *CreateRelationTupleInternalServerError) Error() string {
	return fmt.Sprintf("[PUT /relation-tuples][%d] createRelationTupleInternalServerError  %+v", 500, o.Payload)
}
func (o *CreateRelationTupleInternalServerError) GetPayload() *CreateRelationTupleInternalServerErrorBody {
	return o.Payload
}
func (o *CreateRelationTupleInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(CreateRelationTupleInternalServerErrorBody)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
type CreateRelationTupleBadRequestBody struct {
	Code int64 `json:"code,omitempty"`
	Details []interface{} `json:"details"`
	Message string `json:"message,omitempty"`
	Reason string `json:"reason,omitempty"`
	Request string `json:"request,omitempty"`
	Status string `json:"status,omitempty"`
}
func (o *CreateRelationTupleBadRequestBody) Validate(formats strfmt.Registry) error {
	return nil
}
func (o *CreateRelationTupleBadRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
func (o *CreateRelationTupleBadRequestBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}