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

package v1

import (
	configv1 "github.com/openshift/api/config/v1"
)

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

// ImagePolicySpecApplyConfiguration constructs a 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 ...configv1.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
}
