...

Source file src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/namedrulewithoperations.go

Documentation: k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1

     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 v1alpha1
    20  
    21  import (
    22  	admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
    23  	v1 "k8s.io/client-go/applyconfigurations/admissionregistration/v1"
    24  )
    25  
    26  // NamedRuleWithOperationsApplyConfiguration represents an declarative configuration of the NamedRuleWithOperations type for use
    27  // with apply.
    28  type NamedRuleWithOperationsApplyConfiguration struct {
    29  	ResourceNames                           []string `json:"resourceNames,omitempty"`
    30  	v1.RuleWithOperationsApplyConfiguration `json:",inline"`
    31  }
    32  
    33  // NamedRuleWithOperationsApplyConfiguration constructs an declarative configuration of the NamedRuleWithOperations type for use with
    34  // apply.
    35  func NamedRuleWithOperations() *NamedRuleWithOperationsApplyConfiguration {
    36  	return &NamedRuleWithOperationsApplyConfiguration{}
    37  }
    38  
    39  // WithResourceNames adds the given value to the ResourceNames field in the declarative configuration
    40  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    41  // If called multiple times, values provided by each call will be appended to the ResourceNames field.
    42  func (b *NamedRuleWithOperationsApplyConfiguration) WithResourceNames(values ...string) *NamedRuleWithOperationsApplyConfiguration {
    43  	for i := range values {
    44  		b.ResourceNames = append(b.ResourceNames, values[i])
    45  	}
    46  	return b
    47  }
    48  
    49  // WithOperations adds the given value to the Operations field in the declarative configuration
    50  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    51  // If called multiple times, values provided by each call will be appended to the Operations field.
    52  func (b *NamedRuleWithOperationsApplyConfiguration) WithOperations(values ...admissionregistrationv1.OperationType) *NamedRuleWithOperationsApplyConfiguration {
    53  	for i := range values {
    54  		b.Operations = append(b.Operations, values[i])
    55  	}
    56  	return b
    57  }
    58  
    59  // WithAPIGroups adds the given value to the APIGroups field in the declarative configuration
    60  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    61  // If called multiple times, values provided by each call will be appended to the APIGroups field.
    62  func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIGroups(values ...string) *NamedRuleWithOperationsApplyConfiguration {
    63  	for i := range values {
    64  		b.APIGroups = append(b.APIGroups, values[i])
    65  	}
    66  	return b
    67  }
    68  
    69  // WithAPIVersions adds the given value to the APIVersions field in the declarative configuration
    70  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    71  // If called multiple times, values provided by each call will be appended to the APIVersions field.
    72  func (b *NamedRuleWithOperationsApplyConfiguration) WithAPIVersions(values ...string) *NamedRuleWithOperationsApplyConfiguration {
    73  	for i := range values {
    74  		b.APIVersions = append(b.APIVersions, values[i])
    75  	}
    76  	return b
    77  }
    78  
    79  // WithResources adds the given value to the Resources field in the declarative configuration
    80  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    81  // If called multiple times, values provided by each call will be appended to the Resources field.
    82  func (b *NamedRuleWithOperationsApplyConfiguration) WithResources(values ...string) *NamedRuleWithOperationsApplyConfiguration {
    83  	for i := range values {
    84  		b.Resources = append(b.Resources, values[i])
    85  	}
    86  	return b
    87  }
    88  
    89  // WithScope sets the Scope field in the declarative configuration to the given value
    90  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    91  // If called multiple times, the Scope field is set to the value of the last call.
    92  func (b *NamedRuleWithOperationsApplyConfiguration) WithScope(value admissionregistrationv1.ScopeType) *NamedRuleWithOperationsApplyConfiguration {
    93  	b.Scope = &value
    94  	return b
    95  }
    96  

View as plain text