validatingadmissionpolicystatus.go 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. Copyright The Kubernetes Authors.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // Code generated by applyconfiguration-gen. DO NOT EDIT.
  14. package v1beta1
  15. import (
  16. v1 "k8s.io/client-go/applyconfigurations/meta/v1"
  17. )
  18. // ValidatingAdmissionPolicyStatusApplyConfiguration represents an declarative configuration of the ValidatingAdmissionPolicyStatus type for use
  19. // with apply.
  20. type ValidatingAdmissionPolicyStatusApplyConfiguration struct {
  21. ObservedGeneration *int64 `json:"observedGeneration,omitempty"`
  22. TypeChecking *TypeCheckingApplyConfiguration `json:"typeChecking,omitempty"`
  23. Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
  24. }
  25. // ValidatingAdmissionPolicyStatusApplyConfiguration constructs an declarative configuration of the ValidatingAdmissionPolicyStatus type for use with
  26. // apply.
  27. func ValidatingAdmissionPolicyStatus() *ValidatingAdmissionPolicyStatusApplyConfiguration {
  28. return &ValidatingAdmissionPolicyStatusApplyConfiguration{}
  29. }
  30. // WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value
  31. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  32. // If called multiple times, the ObservedGeneration field is set to the value of the last call.
  33. func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithObservedGeneration(value int64) *ValidatingAdmissionPolicyStatusApplyConfiguration {
  34. b.ObservedGeneration = &value
  35. return b
  36. }
  37. // WithTypeChecking sets the TypeChecking field in the declarative configuration to the given value
  38. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  39. // If called multiple times, the TypeChecking field is set to the value of the last call.
  40. func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithTypeChecking(value *TypeCheckingApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration {
  41. b.TypeChecking = value
  42. return b
  43. }
  44. // WithConditions adds the given value to the Conditions field in the declarative configuration
  45. // and returns the receiver, so that objects can be build by chaining "With" function invocations.
  46. // If called multiple times, values provided by each call will be appended to the Conditions field.
  47. func (b *ValidatingAdmissionPolicyStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *ValidatingAdmissionPolicyStatusApplyConfiguration {
  48. for i := range values {
  49. if values[i] == nil {
  50. panic("nil value passed to WithConditions")
  51. }
  52. b.Conditions = append(b.Conditions, *values[i])
  53. }
  54. return b
  55. }