/
models.go
2523 lines (1835 loc) · 74.9 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
//go:build go1.18
// +build go1.18
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator. DO NOT EDIT.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
package armconsumption
import "time"
// Amount - The amount plus currency .
type Amount struct {
// READ-ONLY; Amount currency.
Currency *string
// READ-ONLY; Amount.
Value *float64
}
// AmountWithExchangeRate - The amount with exchange rate.
type AmountWithExchangeRate struct {
// READ-ONLY; Amount currency.
Currency *string
// READ-ONLY; The exchange rate.
ExchangeRate *float64
// READ-ONLY; The exchange rate month.
ExchangeRateMonth *int32
// READ-ONLY; Amount.
Value *float64
}
// Balance - A balance resource.
type Balance struct {
// The properties of the balance.
Properties *BalanceProperties
// READ-ONLY; The etag for the resource.
Etag *string
// READ-ONLY; The full qualified ARM ID of an event.
ID *string
// READ-ONLY; The ID that uniquely identifies an event.
Name *string
// READ-ONLY; Resource tags.
Tags map[string]*string
// READ-ONLY; Resource type.
Type *string
}
// BalanceProperties - The properties of the balance.
type BalanceProperties struct {
// The billing frequency.
BillingFrequency *BillingFrequency
// READ-ONLY; List of Adjustments (Promo credit, SIE credit etc.).
AdjustmentDetails []*BalancePropertiesAdjustmentDetailsItem
// READ-ONLY; Total adjustment amount.
Adjustments *float64
// READ-ONLY; Total charges for Azure Marketplace.
AzureMarketplaceServiceCharges *float64
// READ-ONLY; The beginning balance for the billing period.
BeginningBalance *float64
// READ-ONLY; Charges Billed separately.
ChargesBilledSeparately *float64
// READ-ONLY; The ISO currency in which the meter is charged, for example, USD.
Currency *string
// READ-ONLY; The ending balance for the billing period (for open periods this will be updated daily).
EndingBalance *float64
// READ-ONLY; Total new purchase amount.
NewPurchases *float64
// READ-ONLY; List of new purchases.
NewPurchasesDetails []*BalancePropertiesNewPurchasesDetailsItem
// READ-ONLY; Price is hidden or not.
PriceHidden *bool
// READ-ONLY; Overage for Azure services.
ServiceOverage *float64
// READ-ONLY; serviceOverage + chargesBilledSeparately.
TotalOverage *float64
// READ-ONLY; Azure service commitment + total Overage.
TotalUsage *float64
// READ-ONLY; Total Commitment usage.
Utilized *float64
}
type BalancePropertiesAdjustmentDetailsItem struct {
// READ-ONLY; the name of new adjustment.
Name *string
// READ-ONLY; the value of new adjustment.
Value *float64
}
type BalancePropertiesNewPurchasesDetailsItem struct {
// READ-ONLY; the name of new purchase.
Name *string
// READ-ONLY; the value of new purchase.
Value *float64
}
// Budget - A budget resource.
type Budget struct {
// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating
// the latest version or not.
ETag *string
// The properties of the budget.
Properties *BudgetProperties
// READ-ONLY; Resource Id.
ID *string
// READ-ONLY; Resource name.
Name *string
// READ-ONLY; Resource type.
Type *string
}
// BudgetComparisonExpression - The comparison expression to be used in the budgets.
type BudgetComparisonExpression struct {
// REQUIRED; The name of the column to use in comparison.
Name *string
// REQUIRED; The operator to use for comparison.
Operator *BudgetOperatorType
// REQUIRED; Array of values to use for comparison
Values []*string
}
// BudgetFilter - May be used to filter budgets by resource group, resource, or meter.
type BudgetFilter struct {
// The logical "AND" expression. Must have at least 2 items.
And []*BudgetFilterProperties
// Has comparison expression for a dimension
Dimensions *BudgetComparisonExpression
// Has comparison expression for a tag
Tags *BudgetComparisonExpression
}
// BudgetFilterProperties - The Dimensions or Tags to filter a budget by.
type BudgetFilterProperties struct {
// Has comparison expression for a dimension
Dimensions *BudgetComparisonExpression
// Has comparison expression for a tag
Tags *BudgetComparisonExpression
}
// BudgetProperties - The properties of the budget.
type BudgetProperties struct {
// REQUIRED; The total amount of cost to track with the budget
Amount *float64
// REQUIRED; The category of the budget, whether the budget tracks cost or usage.
Category *CategoryType
// REQUIRED; The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter,
// and BillingAnnual are only supported by WD customers
TimeGrain *TimeGrainType
// REQUIRED; Has start and end date of the budget. The start date must be first of the month and should be less than the end
// date. Budget start date must be on or after June 1, 2017. Future start date should not
// be more than twelve months. Past start date should be selected within the timegrain period. There are no restrictions on
// the end date.
TimePeriod *BudgetTimePeriod
// May be used to filter budgets by user-specified dimensions and/or tags.
Filter *BudgetFilter
// Dictionary of notifications associated with the budget. Budget can have up to five notifications.
Notifications map[string]*Notification
// READ-ONLY; The current amount of cost which is being tracked for a budget.
CurrentSpend *CurrentSpend
// READ-ONLY; The forecasted cost which is being tracked for a budget.
ForecastSpend *ForecastSpend
}
// BudgetTimePeriod - The start and end date for a budget.
type BudgetTimePeriod struct {
// REQUIRED; The start date for the budget.
StartDate *time.Time
// The end date for the budget. If not provided, we default this to 10 years from the start date.
EndDate *time.Time
}
// BudgetsListResult - Result of listing budgets. It contains a list of available budgets in the scope provided.
type BudgetsListResult struct {
// READ-ONLY; The link (url) to the next page of results.
NextLink *string
// READ-ONLY; The list of budgets.
Value []*Budget
}
// ChargeSummary - A charge summary resource.
type ChargeSummary struct {
// REQUIRED; Specifies the kind of charge summary.
Kind *ChargeSummaryKind
// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating
// the latest version or not.
ETag *string
// READ-ONLY; Resource Id.
ID *string
// READ-ONLY; Resource name.
Name *string
// READ-ONLY; Resource type.
Type *string
}
// GetChargeSummary implements the ChargeSummaryClassification interface for type ChargeSummary.
func (c *ChargeSummary) GetChargeSummary() *ChargeSummary { return c }
// ChargesListResult - Result of listing charge summary.
type ChargesListResult struct {
// READ-ONLY; The list of charge summary
Value []ChargeSummaryClassification
}
// CreditBalanceSummary - Summary of credit balances.
type CreditBalanceSummary struct {
// READ-ONLY; Current balance.
CurrentBalance *Amount
// READ-ONLY; Estimated balance.
EstimatedBalance *Amount
// READ-ONLY; Estimated balance in billing currency.
EstimatedBalanceInBillingCurrency *AmountWithExchangeRate
}
// CreditSummary - A credit summary resource.
type CreditSummary struct {
// The properties of the credit summary.
Properties *CreditSummaryProperties
// READ-ONLY; The etag for the resource.
Etag *string
// READ-ONLY; The full qualified ARM ID of an event.
ID *string
// READ-ONLY; The ID that uniquely identifies an event.
Name *string
// READ-ONLY; Resource tags.
Tags map[string]*string
// READ-ONLY; Resource type.
Type *string
}
// CreditSummaryProperties - The properties of the credit summary.
type CreditSummaryProperties struct {
// READ-ONLY; Summary of balances associated with this credit summary.
BalanceSummary *CreditBalanceSummary
// READ-ONLY; The billing currency.
BillingCurrency *string
// READ-ONLY; The credit currency.
CreditCurrency *string
// READ-ONLY; The eTag for the resource.
ETag *string
// READ-ONLY; Expired credit.
ExpiredCredit *Amount
// READ-ONLY; Pending credit adjustments.
PendingCreditAdjustments *Amount
// READ-ONLY; Pending eligible charges.
PendingEligibleCharges *Amount
// READ-ONLY; Credit's reseller.
Reseller *Reseller
}
// CurrentSpend - The current amount of cost which is being tracked for a budget.
type CurrentSpend struct {
// READ-ONLY; The total amount of cost which is being tracked by the budget.
Amount *float64
// READ-ONLY; The unit of measure for the budget amount.
Unit *string
}
// DownloadProperties - The properties of the price sheet download.
type DownloadProperties struct {
// READ-ONLY; The link (url) to download the pricesheet.
DownloadURL *string
// READ-ONLY; Download link validity.
ValidTill *string
}
// ErrorDetails - The details of the error.
type ErrorDetails struct {
// READ-ONLY; Error code.
Code *string
// READ-ONLY; Error message indicating why the operation failed.
Message *string
}
// ErrorResponse - Error response indicates that the service is not able to process the incoming request. The reason is provided
// in the error message.
// Some Error responses:
// * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after"
// header.
//
// * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After"
// header.
type ErrorResponse struct {
// The details of the error.
Error *ErrorDetails
}
// EventProperties - The event properties.
type EventProperties struct {
// Identifies the type of the event.
EventType *EventType
// READ-ONLY; The amount of balance adjustment. The property is not available for ConsumptionCommitment lots.
Adjustments *Amount
// READ-ONLY; The amount of balance adjustment in billing currency.
AdjustmentsInBillingCurrency *AmountWithExchangeRate
// READ-ONLY; The billing currency of the event.
BillingCurrency *string
// READ-ONLY; The display name of the billing profile for which the event happened. The property is only available for billing
// account of type MicrosoftCustomerAgreement.
BillingProfileDisplayName *string
// READ-ONLY; The ID that uniquely identifies the billing profile for which the event happened. The property is only available
// for billing account of type MicrosoftCustomerAgreement.
BillingProfileID *string
// READ-ONLY; Amount of canceled credit.
CanceledCredit *Amount
// READ-ONLY; The amount of charges for events of type SettleCharges and PendingEligibleCharges.
Charges *Amount
// READ-ONLY; The amount of charges for events of type SettleCharges and PendingEligibleCharges in billing currency.
ChargesInBillingCurrency *AmountWithExchangeRate
// READ-ONLY; The balance after the event.
ClosedBalance *Amount
// READ-ONLY; The balance in billing currency after the event.
ClosedBalanceInBillingCurrency *AmountWithExchangeRate
// READ-ONLY; The credit currency of the event.
CreditCurrency *string
// READ-ONLY; The amount of expired credit or commitment for NewCredit or SettleCharges event.
CreditExpired *Amount
// READ-ONLY; The amount of expired credit or commitment for NewCredit or SettleCharges event in billing currency.
CreditExpiredInBillingCurrency *AmountWithExchangeRate
// READ-ONLY; The description of the event.
Description *string
// READ-ONLY; The eTag for the resource.
ETag *string
// READ-ONLY; The number which uniquely identifies the invoice on which the event was billed. This will be empty for unbilled
// events.
InvoiceNumber *string
// READ-ONLY; The ID that uniquely identifies the lot for which the event happened.
LotID *string
// READ-ONLY; Identifies the source of the lot for which the event happened.
LotSource *string
// READ-ONLY; The amount of new credit or commitment for NewCredit or SettleCharges event.
NewCredit *Amount
// READ-ONLY; The amount of new credit or commitment for NewCredit or SettleCharges event in billing currency.
NewCreditInBillingCurrency *AmountWithExchangeRate
// READ-ONLY; The reseller of the event.
Reseller *Reseller
// READ-ONLY; The date of the event.
TransactionDate *time.Time
}
// EventSummary - An event summary resource.
type EventSummary struct {
// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating
// the latest version or not.
ETag *string
// The event properties.
Properties *EventProperties
// READ-ONLY; Resource Id.
ID *string
// READ-ONLY; Resource name.
Name *string
// READ-ONLY; Resource type.
Type *string
}
// Events - Result of listing event summary.
type Events struct {
// READ-ONLY; The link (url) to the next page of results.
NextLink *string
// READ-ONLY; The list of event summary.
Value []*EventSummary
}
// ForecastSpend - The forecasted cost which is being tracked for a budget.
type ForecastSpend struct {
// READ-ONLY; The forecasted cost for the total time period which is being tracked by the budget. This value is only provided
// if the budget contains a forecast alert type.
Amount *float64
// READ-ONLY; The unit of measure for the budget amount.
Unit *string
}
// HighCasedErrorDetails - The details of the error.
type HighCasedErrorDetails struct {
// READ-ONLY; Error code.
Code *string
// READ-ONLY; Error message indicating why the operation failed.
Message *string
}
// HighCasedErrorResponse - Error response indicates that the service is not able to process the incoming request. The reason
// is provided in the error message.
// Some Error responses:
// * 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after"
// header.
//
// * 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After"
// header.
type HighCasedErrorResponse struct {
// The details of the error.
Error *HighCasedErrorDetails
}
// LegacyChargeSummary - Legacy charge summary.
type LegacyChargeSummary struct {
// REQUIRED; Specifies the kind of charge summary.
Kind *ChargeSummaryKind
// REQUIRED; Properties for legacy charge summary
Properties *LegacyChargeSummaryProperties
// eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating
// the latest version or not.
ETag *string
// READ-ONLY; Resource Id.
ID *string
// READ-ONLY; Resource name.
Name *string
// READ-ONLY; Resource type.
Type *string
}
// GetChargeSummary implements the ChargeSummaryClassification interface for type LegacyChargeSummary.
func (l *LegacyChargeSummary) GetChargeSummary() *ChargeSummary {
return &ChargeSummary{
ETag: l.ETag,
ID: l.ID,
Kind: l.Kind,
Name: l.Name,
Type: l.Type,
}
}
// LegacyChargeSummaryProperties - The properties of legacy charge summary.
type LegacyChargeSummaryProperties struct {
// READ-ONLY; Azure Charges.
AzureCharges *float64
// READ-ONLY; The id of the billing period resource that the charge belongs to.
BillingPeriodID *string
// READ-ONLY; Charges Billed separately.
ChargesBilledSeparately *float64
// READ-ONLY; Currency Code
Currency *string
// READ-ONLY; Marketplace Charges.
MarketplaceCharges *float64
// READ-ONLY; Usage end date.
UsageEnd *string
// READ-ONLY; Usage start date.
UsageStart *string
}
// LegacyReservationRecommendation - Legacy reservation recommendation.
type LegacyReservationRecommendation struct {
// REQUIRED; Specifies the kind of reservation recommendation.
Kind *ReservationRecommendationKind
// REQUIRED; Properties for legacy reservation recommendation
Properties LegacyReservationRecommendationPropertiesClassification
// READ-ONLY; The etag for the resource.
Etag *string
// READ-ONLY; The full qualified ARM ID of an event.
ID *string
// READ-ONLY; Resource location
Location *string
// READ-ONLY; The ID that uniquely identifies an event.
Name *string
// READ-ONLY; Resource sku
SKU *string
// READ-ONLY; Resource tags.
Tags map[string]*string
// READ-ONLY; Resource type.
Type *string
}
// GetReservationRecommendation implements the ReservationRecommendationClassification interface for type LegacyReservationRecommendation.
func (l *LegacyReservationRecommendation) GetReservationRecommendation() *ReservationRecommendation {
return &ReservationRecommendation{
Etag: l.Etag,
ID: l.ID,
Kind: l.Kind,
Location: l.Location,
Name: l.Name,
SKU: l.SKU,
Tags: l.Tags,
Type: l.Type,
}
}
// LegacyReservationRecommendationProperties - The properties of the reservation recommendation.
type LegacyReservationRecommendationProperties struct {
// REQUIRED; Shared or single recommendation.
Scope *string
// READ-ONLY; The total amount of cost without reserved instances.
CostWithNoReservedInstances *float64
// READ-ONLY; The usage date for looking back.
FirstUsageDate *time.Time
// READ-ONLY; The instance Flexibility Group.
InstanceFlexibilityGroup *string
// READ-ONLY; The instance Flexibility Ratio.
InstanceFlexibilityRatio *float32
// READ-ONLY; The number of days of usage to look back for recommendation.
LookBackPeriod *string
// READ-ONLY; The meter id (GUID)
MeterID *string
// READ-ONLY; Total estimated savings with reserved instances.
NetSavings *float64
// READ-ONLY; The normalized Size.
NormalizedSize *string
// READ-ONLY; Recommended quality for reserved instances.
RecommendedQuantity *float64
// READ-ONLY; The recommended Quantity Normalized.
RecommendedQuantityNormalized *float32
// READ-ONLY; The azure resource type.
ResourceType *string
// READ-ONLY; List of sku properties
SKUProperties []*SKUProperty
// READ-ONLY; RI recommendations in one or three year terms.
Term *string
// READ-ONLY; The total amount of cost with reserved instances.
TotalCostWithReservedInstances *float64
}
// GetLegacyReservationRecommendationProperties implements the LegacyReservationRecommendationPropertiesClassification interface
// for type LegacyReservationRecommendationProperties.
func (l *LegacyReservationRecommendationProperties) GetLegacyReservationRecommendationProperties() *LegacyReservationRecommendationProperties {
return l
}
// LegacyReservationTransaction - Legacy Reservation transaction resource.
type LegacyReservationTransaction struct {
// The properties of a legacy reservation transaction.
Properties *LegacyReservationTransactionProperties
// READ-ONLY; Resource Id.
ID *string
// READ-ONLY; Resource name.
Name *string
// READ-ONLY; Resource tags.
Tags []*string
// READ-ONLY; Resource type.
Type *string
}
// LegacyReservationTransactionProperties - The properties of a legacy reservation transaction.
type LegacyReservationTransactionProperties struct {
// READ-ONLY; The name of the account that makes the transaction.
AccountName *string
// READ-ONLY; The email of the account owner that makes the transaction.
AccountOwnerEmail *string
// READ-ONLY; The charge of the transaction.
Amount *float64
// READ-ONLY; This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
ArmSKUName *string
// READ-ONLY; The billing frequency, which can be either one-time or recurring.
BillingFrequency *string
// READ-ONLY; The billing month(yyyyMMdd), on which the event initiated.
BillingMonth *int32
// READ-ONLY; The cost center of this department if it is a department and a cost center is provided.
CostCenter *string
// READ-ONLY; The ISO currency in which the transaction is charged, for example, USD.
Currency *string
// READ-ONLY; The current enrollment.
CurrentEnrollment *string
// READ-ONLY; The department name.
DepartmentName *string
// READ-ONLY; The description of the transaction.
Description *string
// READ-ONLY; The date of the transaction
EventDate *time.Time
// READ-ONLY; The type of the transaction (Purchase, Cancel, etc.)
EventType *string
// READ-ONLY; The monetary commitment amount at the enrollment scope.
MonetaryCommitment *float64
// READ-ONLY; The overage amount at the enrollment scope.
Overage *float64
// READ-ONLY; The purchasing enrollment.
PurchasingEnrollment *string
// READ-ONLY; The subscription guid that makes the transaction.
PurchasingSubscriptionGUID *string
// READ-ONLY; The subscription name that makes the transaction.
PurchasingSubscriptionName *string
// READ-ONLY; The quantity of the transaction.
Quantity *float64
// READ-ONLY; The region of the transaction.
Region *string
// READ-ONLY; The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents
// a single purchase transaction. A reservation order contains reservations. The reservation
// order specifies the VM size and region for the reservations.
ReservationOrderID *string
// READ-ONLY; The name of the reservation order.
ReservationOrderName *string
// READ-ONLY; This is the term of the transaction.
Term *string
}
// LegacySharedScopeReservationRecommendationProperties - The properties of the legacy reservation recommendation for shared
// scope.
type LegacySharedScopeReservationRecommendationProperties struct {
// REQUIRED; Shared or single recommendation.
Scope *string
// READ-ONLY; The total amount of cost without reserved instances.
CostWithNoReservedInstances *float64
// READ-ONLY; The usage date for looking back.
FirstUsageDate *time.Time
// READ-ONLY; The instance Flexibility Group.
InstanceFlexibilityGroup *string
// READ-ONLY; The instance Flexibility Ratio.
InstanceFlexibilityRatio *float32
// READ-ONLY; The number of days of usage to look back for recommendation.
LookBackPeriod *string
// READ-ONLY; The meter id (GUID)
MeterID *string
// READ-ONLY; Total estimated savings with reserved instances.
NetSavings *float64
// READ-ONLY; The normalized Size.
NormalizedSize *string
// READ-ONLY; Recommended quality for reserved instances.
RecommendedQuantity *float64
// READ-ONLY; The recommended Quantity Normalized.
RecommendedQuantityNormalized *float32
// READ-ONLY; The azure resource type.
ResourceType *string
// READ-ONLY; List of sku properties
SKUProperties []*SKUProperty
// READ-ONLY; RI recommendations in one or three year terms.
Term *string
// READ-ONLY; The total amount of cost with reserved instances.
TotalCostWithReservedInstances *float64
}
// GetLegacyReservationRecommendationProperties implements the LegacyReservationRecommendationPropertiesClassification interface
// for type LegacySharedScopeReservationRecommendationProperties.
func (l *LegacySharedScopeReservationRecommendationProperties) GetLegacyReservationRecommendationProperties() *LegacyReservationRecommendationProperties {
return &LegacyReservationRecommendationProperties{
CostWithNoReservedInstances: l.CostWithNoReservedInstances,
FirstUsageDate: l.FirstUsageDate,
InstanceFlexibilityGroup: l.InstanceFlexibilityGroup,
InstanceFlexibilityRatio: l.InstanceFlexibilityRatio,
LookBackPeriod: l.LookBackPeriod,
MeterID: l.MeterID,
NetSavings: l.NetSavings,
NormalizedSize: l.NormalizedSize,
RecommendedQuantity: l.RecommendedQuantity,
RecommendedQuantityNormalized: l.RecommendedQuantityNormalized,
ResourceType: l.ResourceType,
SKUProperties: l.SKUProperties,
Scope: l.Scope,
Term: l.Term,
TotalCostWithReservedInstances: l.TotalCostWithReservedInstances,
}
}
// LegacySingleScopeReservationRecommendationProperties - The properties of the legacy reservation recommendation for single
// scope.
type LegacySingleScopeReservationRecommendationProperties struct {
// REQUIRED; Shared or single recommendation.
Scope *string
// READ-ONLY; The total amount of cost without reserved instances.
CostWithNoReservedInstances *float64
// READ-ONLY; The usage date for looking back.
FirstUsageDate *time.Time
// READ-ONLY; The instance Flexibility Group.
InstanceFlexibilityGroup *string
// READ-ONLY; The instance Flexibility Ratio.
InstanceFlexibilityRatio *float32
// READ-ONLY; The number of days of usage to look back for recommendation.
LookBackPeriod *string
// READ-ONLY; The meter id (GUID)
MeterID *string
// READ-ONLY; Total estimated savings with reserved instances.
NetSavings *float64
// READ-ONLY; The normalized Size.
NormalizedSize *string
// READ-ONLY; Recommended quality for reserved instances.
RecommendedQuantity *float64
// READ-ONLY; The recommended Quantity Normalized.
RecommendedQuantityNormalized *float32
// READ-ONLY; The azure resource type.
ResourceType *string
// READ-ONLY; List of sku properties
SKUProperties []*SKUProperty
// READ-ONLY; Subscription id associated with single scoped recommendation.
SubscriptionID *string
// READ-ONLY; RI recommendations in one or three year terms.
Term *string
// READ-ONLY; The total amount of cost with reserved instances.
TotalCostWithReservedInstances *float64
}
// GetLegacyReservationRecommendationProperties implements the LegacyReservationRecommendationPropertiesClassification interface
// for type LegacySingleScopeReservationRecommendationProperties.
func (l *LegacySingleScopeReservationRecommendationProperties) GetLegacyReservationRecommendationProperties() *LegacyReservationRecommendationProperties {
return &LegacyReservationRecommendationProperties{
CostWithNoReservedInstances: l.CostWithNoReservedInstances,
FirstUsageDate: l.FirstUsageDate,
InstanceFlexibilityGroup: l.InstanceFlexibilityGroup,
InstanceFlexibilityRatio: l.InstanceFlexibilityRatio,
LookBackPeriod: l.LookBackPeriod,
MeterID: l.MeterID,
NetSavings: l.NetSavings,
NormalizedSize: l.NormalizedSize,
RecommendedQuantity: l.RecommendedQuantity,
RecommendedQuantityNormalized: l.RecommendedQuantityNormalized,
ResourceType: l.ResourceType,
SKUProperties: l.SKUProperties,
Scope: l.Scope,
Term: l.Term,
TotalCostWithReservedInstances: l.TotalCostWithReservedInstances,
}
}
// LegacyUsageDetail - Legacy usage detail.
type LegacyUsageDetail struct {
// REQUIRED; Specifies the kind of usage details.
Kind *UsageDetailsKind
// REQUIRED; Properties for legacy usage details
Properties *LegacyUsageDetailProperties
// READ-ONLY; The etag for the resource.
Etag *string
// READ-ONLY; The full qualified ARM ID of an event.
ID *string
// READ-ONLY; The ID that uniquely identifies an event.
Name *string
// READ-ONLY; Resource tags.
Tags map[string]*string
// READ-ONLY; Resource type.
Type *string
}
// GetUsageDetail implements the UsageDetailClassification interface for type LegacyUsageDetail.
func (l *LegacyUsageDetail) GetUsageDetail() *UsageDetail {
return &UsageDetail{
Etag: l.Etag,
ID: l.ID,
Kind: l.Kind,
Name: l.Name,
Tags: l.Tags,
Type: l.Type,
}
}
// LegacyUsageDetailProperties - The properties of the legacy usage detail.
type LegacyUsageDetailProperties struct {
// READ-ONLY; Account Name.
AccountName *string
// READ-ONLY; Account Owner Id.
AccountOwnerID *string
// READ-ONLY; Additional details of this usage item. By default this is not populated, unless it's specified in $expand. Use
// this field to get usage line item specific details such as the actual VM Size
// (ServiceType) or the ratio in which the reservation discount is applied.
AdditionalInfo *string
// READ-ONLY; Unique identifier for the applicable benefit.
BenefitID *string
// READ-ONLY; Name of the applicable benefit.
BenefitName *string
// READ-ONLY; Billing Account identifier.
BillingAccountID *string
// READ-ONLY; Billing Account Name.
BillingAccountName *string
// READ-ONLY; Billing Currency.
BillingCurrency *string
// READ-ONLY; The billing period end date.
BillingPeriodEndDate *time.Time
// READ-ONLY; The billing period start date.
BillingPeriodStartDate *time.Time
// READ-ONLY; Billing Profile identifier.
BillingProfileID *string
// READ-ONLY; Billing Profile Name.
BillingProfileName *string
// READ-ONLY; Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a refund.
ChargeType *string
// READ-ONLY; Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value
// is not provided for marketplace usage.
ConsumedService *string
// READ-ONLY; The amount of cost before tax.
Cost *float64
// READ-ONLY; The cost center of this department if it is a department and a cost center is provided.
CostCenter *string
// READ-ONLY; Date for the usage record.
Date *time.Time
// READ-ONLY; Effective Price that's charged for the usage.
EffectivePrice *float64
// READ-ONLY; Indicates how frequently this charge will occur. OneTime for purchases which only happen once, Monthly for fees
// which recur every month, and UsageBased for charges based on how much a service is used.
Frequency *string
// READ-ONLY; Invoice Section Name.
InvoiceSection *string
// READ-ONLY; Is Azure Credit Eligible.
IsAzureCreditEligible *bool
// READ-ONLY; The details about the meter. By default this is not populated, unless it's specified in $expand.
MeterDetails *MeterDetailsResponse
// READ-ONLY; The meter id (GUID). Not available for marketplace. For reserved instance this represents the primary meter
// for which the reservation was purchased. For the actual VM Size for which the reservation is
// purchased see productOrderName.
MeterID *string
// READ-ONLY; Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P.
OfferID *string
// READ-ONLY; Part Number of the service used. Can be used to join with the price sheet. Not available for marketplace.
PartNumber *string
// READ-ONLY; Retail price for the resource.
PayGPrice *float64
// READ-ONLY; Plan Name.