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

package v1

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

// FileReferenceSourceApplyConfiguration represents a declarative configuration of the FileReferenceSource type for use
// with apply.
//
// FileReferenceSource is used by the console to locate the specified file containing a custom logo.
type FileReferenceSourceApplyConfiguration struct {
	// from is a required field to specify the source type of the file reference.
	// Allowed values are ConfigMap.
	// When set to ConfigMap, the file will be sourced from a ConfigMap in the openshift-config namespace. The configMap field must be set when from is set to ConfigMap.
	From *operatorv1.SourceType `json:"from,omitempty"`
	// configMap specifies the ConfigMap sourcing details such as the name of the ConfigMap and the key for the file.
	// The ConfigMap must exist in the openshift-config namespace.
	// Required when from is "ConfigMap", and forbidden otherwise.
	ConfigMap *ConfigMapFileReferenceApplyConfiguration `json:"configMap,omitempty"`
}

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

// WithFrom sets the From 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 From field is set to the value of the last call.
func (b *FileReferenceSourceApplyConfiguration) WithFrom(value operatorv1.SourceType) *FileReferenceSourceApplyConfiguration {
	b.From = &value
	return b
}

// WithConfigMap sets the ConfigMap 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 ConfigMap field is set to the value of the last call.
func (b *FileReferenceSourceApplyConfiguration) WithConfigMap(value *ConfigMapFileReferenceApplyConfiguration) *FileReferenceSourceApplyConfiguration {
	b.ConfigMap = value
	return b
}
