/
VirtualMachineScaleSetUnmanagedDataDisk.java
258 lines (234 loc) · 10 KB
/
VirtualMachineScaleSetUnmanagedDataDisk.java
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.management.compute;
import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource;
import com.microsoft.azure.management.resources.fluentcore.model.Attachable;
import com.microsoft.azure.management.resources.fluentcore.model.Settable;
import com.microsoft.azure.management.resources.fluentcore.model.HasInner;
/**
* Describes definition and update stages of unmanaged data disk of a scale set.
*/
@Fluent
public interface VirtualMachineScaleSetUnmanagedDataDisk extends
HasInner<VirtualMachineScaleSetDataDisk>,
ChildResource<VirtualMachineScaleSet> {
/**
* Grouping of unmanaged data disk definition stages applicable as part of a virtual machine scale set creation.
*/
interface DefinitionStages {
/**
* The first stage of a unmanaged data disk definition.
*
* @param <ParentT> the stage of the parent definition to return to after attaching this definition
*/
interface Blank<ParentT>
extends WithDiskSource<ParentT> {
}
/**
* The stage of the unmanaged data disk definition allowing to choose the source.
*
* @param <ParentT> the stage of the parent definition to return to after attaching this definition
*/
interface WithDiskSource<ParentT> {
/**
* specifies that unmanaged disk needs to be created with a new VHD of given size.
*
* @param sizeInGB the initial disk size in GB
* @return the next stage of unmanaged data disk definition
*/
WithNewVhdDiskSettings<ParentT> withNewVhd(int sizeInGB);
/**
* Specifies the image LUN identifier of the source disk image.
*
* @param imageLun the LUN
* @return the next stage of unmanaged data disk definition
*/
WithFromImageDiskSettings<ParentT> fromImage(int imageLun);
}
/**
* The stage that allows configure the unmanaged disk based on new VHD.
*
* @param <ParentT> the stage of the parent definition to return to after attaching this definition
*/
interface WithNewVhdDiskSettings<ParentT> extends WithAttach<ParentT> {
/**
* Specifies the logical unit number for the unmanaged data disk.
*
* @param lun the logical unit number
* @return the next stage of unmanaged data disk definition
*/
WithNewVhdDiskSettings<ParentT> withLun(Integer lun);
/**
* Specifies the caching type for the unmanaged data disk.
*
* @param cachingType the disk caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
* @return the next stage of unmanaged data disk definition
*/
WithNewVhdDiskSettings<ParentT> withCaching(CachingTypes cachingType);
}
/**
* The stage that allows configure the unmanaged disk based on an image.
*
* @param <ParentT> the stage of the parent definition to return to after attaching this definition
*/
interface WithFromImageDiskSettings<ParentT> extends WithAttach<ParentT> {
/**
* Specifies the size in GB the unmanaged disk needs to be resized.
*
* @param sizeInGB the disk size in GB
* @return the next stage of unmanaged data disk definition
*/
WithFromImageDiskSettings<ParentT> withSizeInGB(Integer sizeInGB);
/**
* Specifies the caching type for the unmanaged data disk.
*
* @param cachingType the disk caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
* @return the next stage of unmanaged data disk definition
*/
WithFromImageDiskSettings<ParentT> withCaching(CachingTypes cachingType);
}
/**
* The final stage of the unmanaged data disk definition.
*
* @param <ParentT> the stage of the parent definition to return to after attaching this definition
*/
interface WithAttach<ParentT> extends Attachable.InDefinition<ParentT> {
}
}
/** The entirety of a unmanaged data disk of a virtual machine scale set definition.
* @param <ParentT> the stage of the parent definition to return to after attaching this definition
*/
interface DefinitionWithNewVhd<ParentT> extends
DefinitionStages.Blank<ParentT>,
DefinitionStages.WithDiskSource<ParentT>,
DefinitionStages.WithNewVhdDiskSettings<ParentT>,
DefinitionStages.WithAttach<ParentT> {
}
/** The entirety of a unmanaged data disk of a virtual machine scale set definition.
* @param <ParentT> the stage of the parent definition to return to after attaching this definition
*/
interface DefinitionWithImage<ParentT> extends
DefinitionStages.Blank<ParentT>,
DefinitionStages.WithDiskSource<ParentT>,
DefinitionStages.WithFromImageDiskSettings<ParentT>,
DefinitionStages.WithAttach<ParentT> {
}
/**
* Grouping of unamanged data disk definition stages applicable as part of a virtual machine scale set update.
*/
interface UpdateDefinitionStages {
/**
* The first stage of a unmanaged data disk definition.
*
* @param <ParentT> the stage of the parent update to return to after attaching this definition
*/
interface Blank<ParentT>
extends WithDiskSource<ParentT> {
}
/**
* The stage of the unmanaged data disk definition allowing to choose the source.
*
* @param <ParentT> the stage of the parent update to return to after attaching this definition
*/
interface WithDiskSource<ParentT> {
/**
* specifies that unmanaged disk needs to be created with a new VHD of given size.
*
* @param sizeInGB the initial disk size in GB
* @return the next stage of unmanaged data disk definition
*/
WithNewVhdDiskSettings<ParentT> withNewVhd(int sizeInGB);
}
/**
* The stage that allows configure the unmanaged disk based on new VHD.
*
* @param <ParentT> the stage of the parent update to return to after attaching this definition
*/
interface WithNewVhdDiskSettings<ParentT> extends WithAttach<ParentT> {
/**
* Specifies the logical unit number for the unmanaged data disk.
*
* @param lun the logical unit number
* @return the next stage of unmanaged data disk definition
*/
WithNewVhdDiskSettings<ParentT> withLun(Integer lun);
/**
* Specifies the caching type for the unmanaged data disk.
*
* @param cachingType the disk caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
* @return the next stage of unmanaged data disk definition
*/
WithNewVhdDiskSettings<ParentT> withCaching(CachingTypes cachingType);
}
/**
* The final stage of the unmanaged data disk definition.
*
* @param <ParentT> the stage of the parent update to return to after attaching this definition
*/
interface WithAttach<ParentT> extends Attachable.InUpdate<ParentT> {
}
}
/** The entirety of a unmanaged data disk of a virtual machine scale set definition.
* @param <ParentT> the stage of the parent update to return to after attaching this definition
*/
interface UpdateDefinition<ParentT> extends
UpdateDefinitionStages.Blank<ParentT>,
UpdateDefinitionStages.WithDiskSource<ParentT>,
UpdateDefinitionStages.WithNewVhdDiskSettings<ParentT>,
UpdateDefinitionStages.WithAttach<ParentT> {
}
/**
* Grouping of unmanaged data disk update stages.
*/
interface UpdateStages {
/**
* The stage of the unmanaged data disk update allowing to set the disk size.
*/
interface WithDiskSize {
/**
* Specifies the new size in GB for data disk.
*
* @param sizeInGB the disk size in GB
* @return the next stage of unmanaged data disk update
*/
Update withSizeInGB(Integer sizeInGB);
}
/**
* The stage of the unmanaged data disk update allowing to set the disk LUN.
*/
interface WithDiskLun {
/**
* Specifies the new logical unit number for the unmanaged data disk.
*
* @param lun the logical unit number
* @return the next stage of unmanaged data disk update
*/
Update withLun(Integer lun);
}
/**
* The stage of the unmanaged data disk update allowing to set the disk caching type.
*/
interface WithDiskCaching {
/**
* Specifies the new caching type for the unmanaged data disk.
*
* @param cachingType the disk caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
* @return the next stage of unmanaged data disk update
*/
Update withCaching(CachingTypes cachingType);
}
}
/**
* The entirety of a unmanaged data disk update as part of a virtual machine scale set update.
*/
interface Update extends
UpdateStages.WithDiskSize,
UpdateStages.WithDiskLun,
UpdateStages.WithDiskCaching,
Settable<VirtualMachineScaleSet.Update> {
}
}