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

package v1

import (
	operatorv1 "github.com/openshift/api/operator/v1"
)

// PerspectiveVisibilityApplyConfiguration represents a declarative configuration of the PerspectiveVisibility type for use
// with apply.
//
// PerspectiveVisibility defines the criteria to show/hide a perspective
type PerspectiveVisibilityApplyConfiguration struct {
	// state defines the perspective is enabled or disabled or access review check is required.
	State *operatorv1.PerspectiveState `json:"state,omitempty"`
	// accessReview defines required and missing access review checks.
	AccessReview *ResourceAttributesAccessReviewApplyConfiguration `json:"accessReview,omitempty"`
}

// PerspectiveVisibilityApplyConfiguration constructs a declarative configuration of the PerspectiveVisibility type for use with
// apply.
func PerspectiveVisibility() *PerspectiveVisibilityApplyConfiguration {
	return &PerspectiveVisibilityApplyConfiguration{}
}

// WithState sets the State 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 State field is set to the value of the last call.
func (b *PerspectiveVisibilityApplyConfiguration) WithState(value operatorv1.PerspectiveState) *PerspectiveVisibilityApplyConfiguration {
	b.State = &value
	return b
}

// WithAccessReview sets the AccessReview 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 AccessReview field is set to the value of the last call.
func (b *PerspectiveVisibilityApplyConfiguration) WithAccessReview(value *ResourceAttributesAccessReviewApplyConfiguration) *PerspectiveVisibilityApplyConfiguration {
	b.AccessReview = value
	return b
}
