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 // RBDVolumeSourceApplyConfiguration represents an declarative configuration of the RBDVolumeSource type for use 22 // with apply. 23 type RBDVolumeSourceApplyConfiguration 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 *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` 31 ReadOnly *bool `json:"readOnly,omitempty"` 32 } 33 34 // RBDVolumeSourceApplyConfiguration constructs an declarative configuration of the RBDVolumeSource type for use with 35 // apply. 36 func RBDVolumeSource() *RBDVolumeSourceApplyConfiguration { 37 return &RBDVolumeSourceApplyConfiguration{} 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 *RBDVolumeSourceApplyConfiguration) WithCephMonitors(values ...string) *RBDVolumeSourceApplyConfiguration { 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 *RBDVolumeSourceApplyConfiguration) WithRBDImage(value string) *RBDVolumeSourceApplyConfiguration { 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 *RBDVolumeSourceApplyConfiguration) WithFSType(value string) *RBDVolumeSourceApplyConfiguration { 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 *RBDVolumeSourceApplyConfiguration) WithRBDPool(value string) *RBDVolumeSourceApplyConfiguration { 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 *RBDVolumeSourceApplyConfiguration) WithRadosUser(value string) *RBDVolumeSourceApplyConfiguration { 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 *RBDVolumeSourceApplyConfiguration) WithKeyring(value string) *RBDVolumeSourceApplyConfiguration { 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 *RBDVolumeSourceApplyConfiguration) WithSecretRef(value *LocalObjectReferenceApplyConfiguration) *RBDVolumeSourceApplyConfiguration { 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 *RBDVolumeSourceApplyConfiguration) WithReadOnly(value bool) *RBDVolumeSourceApplyConfiguration { 102 b.ReadOnly = &value 103 return b 104 } 105