func (o *GetExpandInternalServerErrorBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}
MarshalBinary interface implementation
package read
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 GetExpandReader struct {
	formats strfmt.Registry
}
func (o *GetExpandReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 200:
		result := NewGetExpandOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewGetExpandBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 404:
		result := NewGetExpandNotFound()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewGetExpandInternalServerError()
		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 NewGetExpandOK() *GetExpandOK {
	return &GetExpandOK{}
}
type GetExpandOK struct {
	Payload *models.ExpandTree
}
func (o *GetExpandOK) Error() string {
	return fmt.Sprintf("[GET /expand][%d] getExpandOK  %+v", 200, o.Payload)
}
func (o *GetExpandOK) GetPayload() *models.ExpandTree {
	return o.Payload
}
func (o *GetExpandOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(models.ExpandTree)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetExpandBadRequest() *GetExpandBadRequest {
	return &GetExpandBadRequest{}
}
type GetExpandBadRequest struct {
	Payload *GetExpandBadRequestBody
}
func (o *GetExpandBadRequest) Error() string {
	return fmt.Sprintf("[GET /expand][%d] getExpandBadRequest  %+v", 400, o.Payload)
}
func (o *GetExpandBadRequest) GetPayload() *GetExpandBadRequestBody {
	return o.Payload
}
func (o *GetExpandBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(GetExpandBadRequestBody)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetExpandNotFound() *GetExpandNotFound {
	return &GetExpandNotFound{}
}
type GetExpandNotFound struct {
	Payload *GetExpandNotFoundBody
}
func (o *GetExpandNotFound) Error() string {
	return fmt.Sprintf("[GET /expand][%d] getExpandNotFound  %+v", 404, o.Payload)
}
func (o *GetExpandNotFound) GetPayload() *GetExpandNotFoundBody {
	return o.Payload
}
func (o *GetExpandNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(GetExpandNotFoundBody)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
func NewGetExpandInternalServerError() *GetExpandInternalServerError {
	return &GetExpandInternalServerError{}
}
type GetExpandInternalServerError struct {
	Payload *GetExpandInternalServerErrorBody
}
func (o *GetExpandInternalServerError) Error() string {
	return fmt.Sprintf("[GET /expand][%d] getExpandInternalServerError  %+v", 500, o.Payload)
}
func (o *GetExpandInternalServerError) GetPayload() *GetExpandInternalServerErrorBody {
	return o.Payload
}
func (o *GetExpandInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(GetExpandInternalServerErrorBody)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}
type GetExpandBadRequestBody 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 *GetExpandBadRequestBody) Validate(formats strfmt.Registry) error {
	return nil
}
func (o *GetExpandBadRequestBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}
func (o *GetExpandBadRequestBody) MarshalBinary() ([]byte, error) {
	if o == nil {
		return nil, nil
	}
	return swag.WriteJSON(o)
}
func (o *GetExpandBadRequestBody) UnmarshalBinary(b []byte) error {
	var res GetExpandBadRequestBody
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*o = res
	return nil
}
type GetExpandInternalServerErrorBody 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 *GetExpandInternalServerErrorBody) Validate(formats strfmt.Registry) error {
	return nil
}
func (o *GetExpandInternalServerErrorBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}