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