func (b *ServiceSpecApplyConfiguration) WithLoadBalancerClass(value string) *ServiceSpecApplyConfiguration {
	b.LoadBalancerClass = &value
	return b
}
WithLoadBalancerClass sets the LoadBalancerClass 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 LoadBalancerClass field is set to the value of the last call.
package v1
import (
	corev1 "k8s.io/api/core/v1"
)
type ServiceSpecApplyConfiguration struct {
	Ports                         []ServicePortApplyConfiguration          `json:"ports,omitempty"`
	Selector                      map[string]string                        `json:"selector,omitempty"`
	ClusterIP                     *string                                  `json:"clusterIP,omitempty"`
	ClusterIPs                    []string                                 `json:"clusterIPs,omitempty"`
	Type                          *corev1.ServiceType                      `json:"type,omitempty"`
	ExternalIPs                   []string                                 `json:"externalIPs,omitempty"`
	SessionAffinity               *corev1.ServiceAffinity                  `json:"sessionAffinity,omitempty"`
	LoadBalancerIP                *string                                  `json:"loadBalancerIP,omitempty"`
	LoadBalancerSourceRanges      []string                                 `json:"loadBalancerSourceRanges,omitempty"`
	ExternalName                  *string                                  `json:"externalName,omitempty"`
	ExternalTrafficPolicy         *corev1.ServiceExternalTrafficPolicyType `json:"externalTrafficPolicy,omitempty"`
	HealthCheckNodePort           *int32                                   `json:"healthCheckNodePort,omitempty"`
	PublishNotReadyAddresses      *bool                                    `json:"publishNotReadyAddresses,omitempty"`
	SessionAffinityConfig         *SessionAffinityConfigApplyConfiguration `json:"sessionAffinityConfig,omitempty"`
	IPFamilies                    []corev1.IPFamily                        `json:"ipFamilies,omitempty"`
	IPFamilyPolicy                *corev1.IPFamilyPolicyType               `json:"ipFamilyPolicy,omitempty"`
	AllocateLoadBalancerNodePorts *bool                                    `json:"allocateLoadBalancerNodePorts,omitempty"`
	LoadBalancerClass             *string                                  `json:"loadBalancerClass,omitempty"`
	InternalTrafficPolicy         *corev1.ServiceInternalTrafficPolicyType `json:"internalTrafficPolicy,omitempty"`
}
func ServiceSpec() *ServiceSpecApplyConfiguration {
	return &ServiceSpecApplyConfiguration{}
}
func (b *ServiceSpecApplyConfiguration) WithPorts(values ...*ServicePortApplyConfiguration) *ServiceSpecApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithPorts")
		}
		b.Ports = append(b.Ports, *values[i])
	}
	return b
}
func (b *ServiceSpecApplyConfiguration) WithSelector(entries map[string]string) *ServiceSpecApplyConfiguration {
	if b.Selector == nil && len(entries) > 0 {
		b.Selector = make(map[string]string, len(entries))
	}
	for k, v := range entries {
		b.Selector[k] = v
	}
	return b
}
func (b *ServiceSpecApplyConfiguration) WithClusterIP(value string) *ServiceSpecApplyConfiguration {
	b.ClusterIP = &value
	return b
}
func (b *ServiceSpecApplyConfiguration) WithClusterIPs(values ...string) *ServiceSpecApplyConfiguration {
	for i := range values {
		b.ClusterIPs = append(b.ClusterIPs, values[i])
	}
	return b
}
func (b *ServiceSpecApplyConfiguration) WithType(value corev1.ServiceType) *ServiceSpecApplyConfiguration {
	b.Type = &value
	return b
}
func (b *ServiceSpecApplyConfiguration) WithExternalIPs(values ...string) *ServiceSpecApplyConfiguration {
	for i := range values {
		b.ExternalIPs = append(b.ExternalIPs, values[i])
	}
	return b
}
func (b *ServiceSpecApplyConfiguration) WithSessionAffinity(value corev1.ServiceAffinity) *ServiceSpecApplyConfiguration {
	b.SessionAffinity = &value
	return b
}
func (b *ServiceSpecApplyConfiguration) WithLoadBalancerIP(value string) *ServiceSpecApplyConfiguration {
	b.LoadBalancerIP = &value
	return b
}
func (b *ServiceSpecApplyConfiguration) WithLoadBalancerSourceRanges(values ...string) *ServiceSpecApplyConfiguration {
	for i := range values {
		b.LoadBalancerSourceRanges = append(b.LoadBalancerSourceRanges, values[i])
	}
	return b
}
func (b *ServiceSpecApplyConfiguration) WithExternalName(value string) *ServiceSpecApplyConfiguration {
	b.ExternalName = &value
	return b
}
func (b *ServiceSpecApplyConfiguration) WithExternalTrafficPolicy(value corev1.ServiceExternalTrafficPolicyType) *ServiceSpecApplyConfiguration {
	b.ExternalTrafficPolicy = &value
	return b
}
func (b *ServiceSpecApplyConfiguration) WithHealthCheckNodePort(value int32) *ServiceSpecApplyConfiguration {
	b.HealthCheckNodePort = &value
	return b
}
func (b *ServiceSpecApplyConfiguration) WithPublishNotReadyAddresses(value bool) *ServiceSpecApplyConfiguration {
	b.PublishNotReadyAddresses = &value
	return b
}
func (b *ServiceSpecApplyConfiguration) WithSessionAffinityConfig(value *SessionAffinityConfigApplyConfiguration) *ServiceSpecApplyConfiguration {
	b.SessionAffinityConfig = value
	return b
}
func (b *ServiceSpecApplyConfiguration) WithIPFamilies(values ...corev1.IPFamily) *ServiceSpecApplyConfiguration {
	for i := range values {
		b.IPFamilies = append(b.IPFamilies, values[i])
	}
	return b
}
func (b *ServiceSpecApplyConfiguration) WithIPFamilyPolicy(value corev1.IPFamilyPolicyType) *ServiceSpecApplyConfiguration {
	b.IPFamilyPolicy = &value
	return b
}
func (b *ServiceSpecApplyConfiguration) WithAllocateLoadBalancerNodePorts(value bool) *ServiceSpecApplyConfiguration {
	b.AllocateLoadBalancerNodePorts = &value
	return b
}