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

package v1

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

// IBMCloudPlatformStatusApplyConfiguration represents a declarative configuration of the IBMCloudPlatformStatus type for use
// with apply.
//
// IBMCloudPlatformStatus holds the current status of the IBMCloud infrastructure provider.
type IBMCloudPlatformStatusApplyConfiguration struct {
	// location is where the cluster has been deployed
	Location *string `json:"location,omitempty"`
	// resourceGroupName is the Resource Group for new IBMCloud resources created for the cluster.
	ResourceGroupName *string `json:"resourceGroupName,omitempty"`
	// providerType indicates the type of cluster that was created
	ProviderType *configv1.IBMCloudProviderType `json:"providerType,omitempty"`
	// cisInstanceCRN is the CRN of the Cloud Internet Services instance managing
	// the DNS zone for the cluster's base domain
	CISInstanceCRN *string `json:"cisInstanceCRN,omitempty"`
	// dnsInstanceCRN is the CRN of the DNS Services instance managing the DNS zone
	// for the cluster's base domain
	DNSInstanceCRN *string `json:"dnsInstanceCRN,omitempty"`
	// serviceEndpoints is a list of custom endpoints which will override the default
	// service endpoints of an IBM service. These endpoints are used by components
	// within the cluster when trying to reach the IBM Cloud Services that have been
	// overridden. The CCCMO reads in the IBMCloudPlatformSpec and validates each
	// endpoint is resolvable. Once validated, the cloud config and IBMCloudPlatformStatus
	// are updated to reflect the same custom endpoints.
	ServiceEndpoints []IBMCloudServiceEndpointApplyConfiguration `json:"serviceEndpoints,omitempty"`
}

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

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

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

// WithProviderType sets the ProviderType 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 ProviderType field is set to the value of the last call.
func (b *IBMCloudPlatformStatusApplyConfiguration) WithProviderType(value configv1.IBMCloudProviderType) *IBMCloudPlatformStatusApplyConfiguration {
	b.ProviderType = &value
	return b
}

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

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

// WithServiceEndpoints adds the given value to the ServiceEndpoints 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 ServiceEndpoints field.
func (b *IBMCloudPlatformStatusApplyConfiguration) WithServiceEndpoints(values ...*IBMCloudServiceEndpointApplyConfiguration) *IBMCloudPlatformStatusApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithServiceEndpoints")
		}
		b.ServiceEndpoints = append(b.ServiceEndpoints, *values[i])
	}
	return b
}
