| 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 |
// ISCSIPersistentVolumeSourceApplyConfiguration represents a declarative configuration of the ISCSIPersistentVolumeSource type for use |
| 22 |
// with apply. |
| 23 |
type ISCSIPersistentVolumeSourceApplyConfiguration 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 *SecretReferenceApplyConfiguration `json:"secretRef,omitempty"` |
| 34 |
InitiatorName *string `json:"initiatorName,omitempty"` |
| 35 |
} |
| 36 |
|
| 37 |
// ISCSIPersistentVolumeSourceApplyConfiguration constructs a declarative configuration of the ISCSIPersistentVolumeSource type for use with |
| 38 |
// apply. |
| 39 |
func ISCSIPersistentVolumeSource() *ISCSIPersistentVolumeSourceApplyConfiguration { |
| 40 |
return &ISCSIPersistentVolumeSourceApplyConfiguration{} |
| 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 *ISCSIPersistentVolumeSourceApplyConfiguration) WithTargetPortal(value string) *ISCSIPersistentVolumeSourceApplyConfiguration { |
| 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 *ISCSIPersistentVolumeSourceApplyConfiguration) WithIQN(value string) *ISCSIPersistentVolumeSourceApplyConfiguration { |
| 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 *ISCSIPersistentVolumeSourceApplyConfiguration) WithLun(value int32) *ISCSIPersistentVolumeSourceApplyConfiguration { |
| 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 *ISCSIPersistentVolumeSourceApplyConfiguration) WithISCSIInterface(value string) *ISCSIPersistentVolumeSourceApplyConfiguration { |
| 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 *ISCSIPersistentVolumeSourceApplyConfiguration) WithFSType(value string) *ISCSIPersistentVolumeSourceApplyConfiguration { |
| 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 *ISCSIPersistentVolumeSourceApplyConfiguration) WithReadOnly(value bool) *ISCSIPersistentVolumeSourceApplyConfiguration { |
| 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 *ISCSIPersistentVolumeSourceApplyConfiguration) WithPortals(values ...string) *ISCSIPersistentVolumeSourceApplyConfiguration { |
| 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 *ISCSIPersistentVolumeSourceApplyConfiguration) WithDiscoveryCHAPAuth(value bool) *ISCSIPersistentVolumeSourceApplyConfiguration { |
| 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 *ISCSIPersistentVolumeSourceApplyConfiguration) WithSessionCHAPAuth(value bool) *ISCSIPersistentVolumeSourceApplyConfiguration { |
| 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 *ISCSIPersistentVolumeSourceApplyConfiguration) WithSecretRef(value *SecretReferenceApplyConfiguration) *ISCSIPersistentVolumeSourceApplyConfiguration { |
| 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 *ISCSIPersistentVolumeSourceApplyConfiguration) WithInitiatorName(value string) *ISCSIPersistentVolumeSourceApplyConfiguration { |
| 129 |
b.InitiatorName = &value |
| 130 |
return b |
| 131 |
} |