1/*
2Copyright The Kubernetes Authors.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8    http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17// Code generated by applyconfiguration-gen. DO NOT EDIT.
18
19package v1
20
21import (
22	v1 "k8s.io/api/core/v1"
23)
24
25// AzureDiskVolumeSourceApplyConfiguration represents an declarative configuration of the AzureDiskVolumeSource type for use
26// with apply.
27type AzureDiskVolumeSourceApplyConfiguration struct {
28	DiskName    *string                      `json:"diskName,omitempty"`
29	DataDiskURI *string                      `json:"diskURI,omitempty"`
30	CachingMode *v1.AzureDataDiskCachingMode `json:"cachingMode,omitempty"`
31	FSType      *string                      `json:"fsType,omitempty"`
32	ReadOnly    *bool                        `json:"readOnly,omitempty"`
33	Kind        *v1.AzureDataDiskKind        `json:"kind,omitempty"`
34}
35
36// AzureDiskVolumeSourceApplyConfiguration constructs an declarative configuration of the AzureDiskVolumeSource type for use with
37// apply.
38func AzureDiskVolumeSource() *AzureDiskVolumeSourceApplyConfiguration {
39	return &AzureDiskVolumeSourceApplyConfiguration{}
40}
41
42// WithDiskName sets the DiskName field in the declarative configuration to the given value
43// and returns the receiver, so that objects can be built by chaining "With" function invocations.
44// If called multiple times, the DiskName field is set to the value of the last call.
45func (b *AzureDiskVolumeSourceApplyConfiguration) WithDiskName(value string) *AzureDiskVolumeSourceApplyConfiguration {
46	b.DiskName = &value
47	return b
48}
49
50// WithDataDiskURI sets the DataDiskURI field in the declarative configuration to the given value
51// and returns the receiver, so that objects can be built by chaining "With" function invocations.
52// If called multiple times, the DataDiskURI field is set to the value of the last call.
53func (b *AzureDiskVolumeSourceApplyConfiguration) WithDataDiskURI(value string) *AzureDiskVolumeSourceApplyConfiguration {
54	b.DataDiskURI = &value
55	return b
56}
57
58// WithCachingMode sets the CachingMode 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 CachingMode field is set to the value of the last call.
61func (b *AzureDiskVolumeSourceApplyConfiguration) WithCachingMode(value v1.AzureDataDiskCachingMode) *AzureDiskVolumeSourceApplyConfiguration {
62	b.CachingMode = &value
63	return b
64}
65
66// WithFSType sets the FSType 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 FSType field is set to the value of the last call.
69func (b *AzureDiskVolumeSourceApplyConfiguration) WithFSType(value string) *AzureDiskVolumeSourceApplyConfiguration {
70	b.FSType = &value
71	return b
72}
73
74// WithReadOnly sets the ReadOnly field in the declarative configuration to the given value
75// and returns the receiver, so that objects can be built by chaining "With" function invocations.
76// If called multiple times, the ReadOnly field is set to the value of the last call.
77func (b *AzureDiskVolumeSourceApplyConfiguration) WithReadOnly(value bool) *AzureDiskVolumeSourceApplyConfiguration {
78	b.ReadOnly = &value
79	return b
80}
81
82// WithKind sets the Kind field in the declarative configuration to the given value
83// and returns the receiver, so that objects can be built by chaining "With" function invocations.
84// If called multiple times, the Kind field is set to the value of the last call.
85func (b *AzureDiskVolumeSourceApplyConfiguration) WithKind(value v1.AzureDataDiskKind) *AzureDiskVolumeSourceApplyConfiguration {
86	b.Kind = &value
87	return b
88}
89