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

package v1

// IBMCloudPlatformSpecApplyConfiguration represents a declarative configuration of the IBMCloudPlatformSpec type for use
// with apply.
//
// IBMCloudPlatformSpec holds the desired state of the IBMCloud infrastructure provider.
// This only includes fields that can be modified in the cluster.
type IBMCloudPlatformSpecApplyConfiguration struct {
	// 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.
	// A maximum of 13 service endpoints overrides are supported.
	ServiceEndpoints []IBMCloudServiceEndpointApplyConfiguration `json:"serviceEndpoints,omitempty"`
}

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

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