Debian Codegraph @

applyconfigurations/core/v1/cephfsvolumesource.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 // CephFSVolumeSourceApplyConfiguration represents a declarative configuration of the CephFSVolumeSource type for use
22 // with apply.
23 type CephFSVolumeSourceApplyConfiguration struct {
24 Monitors []string `json:"monitors,omitempty"`
25 Path *string `json:"path,omitempty"`
26 User *string `json:"user,omitempty"`
27 SecretFile *string `json:"secretFile,omitempty"`
28 SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"`
29 ReadOnly *bool `json:"readOnly,omitempty"`
30 }
31
32 // CephFSVolumeSourceApplyConfiguration constructs a declarative configuration of the CephFSVolumeSource type for use with
33 // apply.
34 func CephFSVolumeSource() *CephFSVolumeSourceApplyConfiguration {
35 return &CephFSVolumeSourceApplyConfiguration{}
36 }
37
38 // WithMonitors adds the given value to the Monitors field in the declarative configuration
39 // and returns the receiver, so that objects can be build by chaining "With" function invocations.
40 // If called multiple times, values provided by each call will be appended to the Monitors field.
41 func (b *CephFSVolumeSourceApplyConfiguration) WithMonitors(values ...string) *CephFSVolumeSourceApplyConfiguration {
42 for i := range values {
43 b.Monitors = append(b.Monitors, values[i])
44 }
45 return b
46 }
47
48 // WithPath sets the Path field in the declarative configuration to the given value
49 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
50 // If called multiple times, the Path field is set to the value of the last call.
51 func (b *CephFSVolumeSourceApplyConfiguration) WithPath(value string) *CephFSVolumeSourceApplyConfiguration {
52 b.Path = &value
53 return b
54 }
55
56 // WithUser sets the User field in the declarative configuration to the given value
57 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
58 // If called multiple times, the User field is set to the value of the last call.
59 func (b *CephFSVolumeSourceApplyConfiguration) WithUser(value string) *CephFSVolumeSourceApplyConfiguration {
60 b.User = &value
61 return b
62 }
63
64 // WithSecretFile sets the SecretFile field in the declarative configuration to the given value
65 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
66 // If called multiple times, the SecretFile field is set to the value of the last call.
67 func (b *CephFSVolumeSourceApplyConfiguration) WithSecretFile(value string) *CephFSVolumeSourceApplyConfiguration {
68 b.SecretFile = &value
69 return b
70 }
71
72 // WithSecretRef sets the SecretRef field in the declarative configuration to the given value
73 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
74 // If called multiple times, the SecretRef field is set to the value of the last call.
75 func (b *CephFSVolumeSourceApplyConfiguration) WithSecretRef(value *LocalObjectReferenceApplyConfiguration) *CephFSVolumeSourceApplyConfiguration {
76 b.SecretRef = value
77 return b
78 }
79
80 // WithReadOnly sets the ReadOnly field in the declarative configuration to the given value
81 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
82 // If called multiple times, the ReadOnly field is set to the value of the last call.
83 func (b *CephFSVolumeSourceApplyConfiguration) WithReadOnly(value bool) *CephFSVolumeSourceApplyConfiguration {
84 b.ReadOnly = &value
85 return b
86 }