ownerreference.go 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 v1
  15. import (
  16. types "k8s.io/apimachinery/pkg/types"
  17. )
  18. // OwnerReferenceApplyConfiguration represents an declarative configuration of the OwnerReference type for use
  19. // with apply.
  20. type OwnerReferenceApplyConfiguration struct {
  21. APIVersion *string `json:"apiVersion,omitempty"`
  22. Kind *string `json:"kind,omitempty"`
  23. Name *string `json:"name,omitempty"`
  24. UID *types.UID `json:"uid,omitempty"`
  25. Controller *bool `json:"controller,omitempty"`
  26. BlockOwnerDeletion *bool `json:"blockOwnerDeletion,omitempty"`
  27. }
  28. // OwnerReferenceApplyConfiguration constructs an declarative configuration of the OwnerReference type for use with
  29. // apply.
  30. func OwnerReference() *OwnerReferenceApplyConfiguration {
  31. return &OwnerReferenceApplyConfiguration{}
  32. }
  33. // WithAPIVersion sets the APIVersion field in the declarative configuration to the given value
  34. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  35. // If called multiple times, the APIVersion field is set to the value of the last call.
  36. func (b *OwnerReferenceApplyConfiguration) WithAPIVersion(value string) *OwnerReferenceApplyConfiguration {
  37. b.APIVersion = &value
  38. return b
  39. }
  40. // WithKind sets the Kind 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 Kind field is set to the value of the last call.
  43. func (b *OwnerReferenceApplyConfiguration) WithKind(value string) *OwnerReferenceApplyConfiguration {
  44. b.Kind = &value
  45. return b
  46. }
  47. // WithName sets the Name field in the declarative configuration to the given value
  48. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  49. // If called multiple times, the Name field is set to the value of the last call.
  50. func (b *OwnerReferenceApplyConfiguration) WithName(value string) *OwnerReferenceApplyConfiguration {
  51. b.Name = &value
  52. return b
  53. }
  54. // WithUID sets the UID field in the declarative configuration to the given value
  55. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  56. // If called multiple times, the UID field is set to the value of the last call.
  57. func (b *OwnerReferenceApplyConfiguration) WithUID(value types.UID) *OwnerReferenceApplyConfiguration {
  58. b.UID = &value
  59. return b
  60. }
  61. // WithController sets the Controller field in the declarative configuration to the given value
  62. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  63. // If called multiple times, the Controller field is set to the value of the last call.
  64. func (b *OwnerReferenceApplyConfiguration) WithController(value bool) *OwnerReferenceApplyConfiguration {
  65. b.Controller = &value
  66. return b
  67. }
  68. // WithBlockOwnerDeletion sets the BlockOwnerDeletion field in the declarative configuration to the given value
  69. // and returns the receiver, so that objects can be built by chaining "With" function invocations.
  70. // If called multiple times, the BlockOwnerDeletion field is set to the value of the last call.
  71. func (b *OwnerReferenceApplyConfiguration) WithBlockOwnerDeletion(value bool) *OwnerReferenceApplyConfiguration {
  72. b.BlockOwnerDeletion = &value
  73. return b
  74. }