func NewCreateFamilyBadRequest() *CreateFamilyBadRequest {
	return &CreateFamilyBadRequest{}
}
NewCreateFamilyBadRequest creates a CreateFamilyBadRequest with default headers values
package families
import (
	"fmt"
	"io"
	"github.com/go-openapi/runtime"
	"github.com/go-openapi/strfmt"
	"github.com/fugue/fugue-client/models"
)
type CreateFamilyReader struct {
	formats strfmt.Registry
}
func (o *CreateFamilyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {
	case 201:
		result := NewCreateFamilyCreated()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	case 400:
		result := NewCreateFamilyBadRequest()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 401:
		result := NewCreateFamilyUnauthorized()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 403:
		result := NewCreateFamilyForbidden()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	case 500:
		result := NewCreateFamilyInternalServerError()
		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 NewCreateFamilyCreated() *CreateFamilyCreated {
	return &CreateFamilyCreated{}
}
type CreateFamilyCreated struct {
	Payload *models.FamilyWithRules
}
func (o *CreateFamilyCreated) Error() string {
	return fmt.Sprintf("[POST /families][%d] createFamilyCreated  %+v", 201, o.Payload)
}
func (o *CreateFamilyCreated) GetPayload() *models.FamilyWithRules {
	return o.Payload
}
func (o *CreateFamilyCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
	o.Payload = new(models.FamilyWithRules)
	if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
		return err
	}
	return nil
}