/*
 * OPEN OUTCRY API
 *
 * # Introduction This API is documented in **OpenAPI 3.0 format**.  This API the following operations: * Retrieve a list of available instruments * Retrieve a list of executed trades  # Basics * API calls have to be secured with HTTPS. * All data has to be submitted UTF-8 encoded. * The reply is sent JSON encoded.
 *
 * API version: 1.0.0
 * Generated by: OpenAPI Generator (https://openapi-generator.tech)
 */

package api

type TradingAccount struct {
	Id string `json:"id"`

	Instruments []TradingAccountInstrument `json:"instruments"`
}

// AssertTradingAccountRequired checks if the required fields are not zero-ed
func AssertTradingAccountRequired(obj TradingAccount) error {
	elements := map[string]interface{}{
		"id":          obj.Id,
		"instruments": obj.Instruments,
	}
	for name, el := range elements {
		if isZero := IsZeroValue(el); isZero {
			return &RequiredError{Field: name}
		}
	}

	for _, el := range obj.Instruments {
		if err := AssertTradingAccountInstrumentRequired(el); err != nil {
			return err
		}
	}
	return nil
}

// AssertTradingAccountConstraints checks if the values respects the defined constraints
func AssertTradingAccountConstraints(obj TradingAccount) error {
	return nil
}
