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

	Capacity string `json:"capacity,omitempty"`

	Allocatable string `json:"allocatable,omitempty"`

	Limit string `json:"limit,omitempty"`

	Request string `json:"request,omitempty"`
}

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

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