replicasetspec.go 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. Copyright The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // Code generated by applyconfiguration-gen. DO NOT EDIT.
  14. package v1
  15. import (
  16. corev1 "k8s.io/client-go/applyconfigurations/core/v1"
  17. v1 "k8s.io/client-go/applyconfigurations/meta/v1"
  18. )
  19. // ReplicaSetSpecApplyConfiguration represents an declarative configuration of the ReplicaSetSpec type for use
  20. // with apply.
  21. type ReplicaSetSpecApplyConfiguration struct {
  22. Replicas *int32 `json:"replicas,omitempty"`
  23. MinReadySeconds *int32 `json:"minReadySeconds,omitempty"`
  24. Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
  25. Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"`
  26. }
  27. // ReplicaSetSpecApplyConfiguration constructs an declarative configuration of the ReplicaSetSpec type for use with
  28. // apply.
  29. func ReplicaSetSpec() *ReplicaSetSpecApplyConfiguration {
  30. return &ReplicaSetSpecApplyConfiguration{}
  31. }
  32. // WithReplicas sets the Replicas field in the declarative configuration to the given value
  33. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  34. // If called multiple times, the Replicas field is set to the value of the last call.
  35. func (b *ReplicaSetSpecApplyConfiguration) WithReplicas(value int32) *ReplicaSetSpecApplyConfiguration {
  36. b.Replicas = &value
  37. return b
  38. }
  39. // WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value
  40. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  41. // If called multiple times, the MinReadySeconds field is set to the value of the last call.
  42. func (b *ReplicaSetSpecApplyConfiguration) WithMinReadySeconds(value int32) *ReplicaSetSpecApplyConfiguration {
  43. b.MinReadySeconds = &value
  44. return b
  45. }
  46. // WithSelector sets the Selector field in the declarative configuration to the given value
  47. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  48. // If called multiple times, the Selector field is set to the value of the last call.
  49. func (b *ReplicaSetSpecApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *ReplicaSetSpecApplyConfiguration {
  50. b.Selector = value
  51. return b
  52. }
  53. // WithTemplate sets the Template field in the declarative configuration to the given value
  54. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  55. // If called multiple times, the Template field is set to the value of the last call.
  56. func (b *ReplicaSetSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *ReplicaSetSpecApplyConfiguration {
  57. b.Template = value
  58. return b
  59. }