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

	// Total CPU requested for the cluster
	SumCpu int32 `json:"sumCpu,omitempty"`

	// Total memory requested for the cluster (GB)
	SumMem int32 `json:"sumMem,omitempty"`

	Filters []string `json:"filters,omitempty"`

	// If true, recommended instance types will have a similar size
	SameSize bool `json:"sameSize,omitempty"`

	// Percentage of regular (on-demand) nodes in the recommended cluster
	OnDemandPct int32 `json:"onDemandPct,omitempty"`

	// Minimum number of nodes in the recommended cluster
	MinNodes int32 `json:"minNodes,omitempty"`

	// Maximum number of nodes in the recommended cluster
	MaxNodes int32 `json:"maxNodes,omitempty"`
}

// AssertRequestedResourcesRequired checks if the required fields are not zero-ed
func AssertRequestedResourcesRequired(obj RequestedResources) error {
	return nil
}

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