nonresourcepolicyrule.go 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. // NonResourcePolicyRuleApplyConfiguration represents an declarative configuration of the NonResourcePolicyRule type for use
  16. // with apply.
  17. type NonResourcePolicyRuleApplyConfiguration struct {
  18. Verbs []string `json:"verbs,omitempty"`
  19. NonResourceURLs []string `json:"nonResourceURLs,omitempty"`
  20. }
  21. // NonResourcePolicyRuleApplyConfiguration constructs an declarative configuration of the NonResourcePolicyRule type for use with
  22. // apply.
  23. func NonResourcePolicyRule() *NonResourcePolicyRuleApplyConfiguration {
  24. return &NonResourcePolicyRuleApplyConfiguration{}
  25. }
  26. // WithVerbs adds the given value to the Verbs field in the declarative configuration
  27. // and returns the receiver, so that objects can be build by chaining "With" function invocations.
  28. // If called multiple times, values provided by each call will be appended to the Verbs field.
  29. func (b *NonResourcePolicyRuleApplyConfiguration) WithVerbs(values ...string) *NonResourcePolicyRuleApplyConfiguration {
  30. for i := range values {
  31. b.Verbs = append(b.Verbs, values[i])
  32. }
  33. return b
  34. }
  35. // WithNonResourceURLs adds the given value to the NonResourceURLs field in the declarative configuration
  36. // and returns the receiver, so that objects can be build by chaining "With" function invocations.
  37. // If called multiple times, values provided by each call will be appended to the NonResourceURLs field.
  38. func (b *NonResourcePolicyRuleApplyConfiguration) WithNonResourceURLs(values ...string) *NonResourcePolicyRuleApplyConfiguration {
  39. for i := range values {
  40. b.NonResourceURLs = append(b.NonResourceURLs, values[i])
  41. }
  42. return b
  43. }