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
}
WithSelector puts the entries into the Selector field in the declarative configuration
and returns the receiver, so that objects can be build by chaining "With" function invocations.
If called multiple times, the entries provided by each call will be put on the Selector field,
overwriting an existing map entries in Selector field with the same key.
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
}