|
| 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 | +} |
0 commit comments