| 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 | import ( |
| 22 | corev1 "k8s.io/client-go/applyconfigurations/core/v1" |
| 23 | v1 "k8s.io/client-go/applyconfigurations/meta/v1" |
| 24 | ) |
| 25 | |
| 26 | // DeploymentSpecApplyConfiguration represents a 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 | RollbackTo *RollbackConfigApplyConfiguration `json:"rollbackTo,omitempty"` |
| 37 | ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty"` |
| 38 | } |
| 39 | |
| 40 | // DeploymentSpecApplyConfiguration constructs a declarative configuration of the DeploymentSpec type for use with |
| 41 | // apply. |
| 42 | func DeploymentSpec() *DeploymentSpecApplyConfiguration { |
| 43 | return &DeploymentSpecApplyConfiguration{} |
| 44 | } |
| 45 | |
| 46 | // WithReplicas sets the Replicas 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 Replicas field is set to the value of the last call. |
| 49 | func (b *DeploymentSpecApplyConfiguration) WithReplicas(value int32) *DeploymentSpecApplyConfiguration { |
| 50 | b.Replicas = &value |
| 51 | return b |
| 52 | } |
| 53 | |
| 54 | // WithSelector sets the Selector 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 Selector field is set to the value of the last call. |
| 57 | func (b *DeploymentSpecApplyConfiguration) WithSelector(value *v1.LabelSelectorApplyConfiguration) *DeploymentSpecApplyConfiguration { |
| 58 | b.Selector = value |
| 59 | return b |
| 60 | } |
| 61 | |
| 62 | // WithTemplate sets the Template 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 Template field is set to the value of the last call. |
| 65 | func (b *DeploymentSpecApplyConfiguration) WithTemplate(value *corev1.PodTemplateSpecApplyConfiguration) *DeploymentSpecApplyConfiguration { |
| 66 | b.Template = value |
| 67 | return b |
| 68 | } |
| 69 | |
| 70 | // WithStrategy sets the Strategy 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 Strategy field is set to the value of the last call. |
| 73 | func (b *DeploymentSpecApplyConfiguration) WithStrategy(value *DeploymentStrategyApplyConfiguration) *DeploymentSpecApplyConfiguration { |
| 74 | b.Strategy = value |
| 75 | return b |
| 76 | } |
| 77 | |
| 78 | // WithMinReadySeconds sets the MinReadySeconds field in the declarative configuration to the given value |
| 79 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 80 | // If called multiple times, the MinReadySeconds field is set to the value of the last call. |
| 81 | func (b *DeploymentSpecApplyConfiguration) WithMinReadySeconds(value int32) *DeploymentSpecApplyConfiguration { |
| 82 | b.MinReadySeconds = &value |
| 83 | return b |
| 84 | } |
| 85 | |
| 86 | // WithRevisionHistoryLimit sets the RevisionHistoryLimit field in the declarative configuration to the given value |
| 87 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 88 | // If called multiple times, the RevisionHistoryLimit field is set to the value of the last call. |
| 89 | func (b *DeploymentSpecApplyConfiguration) WithRevisionHistoryLimit(value int32) *DeploymentSpecApplyConfiguration { |
| 90 | b.RevisionHistoryLimit = &value |
| 91 | return b |
| 92 | } |
| 93 | |
| 94 | // WithPaused sets the Paused field in the declarative configuration to the given value |
| 95 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 96 | // If called multiple times, the Paused field is set to the value of the last call. |
| 97 | func (b *DeploymentSpecApplyConfiguration) WithPaused(value bool) *DeploymentSpecApplyConfiguration { |
| 98 | b.Paused = &value |
| 99 | return b |
| 100 | } |
| 101 | |
| 102 | // WithRollbackTo sets the RollbackTo field in the declarative configuration to the given value |
| 103 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 104 | // If called multiple times, the RollbackTo field is set to the value of the last call. |
| 105 | func (b *DeploymentSpecApplyConfiguration) WithRollbackTo(value *RollbackConfigApplyConfiguration) *DeploymentSpecApplyConfiguration { |
| 106 | b.RollbackTo = value |
| 107 | return b |
| 108 | } |
| 109 | |
| 110 | // WithProgressDeadlineSeconds sets the ProgressDeadlineSeconds 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 ProgressDeadlineSeconds field is set to the value of the last call. |
| 113 | func (b *DeploymentSpecApplyConfiguration) WithProgressDeadlineSeconds(value int32) *DeploymentSpecApplyConfiguration { |
| 114 | b.ProgressDeadlineSeconds = &value |
| 115 | return b |
| 116 | } |