| 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 |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" |
| 23 |
) |
| 24 |
|
| 25 |
// DeleteOptionsApplyConfiguration represents a declarative configuration of the DeleteOptions type for use |
| 26 |
// with apply. |
| 27 |
type 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 |
IgnoreStoreReadErrorWithClusterBreakingPotential *bool `json:"ignoreStoreReadErrorWithClusterBreakingPotential,omitempty"` |
| 35 |
} |
| 36 |
|
| 37 |
// DeleteOptionsApplyConfiguration constructs a declarative configuration of the DeleteOptions type for use with |
| 38 |
// apply. |
| 39 |
func DeleteOptions() *DeleteOptionsApplyConfiguration { |
| 40 |
b := &DeleteOptionsApplyConfiguration{} |
| 41 |
b.WithKind("DeleteOptions") |
| 42 |
b.WithAPIVersion("meta.k8s.io/v1") |
| 43 |
return b |
| 44 |
} |
| 45 |
|
| 46 |
// WithKind sets the Kind 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 Kind field is set to the value of the last call. |
| 49 |
func (b *DeleteOptionsApplyConfiguration) WithKind(value string) *DeleteOptionsApplyConfiguration { |
| 50 |
b.TypeMetaApplyConfiguration.Kind = &value |
| 51 |
return b |
| 52 |
} |
| 53 |
|
| 54 |
// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call. |
| 57 |
func (b *DeleteOptionsApplyConfiguration) WithAPIVersion(value string) *DeleteOptionsApplyConfiguration { |
| 58 |
b.TypeMetaApplyConfiguration.APIVersion = &value |
| 59 |
return b |
| 60 |
} |
| 61 |
|
| 62 |
// WithGracePeriodSeconds sets the GracePeriodSeconds 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 GracePeriodSeconds field is set to the value of the last call. |
| 65 |
func (b *DeleteOptionsApplyConfiguration) WithGracePeriodSeconds(value int64) *DeleteOptionsApplyConfiguration { |
| 66 |
b.GracePeriodSeconds = &value |
| 67 |
return b |
| 68 |
} |
| 69 |
|
| 70 |
// WithPreconditions sets the Preconditions 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 Preconditions field is set to the value of the last call. |
| 73 |
func (b *DeleteOptionsApplyConfiguration) WithPreconditions(value *PreconditionsApplyConfiguration) *DeleteOptionsApplyConfiguration { |
| 74 |
b.Preconditions = value |
| 75 |
return b |
| 76 |
} |
| 77 |
|
| 78 |
// WithOrphanDependents sets the OrphanDependents 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 OrphanDependents field is set to the value of the last call. |
| 81 |
func (b *DeleteOptionsApplyConfiguration) WithOrphanDependents(value bool) *DeleteOptionsApplyConfiguration { |
| 82 |
b.OrphanDependents = &value |
| 83 |
return b |
| 84 |
} |
| 85 |
|
| 86 |
// WithPropagationPolicy sets the PropagationPolicy 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 PropagationPolicy field is set to the value of the last call. |
| 89 |
func (b *DeleteOptionsApplyConfiguration) WithPropagationPolicy(value metav1.DeletionPropagation) *DeleteOptionsApplyConfiguration { |
| 90 |
b.PropagationPolicy = &value |
| 91 |
return b |
| 92 |
} |
| 93 |
|
| 94 |
// WithDryRun adds the given value to the DryRun field in the declarative configuration |
| 95 |
// and returns the receiver, so that objects can be build by chaining "With" function invocations. |
| 96 |
// If called multiple times, values provided by each call will be appended to the DryRun field. |
| 97 |
func (b *DeleteOptionsApplyConfiguration) WithDryRun(values ...string) *DeleteOptionsApplyConfiguration { |
| 98 |
for i := range values { |
| 99 |
b.DryRun = append(b.DryRun, values[i]) |
| 100 |
} |
| 101 |
return b |
| 102 |
} |
| 103 |
|
| 104 |
// WithIgnoreStoreReadErrorWithClusterBreakingPotential sets the IgnoreStoreReadErrorWithClusterBreakingPotential field in the declarative configuration to the given value |
| 105 |
// and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 106 |
// If called multiple times, the IgnoreStoreReadErrorWithClusterBreakingPotential field is set to the value of the last call. |
| 107 |
func (b *DeleteOptionsApplyConfiguration) WithIgnoreStoreReadErrorWithClusterBreakingPotential(value bool) *DeleteOptionsApplyConfiguration { |
| 108 |
b.IgnoreStoreReadErrorWithClusterBreakingPotential = &value |
| 109 |
return b |
| 110 |
} |