...

Source file src/k8s.io/client-go/applyconfigurations/core/v1/podspec.go

Documentation: k8s.io/client-go/applyconfigurations/core/v1

     1  /*
     2  Copyright The Kubernetes Authors.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  // Code generated by applyconfiguration-gen. DO NOT EDIT.
    18  
    19  package v1
    20  
    21  import (
    22  	corev1 "k8s.io/api/core/v1"
    23  )
    24  
    25  // PodSpecApplyConfiguration represents an declarative configuration of the PodSpec type for use
    26  // with apply.
    27  type PodSpecApplyConfiguration struct {
    28  	Volumes                       []VolumeApplyConfiguration                   `json:"volumes,omitempty"`
    29  	InitContainers                []ContainerApplyConfiguration                `json:"initContainers,omitempty"`
    30  	Containers                    []ContainerApplyConfiguration                `json:"containers,omitempty"`
    31  	EphemeralContainers           []EphemeralContainerApplyConfiguration       `json:"ephemeralContainers,omitempty"`
    32  	RestartPolicy                 *corev1.RestartPolicy                        `json:"restartPolicy,omitempty"`
    33  	TerminationGracePeriodSeconds *int64                                       `json:"terminationGracePeriodSeconds,omitempty"`
    34  	ActiveDeadlineSeconds         *int64                                       `json:"activeDeadlineSeconds,omitempty"`
    35  	DNSPolicy                     *corev1.DNSPolicy                            `json:"dnsPolicy,omitempty"`
    36  	NodeSelector                  map[string]string                            `json:"nodeSelector,omitempty"`
    37  	ServiceAccountName            *string                                      `json:"serviceAccountName,omitempty"`
    38  	DeprecatedServiceAccount      *string                                      `json:"serviceAccount,omitempty"`
    39  	AutomountServiceAccountToken  *bool                                        `json:"automountServiceAccountToken,omitempty"`
    40  	NodeName                      *string                                      `json:"nodeName,omitempty"`
    41  	HostNetwork                   *bool                                        `json:"hostNetwork,omitempty"`
    42  	HostPID                       *bool                                        `json:"hostPID,omitempty"`
    43  	HostIPC                       *bool                                        `json:"hostIPC,omitempty"`
    44  	ShareProcessNamespace         *bool                                        `json:"shareProcessNamespace,omitempty"`
    45  	SecurityContext               *PodSecurityContextApplyConfiguration        `json:"securityContext,omitempty"`
    46  	ImagePullSecrets              []LocalObjectReferenceApplyConfiguration     `json:"imagePullSecrets,omitempty"`
    47  	Hostname                      *string                                      `json:"hostname,omitempty"`
    48  	Subdomain                     *string                                      `json:"subdomain,omitempty"`
    49  	Affinity                      *AffinityApplyConfiguration                  `json:"affinity,omitempty"`
    50  	SchedulerName                 *string                                      `json:"schedulerName,omitempty"`
    51  	Tolerations                   []TolerationApplyConfiguration               `json:"tolerations,omitempty"`
    52  	HostAliases                   []HostAliasApplyConfiguration                `json:"hostAliases,omitempty"`
    53  	PriorityClassName             *string                                      `json:"priorityClassName,omitempty"`
    54  	Priority                      *int32                                       `json:"priority,omitempty"`
    55  	DNSConfig                     *PodDNSConfigApplyConfiguration              `json:"dnsConfig,omitempty"`
    56  	ReadinessGates                []PodReadinessGateApplyConfiguration         `json:"readinessGates,omitempty"`
    57  	RuntimeClassName              *string                                      `json:"runtimeClassName,omitempty"`
    58  	EnableServiceLinks            *bool                                        `json:"enableServiceLinks,omitempty"`
    59  	PreemptionPolicy              *corev1.PreemptionPolicy                     `json:"preemptionPolicy,omitempty"`
    60  	Overhead                      *corev1.ResourceList                         `json:"overhead,omitempty"`
    61  	TopologySpreadConstraints     []TopologySpreadConstraintApplyConfiguration `json:"topologySpreadConstraints,omitempty"`
    62  	SetHostnameAsFQDN             *bool                                        `json:"setHostnameAsFQDN,omitempty"`
    63  	OS                            *PodOSApplyConfiguration                     `json:"os,omitempty"`
    64  	HostUsers                     *bool                                        `json:"hostUsers,omitempty"`
    65  	SchedulingGates               []PodSchedulingGateApplyConfiguration        `json:"schedulingGates,omitempty"`
    66  	ResourceClaims                []PodResourceClaimApplyConfiguration         `json:"resourceClaims,omitempty"`
    67  }
    68  
    69  // PodSpecApplyConfiguration constructs an declarative configuration of the PodSpec type for use with
    70  // apply.
    71  func PodSpec() *PodSpecApplyConfiguration {
    72  	return &PodSpecApplyConfiguration{}
    73  }
    74  
    75  // WithVolumes adds the given value to the Volumes field in the declarative configuration
    76  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    77  // If called multiple times, values provided by each call will be appended to the Volumes field.
    78  func (b *PodSpecApplyConfiguration) WithVolumes(values ...*VolumeApplyConfiguration) *PodSpecApplyConfiguration {
    79  	for i := range values {
    80  		if values[i] == nil {
    81  			panic("nil value passed to WithVolumes")
    82  		}
    83  		b.Volumes = append(b.Volumes, *values[i])
    84  	}
    85  	return b
    86  }
    87  
    88  // WithInitContainers adds the given value to the InitContainers field in the declarative configuration
    89  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    90  // If called multiple times, values provided by each call will be appended to the InitContainers field.
    91  func (b *PodSpecApplyConfiguration) WithInitContainers(values ...*ContainerApplyConfiguration) *PodSpecApplyConfiguration {
    92  	for i := range values {
    93  		if values[i] == nil {
    94  			panic("nil value passed to WithInitContainers")
    95  		}
    96  		b.InitContainers = append(b.InitContainers, *values[i])
    97  	}
    98  	return b
    99  }
   100  
   101  // WithContainers adds the given value to the Containers field in the declarative configuration
   102  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   103  // If called multiple times, values provided by each call will be appended to the Containers field.
   104  func (b *PodSpecApplyConfiguration) WithContainers(values ...*ContainerApplyConfiguration) *PodSpecApplyConfiguration {
   105  	for i := range values {
   106  		if values[i] == nil {
   107  			panic("nil value passed to WithContainers")
   108  		}
   109  		b.Containers = append(b.Containers, *values[i])
   110  	}
   111  	return b
   112  }
   113  
   114  // WithEphemeralContainers adds the given value to the EphemeralContainers field in the declarative configuration
   115  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   116  // If called multiple times, values provided by each call will be appended to the EphemeralContainers field.
   117  func (b *PodSpecApplyConfiguration) WithEphemeralContainers(values ...*EphemeralContainerApplyConfiguration) *PodSpecApplyConfiguration {
   118  	for i := range values {
   119  		if values[i] == nil {
   120  			panic("nil value passed to WithEphemeralContainers")
   121  		}
   122  		b.EphemeralContainers = append(b.EphemeralContainers, *values[i])
   123  	}
   124  	return b
   125  }
   126  
   127  // WithRestartPolicy sets the RestartPolicy field in the declarative configuration to the given value
   128  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   129  // If called multiple times, the RestartPolicy field is set to the value of the last call.
   130  func (b *PodSpecApplyConfiguration) WithRestartPolicy(value corev1.RestartPolicy) *PodSpecApplyConfiguration {
   131  	b.RestartPolicy = &value
   132  	return b
   133  }
   134  
   135  // WithTerminationGracePeriodSeconds sets the TerminationGracePeriodSeconds field in the declarative configuration to the given value
   136  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   137  // If called multiple times, the TerminationGracePeriodSeconds field is set to the value of the last call.
   138  func (b *PodSpecApplyConfiguration) WithTerminationGracePeriodSeconds(value int64) *PodSpecApplyConfiguration {
   139  	b.TerminationGracePeriodSeconds = &value
   140  	return b
   141  }
   142  
   143  // WithActiveDeadlineSeconds sets the ActiveDeadlineSeconds field in the declarative configuration to the given value
   144  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   145  // If called multiple times, the ActiveDeadlineSeconds field is set to the value of the last call.
   146  func (b *PodSpecApplyConfiguration) WithActiveDeadlineSeconds(value int64) *PodSpecApplyConfiguration {
   147  	b.ActiveDeadlineSeconds = &value
   148  	return b
   149  }
   150  
   151  // WithDNSPolicy sets the DNSPolicy field in the declarative configuration to the given value
   152  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   153  // If called multiple times, the DNSPolicy field is set to the value of the last call.
   154  func (b *PodSpecApplyConfiguration) WithDNSPolicy(value corev1.DNSPolicy) *PodSpecApplyConfiguration {
   155  	b.DNSPolicy = &value
   156  	return b
   157  }
   158  
   159  // WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration
   160  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   161  // If called multiple times, the entries provided by each call will be put on the NodeSelector field,
   162  // overwriting an existing map entries in NodeSelector field with the same key.
   163  func (b *PodSpecApplyConfiguration) WithNodeSelector(entries map[string]string) *PodSpecApplyConfiguration {
   164  	if b.NodeSelector == nil && len(entries) > 0 {
   165  		b.NodeSelector = make(map[string]string, len(entries))
   166  	}
   167  	for k, v := range entries {
   168  		b.NodeSelector[k] = v
   169  	}
   170  	return b
   171  }
   172  
   173  // WithServiceAccountName sets the ServiceAccountName field in the declarative configuration to the given value
   174  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   175  // If called multiple times, the ServiceAccountName field is set to the value of the last call.
   176  func (b *PodSpecApplyConfiguration) WithServiceAccountName(value string) *PodSpecApplyConfiguration {
   177  	b.ServiceAccountName = &value
   178  	return b
   179  }
   180  
   181  // WithDeprecatedServiceAccount sets the DeprecatedServiceAccount field in the declarative configuration to the given value
   182  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   183  // If called multiple times, the DeprecatedServiceAccount field is set to the value of the last call.
   184  func (b *PodSpecApplyConfiguration) WithDeprecatedServiceAccount(value string) *PodSpecApplyConfiguration {
   185  	b.DeprecatedServiceAccount = &value
   186  	return b
   187  }
   188  
   189  // WithAutomountServiceAccountToken sets the AutomountServiceAccountToken field in the declarative configuration to the given value
   190  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   191  // If called multiple times, the AutomountServiceAccountToken field is set to the value of the last call.
   192  func (b *PodSpecApplyConfiguration) WithAutomountServiceAccountToken(value bool) *PodSpecApplyConfiguration {
   193  	b.AutomountServiceAccountToken = &value
   194  	return b
   195  }
   196  
   197  // WithNodeName sets the NodeName field in the declarative configuration to the given value
   198  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   199  // If called multiple times, the NodeName field is set to the value of the last call.
   200  func (b *PodSpecApplyConfiguration) WithNodeName(value string) *PodSpecApplyConfiguration {
   201  	b.NodeName = &value
   202  	return b
   203  }
   204  
   205  // WithHostNetwork sets the HostNetwork field in the declarative configuration to the given value
   206  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   207  // If called multiple times, the HostNetwork field is set to the value of the last call.
   208  func (b *PodSpecApplyConfiguration) WithHostNetwork(value bool) *PodSpecApplyConfiguration {
   209  	b.HostNetwork = &value
   210  	return b
   211  }
   212  
   213  // WithHostPID sets the HostPID field in the declarative configuration to the given value
   214  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   215  // If called multiple times, the HostPID field is set to the value of the last call.
   216  func (b *PodSpecApplyConfiguration) WithHostPID(value bool) *PodSpecApplyConfiguration {
   217  	b.HostPID = &value
   218  	return b
   219  }
   220  
   221  // WithHostIPC sets the HostIPC field in the declarative configuration to the given value
   222  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   223  // If called multiple times, the HostIPC field is set to the value of the last call.
   224  func (b *PodSpecApplyConfiguration) WithHostIPC(value bool) *PodSpecApplyConfiguration {
   225  	b.HostIPC = &value
   226  	return b
   227  }
   228  
   229  // WithShareProcessNamespace sets the ShareProcessNamespace field in the declarative configuration to the given value
   230  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   231  // If called multiple times, the ShareProcessNamespace field is set to the value of the last call.
   232  func (b *PodSpecApplyConfiguration) WithShareProcessNamespace(value bool) *PodSpecApplyConfiguration {
   233  	b.ShareProcessNamespace = &value
   234  	return b
   235  }
   236  
   237  // WithSecurityContext sets the SecurityContext field in the declarative configuration to the given value
   238  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   239  // If called multiple times, the SecurityContext field is set to the value of the last call.
   240  func (b *PodSpecApplyConfiguration) WithSecurityContext(value *PodSecurityContextApplyConfiguration) *PodSpecApplyConfiguration {
   241  	b.SecurityContext = value
   242  	return b
   243  }
   244  
   245  // WithImagePullSecrets adds the given value to the ImagePullSecrets field in the declarative configuration
   246  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   247  // If called multiple times, values provided by each call will be appended to the ImagePullSecrets field.
   248  func (b *PodSpecApplyConfiguration) WithImagePullSecrets(values ...*LocalObjectReferenceApplyConfiguration) *PodSpecApplyConfiguration {
   249  	for i := range values {
   250  		if values[i] == nil {
   251  			panic("nil value passed to WithImagePullSecrets")
   252  		}
   253  		b.ImagePullSecrets = append(b.ImagePullSecrets, *values[i])
   254  	}
   255  	return b
   256  }
   257  
   258  // WithHostname sets the Hostname field in the declarative configuration to the given value
   259  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   260  // If called multiple times, the Hostname field is set to the value of the last call.
   261  func (b *PodSpecApplyConfiguration) WithHostname(value string) *PodSpecApplyConfiguration {
   262  	b.Hostname = &value
   263  	return b
   264  }
   265  
   266  // WithSubdomain sets the Subdomain field in the declarative configuration to the given value
   267  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   268  // If called multiple times, the Subdomain field is set to the value of the last call.
   269  func (b *PodSpecApplyConfiguration) WithSubdomain(value string) *PodSpecApplyConfiguration {
   270  	b.Subdomain = &value
   271  	return b
   272  }
   273  
   274  // WithAffinity sets the Affinity field in the declarative configuration to the given value
   275  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   276  // If called multiple times, the Affinity field is set to the value of the last call.
   277  func (b *PodSpecApplyConfiguration) WithAffinity(value *AffinityApplyConfiguration) *PodSpecApplyConfiguration {
   278  	b.Affinity = value
   279  	return b
   280  }
   281  
   282  // WithSchedulerName sets the SchedulerName field in the declarative configuration to the given value
   283  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   284  // If called multiple times, the SchedulerName field is set to the value of the last call.
   285  func (b *PodSpecApplyConfiguration) WithSchedulerName(value string) *PodSpecApplyConfiguration {
   286  	b.SchedulerName = &value
   287  	return b
   288  }
   289  
   290  // WithTolerations adds the given value to the Tolerations field in the declarative configuration
   291  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   292  // If called multiple times, values provided by each call will be appended to the Tolerations field.
   293  func (b *PodSpecApplyConfiguration) WithTolerations(values ...*TolerationApplyConfiguration) *PodSpecApplyConfiguration {
   294  	for i := range values {
   295  		if values[i] == nil {
   296  			panic("nil value passed to WithTolerations")
   297  		}
   298  		b.Tolerations = append(b.Tolerations, *values[i])
   299  	}
   300  	return b
   301  }
   302  
   303  // WithHostAliases adds the given value to the HostAliases field in the declarative configuration
   304  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   305  // If called multiple times, values provided by each call will be appended to the HostAliases field.
   306  func (b *PodSpecApplyConfiguration) WithHostAliases(values ...*HostAliasApplyConfiguration) *PodSpecApplyConfiguration {
   307  	for i := range values {
   308  		if values[i] == nil {
   309  			panic("nil value passed to WithHostAliases")
   310  		}
   311  		b.HostAliases = append(b.HostAliases, *values[i])
   312  	}
   313  	return b
   314  }
   315  
   316  // WithPriorityClassName sets the PriorityClassName field in the declarative configuration to the given value
   317  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   318  // If called multiple times, the PriorityClassName field is set to the value of the last call.
   319  func (b *PodSpecApplyConfiguration) WithPriorityClassName(value string) *PodSpecApplyConfiguration {
   320  	b.PriorityClassName = &value
   321  	return b
   322  }
   323  
   324  // WithPriority sets the Priority field in the declarative configuration to the given value
   325  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   326  // If called multiple times, the Priority field is set to the value of the last call.
   327  func (b *PodSpecApplyConfiguration) WithPriority(value int32) *PodSpecApplyConfiguration {
   328  	b.Priority = &value
   329  	return b
   330  }
   331  
   332  // WithDNSConfig sets the DNSConfig field in the declarative configuration to the given value
   333  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   334  // If called multiple times, the DNSConfig field is set to the value of the last call.
   335  func (b *PodSpecApplyConfiguration) WithDNSConfig(value *PodDNSConfigApplyConfiguration) *PodSpecApplyConfiguration {
   336  	b.DNSConfig = value
   337  	return b
   338  }
   339  
   340  // WithReadinessGates adds the given value to the ReadinessGates field in the declarative configuration
   341  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   342  // If called multiple times, values provided by each call will be appended to the ReadinessGates field.
   343  func (b *PodSpecApplyConfiguration) WithReadinessGates(values ...*PodReadinessGateApplyConfiguration) *PodSpecApplyConfiguration {
   344  	for i := range values {
   345  		if values[i] == nil {
   346  			panic("nil value passed to WithReadinessGates")
   347  		}
   348  		b.ReadinessGates = append(b.ReadinessGates, *values[i])
   349  	}
   350  	return b
   351  }
   352  
   353  // WithRuntimeClassName sets the RuntimeClassName field in the declarative configuration to the given value
   354  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   355  // If called multiple times, the RuntimeClassName field is set to the value of the last call.
   356  func (b *PodSpecApplyConfiguration) WithRuntimeClassName(value string) *PodSpecApplyConfiguration {
   357  	b.RuntimeClassName = &value
   358  	return b
   359  }
   360  
   361  // WithEnableServiceLinks sets the EnableServiceLinks field in the declarative configuration to the given value
   362  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   363  // If called multiple times, the EnableServiceLinks field is set to the value of the last call.
   364  func (b *PodSpecApplyConfiguration) WithEnableServiceLinks(value bool) *PodSpecApplyConfiguration {
   365  	b.EnableServiceLinks = &value
   366  	return b
   367  }
   368  
   369  // WithPreemptionPolicy sets the PreemptionPolicy field in the declarative configuration to the given value
   370  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   371  // If called multiple times, the PreemptionPolicy field is set to the value of the last call.
   372  func (b *PodSpecApplyConfiguration) WithPreemptionPolicy(value corev1.PreemptionPolicy) *PodSpecApplyConfiguration {
   373  	b.PreemptionPolicy = &value
   374  	return b
   375  }
   376  
   377  // WithOverhead sets the Overhead field in the declarative configuration to the given value
   378  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   379  // If called multiple times, the Overhead field is set to the value of the last call.
   380  func (b *PodSpecApplyConfiguration) WithOverhead(value corev1.ResourceList) *PodSpecApplyConfiguration {
   381  	b.Overhead = &value
   382  	return b
   383  }
   384  
   385  // WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration
   386  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   387  // If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field.
   388  func (b *PodSpecApplyConfiguration) WithTopologySpreadConstraints(values ...*TopologySpreadConstraintApplyConfiguration) *PodSpecApplyConfiguration {
   389  	for i := range values {
   390  		if values[i] == nil {
   391  			panic("nil value passed to WithTopologySpreadConstraints")
   392  		}
   393  		b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, *values[i])
   394  	}
   395  	return b
   396  }
   397  
   398  // WithSetHostnameAsFQDN sets the SetHostnameAsFQDN field in the declarative configuration to the given value
   399  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   400  // If called multiple times, the SetHostnameAsFQDN field is set to the value of the last call.
   401  func (b *PodSpecApplyConfiguration) WithSetHostnameAsFQDN(value bool) *PodSpecApplyConfiguration {
   402  	b.SetHostnameAsFQDN = &value
   403  	return b
   404  }
   405  
   406  // WithOS sets the OS field in the declarative configuration to the given value
   407  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   408  // If called multiple times, the OS field is set to the value of the last call.
   409  func (b *PodSpecApplyConfiguration) WithOS(value *PodOSApplyConfiguration) *PodSpecApplyConfiguration {
   410  	b.OS = value
   411  	return b
   412  }
   413  
   414  // WithHostUsers sets the HostUsers field in the declarative configuration to the given value
   415  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
   416  // If called multiple times, the HostUsers field is set to the value of the last call.
   417  func (b *PodSpecApplyConfiguration) WithHostUsers(value bool) *PodSpecApplyConfiguration {
   418  	b.HostUsers = &value
   419  	return b
   420  }
   421  
   422  // WithSchedulingGates adds the given value to the SchedulingGates field in the declarative configuration
   423  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   424  // If called multiple times, values provided by each call will be appended to the SchedulingGates field.
   425  func (b *PodSpecApplyConfiguration) WithSchedulingGates(values ...*PodSchedulingGateApplyConfiguration) *PodSpecApplyConfiguration {
   426  	for i := range values {
   427  		if values[i] == nil {
   428  			panic("nil value passed to WithSchedulingGates")
   429  		}
   430  		b.SchedulingGates = append(b.SchedulingGates, *values[i])
   431  	}
   432  	return b
   433  }
   434  
   435  // WithResourceClaims adds the given value to the ResourceClaims field in the declarative configuration
   436  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
   437  // If called multiple times, values provided by each call will be appended to the ResourceClaims field.
   438  func (b *PodSpecApplyConfiguration) WithResourceClaims(values ...*PodResourceClaimApplyConfiguration) *PodSpecApplyConfiguration {
   439  	for i := range values {
   440  		if values[i] == nil {
   441  			panic("nil value passed to WithResourceClaims")
   442  		}
   443  		b.ResourceClaims = append(b.ResourceClaims, *values[i])
   444  	}
   445  	return b
   446  }
   447  

View as plain text