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 v1 20 21 import ( 22 corev1 "k8s.io/client-go/applyconfigurations/core/v1" 23 v1 "k8s.io/client-go/applyconfigurations/meta/v1" 24 ) 25 26 // DeploymentSpecApplyConfiguration represents an declarative configuration of the DeploymentSpec type for use 27 // with apply. 28 type DeploymentSpecApplyConfiguration struct { 29 Replicas *int32 `json:"replicas,omitempty"` 30 Selector *v1.LabelSelectorApplyConfiguration `json:"selector,omitempty"` 31 Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"` 32 Strategy *DeploymentStrategyApplyConfiguration `json:"strategy,omitempty"` 33 MinReadySeconds *int32 `json:"minReadySeconds,omitempty"` 34 RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty"` 35 Paused *bool `json:"paused,omitempty"` 36 ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` 37 } 38 39 // DeploymentSpecApplyConfiguration constructs an declarative configuration of the DeploymentSpec type for use with 40 // apply. 41 func DeploymentSpec() *DeploymentSpecApplyConfiguration { 42 return &DeploymentSpecApplyConfiguration{} 43 } 44 45 // WithReplicas sets the Replicas field in the declarative configuration to the given value 46 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 47 // If called multiple times, the Replicas field is set to the value of the last call. 48 func (b *DeploymentSpecApplyConfiguration) WithReplicas(value int32) *DeploymentSpecApplyConfiguration { 49 b.Replicas = &value 50 return b 51 } 52 53 // WithSelector sets the Selector field in the declarative configuration to the given value 54 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 55 // If called multiple times, the Selector field is set to the value of the last call. 56 func (b *DeploymentSpecApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *DeploymentSpecApplyConfiguration { 57 b.Selector = value 58 return b 59 } 60 61 // WithTemplate sets the Template field in the declarative configuration to the given value 62 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 63 // If called multiple times, the Template field is set to the value of the last call. 64 func (b *DeploymentSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *DeploymentSpecApplyConfiguration { 65 b.Template = value 66 return b 67 } 68 69 // WithStrategy sets the Strategy field in the declarative configuration to the given value 70 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 71 // If called multiple times, the Strategy field is set to the value of the last call. 72 func (b *DeploymentSpecApplyConfiguration) WithStrategy(value *DeploymentStrategyApplyConfiguration) *DeploymentSpecApplyConfiguration { 73 b.Strategy = value 74 return b 75 } 76 77 // WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value 78 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 79 // If called multiple times, the MinReadySeconds field is set to the value of the last call. 80 func (b *DeploymentSpecApplyConfiguration) WithMinReadySeconds(value int32) *DeploymentSpecApplyConfiguration { 81 b.MinReadySeconds = &value 82 return b 83 } 84 85 // WithRevisionHistoryLimit sets the RevisionHistoryLimit field in the declarative configuration to the given value 86 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 87 // If called multiple times, the RevisionHistoryLimit field is set to the value of the last call. 88 func (b *DeploymentSpecApplyConfiguration) WithRevisionHistoryLimit(value int32) *DeploymentSpecApplyConfiguration { 89 b.RevisionHistoryLimit = &value 90 return b 91 } 92 93 // WithPaused sets the Paused field in the declarative configuration to the given value 94 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 95 // If called multiple times, the Paused field is set to the value of the last call. 96 func (b *DeploymentSpecApplyConfiguration) WithPaused(value bool) *DeploymentSpecApplyConfiguration { 97 b.Paused = &value 98 return b 99 } 100 101 // WithProgressDeadlineSeconds sets the ProgressDeadlineSeconds 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 ProgressDeadlineSeconds field is set to the value of the last call. 104 func (b *DeploymentSpecApplyConfiguration) WithProgressDeadlineSeconds(value int32) *DeploymentSpecApplyConfiguration { 105 b.ProgressDeadlineSeconds = &value 106 return b 107 } 108