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 // FCVolumeSourceApplyConfiguration represents an declarative configuration of the FCVolumeSource type for use 22 // with apply. 23 type FCVolumeSourceApplyConfiguration struct { 24 TargetWWNs []string `json:"targetWWNs,omitempty"` 25 Lun *int32 `json:"lun,omitempty"` 26 FSType *string `json:"fsType,omitempty"` 27 ReadOnly *bool `json:"readOnly,omitempty"` 28 WWIDs []string `json:"wwids,omitempty"` 29 } 30 31 // FCVolumeSourceApplyConfiguration constructs an declarative configuration of the FCVolumeSource type for use with 32 // apply. 33 func FCVolumeSource() *FCVolumeSourceApplyConfiguration { 34 return &FCVolumeSourceApplyConfiguration{} 35 } 36 37 // WithTargetWWNs adds the given value to the TargetWWNs field in the declarative configuration 38 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 39 // If called multiple times, values provided by each call will be appended to the TargetWWNs field. 40 func (b *FCVolumeSourceApplyConfiguration) WithTargetWWNs(values ...string) *FCVolumeSourceApplyConfiguration { 41 for i := range values { 42 b.TargetWWNs = append(b.TargetWWNs, values[i]) 43 } 44 return b 45 } 46 47 // WithLun sets the Lun field in the declarative configuration to the given value 48 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 49 // If called multiple times, the Lun field is set to the value of the last call. 50 func (b *FCVolumeSourceApplyConfiguration) WithLun(value int32) *FCVolumeSourceApplyConfiguration { 51 b.Lun = &value 52 return b 53 } 54 55 // WithFSType sets the FSType field in the declarative configuration to the given value 56 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 57 // If called multiple times, the FSType field is set to the value of the last call. 58 func (b *FCVolumeSourceApplyConfiguration) WithFSType(value string) *FCVolumeSourceApplyConfiguration { 59 b.FSType = &value 60 return b 61 } 62 63 // WithReadOnly sets the ReadOnly field in the declarative configuration to the given value 64 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 65 // If called multiple times, the ReadOnly field is set to the value of the last call. 66 func (b *FCVolumeSourceApplyConfiguration) WithReadOnly(value bool) *FCVolumeSourceApplyConfiguration { 67 b.ReadOnly = &value 68 return b 69 } 70 71 // WithWWIDs adds the given value to the WWIDs field in the declarative configuration 72 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 73 // If called multiple times, values provided by each call will be appended to the WWIDs field. 74 func (b *FCVolumeSourceApplyConfiguration) WithWWIDs(values ...string) *FCVolumeSourceApplyConfiguration { 75 for i := range values { 76 b.WWIDs = append(b.WWIDs, values[i]) 77 } 78 return b 79 } 80