/*
 * 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 PlanMonth struct {

	Date string `json:"date"`

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

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

	return nil
}

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