func (m *UserPortfolioNotification) UnmarshalBinary(b []byte) error {
	var res UserPortfolioNotification
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
UnmarshalBinary interface implementation
package models
import (
	strfmt "github.com/go-openapi/strfmt"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)
type UserPortfolioNotification struct {
	AvailableFunds *float64 `json:"available_funds"`
	AvailableWithdrawalFunds *float64 `json:"available_withdrawal_funds"`
	Balance *float64 `json:"balance"`
	Currency *string `json:"currency"`
	DeltaTotal *float64 `json:"delta_total"`
	Equity *float64 `json:"equity"`
	FuturesPl *float64 `json:"futures_pl"`
	FuturesSessionRpl *float64 `json:"futures_session_rpl"`
	FuturesSessionUpl *float64 `json:"futures_session_upl"`
	InitialMargin *float64 `json:"initial_margin"`
	MaintenanceMargin *float64 `json:"maintenance_margin"`
	MarginBalance *float64 `json:"margin_balance"`
	OptionsDelta *float64 `json:"options_delta"`
	OptionsGamma *float64 `json:"options_gamma"`
	OptionsPl *float64 `json:"options_pl"`
	OptionsSessionRpl *float64 `json:"options_session_rpl"`
	OptionsSessionUpl *float64 `json:"options_session_upl"`
	OptionsTheta *float64 `json:"options_theta"`
	OptionsVega *float64 `json:"options_vega"`
	PortfolioMarginingEnabled *bool `json:"portfolio_margining_enabled"`
	ProjectedInitialMargin float64 `json:"projected_initial_margin,omitempty"`
	ProjectedMaintenanceMargin float64 `json:"projected_maintenance_margin,omitempty"`
	SessionFunding *float64 `json:"session_funding"`
	SessionRpl *float64 `json:"session_rpl"`
	SessionUpl *float64 `json:"session_upl"`
	TotalPl *float64 `json:"total_pl"`
}
func (m *UserPortfolioNotification) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateAvailableFunds(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateAvailableWithdrawalFunds(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateBalance(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateCurrency(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateDeltaTotal(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateEquity(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateFuturesPl(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateFuturesSessionRpl(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateFuturesSessionUpl(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateInitialMargin(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateMaintenanceMargin(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateMarginBalance(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateOptionsDelta(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateOptionsGamma(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateOptionsPl(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateOptionsSessionRpl(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateOptionsSessionUpl(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateOptionsTheta(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateOptionsVega(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validatePortfolioMarginingEnabled(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateSessionFunding(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateSessionRpl(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateSessionUpl(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateTotalPl(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *UserPortfolioNotification) validateAvailableFunds(formats strfmt.Registry) error {
	if err := validate.Required("available_funds", "body", m.AvailableFunds); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateAvailableWithdrawalFunds(formats strfmt.Registry) error {
	if err := validate.Required("available_withdrawal_funds", "body", m.AvailableWithdrawalFunds); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateBalance(formats strfmt.Registry) error {
	if err := validate.Required("balance", "body", m.Balance); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateCurrency(formats strfmt.Registry) error {
	if err := validate.Required("currency", "body", m.Currency); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateDeltaTotal(formats strfmt.Registry) error {
	if err := validate.Required("delta_total", "body", m.DeltaTotal); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateEquity(formats strfmt.Registry) error {
	if err := validate.Required("equity", "body", m.Equity); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateFuturesPl(formats strfmt.Registry) error {
	if err := validate.Required("futures_pl", "body", m.FuturesPl); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateFuturesSessionRpl(formats strfmt.Registry) error {
	if err := validate.Required("futures_session_rpl", "body", m.FuturesSessionRpl); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateFuturesSessionUpl(formats strfmt.Registry) error {
	if err := validate.Required("futures_session_upl", "body", m.FuturesSessionUpl); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateInitialMargin(formats strfmt.Registry) error {
	if err := validate.Required("initial_margin", "body", m.InitialMargin); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateMaintenanceMargin(formats strfmt.Registry) error {
	if err := validate.Required("maintenance_margin", "body", m.MaintenanceMargin); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateMarginBalance(formats strfmt.Registry) error {
	if err := validate.Required("margin_balance", "body", m.MarginBalance); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateOptionsDelta(formats strfmt.Registry) error {
	if err := validate.Required("options_delta", "body", m.OptionsDelta); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateOptionsGamma(formats strfmt.Registry) error {
	if err := validate.Required("options_gamma", "body", m.OptionsGamma); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateOptionsPl(formats strfmt.Registry) error {
	if err := validate.Required("options_pl", "body", m.OptionsPl); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateOptionsSessionRpl(formats strfmt.Registry) error {
	if err := validate.Required("options_session_rpl", "body", m.OptionsSessionRpl); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateOptionsSessionUpl(formats strfmt.Registry) error {
	if err := validate.Required("options_session_upl", "body", m.OptionsSessionUpl); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateOptionsTheta(formats strfmt.Registry) error {
	if err := validate.Required("options_theta", "body", m.OptionsTheta); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateOptionsVega(formats strfmt.Registry) error {
	if err := validate.Required("options_vega", "body", m.OptionsVega); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validatePortfolioMarginingEnabled(formats strfmt.Registry) error {
	if err := validate.Required("portfolio_margining_enabled", "body", m.PortfolioMarginingEnabled); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateSessionFunding(formats strfmt.Registry) error {
	if err := validate.Required("session_funding", "body", m.SessionFunding); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateSessionRpl(formats strfmt.Registry) error {
	if err := validate.Required("session_rpl", "body", m.SessionRpl); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateSessionUpl(formats strfmt.Registry) error {
	if err := validate.Required("session_upl", "body", m.SessionUpl); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) validateTotalPl(formats strfmt.Registry) error {
	if err := validate.Required("total_pl", "body", m.TotalPl); err != nil {
		return err
	}
	return nil
}
func (m *UserPortfolioNotification) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}