/*
 * Dash API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * API version: 0.1
 * Generated by: OpenAPI Generator (https://openapi-generator.tech)
 */

package dashapi

type TrackingCategory struct {

	Type string `json:"type"`

	Name string `json:"name"`

	Items []string `json:"items,omitempty"`
}

// AssertTrackingCategoryRequired checks if the required fields are not zero-ed
func AssertTrackingCategoryRequired(obj TrackingCategory) error {
	elements := map[string]interface{}{
		"type": obj.Type,
		"name": obj.Name,
	}
	for name, el := range elements {
		if isZero := IsZeroValue(el); isZero {
			return &RequiredError{Field: name}
		}
	}

	return nil
}

// AssertRecurseTrackingCategoryRequired recursively checks if required fields are not zero-ed in a nested slice.
// Accepts only nested slice of TrackingCategory (e.g. [][]TrackingCategory), otherwise ErrTypeAssertionError is thrown.
func AssertRecurseTrackingCategoryRequired(objSlice interface{}) error {
	return AssertRecurseInterfaceRequired(objSlice, func(obj interface{}) error {
		aTrackingCategory, ok := obj.(TrackingCategory)
		if !ok {
			return ErrTypeAssertionError
		}
		return AssertTrackingCategoryRequired(aTrackingCategory)
	})
}
