1/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8    http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17// Code generated by applyconfiguration-gen. DO NOT EDIT.
18
19package v1
20
21// ReplicationControllerStatusApplyConfiguration represents an declarative configuration of the ReplicationControllerStatus type for use
22// with apply.
23type ReplicationControllerStatusApplyConfiguration 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	ObservedGeneration   *int64                                             `json:"observedGeneration,omitempty"`
29	Conditions           []ReplicationControllerConditionApplyConfiguration `json:"conditions,omitempty"`
30}
31
32// ReplicationControllerStatusApplyConfiguration constructs an declarative configuration of the ReplicationControllerStatus type for use with
33// apply.
34func ReplicationControllerStatus() *ReplicationControllerStatusApplyConfiguration {
35	return &ReplicationControllerStatusApplyConfiguration{}
36}
37
38// WithReplicas sets the Replicas field in the declarative configuration to the given value
39// and returns the receiver, so that objects can be built by chaining "With" function invocations.
40// If called multiple times, the Replicas field is set to the value of the last call.
41func (b *ReplicationControllerStatusApplyConfiguration) WithReplicas(value int32) *ReplicationControllerStatusApplyConfiguration {
42	b.Replicas = &value
43	return b
44}
45
46// WithFullyLabeledReplicas sets the FullyLabeledReplicas field in the declarative configuration to the given value
47// and returns the receiver, so that objects can be built by chaining "With" function invocations.
48// If called multiple times, the FullyLabeledReplicas field is set to the value of the last call.
49func (b *ReplicationControllerStatusApplyConfiguration) WithFullyLabeledReplicas(value int32) *ReplicationControllerStatusApplyConfiguration {
50	b.FullyLabeledReplicas = &value
51	return b
52}
53
54// WithReadyReplicas sets the ReadyReplicas 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 ReadyReplicas field is set to the value of the last call.
57func (b *ReplicationControllerStatusApplyConfiguration) WithReadyReplicas(value int32) *ReplicationControllerStatusApplyConfiguration {
58	b.ReadyReplicas = &value
59	return b
60}
61
62// WithAvailableReplicas sets the AvailableReplicas field in the declarative configuration to the given value
63// and returns the receiver, so that objects can be built by chaining "With" function invocations.
64// If called multiple times, the AvailableReplicas field is set to the value of the last call.
65func (b *ReplicationControllerStatusApplyConfiguration) WithAvailableReplicas(value int32) *ReplicationControllerStatusApplyConfiguration {
66	b.AvailableReplicas = &value
67	return b
68}
69
70// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
71// and returns the receiver, so that objects can be built by chaining "With" function invocations.
72// If called multiple times, the ObservedGeneration field is set to the value of the last call.
73func (b *ReplicationControllerStatusApplyConfiguration) WithObservedGeneration(value int64) *ReplicationControllerStatusApplyConfiguration {
74	b.ObservedGeneration = &value
75	return b
76}
77
78// WithConditions adds the given value to the Conditions field in the declarative configuration
79// and returns the receiver, so that objects can be build by chaining "With" function invocations.
80// If called multiple times, values provided by each call will be appended to the Conditions field.
81func (b *ReplicationControllerStatusApplyConfiguration) WithConditions(values ...*ReplicationControllerConditionApplyConfiguration) *ReplicationControllerStatusApplyConfiguration {
82	for i := range values {
83		if values[i] == nil {
84			panic("nil value passed to WithConditions")
85		}
86		b.Conditions = append(b.Conditions, *values[i])
87	}
88	return b
89}
90