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

	Chart string `json:"chart,omitempty"`

	ChartName string `json:"chartName,omitempty"`

	ChartVersion string `json:"chartVersion,omitempty"`

	CreatedAt string `json:"createdAt,omitempty"`

	Description string `json:"description,omitempty"`

	Namespace string `json:"namespace,omitempty"`

	ReleaseName string `json:"releaseName,omitempty"`

	TargetClusters []DeploymentTargetClusterStatus `json:"targetClusters,omitempty"`

	UpdatedAt string `json:"updatedAt,omitempty"`

	ValueOverrides map[string]interface{} `json:"valueOverrides,omitempty"`

	Values map[string]interface{} `json:"values,omitempty"`

	Version int32 `json:"version,omitempty"`
}

// AssertDeploymentDeploymentInfoRequired checks if the required fields are not zero-ed
func AssertDeploymentDeploymentInfoRequired(obj DeploymentDeploymentInfo) error {
	for _, el := range obj.TargetClusters {
		if err := AssertDeploymentTargetClusterStatusRequired(el); err != nil {
			return err
		}
	}
	return nil
}

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