func (m *PrivateCreateSubaccountResponseResult) validateTypeEnum(path, location string, value string) error {
	if err := validate.Enum(path, location, value, privateCreateSubaccountResponseResultTypeTypePropEnum); err != nil {
		return err
	}
	return nil
}
prop value enum
package models
import (
	"encoding/json"
	strfmt "github.com/go-openapi/strfmt"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)
type PrivateCreateSubaccountResponse struct {
	Result *PrivateCreateSubaccountResponseResult `json:"result"`
}
func (m *PrivateCreateSubaccountResponse) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateResult(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *PrivateCreateSubaccountResponse) validateResult(formats strfmt.Registry) error {
	if err := validate.Required("result", "body", m.Result); err != nil {
		return err
	}
	if m.Result != nil {
		if err := m.Result.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("result")
			}
			return err
		}
	}
	return nil
}
func (m *PrivateCreateSubaccountResponse) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
func (m *PrivateCreateSubaccountResponse) UnmarshalBinary(b []byte) error {
	var res PrivateCreateSubaccountResponse
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
type PrivateCreateSubaccountResponseResult struct {
	Email *string `json:"email"`
	ID *int64 `json:"id"`
	IsPassword *bool `json:"is_password"`
	LoginEnabled *bool `json:"login_enabled"`
	Portfolio *Portfolio `json:"portfolio,omitempty"`
	ReceiveNotifications *bool `json:"receive_notifications"`
	SystemName *string `json:"system_name"`
	TfaEnabled *bool `json:"tfa_enabled"`
	Type *string `json:"type"`
	Username *string `json:"username"`
}
func (m *PrivateCreateSubaccountResponseResult) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateEmail(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateID(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateIsPassword(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateLoginEnabled(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validatePortfolio(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateReceiveNotifications(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateSystemName(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateTfaEnabled(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateType(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateUsername(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *PrivateCreateSubaccountResponseResult) validateEmail(formats strfmt.Registry) error {
	if err := validate.Required("result"+"."+"email", "body", m.Email); err != nil {
		return err
	}
	return nil
}
func (m *PrivateCreateSubaccountResponseResult) validateID(formats strfmt.Registry) error {
	if err := validate.Required("result"+"."+"id", "body", m.ID); err != nil {
		return err
	}
	return nil
}
func (m *PrivateCreateSubaccountResponseResult) validateIsPassword(formats strfmt.Registry) error {
	if err := validate.Required("result"+"."+"is_password", "body", m.IsPassword); err != nil {
		return err
	}
	return nil
}
func (m *PrivateCreateSubaccountResponseResult) validateLoginEnabled(formats strfmt.Registry) error {
	if err := validate.Required("result"+"."+"login_enabled", "body", m.LoginEnabled); err != nil {
		return err
	}
	return nil
}
func (m *PrivateCreateSubaccountResponseResult) validatePortfolio(formats strfmt.Registry) error {
	if swag.IsZero(m.Portfolio) {  
		return nil
	}
	if m.Portfolio != nil {
		if err := m.Portfolio.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("result" + "." + "portfolio")
			}
			return err
		}
	}
	return nil
}
func (m *PrivateCreateSubaccountResponseResult) validateReceiveNotifications(formats strfmt.Registry) error {
	if err := validate.Required("result"+"."+"receive_notifications", "body", m.ReceiveNotifications); err != nil {
		return err
	}
	return nil
}
func (m *PrivateCreateSubaccountResponseResult) validateSystemName(formats strfmt.Registry) error {
	if err := validate.Required("result"+"."+"system_name", "body", m.SystemName); err != nil {
		return err
	}
	return nil
}
func (m *PrivateCreateSubaccountResponseResult) validateTfaEnabled(formats strfmt.Registry) error {
	if err := validate.Required("result"+"."+"tfa_enabled", "body", m.TfaEnabled); err != nil {
		return err
	}
	return nil
}
var privateCreateSubaccountResponseResultTypeTypePropEnum []interface{}
func init() {
	var res []string
	if err := json.Unmarshal([]byte(`["subaccount"]`), &res); err != nil {
		panic(err)
	}
	for _, v := range res {
		privateCreateSubaccountResponseResultTypeTypePropEnum = append(privateCreateSubaccountResponseResultTypeTypePropEnum, v)
	}
}
const (
	PrivateCreateSubaccountResponseResultTypeSubaccount string = "subaccount"
)