-
Notifications
You must be signed in to change notification settings - Fork 218
/
volume_modify_parameters.go
687 lines (531 loc) · 20.5 KB
/
volume_modify_parameters.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
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
// Code generated by go-swagger; DO NOT EDIT.
package storage
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"net/http"
"time"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
cr "github.com/go-openapi/runtime/client"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/netapp/trident/storage_drivers/ontap/api/rest/models"
)
// NewVolumeModifyParams creates a new VolumeModifyParams object,
// with the default timeout for this client.
//
// Default values are not hydrated, since defaults are normally applied by the API server side.
//
// To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewVolumeModifyParams() *VolumeModifyParams {
return &VolumeModifyParams{
timeout: cr.DefaultTimeout,
}
}
// NewVolumeModifyParamsWithTimeout creates a new VolumeModifyParams object
// with the ability to set a timeout on a request.
func NewVolumeModifyParamsWithTimeout(timeout time.Duration) *VolumeModifyParams {
return &VolumeModifyParams{
timeout: timeout,
}
}
// NewVolumeModifyParamsWithContext creates a new VolumeModifyParams object
// with the ability to set a context for a request.
func NewVolumeModifyParamsWithContext(ctx context.Context) *VolumeModifyParams {
return &VolumeModifyParams{
Context: ctx,
}
}
// NewVolumeModifyParamsWithHTTPClient creates a new VolumeModifyParams object
// with the ability to set a custom HTTPClient for a request.
func NewVolumeModifyParamsWithHTTPClient(client *http.Client) *VolumeModifyParams {
return &VolumeModifyParams{
HTTPClient: client,
}
}
/*
VolumeModifyParams contains all the parameters to send to the API endpoint
for the volume modify operation.
Typically these are written to a http.Request.
*/
type VolumeModifyParams struct {
/* CloneMatchParentStorageTier.
Specifies whether the FlexClone volume splits the data blocks by matching its parent storage tier. This option is applicable only if the tiering policy and the tiering minimum cooling days of the parent volume and the FlexClone volume are the same.
*/
CloneMatchParentStorageTier *bool
/* Info.
Info specification
*/
Info *models.Volume
/* Nvfail.
When this option is "on", the filer performs additional work at boot time if it finds that there has been any potential data loss due to an NVRAM failure. In such situations, it causes the invalidation of all NFS file handles on all volumes affected by the problem so that client-side users are forced to remount the affected file system (and thus not continue to use potentially incorrect data). It is also possible to specify a set of files per volume that are renamed in such cases. The filer sends error messages to the console whenever such problems are found.
*/
Nvfail *string
/* PreserveLunIds.
Specifies whether LUN IDs need to be preserved during a Snapshot copy restore operation.
*/
PreserveLunIds *bool
/* RestoreToByteCount.
Number of bytes to restore from the source file, in multiples of 4096.
*/
RestoreToByteCount *float64
/* RestoreToPath.
Path to the file which is restored from the Snapshot copy.
*/
RestoreToPath *string
/* RestoreToRestorePath.
Specifies the destination location inside the volume where the file is restored.
*/
RestoreToRestorePath *string
/* RestoreToSnapshotName.
Name of the Snapshot copy to restore volume to the point in time the Snapshot copy was taken.
*/
RestoreToSnapshotName *string
/* RestoreToSnapshotUUID.
UUID of the Snapshot copy to restore volume to the point in time the Snapshot copy was taken.
*/
RestoreToSnapshotUUID *string
/* RestoreToStartByte.
Starting byte offset of the source file, in multiples of 4096.
*/
RestoreToStartByte *float64
/* ReturnTimeout.
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202.
*/
ReturnTimeout *int64
/* ScheduledSnapshotNamingScheme.
Naming Scheme for automatic Snapshot copies:
* create_time - Automatic Snapshot copies are saved as per the start of their current date and time.
* ordinal - Latest automatic snapshot copy is saved as <scheduled_frequency>.0 and subsequent copies will follow the create_time naming convention.
Default: "create_time"
*/
ScheduledSnapshotNamingScheme *string
/* SizingMethod.
Represents the method to modify the size of a Flexgroup. The following methods are supported:
* use_existing_resources - Increases or decreases the size of the FlexGroup by increasing or decreasing the size of the current FlexGroup resources
* add_new_resources - Increases the size of the FlexGroup by adding new resources. This is limited to two new resources per available aggregate.
Default: "use_existing_resources"
*/
SizingMethod *string
/* SnapshotDirectoryAccessEnabled.
This field, if true, enables the visible ".snapshot" directory from the client. The ".snapshot" directory will be available in every directory on the volume.
Default: true
*/
SnapshotDirectoryAccessEnabled *bool
/* UUID.
Unique identifier of the volume.
*/
UUID string
/* ValidateOnly.
Validate the operation and its parameters, without actually performing the operation.
*/
ValidateOnly *bool
timeout time.Duration
Context context.Context
HTTPClient *http.Client
}
// WithDefaults hydrates default values in the volume modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *VolumeModifyParams) WithDefaults() *VolumeModifyParams {
o.SetDefaults()
return o
}
// SetDefaults hydrates default values in the volume modify params (not the query body).
//
// All values with no default are reset to their zero value.
func (o *VolumeModifyParams) SetDefaults() {
var (
preserveLunIdsDefault = bool(false)
returnTimeoutDefault = int64(0)
scheduledSnapshotNamingSchemeDefault = string("create_time")
sizingMethodDefault = string("use_existing_resources")
snapshotDirectoryAccessEnabledDefault = bool(true)
)
val := VolumeModifyParams{
PreserveLunIds: &preserveLunIdsDefault,
ReturnTimeout: &returnTimeoutDefault,
ScheduledSnapshotNamingScheme: &scheduledSnapshotNamingSchemeDefault,
SizingMethod: &sizingMethodDefault,
SnapshotDirectoryAccessEnabled: &snapshotDirectoryAccessEnabledDefault,
}
val.timeout = o.timeout
val.Context = o.Context
val.HTTPClient = o.HTTPClient
*o = val
}
// WithTimeout adds the timeout to the volume modify params
func (o *VolumeModifyParams) WithTimeout(timeout time.Duration) *VolumeModifyParams {
o.SetTimeout(timeout)
return o
}
// SetTimeout adds the timeout to the volume modify params
func (o *VolumeModifyParams) SetTimeout(timeout time.Duration) {
o.timeout = timeout
}
// WithContext adds the context to the volume modify params
func (o *VolumeModifyParams) WithContext(ctx context.Context) *VolumeModifyParams {
o.SetContext(ctx)
return o
}
// SetContext adds the context to the volume modify params
func (o *VolumeModifyParams) SetContext(ctx context.Context) {
o.Context = ctx
}
// WithHTTPClient adds the HTTPClient to the volume modify params
func (o *VolumeModifyParams) WithHTTPClient(client *http.Client) *VolumeModifyParams {
o.SetHTTPClient(client)
return o
}
// SetHTTPClient adds the HTTPClient to the volume modify params
func (o *VolumeModifyParams) SetHTTPClient(client *http.Client) {
o.HTTPClient = client
}
// WithCloneMatchParentStorageTier adds the cloneMatchParentStorageTier to the volume modify params
func (o *VolumeModifyParams) WithCloneMatchParentStorageTier(cloneMatchParentStorageTier *bool) *VolumeModifyParams {
o.SetCloneMatchParentStorageTier(cloneMatchParentStorageTier)
return o
}
// SetCloneMatchParentStorageTier adds the cloneMatchParentStorageTier to the volume modify params
func (o *VolumeModifyParams) SetCloneMatchParentStorageTier(cloneMatchParentStorageTier *bool) {
o.CloneMatchParentStorageTier = cloneMatchParentStorageTier
}
// WithInfo adds the info to the volume modify params
func (o *VolumeModifyParams) WithInfo(info *models.Volume) *VolumeModifyParams {
o.SetInfo(info)
return o
}
// SetInfo adds the info to the volume modify params
func (o *VolumeModifyParams) SetInfo(info *models.Volume) {
o.Info = info
}
// WithNvfail adds the nvfail to the volume modify params
func (o *VolumeModifyParams) WithNvfail(nvfail *string) *VolumeModifyParams {
o.SetNvfail(nvfail)
return o
}
// SetNvfail adds the nvfail to the volume modify params
func (o *VolumeModifyParams) SetNvfail(nvfail *string) {
o.Nvfail = nvfail
}
// WithPreserveLunIds adds the preserveLunIds to the volume modify params
func (o *VolumeModifyParams) WithPreserveLunIds(preserveLunIds *bool) *VolumeModifyParams {
o.SetPreserveLunIds(preserveLunIds)
return o
}
// SetPreserveLunIds adds the preserveLunIds to the volume modify params
func (o *VolumeModifyParams) SetPreserveLunIds(preserveLunIds *bool) {
o.PreserveLunIds = preserveLunIds
}
// WithRestoreToByteCount adds the restoreToByteCount to the volume modify params
func (o *VolumeModifyParams) WithRestoreToByteCount(restoreToByteCount *float64) *VolumeModifyParams {
o.SetRestoreToByteCount(restoreToByteCount)
return o
}
// SetRestoreToByteCount adds the restoreToByteCount to the volume modify params
func (o *VolumeModifyParams) SetRestoreToByteCount(restoreToByteCount *float64) {
o.RestoreToByteCount = restoreToByteCount
}
// WithRestoreToPath adds the restoreToPath to the volume modify params
func (o *VolumeModifyParams) WithRestoreToPath(restoreToPath *string) *VolumeModifyParams {
o.SetRestoreToPath(restoreToPath)
return o
}
// SetRestoreToPath adds the restoreToPath to the volume modify params
func (o *VolumeModifyParams) SetRestoreToPath(restoreToPath *string) {
o.RestoreToPath = restoreToPath
}
// WithRestoreToRestorePath adds the restoreToRestorePath to the volume modify params
func (o *VolumeModifyParams) WithRestoreToRestorePath(restoreToRestorePath *string) *VolumeModifyParams {
o.SetRestoreToRestorePath(restoreToRestorePath)
return o
}
// SetRestoreToRestorePath adds the restoreToRestorePath to the volume modify params
func (o *VolumeModifyParams) SetRestoreToRestorePath(restoreToRestorePath *string) {
o.RestoreToRestorePath = restoreToRestorePath
}
// WithRestoreToSnapshotName adds the restoreToSnapshotName to the volume modify params
func (o *VolumeModifyParams) WithRestoreToSnapshotName(restoreToSnapshotName *string) *VolumeModifyParams {
o.SetRestoreToSnapshotName(restoreToSnapshotName)
return o
}
// SetRestoreToSnapshotName adds the restoreToSnapshotName to the volume modify params
func (o *VolumeModifyParams) SetRestoreToSnapshotName(restoreToSnapshotName *string) {
o.RestoreToSnapshotName = restoreToSnapshotName
}
// WithRestoreToSnapshotUUID adds the restoreToSnapshotUUID to the volume modify params
func (o *VolumeModifyParams) WithRestoreToSnapshotUUID(restoreToSnapshotUUID *string) *VolumeModifyParams {
o.SetRestoreToSnapshotUUID(restoreToSnapshotUUID)
return o
}
// SetRestoreToSnapshotUUID adds the restoreToSnapshotUuid to the volume modify params
func (o *VolumeModifyParams) SetRestoreToSnapshotUUID(restoreToSnapshotUUID *string) {
o.RestoreToSnapshotUUID = restoreToSnapshotUUID
}
// WithRestoreToStartByte adds the restoreToStartByte to the volume modify params
func (o *VolumeModifyParams) WithRestoreToStartByte(restoreToStartByte *float64) *VolumeModifyParams {
o.SetRestoreToStartByte(restoreToStartByte)
return o
}
// SetRestoreToStartByte adds the restoreToStartByte to the volume modify params
func (o *VolumeModifyParams) SetRestoreToStartByte(restoreToStartByte *float64) {
o.RestoreToStartByte = restoreToStartByte
}
// WithReturnTimeout adds the returnTimeout to the volume modify params
func (o *VolumeModifyParams) WithReturnTimeout(returnTimeout *int64) *VolumeModifyParams {
o.SetReturnTimeout(returnTimeout)
return o
}
// SetReturnTimeout adds the returnTimeout to the volume modify params
func (o *VolumeModifyParams) SetReturnTimeout(returnTimeout *int64) {
o.ReturnTimeout = returnTimeout
}
// WithScheduledSnapshotNamingScheme adds the scheduledSnapshotNamingScheme to the volume modify params
func (o *VolumeModifyParams) WithScheduledSnapshotNamingScheme(scheduledSnapshotNamingScheme *string) *VolumeModifyParams {
o.SetScheduledSnapshotNamingScheme(scheduledSnapshotNamingScheme)
return o
}
// SetScheduledSnapshotNamingScheme adds the scheduledSnapshotNamingScheme to the volume modify params
func (o *VolumeModifyParams) SetScheduledSnapshotNamingScheme(scheduledSnapshotNamingScheme *string) {
o.ScheduledSnapshotNamingScheme = scheduledSnapshotNamingScheme
}
// WithSizingMethod adds the sizingMethod to the volume modify params
func (o *VolumeModifyParams) WithSizingMethod(sizingMethod *string) *VolumeModifyParams {
o.SetSizingMethod(sizingMethod)
return o
}
// SetSizingMethod adds the sizingMethod to the volume modify params
func (o *VolumeModifyParams) SetSizingMethod(sizingMethod *string) {
o.SizingMethod = sizingMethod
}
// WithSnapshotDirectoryAccessEnabled adds the snapshotDirectoryAccessEnabled to the volume modify params
func (o *VolumeModifyParams) WithSnapshotDirectoryAccessEnabled(snapshotDirectoryAccessEnabled *bool) *VolumeModifyParams {
o.SetSnapshotDirectoryAccessEnabled(snapshotDirectoryAccessEnabled)
return o
}
// SetSnapshotDirectoryAccessEnabled adds the snapshotDirectoryAccessEnabled to the volume modify params
func (o *VolumeModifyParams) SetSnapshotDirectoryAccessEnabled(snapshotDirectoryAccessEnabled *bool) {
o.SnapshotDirectoryAccessEnabled = snapshotDirectoryAccessEnabled
}
// WithUUID adds the uuid to the volume modify params
func (o *VolumeModifyParams) WithUUID(uuid string) *VolumeModifyParams {
o.SetUUID(uuid)
return o
}
// SetUUID adds the uuid to the volume modify params
func (o *VolumeModifyParams) SetUUID(uuid string) {
o.UUID = uuid
}
// WithValidateOnly adds the validateOnly to the volume modify params
func (o *VolumeModifyParams) WithValidateOnly(validateOnly *bool) *VolumeModifyParams {
o.SetValidateOnly(validateOnly)
return o
}
// SetValidateOnly adds the validateOnly to the volume modify params
func (o *VolumeModifyParams) SetValidateOnly(validateOnly *bool) {
o.ValidateOnly = validateOnly
}
// WriteToRequest writes these params to a swagger request
func (o *VolumeModifyParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
if err := r.SetTimeout(o.timeout); err != nil {
return err
}
var res []error
if o.CloneMatchParentStorageTier != nil {
// query param clone.match_parent_storage_tier
var qrCloneMatchParentStorageTier bool
if o.CloneMatchParentStorageTier != nil {
qrCloneMatchParentStorageTier = *o.CloneMatchParentStorageTier
}
qCloneMatchParentStorageTier := swag.FormatBool(qrCloneMatchParentStorageTier)
if qCloneMatchParentStorageTier != "" {
if err := r.SetQueryParam("clone.match_parent_storage_tier", qCloneMatchParentStorageTier); err != nil {
return err
}
}
}
if o.Info != nil {
if err := r.SetBodyParam(o.Info); err != nil {
return err
}
}
if o.Nvfail != nil {
// query param nvfail
var qrNvfail string
if o.Nvfail != nil {
qrNvfail = *o.Nvfail
}
qNvfail := qrNvfail
if qNvfail != "" {
if err := r.SetQueryParam("nvfail", qNvfail); err != nil {
return err
}
}
}
if o.PreserveLunIds != nil {
// query param preserve_lun_ids
var qrPreserveLunIds bool
if o.PreserveLunIds != nil {
qrPreserveLunIds = *o.PreserveLunIds
}
qPreserveLunIds := swag.FormatBool(qrPreserveLunIds)
if qPreserveLunIds != "" {
if err := r.SetQueryParam("preserve_lun_ids", qPreserveLunIds); err != nil {
return err
}
}
}
if o.RestoreToByteCount != nil {
// query param restore_to.byte_count
var qrRestoreToByteCount float64
if o.RestoreToByteCount != nil {
qrRestoreToByteCount = *o.RestoreToByteCount
}
qRestoreToByteCount := swag.FormatFloat64(qrRestoreToByteCount)
if qRestoreToByteCount != "" {
if err := r.SetQueryParam("restore_to.byte_count", qRestoreToByteCount); err != nil {
return err
}
}
}
if o.RestoreToPath != nil {
// query param restore_to.path
var qrRestoreToPath string
if o.RestoreToPath != nil {
qrRestoreToPath = *o.RestoreToPath
}
qRestoreToPath := qrRestoreToPath
if qRestoreToPath != "" {
if err := r.SetQueryParam("restore_to.path", qRestoreToPath); err != nil {
return err
}
}
}
if o.RestoreToRestorePath != nil {
// query param restore_to.restore_path
var qrRestoreToRestorePath string
if o.RestoreToRestorePath != nil {
qrRestoreToRestorePath = *o.RestoreToRestorePath
}
qRestoreToRestorePath := qrRestoreToRestorePath
if qRestoreToRestorePath != "" {
if err := r.SetQueryParam("restore_to.restore_path", qRestoreToRestorePath); err != nil {
return err
}
}
}
if o.RestoreToSnapshotName != nil {
// query param restore_to.snapshot.name
var qrRestoreToSnapshotName string
if o.RestoreToSnapshotName != nil {
qrRestoreToSnapshotName = *o.RestoreToSnapshotName
}
qRestoreToSnapshotName := qrRestoreToSnapshotName
if qRestoreToSnapshotName != "" {
if err := r.SetQueryParam("restore_to.snapshot.name", qRestoreToSnapshotName); err != nil {
return err
}
}
}
if o.RestoreToSnapshotUUID != nil {
// query param restore_to.snapshot.uuid
var qrRestoreToSnapshotUUID string
if o.RestoreToSnapshotUUID != nil {
qrRestoreToSnapshotUUID = *o.RestoreToSnapshotUUID
}
qRestoreToSnapshotUUID := qrRestoreToSnapshotUUID
if qRestoreToSnapshotUUID != "" {
if err := r.SetQueryParam("restore_to.snapshot.uuid", qRestoreToSnapshotUUID); err != nil {
return err
}
}
}
if o.RestoreToStartByte != nil {
// query param restore_to.start_byte
var qrRestoreToStartByte float64
if o.RestoreToStartByte != nil {
qrRestoreToStartByte = *o.RestoreToStartByte
}
qRestoreToStartByte := swag.FormatFloat64(qrRestoreToStartByte)
if qRestoreToStartByte != "" {
if err := r.SetQueryParam("restore_to.start_byte", qRestoreToStartByte); err != nil {
return err
}
}
}
if o.ReturnTimeout != nil {
// query param return_timeout
var qrReturnTimeout int64
if o.ReturnTimeout != nil {
qrReturnTimeout = *o.ReturnTimeout
}
qReturnTimeout := swag.FormatInt64(qrReturnTimeout)
if qReturnTimeout != "" {
if err := r.SetQueryParam("return_timeout", qReturnTimeout); err != nil {
return err
}
}
}
if o.ScheduledSnapshotNamingScheme != nil {
// query param scheduled_snapshot_naming_scheme
var qrScheduledSnapshotNamingScheme string
if o.ScheduledSnapshotNamingScheme != nil {
qrScheduledSnapshotNamingScheme = *o.ScheduledSnapshotNamingScheme
}
qScheduledSnapshotNamingScheme := qrScheduledSnapshotNamingScheme
if qScheduledSnapshotNamingScheme != "" {
if err := r.SetQueryParam("scheduled_snapshot_naming_scheme", qScheduledSnapshotNamingScheme); err != nil {
return err
}
}
}
if o.SizingMethod != nil {
// query param sizing_method
var qrSizingMethod string
if o.SizingMethod != nil {
qrSizingMethod = *o.SizingMethod
}
qSizingMethod := qrSizingMethod
if qSizingMethod != "" {
if err := r.SetQueryParam("sizing_method", qSizingMethod); err != nil {
return err
}
}
}
if o.SnapshotDirectoryAccessEnabled != nil {
// query param snapshot_directory_access_enabled
var qrSnapshotDirectoryAccessEnabled bool
if o.SnapshotDirectoryAccessEnabled != nil {
qrSnapshotDirectoryAccessEnabled = *o.SnapshotDirectoryAccessEnabled
}
qSnapshotDirectoryAccessEnabled := swag.FormatBool(qrSnapshotDirectoryAccessEnabled)
if qSnapshotDirectoryAccessEnabled != "" {
if err := r.SetQueryParam("snapshot_directory_access_enabled", qSnapshotDirectoryAccessEnabled); err != nil {
return err
}
}
}
// path param uuid
if err := r.SetPathParam("uuid", o.UUID); err != nil {
return err
}
if o.ValidateOnly != nil {
// query param validate_only
var qrValidateOnly bool
if o.ValidateOnly != nil {
qrValidateOnly = *o.ValidateOnly
}
qValidateOnly := swag.FormatBool(qrValidateOnly)
if qValidateOnly != "" {
if err := r.SetQueryParam("validate_only", qValidateOnly); err != nil {
return err
}
}
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}