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

	ReleaseName string `json:"releaseName,omitempty"`

	Resource string `json:"resource,omitempty"`

	Image []ScanLogItemImage `json:"image,omitempty"`

	Result []string `json:"result,omitempty"`

	Action string `json:"action,omitempty"`
}

// AssertScanLogItemRequired checks if the required fields are not zero-ed
func AssertScanLogItemRequired(obj ScanLogItem) error {
	for _, el := range obj.Image {
		if err := AssertScanLogItemImageRequired(el); err != nil {
			return err
		}
	}
	return nil
}

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