|
| 1 | +// Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | +// Licensed under the MIT License. |
| 3 | + |
| 4 | +#nullable disable |
| 5 | + |
| 6 | +using System; |
| 7 | +using System.ComponentModel; |
| 8 | +using System.Threading; |
| 9 | +using System.Threading.Tasks; |
| 10 | +using Azure.Core; |
| 11 | +using Azure.ResourceManager.Consumption.Models; |
| 12 | + |
| 13 | +namespace Azure.ResourceManager.Consumption |
| 14 | +{ |
| 15 | + /// <summary> |
| 16 | + /// Obsolete backward-compatibility stub for the billing-account scoped consumption resource that |
| 17 | + /// existed in the v1.1.0 surface. The TypeSpec migration replaced the wrapper resource with |
| 18 | + /// scope-based extension methods on <see cref="ArmClient"/>; this type now throws on every member |
| 19 | + /// and is hidden from IntelliSense. Use the scope-based extension methods on <see cref="ArmClient"/> |
| 20 | + /// (for example <c>GetConsumptionBalanceResults(scope)</c>, <c>GetConsumptionEventSummaries(scope, ...)</c>, |
| 21 | + /// <c>GetConsumptionLotSummaries(scope, ...)</c>, <c>GetConsumptionReservationTransactions(scope, ...)</c>) |
| 22 | + /// instead. |
| 23 | + /// </summary> |
| 24 | + [Obsolete("This type is obsolete and will be removed in a future release.", false)] |
| 25 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 26 | + public partial class BillingAccountConsumptionResource : ArmResource |
| 27 | + { |
| 28 | + /// <summary> Gets the resource type for the operations. </summary> |
| 29 | + public static readonly ResourceType ResourceType = "Microsoft.Billing/billingAccounts"; |
| 30 | + |
| 31 | + /// <summary> Initializes a new instance of the <see cref="BillingAccountConsumptionResource"/> class for mocking. </summary> |
| 32 | + protected BillingAccountConsumptionResource() |
| 33 | + { |
| 34 | + } |
| 35 | + |
| 36 | + /// <summary> Obsolete. Use <c>ArmClient.GetConsumptionBalanceResult(scope)</c> instead. </summary> |
| 37 | + /// <param name="cancellationToken"> The cancellation token to use. </param> |
| 38 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 39 | + public virtual Response<ConsumptionBalanceResult> GetBalance(CancellationToken cancellationToken = default) |
| 40 | + { |
| 41 | + throw new NotSupportedException("This resource type has been removed in the TypeSpec migration. Use ArmClient.GetConsumptionBalanceResult(scope) instead."); |
| 42 | + } |
| 43 | + |
| 44 | + /// <summary> Obsolete. Use <c>ArmClient.GetConsumptionBalanceResultAsync(scope)</c> instead. </summary> |
| 45 | + /// <param name="cancellationToken"> The cancellation token to use. </param> |
| 46 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 47 | + public virtual Task<Response<ConsumptionBalanceResult>> GetBalanceAsync(CancellationToken cancellationToken = default) |
| 48 | + { |
| 49 | + throw new NotSupportedException("This resource type has been removed in the TypeSpec migration. Use ArmClient.GetConsumptionBalanceResultAsync(scope) instead."); |
| 50 | + } |
| 51 | + |
| 52 | + /// <summary> Obsolete. Use <c>ArmClient.GetConsumptionEventSummaries(scope, filter)</c> instead. </summary> |
| 53 | + /// <param name="filter"> Optional OData filter expression. </param> |
| 54 | + /// <param name="cancellationToken"> The cancellation token to use. </param> |
| 55 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 56 | + public virtual Pageable<ConsumptionEventSummary> GetEvents(string filter = null, CancellationToken cancellationToken = default) |
| 57 | + { |
| 58 | + throw new NotSupportedException("This resource type has been removed in the TypeSpec migration. Use ArmClient.GetConsumptionEventSummaries(scope, filter) instead."); |
| 59 | + } |
| 60 | + |
| 61 | + /// <summary> Obsolete. Use <c>ArmClient.GetConsumptionEventSummariesAsync(scope, filter)</c> instead. </summary> |
| 62 | + /// <param name="filter"> Optional OData filter expression. </param> |
| 63 | + /// <param name="cancellationToken"> The cancellation token to use. </param> |
| 64 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 65 | + public virtual AsyncPageable<ConsumptionEventSummary> GetEventsAsync(string filter = null, CancellationToken cancellationToken = default) |
| 66 | + { |
| 67 | + throw new NotSupportedException("This resource type has been removed in the TypeSpec migration. Use ArmClient.GetConsumptionEventSummariesAsync(scope, filter) instead."); |
| 68 | + } |
| 69 | + |
| 70 | + /// <summary> Obsolete. Use <c>ArmClient.GetConsumptionLotSummaries(scope, filter)</c> instead. </summary> |
| 71 | + /// <param name="filter"> Optional OData filter expression. </param> |
| 72 | + /// <param name="cancellationToken"> The cancellation token to use. </param> |
| 73 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 74 | + public virtual Pageable<ConsumptionLotSummary> GetLots(string filter = null, CancellationToken cancellationToken = default) |
| 75 | + { |
| 76 | + throw new NotSupportedException("This resource type has been removed in the TypeSpec migration. Use ArmClient.GetConsumptionLotSummaries(scope, filter) instead."); |
| 77 | + } |
| 78 | + |
| 79 | + /// <summary> Obsolete. Use <c>ArmClient.GetConsumptionLotSummariesAsync(scope, filter)</c> instead. </summary> |
| 80 | + /// <param name="filter"> Optional OData filter expression. </param> |
| 81 | + /// <param name="cancellationToken"> The cancellation token to use. </param> |
| 82 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 83 | + public virtual AsyncPageable<ConsumptionLotSummary> GetLotsAsync(string filter = null, CancellationToken cancellationToken = default) |
| 84 | + { |
| 85 | + throw new NotSupportedException("This resource type has been removed in the TypeSpec migration. Use ArmClient.GetConsumptionLotSummariesAsync(scope, filter) instead."); |
| 86 | + } |
| 87 | + |
| 88 | + /// <summary> Obsolete. Use <c>ArmClient.GetConsumptionReservationTransactions(scope, filter)</c> instead. </summary> |
| 89 | + /// <param name="filter"> Optional OData filter expression. </param> |
| 90 | + /// <param name="cancellationToken"> The cancellation token to use. </param> |
| 91 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 92 | + public virtual Pageable<ConsumptionReservationTransaction> GetReservationTransactions(string filter = null, CancellationToken cancellationToken = default) |
| 93 | + { |
| 94 | + throw new NotSupportedException("This resource type has been removed in the TypeSpec migration. Use ArmClient.GetConsumptionReservationTransactions(scope, filter) instead."); |
| 95 | + } |
| 96 | + |
| 97 | + /// <summary> Obsolete. Use <c>ArmClient.GetConsumptionReservationTransactionsAsync(scope, filter)</c> instead. </summary> |
| 98 | + /// <param name="filter"> Optional OData filter expression. </param> |
| 99 | + /// <param name="cancellationToken"> The cancellation token to use. </param> |
| 100 | + [EditorBrowsable(EditorBrowsableState.Never)] |
| 101 | + public virtual AsyncPageable<ConsumptionReservationTransaction> GetReservationTransactionsAsync(string filter = null, CancellationToken cancellationToken = default) |
| 102 | + { |
| 103 | + throw new NotSupportedException("This resource type has been removed in the TypeSpec migration. Use ArmClient.GetConsumptionReservationTransactionsAsync(scope, filter) instead."); |
| 104 | + } |
| 105 | + } |
| 106 | +} |
0 commit comments