| 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 |
// ReplicaSetStatusApplyConfiguration represents a declarative configuration of the ReplicaSetStatus type for use |
| 22 |
// with apply. |
| 23 |
type ReplicaSetStatusApplyConfiguration struct { |
| 24 |
Replicas *int32 `json:"replicas,omitempty"` |
| 25 |
FullyLabeledReplicas *int32 `json:"fullyLabeledReplicas,omitempty"` |
| 26 |
ReadyReplicas *int32 `json:"readyReplicas,omitempty"` |
| 27 |
AvailableReplicas *int32 `json:"availableReplicas,omitempty"` |
| 28 |
TerminatingReplicas *int32 `json:"terminatingReplicas,omitempty"` |
| 29 |
ObservedGeneration *int64 `json:"observedGeneration,omitempty"` |
| 30 |
Conditions []ReplicaSetConditionApplyConfiguration `json:"conditions,omitempty"` |
| 31 |
} |
| 32 |
|
| 33 |
// ReplicaSetStatusApplyConfiguration constructs a declarative configuration of the ReplicaSetStatus type for use with |
| 34 |
// apply. |
| 35 |
func ReplicaSetStatus() *ReplicaSetStatusApplyConfiguration { |
| 36 |
return &ReplicaSetStatusApplyConfiguration{} |
| 37 |
} |
| 38 |
|
| 39 |
// WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call. |
| 42 |
func (b *ReplicaSetStatusApplyConfiguration) WithReplicas(value int32) *ReplicaSetStatusApplyConfiguration { |
| 43 |
b.Replicas = &value |
| 44 |
return b |
| 45 |
} |
| 46 |
|
| 47 |
// WithFullyLabeledReplicas sets the FullyLabeledReplicas 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 FullyLabeledReplicas field is set to the value of the last call. |
| 50 |
func (b *ReplicaSetStatusApplyConfiguration) WithFullyLabeledReplicas(value int32) *ReplicaSetStatusApplyConfiguration { |
| 51 |
b.FullyLabeledReplicas = &value |
| 52 |
return b |
| 53 |
} |
| 54 |
|
| 55 |
// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value |
| 56 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 57 |
// If called multiple times, the ReadyReplicas field is set to the value of the last call. |
| 58 |
func (b *ReplicaSetStatusApplyConfiguration) WithReadyReplicas(value int32) *ReplicaSetStatusApplyConfiguration { |
| 59 |
b.ReadyReplicas = &value |
| 60 |
return b |
| 61 |
} |
| 62 |
|
| 63 |
// WithAvailableReplicas sets the AvailableReplicas field in the declarative configuration to the given value |
| 64 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 65 |
// If called multiple times, the AvailableReplicas field is set to the value of the last call. |
| 66 |
func (b *ReplicaSetStatusApplyConfiguration) WithAvailableReplicas(value int32) *ReplicaSetStatusApplyConfiguration { |
| 67 |
b.AvailableReplicas = &value |
| 68 |
return b |
| 69 |
} |
| 70 |
|
| 71 |
// WithTerminatingReplicas sets the TerminatingReplicas field in the declarative configuration to the given value |
| 72 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 73 |
// If called multiple times, the TerminatingReplicas field is set to the value of the last call. |
| 74 |
func (b *ReplicaSetStatusApplyConfiguration) WithTerminatingReplicas(value int32) *ReplicaSetStatusApplyConfiguration { |
| 75 |
b.TerminatingReplicas = &value |
| 76 |
return b |
| 77 |
} |
| 78 |
|
| 79 |
// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value |
| 80 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 81 |
// If called multiple times, the ObservedGeneration field is set to the value of the last call. |
| 82 |
func (b *ReplicaSetStatusApplyConfiguration) WithObservedGeneration(value int64) *ReplicaSetStatusApplyConfiguration { |
| 83 |
b.ObservedGeneration = &value |
| 84 |
return b |
| 85 |
} |
| 86 |
|
| 87 |
// WithConditions adds the given value to the Conditions field in the declarative configuration |
| 88 |
// and returns the receiver, so that objects can be build by chaining "With" function invocations. |
| 89 |
// If called multiple times, values provided by each call will be appended to the Conditions field. |
| 90 |
func (b *ReplicaSetStatusApplyConfiguration) WithConditions(values ...*ReplicaSetConditionApplyConfiguration) *ReplicaSetStatusApplyConfiguration { |
| 91 |
for i := range values { |
| 92 |
if values[i] == nil { |
| 93 |
panic("nil value passed to WithConditions") |
| 94 |
} |
| 95 |
b.Conditions = append(b.Conditions, *values[i]) |
| 96 |
} |
| 97 |
return b |
| 98 |
} |