...

Source file src/k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1/validatingadmissionpolicybindingspec.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  	admissionregistrationv1alpha1 "k8s.io/api/admissionregistration/v1alpha1"
    23  )
    24  
    25  // ValidatingAdmissionPolicyBindingSpecApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use
    26  // with apply.
    27  type ValidatingAdmissionPolicyBindingSpecApplyConfiguration struct {
    28  	PolicyName        *string                                          `json:"policyName,omitempty"`
    29  	ParamRef          *ParamRefApplyConfiguration                      `json:"paramRef,omitempty"`
    30  	MatchResources    *MatchResourcesApplyConfiguration                `json:"matchResources,omitempty"`
    31  	ValidationActions []admissionregistrationv1alpha1.ValidationAction `json:"validationActions,omitempty"`
    32  }
    33  
    34  // ValidatingAdmissionPolicyBindingSpecApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyBindingSpec type for use with
    35  // apply.
    36  func ValidatingAdmissionPolicyBindingSpec() *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
    37  	return &ValidatingAdmissionPolicyBindingSpecApplyConfiguration{}
    38  }
    39  
    40  // WithPolicyName sets the PolicyName field in the declarative configuration to the given value
    41  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    42  // If called multiple times, the PolicyName field is set to the value of the last call.
    43  func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithPolicyName(value string) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
    44  	b.PolicyName = &value
    45  	return b
    46  }
    47  
    48  // WithParamRef sets the ParamRef field in the declarative configuration to the given value
    49  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    50  // If called multiple times, the ParamRef field is set to the value of the last call.
    51  func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithParamRef(value *ParamRefApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
    52  	b.ParamRef = value
    53  	return b
    54  }
    55  
    56  // WithMatchResources sets the MatchResources field in the declarative configuration to the given value
    57  // and returns the receiver, so that objects can be built by chaining "With" function invocations.
    58  // If called multiple times, the MatchResources field is set to the value of the last call.
    59  func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithMatchResources(value *MatchResourcesApplyConfiguration) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
    60  	b.MatchResources = value
    61  	return b
    62  }
    63  
    64  // WithValidationActions adds the given value to the ValidationActions field in the declarative configuration
    65  // and returns the receiver, so that objects can be build by chaining "With" function invocations.
    66  // If called multiple times, values provided by each call will be appended to the ValidationActions field.
    67  func (b *ValidatingAdmissionPolicyBindingSpecApplyConfiguration) WithValidationActions(values ...admissionregistrationv1alpha1.ValidationAction) *ValidatingAdmissionPolicyBindingSpecApplyConfiguration {
    68  	for i := range values {
    69  		b.ValidationActions = append(b.ValidationActions, values[i])
    70  	}
    71  	return b
    72  }
    73  

View as plain text