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