forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 2
/
models.go
2647 lines (2388 loc) · 137 KB
/
models.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
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package batch
// Copyright (c) Microsoft and contributors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"io"
"net/http"
)
// AllocationState enumerates the values for allocation state.
type AllocationState string
const (
// Resizing ...
Resizing AllocationState = "resizing"
// Steady ...
Steady AllocationState = "steady"
// Stopping ...
Stopping AllocationState = "stopping"
)
// CertificateFormat enumerates the values for certificate format.
type CertificateFormat string
const (
// Cer ...
Cer CertificateFormat = "cer"
// Pfx ...
Pfx CertificateFormat = "pfx"
// Unmapped ...
Unmapped CertificateFormat = "unmapped"
)
// CertificateState enumerates the values for certificate state.
type CertificateState string
const (
// Active ...
Active CertificateState = "active"
// Deletefailed ...
Deletefailed CertificateState = "deletefailed"
// Deleting ...
Deleting CertificateState = "deleting"
)
// CertificateStoreLocation enumerates the values for certificate store location.
type CertificateStoreLocation string
const (
// CertificateStoreLocationCurrentuser ...
CertificateStoreLocationCurrentuser CertificateStoreLocation = "currentuser"
// CertificateStoreLocationLocalmachine ...
CertificateStoreLocationLocalmachine CertificateStoreLocation = "localmachine"
// CertificateStoreLocationUnmapped ...
CertificateStoreLocationUnmapped CertificateStoreLocation = "unmapped"
)
// ComputeNodeDeallocationOption enumerates the values for compute node deallocation option.
type ComputeNodeDeallocationOption string
const (
// Requeue ...
Requeue ComputeNodeDeallocationOption = "requeue"
// Retaineddata ...
Retaineddata ComputeNodeDeallocationOption = "retaineddata"
// Taskcompletion ...
Taskcompletion ComputeNodeDeallocationOption = "taskcompletion"
// Terminate ...
Terminate ComputeNodeDeallocationOption = "terminate"
)
// ComputeNodeFillType enumerates the values for compute node fill type.
type ComputeNodeFillType string
const (
// ComputeNodeFillTypePack ...
ComputeNodeFillTypePack ComputeNodeFillType = "pack"
// ComputeNodeFillTypeSpread ...
ComputeNodeFillTypeSpread ComputeNodeFillType = "spread"
// ComputeNodeFillTypeUnmapped ...
ComputeNodeFillTypeUnmapped ComputeNodeFillType = "unmapped"
)
// ComputeNodeRebootOption enumerates the values for compute node reboot option.
type ComputeNodeRebootOption string
const (
// ComputeNodeRebootOptionRequeue ...
ComputeNodeRebootOptionRequeue ComputeNodeRebootOption = "requeue"
// ComputeNodeRebootOptionRetaineddata ...
ComputeNodeRebootOptionRetaineddata ComputeNodeRebootOption = "retaineddata"
// ComputeNodeRebootOptionTaskcompletion ...
ComputeNodeRebootOptionTaskcompletion ComputeNodeRebootOption = "taskcompletion"
// ComputeNodeRebootOptionTerminate ...
ComputeNodeRebootOptionTerminate ComputeNodeRebootOption = "terminate"
)
// ComputeNodeReimageOption enumerates the values for compute node reimage option.
type ComputeNodeReimageOption string
const (
// ComputeNodeReimageOptionRequeue ...
ComputeNodeReimageOptionRequeue ComputeNodeReimageOption = "requeue"
// ComputeNodeReimageOptionRetaineddata ...
ComputeNodeReimageOptionRetaineddata ComputeNodeReimageOption = "retaineddata"
// ComputeNodeReimageOptionTaskcompletion ...
ComputeNodeReimageOptionTaskcompletion ComputeNodeReimageOption = "taskcompletion"
// ComputeNodeReimageOptionTerminate ...
ComputeNodeReimageOptionTerminate ComputeNodeReimageOption = "terminate"
)
// ComputeNodeState enumerates the values for compute node state.
type ComputeNodeState string
const (
// Creating ...
Creating ComputeNodeState = "creating"
// Idle ...
Idle ComputeNodeState = "idle"
// Leavingpool ...
Leavingpool ComputeNodeState = "leavingpool"
// Offline ...
Offline ComputeNodeState = "offline"
// Rebooting ...
Rebooting ComputeNodeState = "rebooting"
// Reimaging ...
Reimaging ComputeNodeState = "reimaging"
// Running ...
Running ComputeNodeState = "running"
// Starting ...
Starting ComputeNodeState = "starting"
// Starttaskfailed ...
Starttaskfailed ComputeNodeState = "starttaskfailed"
// Unknown ...
Unknown ComputeNodeState = "unknown"
// Unusable ...
Unusable ComputeNodeState = "unusable"
// Waitingforstarttask ...
Waitingforstarttask ComputeNodeState = "waitingforstarttask"
)
// DisableComputeNodeSchedulingOption enumerates the values for disable compute node scheduling option.
type DisableComputeNodeSchedulingOption string
const (
// DisableComputeNodeSchedulingOptionRequeue ...
DisableComputeNodeSchedulingOptionRequeue DisableComputeNodeSchedulingOption = "requeue"
// DisableComputeNodeSchedulingOptionTaskcompletion ...
DisableComputeNodeSchedulingOptionTaskcompletion DisableComputeNodeSchedulingOption = "taskcompletion"
// DisableComputeNodeSchedulingOptionTerminate ...
DisableComputeNodeSchedulingOptionTerminate DisableComputeNodeSchedulingOption = "terminate"
)
// DisableJobOption enumerates the values for disable job option.
type DisableJobOption string
const (
// DisableJobOptionRequeue ...
DisableJobOptionRequeue DisableJobOption = "requeue"
// DisableJobOptionTerminate ...
DisableJobOptionTerminate DisableJobOption = "terminate"
// DisableJobOptionWait ...
DisableJobOptionWait DisableJobOption = "wait"
)
// JobPreparationTaskState enumerates the values for job preparation task state.
type JobPreparationTaskState string
const (
// JobPreparationTaskStateCompleted ...
JobPreparationTaskStateCompleted JobPreparationTaskState = "completed"
// JobPreparationTaskStateRunning ...
JobPreparationTaskStateRunning JobPreparationTaskState = "running"
)
// JobReleaseTaskState enumerates the values for job release task state.
type JobReleaseTaskState string
const (
// JobReleaseTaskStateCompleted ...
JobReleaseTaskStateCompleted JobReleaseTaskState = "completed"
// JobReleaseTaskStateRunning ...
JobReleaseTaskStateRunning JobReleaseTaskState = "running"
)
// JobScheduleState enumerates the values for job schedule state.
type JobScheduleState string
const (
// JobScheduleStateActive ...
JobScheduleStateActive JobScheduleState = "active"
// JobScheduleStateCompleted ...
JobScheduleStateCompleted JobScheduleState = "completed"
// JobScheduleStateDeleting ...
JobScheduleStateDeleting JobScheduleState = "deleting"
// JobScheduleStateDisabled ...
JobScheduleStateDisabled JobScheduleState = "disabled"
// JobScheduleStateTerminating ...
JobScheduleStateTerminating JobScheduleState = "terminating"
)
// JobState enumerates the values for job state.
type JobState string
const (
// JobStateActive ...
JobStateActive JobState = "active"
// JobStateCompleted ...
JobStateCompleted JobState = "completed"
// JobStateDeleting ...
JobStateDeleting JobState = "deleting"
// JobStateDisabled ...
JobStateDisabled JobState = "disabled"
// JobStateDisabling ...
JobStateDisabling JobState = "disabling"
// JobStateEnabling ...
JobStateEnabling JobState = "enabling"
// JobStateTerminating ...
JobStateTerminating JobState = "terminating"
)
// PoolLifetimeOption enumerates the values for pool lifetime option.
type PoolLifetimeOption string
const (
// PoolLifetimeOptionJob ...
PoolLifetimeOptionJob PoolLifetimeOption = "job"
// PoolLifetimeOptionJobschedule ...
PoolLifetimeOptionJobschedule PoolLifetimeOption = "jobschedule"
// PoolLifetimeOptionUnmapped ...
PoolLifetimeOptionUnmapped PoolLifetimeOption = "unmapped"
)
// PoolState enumerates the values for pool state.
type PoolState string
const (
// PoolStateActive ...
PoolStateActive PoolState = "active"
// PoolStateDeleting ...
PoolStateDeleting PoolState = "deleting"
// PoolStateUpgrading ...
PoolStateUpgrading PoolState = "upgrading"
)
// SchedulingErrorCategory enumerates the values for scheduling error category.
type SchedulingErrorCategory string
const (
// SchedulingErrorCategoryServererror ...
SchedulingErrorCategoryServererror SchedulingErrorCategory = "servererror"
// SchedulingErrorCategoryUnmapped ...
SchedulingErrorCategoryUnmapped SchedulingErrorCategory = "unmapped"
// SchedulingErrorCategoryUsererror ...
SchedulingErrorCategoryUsererror SchedulingErrorCategory = "usererror"
)
// SchedulingState enumerates the values for scheduling state.
type SchedulingState string
const (
// Disabled ...
Disabled SchedulingState = "disabled"
// Enabled ...
Enabled SchedulingState = "enabled"
)
// StartTaskState enumerates the values for start task state.
type StartTaskState string
const (
// StartTaskStateCompleted ...
StartTaskStateCompleted StartTaskState = "completed"
// StartTaskStateRunning ...
StartTaskStateRunning StartTaskState = "running"
)
// TaskState enumerates the values for task state.
type TaskState string
const (
// TaskStateActive ...
TaskStateActive TaskState = "active"
// TaskStateCompleted ...
TaskStateCompleted TaskState = "completed"
// TaskStatePreparing ...
TaskStatePreparing TaskState = "preparing"
// TaskStateRunning ...
TaskStateRunning TaskState = "running"
)
// AffinityInformation a locality hint that can be used by the Batch service to select a compute node on which to
// start a task.
type AffinityInformation struct {
// AffinityID - Gets or sets an opaque string representing the location of a compute node or a task that has run previously. You can pass the AffinityId of a compute node or task to indicate that this task needs to be placed close to the node or task.
AffinityID *string `json:"affinityId,omitempty"`
}
// ApplicationListResult response to a ApplicationOperations.List request.
type ApplicationListResult struct {
autorest.Response `json:"-"`
// Value - Gets or sets the list of applications available in the account.
Value *[]ApplicationSummary `json:"value,omitempty"`
// OdataNextLink - Gets or sets the URL to get the next set of results.
OdataNextLink *string `json:"odata.nextLink,omitempty"`
}
// ApplicationListResultIterator provides access to a complete listing of ApplicationSummary values.
type ApplicationListResultIterator struct {
i int
page ApplicationListResultPage
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *ApplicationListResultIterator) Next() error {
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err := iter.page.Next()
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ApplicationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter ApplicationListResultIterator) Response() ApplicationListResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter ApplicationListResultIterator) Value() ApplicationSummary {
if !iter.page.NotDone() {
return ApplicationSummary{}
}
return iter.page.Values()[iter.i]
}
// IsEmpty returns true if the ListResult contains no values.
func (alr ApplicationListResult) IsEmpty() bool {
return alr.Value == nil || len(*alr.Value) == 0
}
// applicationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (alr ApplicationListResult) applicationListResultPreparer() (*http.Request, error) {
if alr.OdataNextLink == nil || len(to.String(alr.OdataNextLink)) < 1 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(alr.OdataNextLink)))
}
// ApplicationListResultPage contains a page of ApplicationSummary values.
type ApplicationListResultPage struct {
fn func(ApplicationListResult) (ApplicationListResult, error)
alr ApplicationListResult
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *ApplicationListResultPage) Next() error {
next, err := page.fn(page.alr)
if err != nil {
return err
}
page.alr = next
return nil
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ApplicationListResultPage) NotDone() bool {
return !page.alr.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page ApplicationListResultPage) Response() ApplicationListResult {
return page.alr
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page ApplicationListResultPage) Values() []ApplicationSummary {
if page.alr.IsEmpty() {
return nil
}
return *page.alr.Value
}
// ApplicationPackageReference a reference to an application package to be installed on compute nodes in a pool.
type ApplicationPackageReference struct {
// ApplicationID - Gets or sets the application package id.
ApplicationID *string `json:"applicationId,omitempty"`
// Version - Gets or sets the application package version. If not specified, the default is used.
Version *string `json:"version,omitempty"`
}
// ApplicationSummary contains information about an application in an Azure Batch account.
type ApplicationSummary struct {
autorest.Response `json:"-"`
// ID - Gets or sets a string that uniquely identifies the application within the account.
ID *string `json:"id,omitempty"`
// DisplayName - Gets or sets the display name for the application.
DisplayName *string `json:"displayName,omitempty"`
Versions *[]string `json:"versions,omitempty"`
}
// AutoPoolSpecification specifies characteristics for a temporary 'auto pool'. The Batch service will create this
// auto pool, run all the tasks for the job on it, and will delete the pool once the job has completed.
type AutoPoolSpecification struct {
// AutoPoolIDPrefix - Gets or sets a prefix to be added to the unique identifier when a pool is automatically created. The prefix can be up to 20 characters long.
AutoPoolIDPrefix *string `json:"autoPoolIdPrefix,omitempty"`
// PoolLifetimeOption - Gets or sets the minimum lifetime of created auto pools, and how multiple jobs on a schedule are assigned to pools. Possible values include: 'PoolLifetimeOptionJobschedule', 'PoolLifetimeOptionJob', 'PoolLifetimeOptionUnmapped'
PoolLifetimeOption PoolLifetimeOption `json:"poolLifetimeOption,omitempty"`
// KeepAlive - Gets or sets whether to keep an auto pool alive after its lifetime expires.
KeepAlive *bool `json:"keepAlive,omitempty"`
// Pool - Gets or sets the pool specification for the auto pool.
Pool *PoolSpecification `json:"pool,omitempty"`
}
// AutoScaleRun the results and errors from an execution of a pool autoscale formula.
type AutoScaleRun struct {
autorest.Response `json:"-"`
// Timestamp - Gets or sets the time at which the autoscale formula was last evaluated.
Timestamp *date.Time `json:"timestamp,omitempty"`
// Results - Gets or sets the final values of all variables used in the evaluation of the autoscale formula. Each variable value is returned in the form $variable=value, and variables are separated by semicolons.
Results *string `json:"results,omitempty"`
// Error - Gets or sets details of the error encountered evaluating the autoscale formula on the pool, if the evaluation was unsuccessful.
Error *AutoScaleRunError `json:"error,omitempty"`
}
// AutoScaleRunError an error that occurred when executing or evaluating a pool autoscale formula.
type AutoScaleRunError struct {
// Code - Gets or sets an identifier for the autoscale error. Codes are invariant and are intended to be consumed programmatically.
Code *string `json:"code,omitempty"`
// Message - Gets or sets a message describing the autoscale error, intended to be suitable for display in a user interface.
Message *string `json:"message,omitempty"`
// Values - Gets or sets a list of additional error details related to the autoscale error.
Values *[]NameValuePair `json:"values,omitempty"`
}
// Certificate a certificate that can be installed on compute nodes and can be used to authenticate operations on
// the machine.
type Certificate struct {
autorest.Response `json:"-"`
// Thumbprint - Get or sets the X.509 thumbprint of the certificate. This is a sequence of up to 40 hex digits (it may include spaces but these are removed).
Thumbprint *string `json:"thumbprint,omitempty"`
// ThumbprintAlgorithm - Gets or sets the algorithm used to derive the thumbprint. This must be sha1.
ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"`
// URL - Gets or sets the URL of the certificate.
URL *string `json:"url,omitempty"`
// State - Gets or sets the current state of the certificate. Possible values include: 'Active', 'Deleting', 'Deletefailed'
State CertificateState `json:"state,omitempty"`
// StateTransitionTime - Gets or sets the time at which the certificate entered its current state.
StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"`
// PreviousState - Gets or sets the previous state of the certificate. This property is not set if the certificate is in its initial Active state. Possible values include: 'Active', 'Deleting', 'Deletefailed'
PreviousState CertificateState `json:"previousState,omitempty"`
// PreviousStateTransitionTime - Gets or sets the time at which the certificate entered its previous state. This property is not set if the certificate is in its initial Active state.
PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"`
// PublicData - Gets or sets the public part of the certificate as a base-64 encoded .cer file.
PublicData *string `json:"publicData,omitempty"`
// DeleteCertificateError - Gets or sets the error that occurred on the last attempt to delete this certificate. This property is set only if the certificate is in the deletefailed state.
DeleteCertificateError *DeleteCertificateError `json:"deleteCertificateError,omitempty"`
}
// CertificateAddParameter a certificate that can be installed on compute nodes and can be used to authenticate
// operations on the machine.
type CertificateAddParameter struct {
// Thumbprint - Get or sets the X.509 thumbprint of the certificate. This is a sequence of up to 40 hex digits (it may include spaces but these are removed).
Thumbprint *string `json:"thumbprint,omitempty"`
// ThumbprintAlgorithm - Gets or sets the algorithm used to derive the thumbprint. This must be sha1.
ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"`
// Data - Gets or sets the base64-encoded contents of the .pfx file containing the certificate. The maximum size is 10KB. This property is not populated by the Get Certificate operation.
Data *string `json:"data,omitempty"`
// CertificateFormat - Gets or sets the format of the certificate data. This must be pfx. Possible values include: 'Pfx', 'Cer', 'Unmapped'
CertificateFormat CertificateFormat `json:"certificateFormat,omitempty"`
// Password - Gets or sets the password to access the certificate's private key. This property is not populated by the Get Certificate operation.
Password *string `json:"password,omitempty"`
}
// CertificateListResult response to a CertificateOperations.List request.
type CertificateListResult struct {
autorest.Response `json:"-"`
// Value - Gets or sets the list of certificates.
Value *[]Certificate `json:"value,omitempty"`
// OdataNextLink - Gets or sets the URL to get the next set of results.
OdataNextLink *string `json:"odata.nextLink,omitempty"`
}
// CertificateListResultIterator provides access to a complete listing of Certificate values.
type CertificateListResultIterator struct {
i int
page CertificateListResultPage
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *CertificateListResultIterator) Next() error {
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err := iter.page.Next()
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter CertificateListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter CertificateListResultIterator) Response() CertificateListResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter CertificateListResultIterator) Value() Certificate {
if !iter.page.NotDone() {
return Certificate{}
}
return iter.page.Values()[iter.i]
}
// IsEmpty returns true if the ListResult contains no values.
func (clr CertificateListResult) IsEmpty() bool {
return clr.Value == nil || len(*clr.Value) == 0
}
// certificateListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (clr CertificateListResult) certificateListResultPreparer() (*http.Request, error) {
if clr.OdataNextLink == nil || len(to.String(clr.OdataNextLink)) < 1 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(clr.OdataNextLink)))
}
// CertificateListResultPage contains a page of Certificate values.
type CertificateListResultPage struct {
fn func(CertificateListResult) (CertificateListResult, error)
clr CertificateListResult
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *CertificateListResultPage) Next() error {
next, err := page.fn(page.clr)
if err != nil {
return err
}
page.clr = next
return nil
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page CertificateListResultPage) NotDone() bool {
return !page.clr.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page CertificateListResultPage) Response() CertificateListResult {
return page.clr
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page CertificateListResultPage) Values() []Certificate {
if page.clr.IsEmpty() {
return nil
}
return *page.clr.Value
}
// CertificateReference a reference to a certificate to be installed on compute nodes in a pool.
type CertificateReference struct {
// Thumbprint - Gets or sets the thumbprint of the certificate.
Thumbprint *string `json:"thumbprint,omitempty"`
// ThumbprintAlgorithm - Gets or sets the algorithm with which the thumbprint is associated. This must be sha1.
ThumbprintAlgorithm *string `json:"thumbprintAlgorithm,omitempty"`
// StoreLocation - Gets or sets the location of the certificate store on the compute node into which to install the certificate. The default value is CurrentUser. Possible values include: 'CertificateStoreLocationCurrentuser', 'CertificateStoreLocationLocalmachine', 'CertificateStoreLocationUnmapped'
StoreLocation CertificateStoreLocation `json:"storeLocation,omitempty"`
// StoreName - Gets or sets the name of the certificate store on the compute node into which to install the certificate. The default value is My.
StoreName *string `json:"storeName,omitempty"`
// Visibility - Gets or sets which user accounts on the compute node should have access to the private data of the certificate. This may be any subset of the values 'starttask', 'task' and 'rdp', separated by commas. The default is all accounts, corresponding to the string 'starttask,task,rdp'.
Visibility *string `json:"visibility,omitempty"`
}
// CloudJob an Azure Batch job.
type CloudJob struct {
autorest.Response `json:"-"`
// ID - Gets or sets a string that uniquely identifies the job within the account. The id can contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain more than 64 characters. It is common to use a GUID for the id.
ID *string `json:"id,omitempty"`
// DisplayName - Gets or sets the display name for the job.
DisplayName *string `json:"displayName,omitempty"`
// UsesTaskDependencies - Gets or sets the flag that determines if this job will use tasks with dependencies.
UsesTaskDependencies *bool `json:"usesTaskDependencies,omitempty"`
// URL - Gets or sets the URL of the job.
URL *string `json:"url,omitempty"`
// ETag - Gets or sets the ETag of the job.
ETag *string `json:"eTag,omitempty"`
// LastModified - Gets or sets the last modified time of the job.
LastModified *date.Time `json:"lastModified,omitempty"`
// CreationTime - Gets or sets the creation time of the job.
CreationTime *date.Time `json:"creationTime,omitempty"`
// State - Gets or sets the current state of the job. Possible values include: 'JobStateActive', 'JobStateDisabling', 'JobStateDisabled', 'JobStateEnabling', 'JobStateTerminating', 'JobStateCompleted', 'JobStateDeleting'
State JobState `json:"state,omitempty"`
// StateTransitionTime - Gets or sets the time at which the job entered its current state.
StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"`
// PreviousState - Gets or sets the previous state of the job. This property is not set if the job is in its initial Active state. Possible values include: 'JobStateActive', 'JobStateDisabling', 'JobStateDisabled', 'JobStateEnabling', 'JobStateTerminating', 'JobStateCompleted', 'JobStateDeleting'
PreviousState JobState `json:"previousState,omitempty"`
// PreviousStateTransitionTime - Gets or sets the time at which the job entered its previous state. This property is not set if the job is in its initial Active state.
PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"`
// Priority - Gets or sets the priority of the job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0.
Priority *int32 `json:"priority,omitempty"`
// Constraints - Gets or sets the execution constraints for the job.
Constraints *JobConstraints `json:"constraints,omitempty"`
// JobManagerTask - Gets or sets details of a Job Manager task to be launched when the job is started.
JobManagerTask *JobManagerTask `json:"jobManagerTask,omitempty"`
// JobPreparationTask - Gets or sets the Job Preparation task.
JobPreparationTask *JobPreparationTask `json:"jobPreparationTask,omitempty"`
// JobReleaseTask - Gets or sets the Job Release task.
JobReleaseTask *JobReleaseTask `json:"jobReleaseTask,omitempty"`
// CommonEnvironmentSettings - Gets or sets the list of common environment variable settings. These environment variables are set for all tasks in the job (including the Job Manager, Job Preparation and Job Release tasks).
CommonEnvironmentSettings *[]EnvironmentSetting `json:"commonEnvironmentSettings,omitempty"`
// PoolInfo - Gets or sets the pool on which the Batch service runs the job’s tasks.
PoolInfo *PoolInformation `json:"poolInfo,omitempty"`
// Metadata - Gets or sets a list of name-value pairs associated with the job as metadata.
Metadata *[]MetadataItem `json:"metadata,omitempty"`
// ExecutionInfo - Gets or sets the execution information for the job.
ExecutionInfo *JobExecutionInformation `json:"executionInfo,omitempty"`
// Stats - Gets or sets resource usage statistics for the entire lifetime of the job.
Stats *JobStatistics `json:"stats,omitempty"`
}
// CloudJobListPreparationAndReleaseTaskStatusResult response to a
// CloudJobOperations.ListPreparationAndReleaseTaskStatus request.
type CloudJobListPreparationAndReleaseTaskStatusResult struct {
autorest.Response `json:"-"`
// Value - Gets or sets a list of Job Preparation and Job Release task execution information.
Value *[]JobPreparationAndReleaseTaskExecutionInformation `json:"value,omitempty"`
// OdataNextLink - Gets or sets the URL to get the next set of results.
OdataNextLink *string `json:"odata.nextLink,omitempty"`
}
// CloudJobListPreparationAndReleaseTaskStatusResultIterator provides access to a complete listing of
// JobPreparationAndReleaseTaskExecutionInformation values.
type CloudJobListPreparationAndReleaseTaskStatusResultIterator struct {
i int
page CloudJobListPreparationAndReleaseTaskStatusResultPage
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *CloudJobListPreparationAndReleaseTaskStatusResultIterator) Next() error {
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err := iter.page.Next()
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter CloudJobListPreparationAndReleaseTaskStatusResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter CloudJobListPreparationAndReleaseTaskStatusResultIterator) Response() CloudJobListPreparationAndReleaseTaskStatusResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter CloudJobListPreparationAndReleaseTaskStatusResultIterator) Value() JobPreparationAndReleaseTaskExecutionInformation {
if !iter.page.NotDone() {
return JobPreparationAndReleaseTaskExecutionInformation{}
}
return iter.page.Values()[iter.i]
}
// IsEmpty returns true if the ListResult contains no values.
func (cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult) IsEmpty() bool {
return cjlpartsr.Value == nil || len(*cjlpartsr.Value) == 0
}
// cloudJobListPreparationAndReleaseTaskStatusResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult) cloudJobListPreparationAndReleaseTaskStatusResultPreparer() (*http.Request, error) {
if cjlpartsr.OdataNextLink == nil || len(to.String(cjlpartsr.OdataNextLink)) < 1 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cjlpartsr.OdataNextLink)))
}
// CloudJobListPreparationAndReleaseTaskStatusResultPage contains a page of
// JobPreparationAndReleaseTaskExecutionInformation values.
type CloudJobListPreparationAndReleaseTaskStatusResultPage struct {
fn func(CloudJobListPreparationAndReleaseTaskStatusResult) (CloudJobListPreparationAndReleaseTaskStatusResult, error)
cjlpartsr CloudJobListPreparationAndReleaseTaskStatusResult
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *CloudJobListPreparationAndReleaseTaskStatusResultPage) Next() error {
next, err := page.fn(page.cjlpartsr)
if err != nil {
return err
}
page.cjlpartsr = next
return nil
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page CloudJobListPreparationAndReleaseTaskStatusResultPage) NotDone() bool {
return !page.cjlpartsr.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page CloudJobListPreparationAndReleaseTaskStatusResultPage) Response() CloudJobListPreparationAndReleaseTaskStatusResult {
return page.cjlpartsr
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page CloudJobListPreparationAndReleaseTaskStatusResultPage) Values() []JobPreparationAndReleaseTaskExecutionInformation {
if page.cjlpartsr.IsEmpty() {
return nil
}
return *page.cjlpartsr.Value
}
// CloudJobListResult response to a CloudJobOperations.List or ListFromJobSchedule request.
type CloudJobListResult struct {
autorest.Response `json:"-"`
// Value - Gets or sets the list of jobs.
Value *[]CloudJob `json:"value,omitempty"`
// OdataNextLink - Gets or sets the URL to get the next set of results.
OdataNextLink *string `json:"odata.nextLink,omitempty"`
}
// CloudJobListResultIterator provides access to a complete listing of CloudJob values.
type CloudJobListResultIterator struct {
i int
page CloudJobListResultPage
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *CloudJobListResultIterator) Next() error {
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err := iter.page.Next()
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter CloudJobListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter CloudJobListResultIterator) Response() CloudJobListResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter CloudJobListResultIterator) Value() CloudJob {
if !iter.page.NotDone() {
return CloudJob{}
}
return iter.page.Values()[iter.i]
}
// IsEmpty returns true if the ListResult contains no values.
func (cjlr CloudJobListResult) IsEmpty() bool {
return cjlr.Value == nil || len(*cjlr.Value) == 0
}
// cloudJobListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (cjlr CloudJobListResult) cloudJobListResultPreparer() (*http.Request, error) {
if cjlr.OdataNextLink == nil || len(to.String(cjlr.OdataNextLink)) < 1 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cjlr.OdataNextLink)))
}
// CloudJobListResultPage contains a page of CloudJob values.
type CloudJobListResultPage struct {
fn func(CloudJobListResult) (CloudJobListResult, error)
cjlr CloudJobListResult
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *CloudJobListResultPage) Next() error {
next, err := page.fn(page.cjlr)
if err != nil {
return err
}
page.cjlr = next
return nil
}
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page CloudJobListResultPage) NotDone() bool {
return !page.cjlr.IsEmpty()
}
// Response returns the raw server response from the last page request.
func (page CloudJobListResultPage) Response() CloudJobListResult {
return page.cjlr
}
// Values returns the slice of values for the current page or nil if there are no values.
func (page CloudJobListResultPage) Values() []CloudJob {
if page.cjlr.IsEmpty() {
return nil
}
return *page.cjlr.Value
}
// CloudJobSchedule a job schedule that allows recurring jobs by specifying when to run jobs and a specification
// used to create each job.
type CloudJobSchedule struct {
autorest.Response `json:"-"`
// ID - Gets or sets a string that uniquely identifies the schedule within the account. A GUID is recommended.
ID *string `json:"id,omitempty"`
// DisplayName - Gets or sets the display name for the schedule.
DisplayName *string `json:"displayName,omitempty"`
// URL - Gets or sets the URL of the job schedule.
URL *string `json:"url,omitempty"`
// ETag - Gets or sets the ETag of the job schedule.
ETag *string `json:"eTag,omitempty"`
// LastModified - Gets or sets the last modified time of the job schedule.
LastModified *date.Time `json:"lastModified,omitempty"`
// CreationTime - Gets or sets the creation time of the job schedule.
CreationTime *date.Time `json:"creationTime,omitempty"`
// State - Gets or sets the current state of the job schedule. Possible values include: 'JobScheduleStateActive', 'JobScheduleStateCompleted', 'JobScheduleStateDisabled', 'JobScheduleStateTerminating', 'JobScheduleStateDeleting'
State JobScheduleState `json:"state,omitempty"`
// StateTransitionTime - Gets or sets the time at which the job schedule entered the current state.
StateTransitionTime *date.Time `json:"stateTransitionTime,omitempty"`
// PreviousState - Gets or sets the previous state of the job schedule. Possible values include: 'JobScheduleStateActive', 'JobScheduleStateCompleted', 'JobScheduleStateDisabled', 'JobScheduleStateTerminating', 'JobScheduleStateDeleting'
PreviousState JobScheduleState `json:"previousState,omitempty"`
// PreviousStateTransitionTime - Gets or sets the time at which the job schedule entered its previous state.
PreviousStateTransitionTime *date.Time `json:"previousStateTransitionTime,omitempty"`
// Schedule - Gets or sets the schedule according to which jobs will be created.
Schedule *Schedule `json:"schedule,omitempty"`
// JobSpecification - Gets or sets the details of the jobs to be created on this schedule.
JobSpecification *JobSpecification `json:"jobSpecification,omitempty"`
// ExecutionInfo - Gets or sets information about jobs that have been and will be run under this schedule.
ExecutionInfo *JobScheduleExecutionInformation `json:"executionInfo,omitempty"`
// Metadata - Gets or sets a list of name-value pairs associated with the schedule as metadata.
Metadata *[]MetadataItem `json:"metadata,omitempty"`
// Stats - Gets or sets the lifetime resource usage statistics for the job schedule.
Stats *JobScheduleStatistics `json:"stats,omitempty"`
}
// CloudJobScheduleListResult response to a CloudJobScheduleOperations.List request.
type CloudJobScheduleListResult struct {
autorest.Response `json:"-"`
// Value - Gets or sets the list of job schedules.
Value *[]CloudJobSchedule `json:"value,omitempty"`
// OdataNextLink - Gets or sets the URL to get the next set of results.
OdataNextLink *string `json:"odata.nextLink,omitempty"`
}
// CloudJobScheduleListResultIterator provides access to a complete listing of CloudJobSchedule values.
type CloudJobScheduleListResultIterator struct {
i int
page CloudJobScheduleListResultPage
}
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
func (iter *CloudJobScheduleListResultIterator) Next() error {
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
err := iter.page.Next()
if err != nil {
iter.i--
return err
}
iter.i = 0
return nil
}
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter CloudJobScheduleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
func (iter CloudJobScheduleListResultIterator) Response() CloudJobScheduleListResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
func (iter CloudJobScheduleListResultIterator) Value() CloudJobSchedule {
if !iter.page.NotDone() {
return CloudJobSchedule{}
}
return iter.page.Values()[iter.i]
}
// IsEmpty returns true if the ListResult contains no values.
func (cjslr CloudJobScheduleListResult) IsEmpty() bool {
return cjslr.Value == nil || len(*cjslr.Value) == 0
}
// cloudJobScheduleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
func (cjslr CloudJobScheduleListResult) cloudJobScheduleListResultPreparer() (*http.Request, error) {
if cjslr.OdataNextLink == nil || len(to.String(cjslr.OdataNextLink)) < 1 {
return nil, nil
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cjslr.OdataNextLink)))
}
// CloudJobScheduleListResultPage contains a page of CloudJobSchedule values.
type CloudJobScheduleListResultPage struct {
fn func(CloudJobScheduleListResult) (CloudJobScheduleListResult, error)
cjslr CloudJobScheduleListResult
}
// Next advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
func (page *CloudJobScheduleListResultPage) Next() error {
next, err := page.fn(page.cjslr)
if err != nil {
return err
}
page.cjslr = next
return nil
}
// NotDone returns true if the page enumeration should be started or is not yet complete.