statefulsetstatus.go 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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 v1beta2
  15. // StatefulSetStatusApplyConfiguration represents an declarative configuration of the StatefulSetStatus type for use
  16. // with apply.
  17. type StatefulSetStatusApplyConfiguration struct {
  18. ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
  19. Replicas *int32 `json:"replicas,omitempty"`
  20. ReadyReplicas *int32 `json:"readyReplicas,omitempty"`
  21. CurrentReplicas *int32 `json:"currentReplicas,omitempty"`
  22. UpdatedReplicas *int32 `json:"updatedReplicas,omitempty"`
  23. CurrentRevision *string `json:"currentRevision,omitempty"`
  24. UpdateRevision *string `json:"updateRevision,omitempty"`
  25. CollisionCount *int32 `json:"collisionCount,omitempty"`
  26. Conditions []StatefulSetConditionApplyConfiguration `json:"conditions,omitempty"`
  27. }
  28. // StatefulSetStatusApplyConfiguration constructs an declarative configuration of the StatefulSetStatus type for use with
  29. // apply.
  30. func StatefulSetStatus() *StatefulSetStatusApplyConfiguration {
  31. return &StatefulSetStatusApplyConfiguration{}
  32. }
  33. // WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
  34. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  35. // If called multiple times, the ObservedGeneration field is set to the value of the last call.
  36. func (b *StatefulSetStatusApplyConfiguration) WithObservedGeneration(value int64) *StatefulSetStatusApplyConfiguration {
  37. b.ObservedGeneration = &value
  38. return b
  39. }
  40. // WithReplicas sets the Replicas field in the declarative configuration to the given value
  41. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  42. // If called multiple times, the Replicas field is set to the value of the last call.
  43. func (b *StatefulSetStatusApplyConfiguration) WithReplicas(value int32) *StatefulSetStatusApplyConfiguration {
  44. b.Replicas = &value
  45. return b
  46. }
  47. // WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value
  48. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  49. // If called multiple times, the ReadyReplicas field is set to the value of the last call.
  50. func (b *StatefulSetStatusApplyConfiguration) WithReadyReplicas(value int32) *StatefulSetStatusApplyConfiguration {
  51. b.ReadyReplicas = &value
  52. return b
  53. }
  54. // WithCurrentReplicas sets the CurrentReplicas field in the declarative configuration to the given value
  55. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  56. // If called multiple times, the CurrentReplicas field is set to the value of the last call.
  57. func (b *StatefulSetStatusApplyConfiguration) WithCurrentReplicas(value int32) *StatefulSetStatusApplyConfiguration {
  58. b.CurrentReplicas = &value
  59. return b
  60. }
  61. // WithUpdatedReplicas sets the UpdatedReplicas field in the declarative configuration to the given value
  62. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  63. // If called multiple times, the UpdatedReplicas field is set to the value of the last call.
  64. func (b *StatefulSetStatusApplyConfiguration) WithUpdatedReplicas(value int32) *StatefulSetStatusApplyConfiguration {
  65. b.UpdatedReplicas = &value
  66. return b
  67. }
  68. // WithCurrentRevision sets the CurrentRevision field in the declarative configuration to the given value
  69. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  70. // If called multiple times, the CurrentRevision field is set to the value of the last call.
  71. func (b *StatefulSetStatusApplyConfiguration) WithCurrentRevision(value string) *StatefulSetStatusApplyConfiguration {
  72. b.CurrentRevision = &value
  73. return b
  74. }
  75. // WithUpdateRevision sets the UpdateRevision field in the declarative configuration to the given value
  76. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  77. // If called multiple times, the UpdateRevision field is set to the value of the last call.
  78. func (b *StatefulSetStatusApplyConfiguration) WithUpdateRevision(value string) *StatefulSetStatusApplyConfiguration {
  79. b.UpdateRevision = &value
  80. return b
  81. }
  82. // WithCollisionCount sets the CollisionCount field in the declarative configuration to the given value
  83. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  84. // If called multiple times, the CollisionCount field is set to the value of the last call.
  85. func (b *StatefulSetStatusApplyConfiguration) WithCollisionCount(value int32) *StatefulSetStatusApplyConfiguration {
  86. b.CollisionCount = &value
  87. return b
  88. }
  89. // WithConditions adds the given value to the Conditions field in the declarative configuration
  90. // and returns the receiver, so that objects can be build by chaining "With" function invocations.
  91. // If called multiple times, values provided by each call will be appended to the Conditions field.
  92. func (b *StatefulSetStatusApplyConfiguration) WithConditions(values ...*StatefulSetConditionApplyConfiguration) *StatefulSetStatusApplyConfiguration {
  93. for i := range values {
  94. if values[i] == nil {
  95. panic("nil value passed to WithConditions")
  96. }
  97. b.Conditions = append(b.Conditions, *values[i])
  98. }
  99. return b
  100. }