// Code generated by applyconfiguration-gen. DO NOT EDIT.

package v1alpha1

import (
	v1alpha1 "github.com/openshift/api/config/v1alpha1"
)

// ImagePolicySpecApplyConfiguration represents an declarative configuration of the ImagePolicySpec type for use
// with apply.
type ImagePolicySpecApplyConfiguration struct {
	Scopes []v1alpha1.ImageScope     `json:"scopes,omitempty"`
	Policy *PolicyApplyConfiguration `json:"policy,omitempty"`
}

// ImagePolicySpecApplyConfiguration constructs an declarative configuration of the ImagePolicySpec type for use with
// apply.
func ImagePolicySpec() *ImagePolicySpecApplyConfiguration {
	return &ImagePolicySpecApplyConfiguration{}
}

// WithScopes adds the given value to the Scopes field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Scopes field.
func (b *ImagePolicySpecApplyConfiguration) WithScopes(values ...v1alpha1.ImageScope) *ImagePolicySpecApplyConfiguration {
	for i := range values {
		b.Scopes = append(b.Scopes, values[i])
	}
	return b
}

// WithPolicy sets the Policy field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Policy field is set to the value of the last call.
func (b *ImagePolicySpecApplyConfiguration) WithPolicy(value *PolicyApplyConfiguration) *ImagePolicySpecApplyConfiguration {
	b.Policy = value
	return b
}
