Debian Codegraph @

applyconfigurations/meta/v1/ownerreference.go

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