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 21import ( 22 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 23) 24 25// DeleteOptionsApplyConfiguration represents an declarative configuration of the DeleteOptions type for use 26// with apply. 27type DeleteOptionsApplyConfiguration struct { 28 TypeMetaApplyConfiguration `json:",inline"` 29 GracePeriodSeconds *int64 `json:"gracePeriodSeconds,omitempty"` 30 Preconditions *PreconditionsApplyConfiguration `json:"preconditions,omitempty"` 31 OrphanDependents *bool `json:"orphanDependents,omitempty"` 32 PropagationPolicy *metav1.DeletionPropagation `json:"propagationPolicy,omitempty"` 33 DryRun []string `json:"dryRun,omitempty"` 34} 35 36// DeleteOptionsApplyConfiguration constructs an declarative configuration of the DeleteOptions type for use with 37// apply. 38func DeleteOptions() *DeleteOptionsApplyConfiguration { 39 return &DeleteOptionsApplyConfiguration{} 40} 41 42// WithKind sets the Kind field in the declarative configuration to the given value 43// and returns the receiver, so that objects can be built by chaining "With" function invocations. 44// If called multiple times, the Kind field is set to the value of the last call. 45func (b *DeleteOptionsApplyConfiguration) WithKind(value string) *DeleteOptionsApplyConfiguration { 46 b.Kind = &value 47 return b 48} 49 50// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value 51// and returns the receiver, so that objects can be built by chaining "With" function invocations. 52// If called multiple times, the APIVersion field is set to the value of the last call. 53func (b *DeleteOptionsApplyConfiguration) WithAPIVersion(value string) *DeleteOptionsApplyConfiguration { 54 b.APIVersion = &value 55 return b 56} 57 58// WithGracePeriodSeconds sets the GracePeriodSeconds field in the declarative configuration to the given value 59// and returns the receiver, so that objects can be built by chaining "With" function invocations. 60// If called multiple times, the GracePeriodSeconds field is set to the value of the last call. 61func (b *DeleteOptionsApplyConfiguration) WithGracePeriodSeconds(value int64) *DeleteOptionsApplyConfiguration { 62 b.GracePeriodSeconds = &value 63 return b 64} 65 66// WithPreconditions sets the Preconditions field in the declarative configuration to the given value 67// and returns the receiver, so that objects can be built by chaining "With" function invocations. 68// If called multiple times, the Preconditions field is set to the value of the last call. 69func (b *DeleteOptionsApplyConfiguration) WithPreconditions(value *PreconditionsApplyConfiguration) *DeleteOptionsApplyConfiguration { 70 b.Preconditions = value 71 return b 72} 73 74// WithOrphanDependents sets the OrphanDependents field in the declarative configuration to the given value 75// and returns the receiver, so that objects can be built by chaining "With" function invocations. 76// If called multiple times, the OrphanDependents field is set to the value of the last call. 77func (b *DeleteOptionsApplyConfiguration) WithOrphanDependents(value bool) *DeleteOptionsApplyConfiguration { 78 b.OrphanDependents = &value 79 return b 80} 81 82// WithPropagationPolicy sets the PropagationPolicy field in the declarative configuration to the given value 83// and returns the receiver, so that objects can be built by chaining "With" function invocations. 84// If called multiple times, the PropagationPolicy field is set to the value of the last call. 85func (b *DeleteOptionsApplyConfiguration) WithPropagationPolicy(value metav1.DeletionPropagation) *DeleteOptionsApplyConfiguration { 86 b.PropagationPolicy = &value 87 return b 88} 89 90// WithDryRun adds the given value to the DryRun field in the declarative configuration 91// and returns the receiver, so that objects can be build by chaining "With" function invocations. 92// If called multiple times, values provided by each call will be appended to the DryRun field. 93func (b *DeleteOptionsApplyConfiguration) WithDryRun(values ...string) *DeleteOptionsApplyConfiguration { 94 for i := range values { 95 b.DryRun = append(b.DryRun, values[i]) 96 } 97 return b 98} 99