mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-11 10:26:54 +00:00
111 lines
5.4 KiB
Go
111 lines
5.4 KiB
Go
/*
|
|
Copyright The Kubernetes Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
|
|
package v1
|
|
|
|
import (
|
|
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
|
|
)
|
|
|
|
// ForEachValidationApplyConfiguration represents an declarative configuration of the ForEachValidation type for use
|
|
// with apply.
|
|
type ForEachValidationApplyConfiguration struct {
|
|
List *string `json:"list,omitempty"`
|
|
ElementScope *bool `json:"elementScope,omitempty"`
|
|
Context []ContextEntryApplyConfiguration `json:"context,omitempty"`
|
|
AnyAllConditions *AnyAllConditionsApplyConfiguration `json:"preconditions,omitempty"`
|
|
RawPattern *apiextensionsv1.JSON `json:"pattern,omitempty"`
|
|
RawAnyPattern *apiextensionsv1.JSON `json:"anyPattern,omitempty"`
|
|
Deny *DenyApplyConfiguration `json:"deny,omitempty"`
|
|
ForEachValidation *apiextensionsv1.JSON `json:"foreach,omitempty"`
|
|
}
|
|
|
|
// ForEachValidationApplyConfiguration constructs an declarative configuration of the ForEachValidation type for use with
|
|
// apply.
|
|
func ForEachValidation() *ForEachValidationApplyConfiguration {
|
|
return &ForEachValidationApplyConfiguration{}
|
|
}
|
|
|
|
// WithList sets the List field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the List field is set to the value of the last call.
|
|
func (b *ForEachValidationApplyConfiguration) WithList(value string) *ForEachValidationApplyConfiguration {
|
|
b.List = &value
|
|
return b
|
|
}
|
|
|
|
// WithElementScope sets the ElementScope field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the ElementScope field is set to the value of the last call.
|
|
func (b *ForEachValidationApplyConfiguration) WithElementScope(value bool) *ForEachValidationApplyConfiguration {
|
|
b.ElementScope = &value
|
|
return b
|
|
}
|
|
|
|
// WithContext adds the given value to the Context field in the declarative configuration
|
|
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
|
|
// If called multiple times, values provided by each call will be appended to the Context field.
|
|
func (b *ForEachValidationApplyConfiguration) WithContext(values ...*ContextEntryApplyConfiguration) *ForEachValidationApplyConfiguration {
|
|
for i := range values {
|
|
if values[i] == nil {
|
|
panic("nil value passed to WithContext")
|
|
}
|
|
b.Context = append(b.Context, *values[i])
|
|
}
|
|
return b
|
|
}
|
|
|
|
// WithAnyAllConditions sets the AnyAllConditions field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the AnyAllConditions field is set to the value of the last call.
|
|
func (b *ForEachValidationApplyConfiguration) WithAnyAllConditions(value *AnyAllConditionsApplyConfiguration) *ForEachValidationApplyConfiguration {
|
|
b.AnyAllConditions = value
|
|
return b
|
|
}
|
|
|
|
// WithRawPattern sets the RawPattern field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the RawPattern field is set to the value of the last call.
|
|
func (b *ForEachValidationApplyConfiguration) WithRawPattern(value apiextensionsv1.JSON) *ForEachValidationApplyConfiguration {
|
|
b.RawPattern = &value
|
|
return b
|
|
}
|
|
|
|
// WithRawAnyPattern sets the RawAnyPattern field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the RawAnyPattern field is set to the value of the last call.
|
|
func (b *ForEachValidationApplyConfiguration) WithRawAnyPattern(value apiextensionsv1.JSON) *ForEachValidationApplyConfiguration {
|
|
b.RawAnyPattern = &value
|
|
return b
|
|
}
|
|
|
|
// WithDeny sets the Deny field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the Deny field is set to the value of the last call.
|
|
func (b *ForEachValidationApplyConfiguration) WithDeny(value *DenyApplyConfiguration) *ForEachValidationApplyConfiguration {
|
|
b.Deny = value
|
|
return b
|
|
}
|
|
|
|
// WithForEachValidation sets the ForEachValidation field in the declarative configuration to the given value
|
|
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
|
// If called multiple times, the ForEachValidation field is set to the value of the last call.
|
|
func (b *ForEachValidationApplyConfiguration) WithForEachValidation(value apiextensionsv1.JSON) *ForEachValidationApplyConfiguration {
|
|
b.ForEachValidation = &value
|
|
return b
|
|
}
|