/*
 * Pipeline API
 *
 * Pipeline is a feature rich application platform, built for containers on top of Kubernetes to automate the DevOps experience, continuous application development and the lifecycle of deployments. 
 *
 * API version: latest
 * Contact: info@banzaicloud.com
 * Generated by: OpenAPI Generator (https://openapi-generator.tech)
 */

package pipeline

type ResourceSummary struct {

	Cpu Resource `json:"cpu,omitempty"`

	Memory Resource `json:"memory,omitempty"`

	Status string `json:"status,omitempty"`
}

// AssertResourceSummaryRequired checks if the required fields are not zero-ed
func AssertResourceSummaryRequired(obj ResourceSummary) error {
	if err := AssertResourceRequired(obj.Cpu); err != nil {
		return err
	}
	if err := AssertResourceRequired(obj.Memory); err != nil {
		return err
	}
	return nil
}

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