Debian Codegraph @

applyconfigurations/core/v1/rbdpersistentvolumesource.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 // RBDPersistentVolumeSourceApplyConfiguration represents a declarative configuration of the RBDPersistentVolumeSource type for use
22 // with apply.
23 type RBDPersistentVolumeSourceApplyConfiguration struct {
24 CephMonitors []string `json:"monitors,omitempty"`
25 RBDImage *string `json:"image,omitempty"`
26 FSType *string `json:"fsType,omitempty"`
27 RBDPool *string `json:"pool,omitempty"`
28 RadosUser *string `json:"user,omitempty"`
29 Keyring *string `json:"keyring,omitempty"`
30 SecretRef *SecretReferenceApplyConfiguration `json:"secretRef,omitempty"`
31 ReadOnly *bool `json:"readOnly,omitempty"`
32 }
33
34 // RBDPersistentVolumeSourceApplyConfiguration constructs a declarative configuration of the RBDPersistentVolumeSource type for use with
35 // apply.
36 func RBDPersistentVolumeSource() *RBDPersistentVolumeSourceApplyConfiguration {
37 return &RBDPersistentVolumeSourceApplyConfiguration{}
38 }
39
40 // WithCephMonitors adds the given value to the CephMonitors field in the declarative configuration
41 // and returns the receiver, so that objects can be build by chaining "With" function invocations.
42 // If called multiple times, values provided by each call will be appended to the CephMonitors field.
43 func (b *RBDPersistentVolumeSourceApplyConfiguration) WithCephMonitors(values ...string) *RBDPersistentVolumeSourceApplyConfiguration {
44 for i := range values {
45 b.CephMonitors = append(b.CephMonitors, values[i])
46 }
47 return b
48 }
49
50 // WithRBDImage sets the RBDImage 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 RBDImage field is set to the value of the last call.
53 func (b *RBDPersistentVolumeSourceApplyConfiguration) WithRBDImage(value string) *RBDPersistentVolumeSourceApplyConfiguration {
54 b.RBDImage = &value
55 return b
56 }
57
58 // WithFSType sets the FSType 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 FSType field is set to the value of the last call.
61 func (b *RBDPersistentVolumeSourceApplyConfiguration) WithFSType(value string) *RBDPersistentVolumeSourceApplyConfiguration {
62 b.FSType = &value
63 return b
64 }
65
66 // WithRBDPool sets the RBDPool 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 RBDPool field is set to the value of the last call.
69 func (b *RBDPersistentVolumeSourceApplyConfiguration) WithRBDPool(value string) *RBDPersistentVolumeSourceApplyConfiguration {
70 b.RBDPool = &value
71 return b
72 }
73
74 // WithRadosUser sets the RadosUser 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 RadosUser field is set to the value of the last call.
77 func (b *RBDPersistentVolumeSourceApplyConfiguration) WithRadosUser(value string) *RBDPersistentVolumeSourceApplyConfiguration {
78 b.RadosUser = &value
79 return b
80 }
81
82 // WithKeyring sets the Keyring 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 Keyring field is set to the value of the last call.
85 func (b *RBDPersistentVolumeSourceApplyConfiguration) WithKeyring(value string) *RBDPersistentVolumeSourceApplyConfiguration {
86 b.Keyring = &value
87 return b
88 }
89
90 // WithSecretRef sets the SecretRef field in the declarative configuration to the given value
91 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
92 // If called multiple times, the SecretRef field is set to the value of the last call.
93 func (b *RBDPersistentVolumeSourceApplyConfiguration) WithSecretRef(value *SecretReferenceApplyConfiguration) *RBDPersistentVolumeSourceApplyConfiguration {
94 b.SecretRef = value
95 return b
96 }
97
98 // WithReadOnly sets the ReadOnly field in the declarative configuration to the given value
99 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
100 // If called multiple times, the ReadOnly field is set to the value of the last call.
101 func (b *RBDPersistentVolumeSourceApplyConfiguration) WithReadOnly(value bool) *RBDPersistentVolumeSourceApplyConfiguration {
102 b.ReadOnly = &value
103 return b
104 }