k8s.io/client-go@v0.31.1/applyconfigurations/meta/v1/deleteoptions.go (about)

     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  }
    35  
    36  // DeleteOptionsApplyConfiguration constructs a declarative configuration of the DeleteOptions type for use with
    37  // apply.
    38  func DeleteOptions() *DeleteOptionsApplyConfiguration {
    39  	b := &DeleteOptionsApplyConfiguration{}
    40  	b.WithKind("DeleteOptions")
    41  	b.WithAPIVersion("meta.k8s.io/v1")
    42  	return b
    43  }
    44  
    45  // WithKind sets the Kind 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 Kind field is set to the value of the last call.
    48  func (b *DeleteOptionsApplyConfiguration) WithKind(value string) *DeleteOptionsApplyConfiguration {
    49  	b.Kind = &value
    50  	return b
    51  }
    52  
    53  // WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
    56  func (b *DeleteOptionsApplyConfiguration) WithAPIVersion(value string) *DeleteOptionsApplyConfiguration {
    57  	b.APIVersion = &value
    58  	return b
    59  }
    60  
    61  // WithGracePeriodSeconds sets the GracePeriodSeconds 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 GracePeriodSeconds field is set to the value of the last call.
    64  func (b *DeleteOptionsApplyConfiguration) WithGracePeriodSeconds(value int64) *DeleteOptionsApplyConfiguration {
    65  	b.GracePeriodSeconds = &value
    66  	return b
    67  }
    68  
    69  // WithPreconditions sets the Preconditions 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 Preconditions field is set to the value of the last call.
    72  func (b *DeleteOptionsApplyConfiguration) WithPreconditions(value *PreconditionsApplyConfiguration) *DeleteOptionsApplyConfiguration {
    73  	b.Preconditions = value
    74  	return b
    75  }
    76  
    77  // WithOrphanDependents sets the OrphanDependents 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 OrphanDependents field is set to the value of the last call.
    80  func (b *DeleteOptionsApplyConfiguration) WithOrphanDependents(value bool) *DeleteOptionsApplyConfiguration {
    81  	b.OrphanDependents = &value
    82  	return b
    83  }
    84  
    85  // WithPropagationPolicy sets the PropagationPolicy 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 PropagationPolicy field is set to the value of the last call.
    88  func (b *DeleteOptionsApplyConfiguration) WithPropagationPolicy(value metav1.DeletionPropagation) *DeleteOptionsApplyConfiguration {
    89  	b.PropagationPolicy = &value
    90  	return b
    91  }
    92  
    93  // WithDryRun adds the given value to the DryRun field in the declarative configuration
    94  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    95  // If called multiple times, values provided by each call will be appended to the DryRun field.
    96  func (b *DeleteOptionsApplyConfiguration) WithDryRun(values ...string) *DeleteOptionsApplyConfiguration {
    97  	for i := range values {
    98  		b.DryRun = append(b.DryRun, values[i])
    99  	}
   100  	return b
   101  }