Skip to content

Commit 83b402b

Browse files
authored
Fix the type mismatch issue in GetWebAppsByHybridConnection. (Azure#47530)
* Update AppServicePlanOperationsTests.cs * update * update * Update AppServicePlanOperationsTests.cs * Update AppServicePlanOperationsTests.cs * Update AppServicePlanOperationsTests.cs * Update CHANGELOG.md
1 parent 07a5ee3 commit 83b402b

9 files changed

+122
-325
lines changed

sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
### Bugs Fixed
1010

11+
- fix the issue of data type mismatch in the AsyncPageable return values. Issue at 'https://github.com/Azure/azure-sdk-for-net/issues/47267
12+
1113
### Other Changes
1214

1315
## 1.3.0 (2024-11-19)

sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.net8.0.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,10 +773,14 @@ protected AppServicePlanHybridConnectionNamespaceRelayResource() { }
773773
public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
774774
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation> DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
775775
public virtual Azure.Response<Azure.ResourceManager.AppService.AppServicePlanHybridConnectionNamespaceRelayResource> Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
776+
public virtual Azure.Pageable<Azure.ResourceManager.AppService.WebSiteData> GetAllWebAppsByHybridConnection(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
777+
public virtual Azure.AsyncPageable<Azure.ResourceManager.AppService.WebSiteData> GetAllWebAppsByHybridConnectionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
776778
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.AppService.AppServicePlanHybridConnectionNamespaceRelayResource>> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
777779
public virtual Azure.Response<Azure.ResourceManager.AppService.Models.HybridConnectionKey> GetHybridConnectionKeys(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
778780
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.AppService.Models.HybridConnectionKey>> GetHybridConnectionKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
781+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
779782
public virtual Azure.Pageable<string> GetWebAppsByHybridConnection(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
783+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
780784
public virtual Azure.AsyncPageable<string> GetWebAppsByHybridConnectionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
781785
Azure.ResourceManager.AppService.HybridConnectionData System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.AppService.HybridConnectionData>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
782786
void System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.AppService.HybridConnectionData>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }

sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,10 +773,14 @@ protected AppServicePlanHybridConnectionNamespaceRelayResource() { }
773773
public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
774774
public virtual System.Threading.Tasks.Task<Azure.ResourceManager.ArmOperation> DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
775775
public virtual Azure.Response<Azure.ResourceManager.AppService.AppServicePlanHybridConnectionNamespaceRelayResource> Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
776+
public virtual Azure.Pageable<Azure.ResourceManager.AppService.WebSiteData> GetAllWebAppsByHybridConnection(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
777+
public virtual Azure.AsyncPageable<Azure.ResourceManager.AppService.WebSiteData> GetAllWebAppsByHybridConnectionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
776778
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.AppService.AppServicePlanHybridConnectionNamespaceRelayResource>> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
777779
public virtual Azure.Response<Azure.ResourceManager.AppService.Models.HybridConnectionKey> GetHybridConnectionKeys(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
778780
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.AppService.Models.HybridConnectionKey>> GetHybridConnectionKeysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
781+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
779782
public virtual Azure.Pageable<string> GetWebAppsByHybridConnection(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
783+
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
780784
public virtual Azure.AsyncPageable<string> GetWebAppsByHybridConnectionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
781785
Azure.ResourceManager.AppService.HybridConnectionData System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.AppService.HybridConnectionData>.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; }
782786
void System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.AppService.HybridConnectionData>.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { }
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
// <auto-generated/>
5+
6+
#nullable disable
7+
8+
using System;
9+
using System.ComponentModel;
10+
using System.Threading;
11+
using Autorest.CSharp.Core;
12+
using Azure.Core;
13+
14+
namespace Azure.ResourceManager.AppService
15+
{
16+
/// <summary>
17+
/// A Class representing an AppServicePlanHybridConnectionNamespaceRelay along with the instance operations that can be performed on it.
18+
/// If you have a <see cref="ResourceIdentifier"/> you can construct an <see cref="AppServicePlanHybridConnectionNamespaceRelayResource"/>
19+
/// from an instance of <see cref="ArmClient"/> using the GetAppServicePlanHybridConnectionNamespaceRelayResource method.
20+
/// Otherwise you can get one from its parent resource <see cref="AppServicePlanResource"/> using the GetAppServicePlanHybridConnectionNamespaceRelay method.
21+
/// </summary>
22+
public partial class AppServicePlanHybridConnectionNamespaceRelayResource
23+
{
24+
/// <summary>
25+
/// Description for Get all apps that use a Hybrid Connection in an App Service Plan.
26+
/// <list type="bullet">
27+
/// <item>
28+
/// <term>Request Path</term>
29+
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites</description>
30+
/// </item>
31+
/// <item>
32+
/// <term>Operation Id</term>
33+
/// <description>AppServicePlans_ListWebAppsByHybridConnection</description>
34+
/// </item>
35+
/// <item>
36+
/// <term>Default Api Version</term>
37+
/// <description>2024-04-01</description>
38+
/// </item>
39+
/// <item>
40+
/// <term>Resource</term>
41+
/// <description><see cref="AppServicePlanHybridConnectionNamespaceRelayResource"/></description>
42+
/// </item>
43+
/// </list>
44+
/// </summary>
45+
/// <param name="cancellationToken"> The cancellation token to use. </param>
46+
/// <returns> An async collection of <see cref="String"/> that may take multiple service requests to iterate over. </returns>
47+
[EditorBrowsable(EditorBrowsableState.Never)]
48+
public virtual AsyncPageable<String> GetWebAppsByHybridConnectionAsync(CancellationToken cancellationToken = default)
49+
{
50+
HttpMessage FirstPageRequest(int? pageSizeHint) => _appServicePlanHybridConnectionNamespaceRelayAppServicePlansRestClient.CreateListWebAppsByHybridConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name);
51+
HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _appServicePlanHybridConnectionNamespaceRelayAppServicePlansRestClient.CreateListWebAppsByHybridConnectionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name);
52+
return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => WebSiteData.DeserializeWebSiteData(e).ToString(), _appServicePlanHybridConnectionNamespaceRelayAppServicePlansClientDiagnostics, Pipeline, "AppServicePlanHybridConnectionNamespaceRelayResource.GetAllWebAppsByHybridConnection", "value", "nextLink", cancellationToken);
53+
}
54+
55+
/// <summary>
56+
/// Description for Get all apps that use a Hybrid Connection in an App Service Plan.
57+
/// <list type="bullet">
58+
/// <item>
59+
/// <term>Request Path</term>
60+
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites</description>
61+
/// </item>
62+
/// <item>
63+
/// <term>Operation Id</term>
64+
/// <description>AppServicePlans_ListWebAppsByHybridConnection</description>
65+
/// </item>
66+
/// <item>
67+
/// <term>Default Api Version</term>
68+
/// <description>2024-04-01</description>
69+
/// </item>
70+
/// <item>
71+
/// <term>Resource</term>
72+
/// <description><see cref="AppServicePlanHybridConnectionNamespaceRelayResource"/></description>
73+
/// </item>
74+
/// </list>
75+
/// </summary>
76+
/// <param name="cancellationToken"> The cancellation token to use. </param>
77+
/// <returns> A collection of <see cref="String"/> that may take multiple service requests to iterate over. </returns>
78+
[EditorBrowsable(EditorBrowsableState.Never)]
79+
public virtual Pageable<String> GetWebAppsByHybridConnection(CancellationToken cancellationToken = default)
80+
{
81+
HttpMessage FirstPageRequest(int? pageSizeHint) => _appServicePlanHybridConnectionNamespaceRelayAppServicePlansRestClient.CreateListWebAppsByHybridConnectionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name);
82+
HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _appServicePlanHybridConnectionNamespaceRelayAppServicePlansRestClient.CreateListWebAppsByHybridConnectionNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name);
83+
return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => WebSiteData.DeserializeWebSiteData(e).ToString(), _appServicePlanHybridConnectionNamespaceRelayAppServicePlansClientDiagnostics, Pipeline, "AppServicePlanHybridConnectionNamespaceRelayResource.GetAllWebAppsByHybridConnection", "value", "nextLink", cancellationToken);
84+
}
85+
}
86+
}

sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.cs

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)