-
Notifications
You must be signed in to change notification settings - Fork 0
/
volume.go
64 lines (54 loc) · 2.75 KB
/
volume.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// SPDX-FileCopyrightText: 2024 Axel Christ and Spheric contributors
// SPDX-License-Identifier: Apache-2.0
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/api/core/v1"
)
// VolumeApplyConfiguration represents an declarative configuration of the Volume type for use
// with apply.
type VolumeApplyConfiguration struct {
Name *string `json:"name,omitempty"`
Device *string `json:"device,omitempty"`
VolumeSourceApplyConfiguration `json:",inline"`
}
// VolumeApplyConfiguration constructs an declarative configuration of the Volume type for use with
// apply.
func Volume() *VolumeApplyConfiguration {
return &VolumeApplyConfiguration{}
}
// WithName sets the Name field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Name field is set to the value of the last call.
func (b *VolumeApplyConfiguration) WithName(value string) *VolumeApplyConfiguration {
b.Name = &value
return b
}
// WithDevice sets the Device field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Device field is set to the value of the last call.
func (b *VolumeApplyConfiguration) WithDevice(value string) *VolumeApplyConfiguration {
b.Device = &value
return b
}
// WithVolumeRef sets the VolumeRef field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the VolumeRef field is set to the value of the last call.
func (b *VolumeApplyConfiguration) WithVolumeRef(value v1.LocalObjectReference) *VolumeApplyConfiguration {
b.VolumeRef = &value
return b
}
// WithEmptyDisk sets the EmptyDisk field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the EmptyDisk field is set to the value of the last call.
func (b *VolumeApplyConfiguration) WithEmptyDisk(value *EmptyDiskVolumeSourceApplyConfiguration) *VolumeApplyConfiguration {
b.EmptyDisk = value
return b
}
// WithEphemeral sets the Ephemeral field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Ephemeral field is set to the value of the last call.
func (b *VolumeApplyConfiguration) WithEphemeral(value *EphemeralVolumeSourceApplyConfiguration) *VolumeApplyConfiguration {
b.Ephemeral = value
return b
}