Skip to content

Commit

Permalink
[AutoPR Microsoft.Azure.Management.Compute] [Compute] Add missing $ex…
Browse files Browse the repository at this point in the history
…pand parameter to AvSet list by subscription API (#165)

* Generated from cce264ba7c751076c58518d67e19b9e469832c0c (#136)

Update ListLegacyPeerings.json

* Generated from 92006e420d65cb70e4b93bc5850af575da4efb78 (#162)

Mark "provisioningState" as read-only

* Generated from ed6acf4e35d75fc3c1c9e617b7131e83b6f59384

Add missing $expand parameter to AvSet list by subscription API
  • Loading branch information
openapi-sdkautomation[bot] authored and azuresdkci committed Aug 30, 2019
1 parent 41f1bde commit 97fd941
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,9 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
/// <summary>
/// Lists all availability sets in a subscription.
/// </summary>
/// <param name='expand'>
/// The expand expression to apply to the operation.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
/// </param>
Expand All @@ -861,7 +864,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
/// <return>
/// A response object containing the response body and response headers.
/// </return>
public async Task<AzureOperationResponse<IPage<AvailabilitySet>>> ListBySubscriptionWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
public async Task<AzureOperationResponse<IPage<AvailabilitySet>>> ListBySubscriptionWithHttpMessagesAsync(string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
Expand All @@ -876,6 +879,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
_invocationId = ServiceClientTracing.NextInvocationId.ToString();
Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
tracingParameters.Add("apiVersion", apiVersion);
tracingParameters.Add("expand", expand);
tracingParameters.Add("cancellationToken", cancellationToken);
ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters);
}
Expand All @@ -888,6 +892,10 @@ internal AvailabilitySetsOperations(ComputeManagementClient client)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion)));
}
if (expand != null)
{
_queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand)));
}
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,12 @@ public static AvailabilitySet Get(this IAvailabilitySetsOperations operations, s
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
public static IPage<AvailabilitySet> ListBySubscription(this IAvailabilitySetsOperations operations)
/// <param name='expand'>
/// The expand expression to apply to the operation.
/// </param>
public static IPage<AvailabilitySet> ListBySubscription(this IAvailabilitySetsOperations operations, string expand = default(string))
{
return operations.ListBySubscriptionAsync().GetAwaiter().GetResult();
return operations.ListBySubscriptionAsync(expand).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -209,12 +212,15 @@ public static IPage<AvailabilitySet> ListBySubscription(this IAvailabilitySetsOp
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='expand'>
/// The expand expression to apply to the operation.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<AvailabilitySet>> ListBySubscriptionAsync(this IAvailabilitySetsOperations operations, CancellationToken cancellationToken = default(CancellationToken))
public static async Task<IPage<AvailabilitySet>> ListBySubscriptionAsync(this IAvailabilitySetsOperations operations, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(expand, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ public partial interface IAvailabilitySetsOperations
/// <summary>
/// Lists all availability sets in a subscription.
/// </summary>
/// <param name='expand'>
/// The expand expression to apply to the operation.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
Expand All @@ -144,7 +147,7 @@ public partial interface IAvailabilitySetsOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<AvailabilitySet>>> ListBySubscriptionWithHttpMessagesAsync(Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<IPage<AvailabilitySet>>> ListBySubscriptionWithHttpMessagesAsync(string expand = default(string), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// Lists all availability sets in a resource group.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,5 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_ComputeManageme
}.AsEnumerable();
}
}
// BEGIN: Code Generation Metadata Section
public static readonly String AutoRestVersion = "latest";
public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283";
public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=C:\\Users\\jopolloc\\codebase\\azure-sdk-for-net\\sdk";
public static readonly String GithubForkName = "Azure";
public static readonly String GithubBranchName = "master";
public static readonly String GithubCommidId = "86796b0f17d82b046fddbc7cce463a159774f6d6";
public static readonly String CodeGenerationErrors = "";
public static readonly String GithubRepoName = "azure-rest-api-specs";
// END: Code Generation Metadata Section
}
}

0 comments on commit 97fd941

Please sign in to comment.