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

	// host of the proxy
	Host string `json:"host"`

	// port the proxy is available on
	Port int32 `json:"port,omitempty"`

	// ID of the secret containing the username and password for the proxy
	SecretId string `json:"secretId,omitempty"`

	// Scheme of the proxy
	Scheme string `json:"scheme,omitempty"`
}

// AssertPkeClusterHttpProxyOptionsRequired checks if the required fields are not zero-ed
func AssertPkeClusterHttpProxyOptionsRequired(obj PkeClusterHttpProxyOptions) error {
	elements := map[string]interface{}{
		"host": obj.Host,
	}
	for name, el := range elements {
		if isZero := IsZeroValue(el); isZero {
			return &RequiredError{Field: name}
		}
	}

	return nil
}

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