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