Skip to content

[Compute] Updating sdk to the new version And adding TierOption #24438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -313,7 +313,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -511,7 +511,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -687,7 +687,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -871,7 +871,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1059,7 +1059,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1252,7 +1252,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ internal CapacityReservationGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -335,7 +335,7 @@ internal CapacityReservationGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -537,7 +537,7 @@ internal CapacityReservationGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -722,7 +722,7 @@ internal CapacityReservationGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -923,7 +923,7 @@ internal CapacityReservationGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1088,6 +1088,17 @@ internal CapacityReservationGroupsOperations(ComputeManagementClient client)
/// response. Possible values include: 'virtualMachineScaleSetVMs/$ref',
/// 'virtualMachines/$ref'
/// </param>
/// <param name='resourceIdsOnly'>
/// The query option to fetch Capacity Reservation Group Resource Ids.
/// &lt;br&gt; 'CreatedInSubscription' enables fetching Resource Ids for all
/// capacity reservation group resources created in the subscription.
/// &lt;br&gt; 'SharedWithSubscription' enables fetching Resource Ids for all
/// capacity reservation group resources shared with the subscription.
/// &lt;br&gt; 'All' enables fetching Resource Ids for all capacity reservation
/// group resources shared with the subscription and created in the
/// subscription. Possible values include: 'CreatedInSubscription',
/// 'SharedWithSubscription', 'All'
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
Expand All @@ -1109,13 +1120,13 @@ internal CapacityReservationGroupsOperations(ComputeManagementClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<IPage<CapacityReservationGroup>>> ListBySubscriptionWithHttpMessagesAsync(string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<IPage<CapacityReservationGroup>>> ListBySubscriptionWithHttpMessagesAsync(string expand = default(string), string resourceIdsOnly = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand All @@ -1125,6 +1136,7 @@ internal CapacityReservationGroupsOperations(ComputeManagementClient client)
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("expand", expand);
tracingParameters.Add("resourceIdsOnly", resourceIdsOnly);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters);
}
Expand All @@ -1141,6 +1153,10 @@ internal CapacityReservationGroupsOperations(ComputeManagementClient client)
{
_queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
}
if (resourceIdsOnly != null)
{
_queryParameters.Add(string.Format("resourceIdsOnly={0}", System.Uri.EscapeDataString(resourceIdsOnly)));
}
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,20 @@ public static void Delete(this ICapacityReservationGroupsOperations operations,
/// response. Possible values include: 'virtualMachineScaleSetVMs/$ref',
/// 'virtualMachines/$ref'
/// </param>
public static IPage<CapacityReservationGroup> ListBySubscription(this ICapacityReservationGroupsOperations operations, string expand = default(string))
/// <param name='resourceIdsOnly'>
/// The query option to fetch Capacity Reservation Group Resource Ids.
/// &lt;br&gt; 'CreatedInSubscription' enables fetching Resource Ids for all
/// capacity reservation group resources created in the subscription.
/// &lt;br&gt; 'SharedWithSubscription' enables fetching Resource Ids for all
/// capacity reservation group resources shared with the subscription.
/// &lt;br&gt; 'All' enables fetching Resource Ids for all capacity reservation
/// group resources shared with the subscription and created in the
/// subscription. Possible values include: 'CreatedInSubscription',
/// 'SharedWithSubscription', 'All'
/// </param>
public static IPage<CapacityReservationGroup> ListBySubscription(this ICapacityReservationGroupsOperations operations, string expand = default(string), string resourceIdsOnly = default(string))
{
return operations.ListBySubscriptionAsync(expand).GetAwaiter().GetResult();
return operations.ListBySubscriptionAsync(expand, resourceIdsOnly).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -311,12 +322,23 @@ public static void Delete(this ICapacityReservationGroupsOperations operations,
/// response. Possible values include: 'virtualMachineScaleSetVMs/$ref',
/// 'virtualMachines/$ref'
/// </param>
/// <param name='resourceIdsOnly'>
/// The query option to fetch Capacity Reservation Group Resource Ids.
/// &lt;br&gt; 'CreatedInSubscription' enables fetching Resource Ids for all
/// capacity reservation group resources created in the subscription.
/// &lt;br&gt; 'SharedWithSubscription' enables fetching Resource Ids for all
/// capacity reservation group resources shared with the subscription.
/// &lt;br&gt; 'All' enables fetching Resource Ids for all capacity reservation
/// group resources shared with the subscription and created in the
/// subscription. Possible values include: 'CreatedInSubscription',
/// 'SharedWithSubscription', 'All'
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<CapacityReservationGroup>> ListBySubscriptionAsync(this ICapacityReservationGroupsOperations operations, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
public static async Task<IPage<CapacityReservationGroup>> ListBySubscriptionAsync(this ICapacityReservationGroupsOperations operations, string expand = default(string), string resourceIdsOnly = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(expand, null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(expand, resourceIdsOnly, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ internal CapacityReservationsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -396,7 +396,7 @@ internal CapacityReservationsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -610,7 +610,7 @@ internal CapacityReservationsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -845,7 +845,7 @@ internal CapacityReservationsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1055,7 +1055,7 @@ internal CapacityReservationsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -333,7 +333,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -531,7 +531,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -713,7 +713,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -907,7 +907,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down Expand Up @@ -1087,7 +1087,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
string apiVersion = "2023-09-01";
string apiVersion = "2024-03-01";
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
string _invocationId = null;
Expand Down
Loading