1/* 2Copyright The Kubernetes Authors. 3 4Licensed under the Apache License, Version 2.0 (the "License"); 5you may not use this file except in compliance with the License. 6You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10Unless required by applicable law or agreed to in writing, software 11distributed under the License is distributed on an "AS IS" BASIS, 12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13See the License for the specific language governing permissions and 14limitations under the License. 15*/ 16 17// Code generated by applyconfiguration-gen. DO NOT EDIT. 18 19package v1 20 21// StorageOSVolumeSourceApplyConfiguration represents an declarative configuration of the StorageOSVolumeSource type for use 22// with apply. 23type StorageOSVolumeSourceApplyConfiguration 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 *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` 29} 30 31// StorageOSVolumeSourceApplyConfiguration constructs an declarative configuration of the StorageOSVolumeSource type for use with 32// apply. 33func StorageOSVolumeSource() *StorageOSVolumeSourceApplyConfiguration { 34 return &StorageOSVolumeSourceApplyConfiguration{} 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. 40func (b *StorageOSVolumeSourceApplyConfiguration) WithVolumeName(value string) *StorageOSVolumeSourceApplyConfiguration { 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. 48func (b *StorageOSVolumeSourceApplyConfiguration) WithVolumeNamespace(value string) *StorageOSVolumeSourceApplyConfiguration { 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. 56func (b *StorageOSVolumeSourceApplyConfiguration) WithFSType(value string) *StorageOSVolumeSourceApplyConfiguration { 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. 64func (b *StorageOSVolumeSourceApplyConfiguration) WithReadOnly(value bool) *StorageOSVolumeSourceApplyConfiguration { 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. 72func (b *StorageOSVolumeSourceApplyConfiguration) WithSecretRef(value *LocalObjectReferenceApplyConfiguration) *StorageOSVolumeSourceApplyConfiguration { 73 b.SecretRef = value 74 return b 75} 76