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

	Item string `json:"item"`

	NumTodo int32 `json:"numTodo,omitempty"`

	NumDone int32 `json:"numDone,omitempty"`
}

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

	return nil
}

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