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

package v1

// VaultTLSConfigApplyConfiguration represents a declarative configuration of the VaultTLSConfig type for use
// with apply.
//
// VaultTLSConfig contains TLS configuration for connecting to Vault.
type VaultTLSConfigApplyConfiguration struct {
	// caBundle references a ConfigMap in the openshift-config namespace containing
	// the CA certificate bundle used to verify the TLS connection to the Vault server.
	// The referenced ConfigMap must contain the CA bundle in the key "ca-bundle.crt".
	// When this field is not set, the system's trusted CA certificates are used.
	//
	// The namespace for the ConfigMap is openshift-config.
	//
	// Example ConfigMap:
	// apiVersion: v1
	// kind: ConfigMap
	// metadata:
	// name: vault-ca-bundle
	// namespace: openshift-config
	// data:
	// ca-bundle.crt: |
	// -----BEGIN CERTIFICATE-----
	// ...
	// -----END CERTIFICATE-----
	CABundle *VaultConfigMapReferenceApplyConfiguration `json:"caBundle,omitempty"`
	// serverName specifies the Server Name Indication (SNI) to use when connecting to Vault via TLS.
	// This is useful when the Vault server's hostname doesn't match its TLS certificate.
	// When this field is not set, the hostname from vaultAddress is used for SNI.
	//
	// The value must be a valid DNS hostname: it must contain no more than 253 characters,
	// contain only lowercase alphanumeric characters, '-' or '.', and start and end with an alphanumeric character.
	ServerName *string `json:"serverName,omitempty"`
}

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

// WithCABundle sets the CABundle 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 CABundle field is set to the value of the last call.
func (b *VaultTLSConfigApplyConfiguration) WithCABundle(value *VaultConfigMapReferenceApplyConfiguration) *VaultTLSConfigApplyConfiguration {
	b.CABundle = value
	return b
}

// WithServerName sets the ServerName 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 ServerName field is set to the value of the last call.
func (b *VaultTLSConfigApplyConfiguration) WithServerName(value string) *VaultTLSConfigApplyConfiguration {
	b.ServerName = &value
	return b
}
