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 // ISCSIVolumeSourceApplyConfiguration represents an declarative configuration of the ISCSIVolumeSource type for use 22 // with apply. 23 type ISCSIVolumeSourceApplyConfiguration struct { 24 TargetPortal *string `json:"targetPortal,omitempty"` 25 IQN *string `json:"iqn,omitempty"` 26 Lun *int32 `json:"lun,omitempty"` 27 ISCSIInterface *string `json:"iscsiInterface,omitempty"` 28 FSType *string `json:"fsType,omitempty"` 29 ReadOnly *bool `json:"readOnly,omitempty"` 30 Portals []string `json:"portals,omitempty"` 31 DiscoveryCHAPAuth *bool `json:"chapAuthDiscovery,omitempty"` 32 SessionCHAPAuth *bool `json:"chapAuthSession,omitempty"` 33 SecretRef *LocalObjectReferenceApplyConfiguration `json:"secretRef,omitempty"` 34 InitiatorName *string `json:"initiatorName,omitempty"` 35 } 36 37 // ISCSIVolumeSourceApplyConfiguration constructs an declarative configuration of the ISCSIVolumeSource type for use with 38 // apply. 39 func ISCSIVolumeSource() *ISCSIVolumeSourceApplyConfiguration { 40 return &ISCSIVolumeSourceApplyConfiguration{} 41 } 42 43 // WithTargetPortal sets the TargetPortal field in the declarative configuration to the given value 44 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 45 // If called multiple times, the TargetPortal field is set to the value of the last call. 46 func (b *ISCSIVolumeSourceApplyConfiguration) WithTargetPortal(value string) *ISCSIVolumeSourceApplyConfiguration { 47 b.TargetPortal = &value 48 return b 49 } 50 51 // WithIQN sets the IQN field in the declarative configuration to the given value 52 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 53 // If called multiple times, the IQN field is set to the value of the last call. 54 func (b *ISCSIVolumeSourceApplyConfiguration) WithIQN(value string) *ISCSIVolumeSourceApplyConfiguration { 55 b.IQN = &value 56 return b 57 } 58 59 // WithLun sets the Lun field in the declarative configuration to the given value 60 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 61 // If called multiple times, the Lun field is set to the value of the last call. 62 func (b *ISCSIVolumeSourceApplyConfiguration) WithLun(value int32) *ISCSIVolumeSourceApplyConfiguration { 63 b.Lun = &value 64 return b 65 } 66 67 // WithISCSIInterface sets the ISCSIInterface field in the declarative configuration to the given value 68 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 69 // If called multiple times, the ISCSIInterface field is set to the value of the last call. 70 func (b *ISCSIVolumeSourceApplyConfiguration) WithISCSIInterface(value string) *ISCSIVolumeSourceApplyConfiguration { 71 b.ISCSIInterface = &value 72 return b 73 } 74 75 // WithFSType sets the FSType field in the declarative configuration to the given value 76 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 77 // If called multiple times, the FSType field is set to the value of the last call. 78 func (b *ISCSIVolumeSourceApplyConfiguration) WithFSType(value string) *ISCSIVolumeSourceApplyConfiguration { 79 b.FSType = &value 80 return b 81 } 82 83 // WithReadOnly sets the ReadOnly field in the declarative configuration to the given value 84 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 85 // If called multiple times, the ReadOnly field is set to the value of the last call. 86 func (b *ISCSIVolumeSourceApplyConfiguration) WithReadOnly(value bool) *ISCSIVolumeSourceApplyConfiguration { 87 b.ReadOnly = &value 88 return b 89 } 90 91 // WithPortals adds the given value to the Portals field in the declarative configuration 92 // and returns the receiver, so that objects can be build by chaining "With" function invocations. 93 // If called multiple times, values provided by each call will be appended to the Portals field. 94 func (b *ISCSIVolumeSourceApplyConfiguration) WithPortals(values ...string) *ISCSIVolumeSourceApplyConfiguration { 95 for i := range values { 96 b.Portals = append(b.Portals, values[i]) 97 } 98 return b 99 } 100 101 // WithDiscoveryCHAPAuth sets the DiscoveryCHAPAuth field in the declarative configuration to the given value 102 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 103 // If called multiple times, the DiscoveryCHAPAuth field is set to the value of the last call. 104 func (b *ISCSIVolumeSourceApplyConfiguration) WithDiscoveryCHAPAuth(value bool) *ISCSIVolumeSourceApplyConfiguration { 105 b.DiscoveryCHAPAuth = &value 106 return b 107 } 108 109 // WithSessionCHAPAuth sets the SessionCHAPAuth field in the declarative configuration to the given value 110 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 111 // If called multiple times, the SessionCHAPAuth field is set to the value of the last call. 112 func (b *ISCSIVolumeSourceApplyConfiguration) WithSessionCHAPAuth(value bool) *ISCSIVolumeSourceApplyConfiguration { 113 b.SessionCHAPAuth = &value 114 return b 115 } 116 117 // WithSecretRef sets the SecretRef field in the declarative configuration to the given value 118 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 119 // If called multiple times, the SecretRef field is set to the value of the last call. 120 func (b *ISCSIVolumeSourceApplyConfiguration) WithSecretRef(value *LocalObjectReferenceApplyConfiguration) *ISCSIVolumeSourceApplyConfiguration { 121 b.SecretRef = value 122 return b 123 } 124 125 // WithInitiatorName sets the InitiatorName field in the declarative configuration to the given value 126 // and returns the receiver, so that objects can be built by chaining "With" function invocations. 127 // If called multiple times, the InitiatorName field is set to the value of the last call. 128 func (b *ISCSIVolumeSourceApplyConfiguration) WithInitiatorName(value string) *ISCSIVolumeSourceApplyConfiguration { 129 b.InitiatorName = &value 130 return b 131 } 132