| 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 | import ( |
| 22 | corev1 "k8s.io/api/core/v1" |
| 23 | ) |
| 24 | |
| 25 | // VolumeMountApplyConfiguration represents a declarative configuration of the VolumeMount type for use |
| 26 | // with apply. |
| 27 | type VolumeMountApplyConfiguration struct { |
| 28 | Name *string `json:"name,omitempty"` |
| 29 | ReadOnly *bool `json:"readOnly,omitempty"` |
| 30 | RecursiveReadOnly *corev1.RecursiveReadOnlyMode `json:"recursiveReadOnly,omitempty"` |
| 31 | MountPath *string `json:"mountPath,omitempty"` |
| 32 | SubPath *string `json:"subPath,omitempty"` |
| 33 | MountPropagation *corev1.MountPropagationMode `json:"mountPropagation,omitempty"` |
| 34 | SubPathExpr *string `json:"subPathExpr,omitempty"` |
| 35 | } |
| 36 | |
| 37 | // VolumeMountApplyConfiguration constructs a declarative configuration of the VolumeMount type for use with |
| 38 | // apply. |
| 39 | func VolumeMount() *VolumeMountApplyConfiguration { |
| 40 | return &VolumeMountApplyConfiguration{} |
| 41 | } |
| 42 | |
| 43 | // WithName sets the Name 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 Name field is set to the value of the last call. |
| 46 | func (b *VolumeMountApplyConfiguration) WithName(value string) *VolumeMountApplyConfiguration { |
| 47 | b.Name = &value |
| 48 | return b |
| 49 | } |
| 50 | |
| 51 | // WithReadOnly sets the ReadOnly 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 ReadOnly field is set to the value of the last call. |
| 54 | func (b *VolumeMountApplyConfiguration) WithReadOnly(value bool) *VolumeMountApplyConfiguration { |
| 55 | b.ReadOnly = &value |
| 56 | return b |
| 57 | } |
| 58 | |
| 59 | // WithRecursiveReadOnly sets the RecursiveReadOnly 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 RecursiveReadOnly field is set to the value of the last call. |
| 62 | func (b *VolumeMountApplyConfiguration) WithRecursiveReadOnly(value corev1.RecursiveReadOnlyMode) *VolumeMountApplyConfiguration { |
| 63 | b.RecursiveReadOnly = &value |
| 64 | return b |
| 65 | } |
| 66 | |
| 67 | // WithMountPath sets the MountPath 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 MountPath field is set to the value of the last call. |
| 70 | func (b *VolumeMountApplyConfiguration) WithMountPath(value string) *VolumeMountApplyConfiguration { |
| 71 | b.MountPath = &value |
| 72 | return b |
| 73 | } |
| 74 | |
| 75 | // WithSubPath sets the SubPath 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 SubPath field is set to the value of the last call. |
| 78 | func (b *VolumeMountApplyConfiguration) WithSubPath(value string) *VolumeMountApplyConfiguration { |
| 79 | b.SubPath = &value |
| 80 | return b |
| 81 | } |
| 82 | |
| 83 | // WithMountPropagation sets the MountPropagation 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 MountPropagation field is set to the value of the last call. |
| 86 | func (b *VolumeMountApplyConfiguration) WithMountPropagation(value corev1.MountPropagationMode) *VolumeMountApplyConfiguration { |
| 87 | b.MountPropagation = &value |
| 88 | return b |
| 89 | } |
| 90 | |
| 91 | // WithSubPathExpr sets the SubPathExpr field in the declarative configuration to the given value |
| 92 | // and returns the receiver, so that objects can be built by chaining "With" function invocations. |
| 93 | // If called multiple times, the SubPathExpr field is set to the value of the last call. |
| 94 | func (b *VolumeMountApplyConfiguration) WithSubPathExpr(value string) *VolumeMountApplyConfiguration { |
| 95 | b.SubPathExpr = &value |
| 96 | return b |
| 97 | } |