Debian Codegraph @

applyconfigurations/storage/v1/volumeattachmentstatus.go

raw
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 // VolumeAttachmentStatusApplyConfiguration represents a declarative configuration of the VolumeAttachmentStatus type for use
22 // with apply.
23 type VolumeAttachmentStatusApplyConfiguration struct {
24 Attached *bool `json:"attached,omitempty"`
25 AttachmentMetadata map[string]string `json:"attachmentMetadata,omitempty"`
26 AttachError *VolumeErrorApplyConfiguration `json:"attachError,omitempty"`
27 DetachError *VolumeErrorApplyConfiguration `json:"detachError,omitempty"`
28 }
29
30 // VolumeAttachmentStatusApplyConfiguration constructs a declarative configuration of the VolumeAttachmentStatus type for use with
31 // apply.
32 func VolumeAttachmentStatus() *VolumeAttachmentStatusApplyConfiguration {
33 return &VolumeAttachmentStatusApplyConfiguration{}
34 }
35
36 // WithAttached sets the Attached field in the declarative configuration to the given value
37 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
38 // If called multiple times, the Attached field is set to the value of the last call.
39 func (b *VolumeAttachmentStatusApplyConfiguration) WithAttached(value bool) *VolumeAttachmentStatusApplyConfiguration {
40 b.Attached = &value
41 return b
42 }
43
44 // WithAttachmentMetadata puts the entries into the AttachmentMetadata field in the declarative configuration
45 // and returns the receiver, so that objects can be build by chaining "With" function invocations.
46 // If called multiple times, the entries provided by each call will be put on the AttachmentMetadata field,
47 // overwriting an existing map entries in AttachmentMetadata field with the same key.
48 func (b *VolumeAttachmentStatusApplyConfiguration) WithAttachmentMetadata(entries map[string]string) *VolumeAttachmentStatusApplyConfiguration {
49 if b.AttachmentMetadata == nil && len(entries) > 0 {
50 b.AttachmentMetadata = make(map[string]string, len(entries))
51 }
52 for k, v := range entries {
53 b.AttachmentMetadata[k] = v
54 }
55 return b
56 }
57
58 // WithAttachError sets the AttachError field in the declarative configuration to the given value
59 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
60 // If called multiple times, the AttachError field is set to the value of the last call.
61 func (b *VolumeAttachmentStatusApplyConfiguration) WithAttachError(value *VolumeErrorApplyConfiguration) *VolumeAttachmentStatusApplyConfiguration {
62 b.AttachError = value
63 return b
64 }
65
66 // WithDetachError sets the DetachError field in the declarative configuration to the given value
67 // and returns the receiver, so that objects can be built by chaining "With" function invocations.
68 // If called multiple times, the DetachError field is set to the value of the last call.
69 func (b *VolumeAttachmentStatusApplyConfiguration) WithDetachError(value *VolumeErrorApplyConfiguration) *VolumeAttachmentStatusApplyConfiguration {
70 b.DetachError = value
71 return b
72 }