/*
Copyright The Clusternet Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by applyconfiguration-gen. DO NOT EDIT.

package v1beta1

import (
	clustersv1beta1 "github.com/clusternet/clusternet/pkg/apis/clusters/v1beta1"
)

// ClusterRegistrationRequestStatusApplyConfiguration represents a declarative configuration of the ClusterRegistrationRequestStatus type for use
// with apply.
type ClusterRegistrationRequestStatusApplyConfiguration struct {
	DedicatedNamespace *string                         `json:"dedicatedNamespace,omitempty"`
	DedicatedToken     []byte                          `json:"token,omitempty"`
	CACertificate      []byte                          `json:"caCertificate,omitempty"`
	Result             *clustersv1beta1.ApprovedResult `json:"result,omitempty"`
	ErrorMessage       *string                         `json:"errorMessage,omitempty"`
	ManagedClusterName *string                         `json:"managedClusterName,omitempty"`
}

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

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

// WithDedicatedToken adds the given value to the DedicatedToken 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 DedicatedToken field.
func (b *ClusterRegistrationRequestStatusApplyConfiguration) WithDedicatedToken(values ...byte) *ClusterRegistrationRequestStatusApplyConfiguration {
	for i := range values {
		b.DedicatedToken = append(b.DedicatedToken, values[i])
	}
	return b
}

// WithCACertificate adds the given value to the CACertificate 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 CACertificate field.
func (b *ClusterRegistrationRequestStatusApplyConfiguration) WithCACertificate(values ...byte) *ClusterRegistrationRequestStatusApplyConfiguration {
	for i := range values {
		b.CACertificate = append(b.CACertificate, values[i])
	}
	return b
}

// WithResult sets the Result 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 Result field is set to the value of the last call.
func (b *ClusterRegistrationRequestStatusApplyConfiguration) WithResult(value clustersv1beta1.ApprovedResult) *ClusterRegistrationRequestStatusApplyConfiguration {
	b.Result = &value
	return b
}

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

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