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 // StorageOSPersistentVolumeSourceApplyConfiguration represents an declarative configuration of the StorageOSPersistentVolumeSource type for use 22 // with apply. 23 type StorageOSPersistentVolumeSourceApplyConfiguration struct { 24 VolumeName *string `json:"volumeName,omitempty"` 25 VolumeNamespace *string `json:"volumeNamespace,omitempty"` 26 FSType *string `json:"fsType,omitempty"` 27 ReadOnly *bool `json:"readOnly,omitempty"` 28 SecretRef *ObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` 29 } 30 31 // StorageOSPersistentVolumeSourceApplyConfiguration constructs an declarative configuration of the StorageOSPersistentVolumeSource type for use with 32 // apply. 33 func StorageOSPersistentVolumeSource() *StorageOSPersistentVolumeSourceApplyConfiguration { 34 return &StorageOSPersistentVolumeSourceApplyConfiguration{} 35 } 36 37 // WithVolumeName sets the VolumeName field in the declarative configuration to the given value 38 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 39 // If called multiple times, the VolumeName field is set to the value of the last call. 40 func (b *StorageOSPersistentVolumeSourceApplyConfiguration) WithVolumeName(value string) *StorageOSPersistentVolumeSourceApplyConfiguration { 41 b.VolumeName = &value 42 return b 43 } 44 45 // WithVolumeNamespace sets the VolumeNamespace field in the declarative configuration to the given value 46 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 47 // If called multiple times, the VolumeNamespace field is set to the value of the last call. 48 func (b *StorageOSPersistentVolumeSourceApplyConfiguration) WithVolumeNamespace(value string) *StorageOSPersistentVolumeSourceApplyConfiguration { 49 b.VolumeNamespace = &value 50 return b 51 } 52 53 // WithFSType sets the FSType field in the declarative configuration to the given value 54 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 55 // If called multiple times, the FSType field is set to the value of the last call. 56 func (b *StorageOSPersistentVolumeSourceApplyConfiguration) WithFSType(value string) *StorageOSPersistentVolumeSourceApplyConfiguration { 57 b.FSType = &value 58 return b 59 } 60 61 // WithReadOnly sets the ReadOnly 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 ReadOnly field is set to the value of the last call. 64 func (b *StorageOSPersistentVolumeSourceApplyConfiguration) WithReadOnly(value bool) *StorageOSPersistentVolumeSourceApplyConfiguration { 65 b.ReadOnly = &value 66 return b 67 } 68 69 // WithSecretRef sets the SecretRef field in the declarative configuration to the given value 70 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 71 // If called multiple times, the SecretRef field is set to the value of the last call. 72 func (b *StorageOSPersistentVolumeSourceApplyConfiguration) WithSecretRef(value *ObjectReferenceApplyConfiguration) *StorageOSPersistentVolumeSourceApplyConfiguration { 73 b.SecretRef = value 74 return b 75 } 76