-
Notifications
You must be signed in to change notification settings - Fork 797
/
models.go
4019 lines (3722 loc) · 172 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 servicefabric
// 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 (
"context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
// The package's fully qualified name.
const fqdn = "github.com/Azure/azure-sdk-for-go/services/servicefabric/mgmt/2019-03-01/servicefabric"
// ArmServicePackageActivationMode enumerates the values for arm service package activation mode.
type ArmServicePackageActivationMode string
const (
// ExclusiveProcess Indicates the application package activation mode will use exclusive process.
ExclusiveProcess ArmServicePackageActivationMode = "ExclusiveProcess"
// SharedProcess Indicates the application package activation mode will use shared process.
SharedProcess ArmServicePackageActivationMode = "SharedProcess"
)
// PossibleArmServicePackageActivationModeValues returns an array of possible values for the ArmServicePackageActivationMode const type.
func PossibleArmServicePackageActivationModeValues() []ArmServicePackageActivationMode {
return []ArmServicePackageActivationMode{ExclusiveProcess, SharedProcess}
}
// ClusterState enumerates the values for cluster state.
type ClusterState string
const (
// AutoScale ...
AutoScale ClusterState = "AutoScale"
// BaselineUpgrade ...
BaselineUpgrade ClusterState = "BaselineUpgrade"
// Deploying ...
Deploying ClusterState = "Deploying"
// EnforcingClusterVersion ...
EnforcingClusterVersion ClusterState = "EnforcingClusterVersion"
// Ready ...
Ready ClusterState = "Ready"
// UpdatingInfrastructure ...
UpdatingInfrastructure ClusterState = "UpdatingInfrastructure"
// UpdatingUserCertificate ...
UpdatingUserCertificate ClusterState = "UpdatingUserCertificate"
// UpdatingUserConfiguration ...
UpdatingUserConfiguration ClusterState = "UpdatingUserConfiguration"
// UpgradeServiceUnreachable ...
UpgradeServiceUnreachable ClusterState = "UpgradeServiceUnreachable"
// WaitingForNodes ...
WaitingForNodes ClusterState = "WaitingForNodes"
)
// PossibleClusterStateValues returns an array of possible values for the ClusterState const type.
func PossibleClusterStateValues() []ClusterState {
return []ClusterState{AutoScale, BaselineUpgrade, Deploying, EnforcingClusterVersion, Ready, UpdatingInfrastructure, UpdatingUserCertificate, UpdatingUserConfiguration, UpgradeServiceUnreachable, WaitingForNodes}
}
// DurabilityLevel enumerates the values for durability level.
type DurabilityLevel string
const (
// Bronze ...
Bronze DurabilityLevel = "Bronze"
// Gold ...
Gold DurabilityLevel = "Gold"
// Silver ...
Silver DurabilityLevel = "Silver"
)
// PossibleDurabilityLevelValues returns an array of possible values for the DurabilityLevel const type.
func PossibleDurabilityLevelValues() []DurabilityLevel {
return []DurabilityLevel{Bronze, Gold, Silver}
}
// Environment enumerates the values for environment.
type Environment string
const (
// Linux ...
Linux Environment = "Linux"
// Windows ...
Windows Environment = "Windows"
)
// PossibleEnvironmentValues returns an array of possible values for the Environment const type.
func PossibleEnvironmentValues() []Environment {
return []Environment{Linux, Windows}
}
// MoveCost enumerates the values for move cost.
type MoveCost string
const (
// High Specifies the move cost of the service as High. The value is 3.
High MoveCost = "High"
// Low Specifies the move cost of the service as Low. The value is 1.
Low MoveCost = "Low"
// Medium Specifies the move cost of the service as Medium. The value is 2.
Medium MoveCost = "Medium"
// Zero Zero move cost. This value is zero.
Zero MoveCost = "Zero"
)
// PossibleMoveCostValues returns an array of possible values for the MoveCost const type.
func PossibleMoveCostValues() []MoveCost {
return []MoveCost{High, Low, Medium, Zero}
}
// PartitionScheme enumerates the values for partition scheme.
type PartitionScheme string
const (
// Invalid Indicates the partition kind is invalid. All Service Fabric enumerations have the invalid type.
// The value is zero.
Invalid PartitionScheme = "Invalid"
// Named Indicates that the partition is based on string names, and is a NamedPartitionSchemeDescription
// object. The value is 3
Named PartitionScheme = "Named"
// Singleton Indicates that the partition is based on string names, and is a
// SingletonPartitionSchemeDescription object, The value is 1.
Singleton PartitionScheme = "Singleton"
// UniformInt64Range Indicates that the partition is based on Int64 key ranges, and is a
// UniformInt64RangePartitionSchemeDescription object. The value is 2.
UniformInt64Range PartitionScheme = "UniformInt64Range"
)
// PossiblePartitionSchemeValues returns an array of possible values for the PartitionScheme const type.
func PossiblePartitionSchemeValues() []PartitionScheme {
return []PartitionScheme{Invalid, Named, Singleton, UniformInt64Range}
}
// PartitionSchemeBasicPartitionSchemeDescription enumerates the values for partition scheme basic partition
// scheme description.
type PartitionSchemeBasicPartitionSchemeDescription string
const (
// PartitionSchemeNamed ...
PartitionSchemeNamed PartitionSchemeBasicPartitionSchemeDescription = "Named"
// PartitionSchemePartitionSchemeDescription ...
PartitionSchemePartitionSchemeDescription PartitionSchemeBasicPartitionSchemeDescription = "PartitionSchemeDescription"
// PartitionSchemeSingleton ...
PartitionSchemeSingleton PartitionSchemeBasicPartitionSchemeDescription = "Singleton"
// PartitionSchemeUniformInt64Range ...
PartitionSchemeUniformInt64Range PartitionSchemeBasicPartitionSchemeDescription = "UniformInt64Range"
)
// PossiblePartitionSchemeBasicPartitionSchemeDescriptionValues returns an array of possible values for the PartitionSchemeBasicPartitionSchemeDescription const type.
func PossiblePartitionSchemeBasicPartitionSchemeDescriptionValues() []PartitionSchemeBasicPartitionSchemeDescription {
return []PartitionSchemeBasicPartitionSchemeDescription{PartitionSchemeNamed, PartitionSchemePartitionSchemeDescription, PartitionSchemeSingleton, PartitionSchemeUniformInt64Range}
}
// ProvisioningState enumerates the values for provisioning state.
type ProvisioningState string
const (
// Canceled ...
Canceled ProvisioningState = "Canceled"
// Failed ...
Failed ProvisioningState = "Failed"
// Succeeded ...
Succeeded ProvisioningState = "Succeeded"
// Updating ...
Updating ProvisioningState = "Updating"
)
// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
func PossibleProvisioningStateValues() []ProvisioningState {
return []ProvisioningState{Canceled, Failed, Succeeded, Updating}
}
// ReliabilityLevel enumerates the values for reliability level.
type ReliabilityLevel string
const (
// ReliabilityLevelBronze ...
ReliabilityLevelBronze ReliabilityLevel = "Bronze"
// ReliabilityLevelGold ...
ReliabilityLevelGold ReliabilityLevel = "Gold"
// ReliabilityLevelNone ...
ReliabilityLevelNone ReliabilityLevel = "None"
// ReliabilityLevelPlatinum ...
ReliabilityLevelPlatinum ReliabilityLevel = "Platinum"
// ReliabilityLevelSilver ...
ReliabilityLevelSilver ReliabilityLevel = "Silver"
)
// PossibleReliabilityLevelValues returns an array of possible values for the ReliabilityLevel const type.
func PossibleReliabilityLevelValues() []ReliabilityLevel {
return []ReliabilityLevel{ReliabilityLevelBronze, ReliabilityLevelGold, ReliabilityLevelNone, ReliabilityLevelPlatinum, ReliabilityLevelSilver}
}
// ReliabilityLevel1 enumerates the values for reliability level 1.
type ReliabilityLevel1 string
const (
// ReliabilityLevel1Bronze ...
ReliabilityLevel1Bronze ReliabilityLevel1 = "Bronze"
// ReliabilityLevel1Gold ...
ReliabilityLevel1Gold ReliabilityLevel1 = "Gold"
// ReliabilityLevel1None ...
ReliabilityLevel1None ReliabilityLevel1 = "None"
// ReliabilityLevel1Platinum ...
ReliabilityLevel1Platinum ReliabilityLevel1 = "Platinum"
// ReliabilityLevel1Silver ...
ReliabilityLevel1Silver ReliabilityLevel1 = "Silver"
)
// PossibleReliabilityLevel1Values returns an array of possible values for the ReliabilityLevel1 const type.
func PossibleReliabilityLevel1Values() []ReliabilityLevel1 {
return []ReliabilityLevel1{ReliabilityLevel1Bronze, ReliabilityLevel1Gold, ReliabilityLevel1None, ReliabilityLevel1Platinum, ReliabilityLevel1Silver}
}
// ServiceCorrelationScheme enumerates the values for service correlation scheme.
type ServiceCorrelationScheme string
const (
// ServiceCorrelationSchemeAffinity Indicates that this service has an affinity relationship with another
// service. Provided for backwards compatibility, consider preferring the Aligned or NonAlignedAffinity
// options. The value is 1.
ServiceCorrelationSchemeAffinity ServiceCorrelationScheme = "Affinity"
// ServiceCorrelationSchemeAlignedAffinity Aligned affinity ensures that the primaries of the partitions of
// the affinitized services are collocated on the same nodes. This is the default and is the same as
// selecting the Affinity scheme. The value is 2.
ServiceCorrelationSchemeAlignedAffinity ServiceCorrelationScheme = "AlignedAffinity"
// ServiceCorrelationSchemeInvalid An invalid correlation scheme. Cannot be used. The value is zero.
ServiceCorrelationSchemeInvalid ServiceCorrelationScheme = "Invalid"
// ServiceCorrelationSchemeNonAlignedAffinity Non-Aligned affinity guarantees that all replicas of each
// service will be placed on the same nodes. Unlike Aligned Affinity, this does not guarantee that replicas
// of particular role will be collocated. The value is 3.
ServiceCorrelationSchemeNonAlignedAffinity ServiceCorrelationScheme = "NonAlignedAffinity"
)
// PossibleServiceCorrelationSchemeValues returns an array of possible values for the ServiceCorrelationScheme const type.
func PossibleServiceCorrelationSchemeValues() []ServiceCorrelationScheme {
return []ServiceCorrelationScheme{ServiceCorrelationSchemeAffinity, ServiceCorrelationSchemeAlignedAffinity, ServiceCorrelationSchemeInvalid, ServiceCorrelationSchemeNonAlignedAffinity}
}
// ServiceKind enumerates the values for service kind.
type ServiceKind string
const (
// ServiceKindInvalid Indicates the service kind is invalid. All Service Fabric enumerations have the
// invalid type. The value is zero.
ServiceKindInvalid ServiceKind = "Invalid"
// ServiceKindStateful Uses Service Fabric to make its state or part of its state highly available and
// reliable. The value is 2.
ServiceKindStateful ServiceKind = "Stateful"
// ServiceKindStateless Does not use Service Fabric to make its state highly available or reliable. The
// value is 1.
ServiceKindStateless ServiceKind = "Stateless"
)
// PossibleServiceKindValues returns an array of possible values for the ServiceKind const type.
func PossibleServiceKindValues() []ServiceKind {
return []ServiceKind{ServiceKindInvalid, ServiceKindStateful, ServiceKindStateless}
}
// ServiceKindBasicServiceResourceProperties enumerates the values for service kind basic service resource
// properties.
type ServiceKindBasicServiceResourceProperties string
const (
// ServiceKindServiceResourceProperties ...
ServiceKindServiceResourceProperties ServiceKindBasicServiceResourceProperties = "ServiceResourceProperties"
// ServiceKindStateful1 ...
ServiceKindStateful1 ServiceKindBasicServiceResourceProperties = "Stateful"
// ServiceKindStateless1 ...
ServiceKindStateless1 ServiceKindBasicServiceResourceProperties = "Stateless"
)
// PossibleServiceKindBasicServiceResourcePropertiesValues returns an array of possible values for the ServiceKindBasicServiceResourceProperties const type.
func PossibleServiceKindBasicServiceResourcePropertiesValues() []ServiceKindBasicServiceResourceProperties {
return []ServiceKindBasicServiceResourceProperties{ServiceKindServiceResourceProperties, ServiceKindStateful1, ServiceKindStateless1}
}
// ServiceKindBasicServiceResourceUpdateProperties enumerates the values for service kind basic service
// resource update properties.
type ServiceKindBasicServiceResourceUpdateProperties string
const (
// ServiceKindBasicServiceResourceUpdatePropertiesServiceKindServiceResourceUpdateProperties ...
ServiceKindBasicServiceResourceUpdatePropertiesServiceKindServiceResourceUpdateProperties ServiceKindBasicServiceResourceUpdateProperties = "ServiceResourceUpdateProperties"
// ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful ...
ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful ServiceKindBasicServiceResourceUpdateProperties = "Stateful"
// ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless ...
ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless ServiceKindBasicServiceResourceUpdateProperties = "Stateless"
)
// PossibleServiceKindBasicServiceResourceUpdatePropertiesValues returns an array of possible values for the ServiceKindBasicServiceResourceUpdateProperties const type.
func PossibleServiceKindBasicServiceResourceUpdatePropertiesValues() []ServiceKindBasicServiceResourceUpdateProperties {
return []ServiceKindBasicServiceResourceUpdateProperties{ServiceKindBasicServiceResourceUpdatePropertiesServiceKindServiceResourceUpdateProperties, ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateful, ServiceKindBasicServiceResourceUpdatePropertiesServiceKindStateless}
}
// ServiceLoadMetricWeight enumerates the values for service load metric weight.
type ServiceLoadMetricWeight string
const (
// ServiceLoadMetricWeightHigh Specifies the metric weight of the service load as High. The value is 3.
ServiceLoadMetricWeightHigh ServiceLoadMetricWeight = "High"
// ServiceLoadMetricWeightLow Specifies the metric weight of the service load as Low. The value is 1.
ServiceLoadMetricWeightLow ServiceLoadMetricWeight = "Low"
// ServiceLoadMetricWeightMedium Specifies the metric weight of the service load as Medium. The value is 2.
ServiceLoadMetricWeightMedium ServiceLoadMetricWeight = "Medium"
// ServiceLoadMetricWeightZero Disables resource balancing for this metric. This value is zero.
ServiceLoadMetricWeightZero ServiceLoadMetricWeight = "Zero"
)
// PossibleServiceLoadMetricWeightValues returns an array of possible values for the ServiceLoadMetricWeight const type.
func PossibleServiceLoadMetricWeightValues() []ServiceLoadMetricWeight {
return []ServiceLoadMetricWeight{ServiceLoadMetricWeightHigh, ServiceLoadMetricWeightLow, ServiceLoadMetricWeightMedium, ServiceLoadMetricWeightZero}
}
// ServicePlacementPolicyType enumerates the values for service placement policy type.
type ServicePlacementPolicyType string
const (
// ServicePlacementPolicyTypeInvalid Indicates the type of the placement policy is invalid. All Service
// Fabric enumerations have the invalid type. The value is zero.
ServicePlacementPolicyTypeInvalid ServicePlacementPolicyType = "Invalid"
// ServicePlacementPolicyTypeInvalidDomain Indicates that the ServicePlacementPolicyDescription is of type
// ServicePlacementInvalidDomainPolicyDescription, which indicates that a particular fault or upgrade
// domain cannot be used for placement of this service. The value is 1.
ServicePlacementPolicyTypeInvalidDomain ServicePlacementPolicyType = "InvalidDomain"
// ServicePlacementPolicyTypeNonPartiallyPlaceService Indicates that the ServicePlacementPolicyDescription
// is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible
// all replicas of a particular partition of the service should be placed atomically. The value is 5.
ServicePlacementPolicyTypeNonPartiallyPlaceService ServicePlacementPolicyType = "NonPartiallyPlaceService"
// ServicePlacementPolicyTypePreferredPrimaryDomain Indicates that the ServicePlacementPolicyDescription is
// of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the
// Primary replica for the partitions of the service should be located in a particular domain as an
// optimization. The value is 3.
ServicePlacementPolicyTypePreferredPrimaryDomain ServicePlacementPolicyType = "PreferredPrimaryDomain"
// ServicePlacementPolicyTypeRequiredDomain Indicates that the ServicePlacementPolicyDescription is of type
// ServicePlacementRequireDomainDistributionPolicyDescription indicating that the replicas of the service
// must be placed in a specific domain. The value is 2.
ServicePlacementPolicyTypeRequiredDomain ServicePlacementPolicyType = "RequiredDomain"
// ServicePlacementPolicyTypeRequiredDomainDistribution Indicates that the
// ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription,
// indicating that the system will disallow placement of any two replicas from the same partition in the
// same domain at any time. The value is 4.
ServicePlacementPolicyTypeRequiredDomainDistribution ServicePlacementPolicyType = "RequiredDomainDistribution"
)
// PossibleServicePlacementPolicyTypeValues returns an array of possible values for the ServicePlacementPolicyType const type.
func PossibleServicePlacementPolicyTypeValues() []ServicePlacementPolicyType {
return []ServicePlacementPolicyType{ServicePlacementPolicyTypeInvalid, ServicePlacementPolicyTypeInvalidDomain, ServicePlacementPolicyTypeNonPartiallyPlaceService, ServicePlacementPolicyTypePreferredPrimaryDomain, ServicePlacementPolicyTypeRequiredDomain, ServicePlacementPolicyTypeRequiredDomainDistribution}
}
// Type enumerates the values for type.
type Type string
const (
// TypeServicePlacementPolicyDescription ...
TypeServicePlacementPolicyDescription Type = "ServicePlacementPolicyDescription"
)
// PossibleTypeValues returns an array of possible values for the Type const type.
func PossibleTypeValues() []Type {
return []Type{TypeServicePlacementPolicyDescription}
}
// UpgradeMode enumerates the values for upgrade mode.
type UpgradeMode string
const (
// Automatic ...
Automatic UpgradeMode = "Automatic"
// Manual ...
Manual UpgradeMode = "Manual"
)
// PossibleUpgradeModeValues returns an array of possible values for the UpgradeMode const type.
func PossibleUpgradeModeValues() []UpgradeMode {
return []UpgradeMode{Automatic, Manual}
}
// UpgradeMode1 enumerates the values for upgrade mode 1.
type UpgradeMode1 string
const (
// UpgradeMode1Automatic ...
UpgradeMode1Automatic UpgradeMode1 = "Automatic"
// UpgradeMode1Manual ...
UpgradeMode1Manual UpgradeMode1 = "Manual"
)
// PossibleUpgradeMode1Values returns an array of possible values for the UpgradeMode1 const type.
func PossibleUpgradeMode1Values() []UpgradeMode1 {
return []UpgradeMode1{UpgradeMode1Automatic, UpgradeMode1Manual}
}
// X509StoreName enumerates the values for x509 store name.
type X509StoreName string
const (
// AddressBook ...
AddressBook X509StoreName = "AddressBook"
// AuthRoot ...
AuthRoot X509StoreName = "AuthRoot"
// CertificateAuthority ...
CertificateAuthority X509StoreName = "CertificateAuthority"
// Disallowed ...
Disallowed X509StoreName = "Disallowed"
// My ...
My X509StoreName = "My"
// Root ...
Root X509StoreName = "Root"
// TrustedPeople ...
TrustedPeople X509StoreName = "TrustedPeople"
// TrustedPublisher ...
TrustedPublisher X509StoreName = "TrustedPublisher"
)
// PossibleX509StoreNameValues returns an array of possible values for the X509StoreName const type.
func PossibleX509StoreNameValues() []X509StoreName {
return []X509StoreName{AddressBook, AuthRoot, CertificateAuthority, Disallowed, My, Root, TrustedPeople, TrustedPublisher}
}
// X509StoreName1 enumerates the values for x509 store name 1.
type X509StoreName1 string
const (
// X509StoreName1AddressBook ...
X509StoreName1AddressBook X509StoreName1 = "AddressBook"
// X509StoreName1AuthRoot ...
X509StoreName1AuthRoot X509StoreName1 = "AuthRoot"
// X509StoreName1CertificateAuthority ...
X509StoreName1CertificateAuthority X509StoreName1 = "CertificateAuthority"
// X509StoreName1Disallowed ...
X509StoreName1Disallowed X509StoreName1 = "Disallowed"
// X509StoreName1My ...
X509StoreName1My X509StoreName1 = "My"
// X509StoreName1Root ...
X509StoreName1Root X509StoreName1 = "Root"
// X509StoreName1TrustedPeople ...
X509StoreName1TrustedPeople X509StoreName1 = "TrustedPeople"
// X509StoreName1TrustedPublisher ...
X509StoreName1TrustedPublisher X509StoreName1 = "TrustedPublisher"
)
// PossibleX509StoreName1Values returns an array of possible values for the X509StoreName1 const type.
func PossibleX509StoreName1Values() []X509StoreName1 {
return []X509StoreName1{X509StoreName1AddressBook, X509StoreName1AuthRoot, X509StoreName1CertificateAuthority, X509StoreName1Disallowed, X509StoreName1My, X509StoreName1Root, X509StoreName1TrustedPeople, X509StoreName1TrustedPublisher}
}
// ApplicationDeltaHealthPolicy defines a delta health policy used to evaluate the health of an application
// or one of its child entities when upgrading the cluster.
type ApplicationDeltaHealthPolicy struct {
// DefaultServiceTypeDeltaHealthPolicy - The delta health policy used by default to evaluate the health of a service type when upgrading the cluster.
DefaultServiceTypeDeltaHealthPolicy *ServiceTypeDeltaHealthPolicy `json:"defaultServiceTypeDeltaHealthPolicy,omitempty"`
// ServiceTypeDeltaHealthPolicies - The map with service type delta health policy per service type name. The map is empty by default.
ServiceTypeDeltaHealthPolicies map[string]*ServiceTypeDeltaHealthPolicy `json:"serviceTypeDeltaHealthPolicies"`
}
// MarshalJSON is the custom marshaler for ApplicationDeltaHealthPolicy.
func (adhp ApplicationDeltaHealthPolicy) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if adhp.DefaultServiceTypeDeltaHealthPolicy != nil {
objectMap["defaultServiceTypeDeltaHealthPolicy"] = adhp.DefaultServiceTypeDeltaHealthPolicy
}
if adhp.ServiceTypeDeltaHealthPolicies != nil {
objectMap["serviceTypeDeltaHealthPolicies"] = adhp.ServiceTypeDeltaHealthPolicies
}
return json.Marshal(objectMap)
}
// ApplicationHealthPolicy defines a health policy used to evaluate the health of an application or one of
// its children entities.
type ApplicationHealthPolicy struct {
// DefaultServiceTypeHealthPolicy - The health policy used by default to evaluate the health of a service type.
DefaultServiceTypeHealthPolicy *ServiceTypeHealthPolicy `json:"defaultServiceTypeHealthPolicy,omitempty"`
// ServiceTypeHealthPolicies - The map with service type health policy per service type name. The map is empty by default.
ServiceTypeHealthPolicies map[string]*ServiceTypeHealthPolicy `json:"serviceTypeHealthPolicies"`
}
// MarshalJSON is the custom marshaler for ApplicationHealthPolicy.
func (ahp ApplicationHealthPolicy) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if ahp.DefaultServiceTypeHealthPolicy != nil {
objectMap["defaultServiceTypeHealthPolicy"] = ahp.DefaultServiceTypeHealthPolicy
}
if ahp.ServiceTypeHealthPolicies != nil {
objectMap["serviceTypeHealthPolicies"] = ahp.ServiceTypeHealthPolicies
}
return json.Marshal(objectMap)
}
// ApplicationMetricDescription describes capacity information for a custom resource balancing metric. This
// can be used to limit the total consumption of this metric by the services of this application.
type ApplicationMetricDescription struct {
// Name - The name of the metric.
Name *string `json:"Name,omitempty"`
// MaximumCapacity - The maximum node capacity for Service Fabric application.
// This is the maximum Load for an instance of this application on a single node. Even if the capacity of node is greater than this value, Service Fabric will limit the total load of services within the application on each node to this value.
// If set to zero, capacity for this metric is unlimited on each node.
// When creating a new application with application capacity defined, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity.
// When updating existing application with application capacity, the product of MaximumNodes and this value must always be smaller than or equal to TotalApplicationCapacity.
MaximumCapacity *int64 `json:"MaximumCapacity,omitempty"`
// ReservationCapacity - The node reservation capacity for Service Fabric application.
// This is the amount of load which is reserved on nodes which have instances of this application.
// If MinimumNodes is specified, then the product of these values will be the capacity reserved in the cluster for the application.
// If set to zero, no capacity is reserved for this metric.
// When setting application capacity or when updating application capacity; this value must be smaller than or equal to MaximumCapacity for each metric.
ReservationCapacity *int64 `json:"ReservationCapacity,omitempty"`
// TotalApplicationCapacity - The total metric capacity for Service Fabric application.
// This is the total metric capacity for this application in the cluster. Service Fabric will try to limit the sum of loads of services within the application to this value.
// When creating a new application with application capacity defined, the product of MaximumNodes and MaximumCapacity must always be smaller than or equal to this value.
TotalApplicationCapacity *int64 `json:"TotalApplicationCapacity,omitempty"`
}
// ApplicationResource the application resource.
type ApplicationResource struct {
autorest.Response `json:"-"`
// ApplicationResourceProperties - The application resource properties.
*ApplicationResourceProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Azure resource identifier.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Azure resource name.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; Azure resource type.
Type *string `json:"type,omitempty"`
// Location - Azure resource location.
Location *string `json:"location,omitempty"`
}
// MarshalJSON is the custom marshaler for ApplicationResource.
func (ar ApplicationResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if ar.ApplicationResourceProperties != nil {
objectMap["properties"] = ar.ApplicationResourceProperties
}
if ar.Location != nil {
objectMap["location"] = ar.Location
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ApplicationResource struct.
func (ar *ApplicationResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var applicationResourceProperties ApplicationResourceProperties
err = json.Unmarshal(*v, &applicationResourceProperties)
if err != nil {
return err
}
ar.ApplicationResourceProperties = &applicationResourceProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
ar.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
ar.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
ar.Type = &typeVar
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
ar.Location = &location
}
}
}
return nil
}
// ApplicationResourceList the list of application resources.
type ApplicationResourceList struct {
autorest.Response `json:"-"`
Value *[]ApplicationResource `json:"value,omitempty"`
}
// ApplicationResourceProperties the application resource properties.
type ApplicationResourceProperties struct {
// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response
ProvisioningState *string `json:"provisioningState,omitempty"`
// TypeName - The application type name as defined in the application manifest.
TypeName *string `json:"typeName,omitempty"`
// TypeVersion - The version of the application type as defined in the application manifest.
TypeVersion *string `json:"typeVersion,omitempty"`
// Parameters - List of application parameters with overridden values from their default values specified in the application manifest.
Parameters map[string]*string `json:"parameters"`
// UpgradePolicy - Describes the policy for a monitored application upgrade.
UpgradePolicy *ApplicationUpgradePolicy `json:"upgradePolicy,omitempty"`
// MinimumNodes - The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of the MaximumNodes property.
MinimumNodes *int64 `json:"minimumNodes,omitempty"`
// MaximumNodes - The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. By default, the value of this property is zero and it means that the services can be placed on any node.
MaximumNodes *int64 `json:"maximumNodes,omitempty"`
// RemoveApplicationCapacity - Remove the current application capacity settings.
RemoveApplicationCapacity *bool `json:"removeApplicationCapacity,omitempty"`
// Metrics - List of application capacity metric description.
Metrics *[]ApplicationMetricDescription `json:"metrics,omitempty"`
}
// MarshalJSON is the custom marshaler for ApplicationResourceProperties.
func (arp ApplicationResourceProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if arp.TypeName != nil {
objectMap["typeName"] = arp.TypeName
}
if arp.TypeVersion != nil {
objectMap["typeVersion"] = arp.TypeVersion
}
if arp.Parameters != nil {
objectMap["parameters"] = arp.Parameters
}
if arp.UpgradePolicy != nil {
objectMap["upgradePolicy"] = arp.UpgradePolicy
}
if arp.MinimumNodes != nil {
objectMap["minimumNodes"] = arp.MinimumNodes
}
if arp.MaximumNodes != nil {
objectMap["maximumNodes"] = arp.MaximumNodes
}
if arp.RemoveApplicationCapacity != nil {
objectMap["removeApplicationCapacity"] = arp.RemoveApplicationCapacity
}
if arp.Metrics != nil {
objectMap["metrics"] = arp.Metrics
}
return json.Marshal(objectMap)
}
// ApplicationResourceUpdate the application resource for patch operations.
type ApplicationResourceUpdate struct {
autorest.Response `json:"-"`
// ApplicationResourceUpdateProperties - The application resource properties for patch operations.
*ApplicationResourceUpdateProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Azure resource identifier.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Azure resource name.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; Azure resource type.
Type *string `json:"type,omitempty"`
// Location - Azure resource location.
Location *string `json:"location,omitempty"`
}
// MarshalJSON is the custom marshaler for ApplicationResourceUpdate.
func (aru ApplicationResourceUpdate) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if aru.ApplicationResourceUpdateProperties != nil {
objectMap["properties"] = aru.ApplicationResourceUpdateProperties
}
if aru.Location != nil {
objectMap["location"] = aru.Location
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ApplicationResourceUpdate struct.
func (aru *ApplicationResourceUpdate) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var applicationResourceUpdateProperties ApplicationResourceUpdateProperties
err = json.Unmarshal(*v, &applicationResourceUpdateProperties)
if err != nil {
return err
}
aru.ApplicationResourceUpdateProperties = &applicationResourceUpdateProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
aru.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
aru.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
aru.Type = &typeVar
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
aru.Location = &location
}
}
}
return nil
}
// ApplicationResourceUpdateProperties the application resource properties for patch operations.
type ApplicationResourceUpdateProperties struct {
// TypeVersion - The version of the application type as defined in the application manifest.
TypeVersion *string `json:"typeVersion,omitempty"`
// Parameters - List of application parameters with overridden values from their default values specified in the application manifest.
Parameters map[string]*string `json:"parameters"`
// UpgradePolicy - Describes the policy for a monitored application upgrade.
UpgradePolicy *ApplicationUpgradePolicy `json:"upgradePolicy,omitempty"`
// MinimumNodes - The minimum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. If this property is set to zero, no capacity will be reserved. The value of this property cannot be more than the value of the MaximumNodes property.
MinimumNodes *int64 `json:"minimumNodes,omitempty"`
// MaximumNodes - The maximum number of nodes where Service Fabric will reserve capacity for this application. Note that this does not mean that the services of this application will be placed on all of those nodes. By default, the value of this property is zero and it means that the services can be placed on any node.
MaximumNodes *int64 `json:"maximumNodes,omitempty"`
// RemoveApplicationCapacity - Remove the current application capacity settings.
RemoveApplicationCapacity *bool `json:"removeApplicationCapacity,omitempty"`
// Metrics - List of application capacity metric description.
Metrics *[]ApplicationMetricDescription `json:"metrics,omitempty"`
}
// MarshalJSON is the custom marshaler for ApplicationResourceUpdateProperties.
func (arup ApplicationResourceUpdateProperties) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if arup.TypeVersion != nil {
objectMap["typeVersion"] = arup.TypeVersion
}
if arup.Parameters != nil {
objectMap["parameters"] = arup.Parameters
}
if arup.UpgradePolicy != nil {
objectMap["upgradePolicy"] = arup.UpgradePolicy
}
if arup.MinimumNodes != nil {
objectMap["minimumNodes"] = arup.MinimumNodes
}
if arup.MaximumNodes != nil {
objectMap["maximumNodes"] = arup.MaximumNodes
}
if arup.RemoveApplicationCapacity != nil {
objectMap["removeApplicationCapacity"] = arup.RemoveApplicationCapacity
}
if arup.Metrics != nil {
objectMap["metrics"] = arup.Metrics
}
return json.Marshal(objectMap)
}
// ApplicationsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ApplicationsCreateFuture struct {
azure.Future
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future *ApplicationsCreateFuture) Result(client ApplicationsClient) (ar ApplicationResource, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsCreateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationsCreateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if ar.Response.Response, err = future.GetResult(sender); err == nil && ar.Response.Response.StatusCode != http.StatusNoContent {
ar, err = client.CreateResponder(ar.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsCreateFuture", "Result", ar.Response.Response, "Failure responding to request")
}
}
return
}
// ApplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ApplicationsDeleteFuture struct {
azure.Future
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future *ApplicationsDeleteFuture) Result(client ApplicationsClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsDeleteFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationsDeleteFuture")
return
}
ar.Response = future.Response()
return
}
// ApplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ApplicationsUpdateFuture struct {
azure.Future
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future *ApplicationsUpdateFuture) Result(client ApplicationsClient) (aru ApplicationResourceUpdate, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)
if err != nil {
err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsUpdateFuture", "Result", future.Response(), "Polling failure")
return
}
if !done {
err = azure.NewAsyncOpIncompleteError("servicefabric.ApplicationsUpdateFuture")
return
}
sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
if aru.Response.Response, err = future.GetResult(sender); err == nil && aru.Response.Response.StatusCode != http.StatusNoContent {
aru, err = client.UpdateResponder(aru.Response.Response)
if err != nil {
err = autorest.NewErrorWithError(err, "servicefabric.ApplicationsUpdateFuture", "Result", aru.Response.Response, "Failure responding to request")
}
}
return
}
// ApplicationTypeResource the application type name resource
type ApplicationTypeResource struct {
autorest.Response `json:"-"`
// ApplicationTypeResourceProperties - The application type name properties
*ApplicationTypeResourceProperties `json:"properties,omitempty"`
// ID - READ-ONLY; Azure resource identifier.
ID *string `json:"id,omitempty"`
// Name - READ-ONLY; Azure resource name.
Name *string `json:"name,omitempty"`
// Type - READ-ONLY; Azure resource type.
Type *string `json:"type,omitempty"`
// Location - Azure resource location.
Location *string `json:"location,omitempty"`
}
// MarshalJSON is the custom marshaler for ApplicationTypeResource.
func (atr ApplicationTypeResource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if atr.ApplicationTypeResourceProperties != nil {
objectMap["properties"] = atr.ApplicationTypeResourceProperties
}
if atr.Location != nil {
objectMap["location"] = atr.Location
}
return json.Marshal(objectMap)
}
// UnmarshalJSON is the custom unmarshaler for ApplicationTypeResource struct.
func (atr *ApplicationTypeResource) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
return err
}
for k, v := range m {
switch k {
case "properties":
if v != nil {
var applicationTypeResourceProperties ApplicationTypeResourceProperties
err = json.Unmarshal(*v, &applicationTypeResourceProperties)
if err != nil {
return err
}
atr.ApplicationTypeResourceProperties = &applicationTypeResourceProperties
}
case "id":
if v != nil {
var ID string
err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
atr.ID = &ID
}
case "name":
if v != nil {
var name string
err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
atr.Name = &name
}
case "type":
if v != nil {
var typeVar string
err = json.Unmarshal(*v, &typeVar)
if err != nil {
return err
}
atr.Type = &typeVar
}
case "location":
if v != nil {
var location string
err = json.Unmarshal(*v, &location)
if err != nil {
return err
}
atr.Location = &location
}
}
}
return nil
}
// ApplicationTypeResourceList the list of application type names.
type ApplicationTypeResourceList struct {
autorest.Response `json:"-"`
Value *[]ApplicationTypeResource `json:"value,omitempty"`
}
// ApplicationTypeResourceProperties the application type name properties
type ApplicationTypeResourceProperties struct {
// ProvisioningState - READ-ONLY; The current deployment or provisioning state, which only appears in the response.
ProvisioningState *string `json:"provisioningState,omitempty"`
}
// ApplicationTypesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type ApplicationTypesDeleteFuture struct {
azure.Future
}
// Result returns the result of the asynchronous operation.
// If the operation has not completed it will return an error.
func (future *ApplicationTypesDeleteFuture) Result(client ApplicationTypesClient) (ar autorest.Response, err error) {
var done bool
done, err = future.DoneWithContext(context.Background(), client)