< Summary

Class:Azure.ResourceManager.Network.AvailablePrivateEndpointTypesOperations
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\AvailablePrivateEndpointTypesOperations.cs
Covered lines:0
Uncovered lines:88
Coverable lines:88
Total lines:222
Line coverage:0% (0 of 88)
Covered branches:0
Total branches:12
Branch coverage:0% (0 of 12)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-0%100%
.ctor()-0%100%
.ctor(...)-0%100%
ListAsync(...)-0%0%
<ListAsync()-0%100%
<ListAsync()-0%100%
List(...)-0%0%
ListByResourceGroupAsync(...)-0%0%
<ListByResourceGroupAsync()-0%100%
<ListByResourceGroupAsync()-0%100%
ListByResourceGroup(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\AvailablePrivateEndpointTypesOperations.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using System.Threading;
 10using System.Threading.Tasks;
 11using Azure;
 12using Azure.Core;
 13using Azure.Core.Pipeline;
 14using Azure.ResourceManager.Network.Models;
 15
 16namespace Azure.ResourceManager.Network
 17{
 18    /// <summary> The AvailablePrivateEndpointTypes service client. </summary>
 19    public partial class AvailablePrivateEndpointTypesOperations
 20    {
 21        private readonly ClientDiagnostics _clientDiagnostics;
 22        private readonly HttpPipeline _pipeline;
 023        internal AvailablePrivateEndpointTypesRestOperations RestClient { get; }
 24        /// <summary> Initializes a new instance of AvailablePrivateEndpointTypesOperations for mocking. </summary>
 025        protected AvailablePrivateEndpointTypesOperations()
 26        {
 027        }
 28        /// <summary> Initializes a new instance of AvailablePrivateEndpointTypesOperations. </summary>
 29        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
 30        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
 31        /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subsc
 32        /// <param name="endpoint"> server parameter. </param>
 033        internal AvailablePrivateEndpointTypesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, str
 34        {
 035            RestClient = new AvailablePrivateEndpointTypesRestOperations(clientDiagnostics, pipeline, subscriptionId, en
 036            _clientDiagnostics = clientDiagnostics;
 037            _pipeline = pipeline;
 038        }
 39
 40        /// <summary> Returns all of the resource types that can be linked to a Private Endpoint in this subscription in
 41        /// <param name="location"> The location of the domain name. </param>
 42        /// <param name="cancellationToken"> The cancellation token to use. </param>
 43        public virtual AsyncPageable<AvailablePrivateEndpointType> ListAsync(string location, CancellationToken cancella
 44        {
 045            if (location == null)
 46            {
 047                throw new ArgumentNullException(nameof(location));
 48            }
 49
 50            async Task<Page<AvailablePrivateEndpointType>> FirstPageFunc(int? pageSizeHint)
 51            {
 052                using var scope = _clientDiagnostics.CreateScope("AvailablePrivateEndpointTypesOperations.List");
 053                scope.Start();
 54                try
 55                {
 056                    var response = await RestClient.ListAsync(location, cancellationToken).ConfigureAwait(false);
 057                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 58                }
 059                catch (Exception e)
 60                {
 061                    scope.Failed(e);
 062                    throw;
 63                }
 064            }
 65            async Task<Page<AvailablePrivateEndpointType>> NextPageFunc(string nextLink, int? pageSizeHint)
 66            {
 067                using var scope = _clientDiagnostics.CreateScope("AvailablePrivateEndpointTypesOperations.List");
 068                scope.Start();
 69                try
 70                {
 071                    var response = await RestClient.ListNextPageAsync(nextLink, location, cancellationToken).ConfigureAw
 072                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 73                }
 074                catch (Exception e)
 75                {
 076                    scope.Failed(e);
 077                    throw;
 78                }
 079            }
 080            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 81        }
 82
 83        /// <summary> Returns all of the resource types that can be linked to a Private Endpoint in this subscription in
 84        /// <param name="location"> The location of the domain name. </param>
 85        /// <param name="cancellationToken"> The cancellation token to use. </param>
 86        public virtual Pageable<AvailablePrivateEndpointType> List(string location, CancellationToken cancellationToken 
 87        {
 088            if (location == null)
 89            {
 090                throw new ArgumentNullException(nameof(location));
 91            }
 92
 93            Page<AvailablePrivateEndpointType> FirstPageFunc(int? pageSizeHint)
 94            {
 095                using var scope = _clientDiagnostics.CreateScope("AvailablePrivateEndpointTypesOperations.List");
 096                scope.Start();
 97                try
 98                {
 099                    var response = RestClient.List(location, cancellationToken);
 0100                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 101                }
 0102                catch (Exception e)
 103                {
 0104                    scope.Failed(e);
 0105                    throw;
 106                }
 0107            }
 108            Page<AvailablePrivateEndpointType> NextPageFunc(string nextLink, int? pageSizeHint)
 109            {
 0110                using var scope = _clientDiagnostics.CreateScope("AvailablePrivateEndpointTypesOperations.List");
 0111                scope.Start();
 112                try
 113                {
 0114                    var response = RestClient.ListNextPage(nextLink, location, cancellationToken);
 0115                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 116                }
 0117                catch (Exception e)
 118                {
 0119                    scope.Failed(e);
 0120                    throw;
 121                }
 0122            }
 0123            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 124        }
 125
 126        /// <summary> Returns all of the resource types that can be linked to a Private Endpoint in this subscription in
 127        /// <param name="location"> The location of the domain name. </param>
 128        /// <param name="resourceGroupName"> The name of the resource group. </param>
 129        /// <param name="cancellationToken"> The cancellation token to use. </param>
 130        public virtual AsyncPageable<AvailablePrivateEndpointType> ListByResourceGroupAsync(string location, string reso
 131        {
 0132            if (location == null)
 133            {
 0134                throw new ArgumentNullException(nameof(location));
 135            }
 0136            if (resourceGroupName == null)
 137            {
 0138                throw new ArgumentNullException(nameof(resourceGroupName));
 139            }
 140
 141            async Task<Page<AvailablePrivateEndpointType>> FirstPageFunc(int? pageSizeHint)
 142            {
 0143                using var scope = _clientDiagnostics.CreateScope("AvailablePrivateEndpointTypesOperations.ListByResource
 0144                scope.Start();
 145                try
 146                {
 0147                    var response = await RestClient.ListByResourceGroupAsync(location, resourceGroupName, cancellationTo
 0148                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 149                }
 0150                catch (Exception e)
 151                {
 0152                    scope.Failed(e);
 0153                    throw;
 154                }
 0155            }
 156            async Task<Page<AvailablePrivateEndpointType>> NextPageFunc(string nextLink, int? pageSizeHint)
 157            {
 0158                using var scope = _clientDiagnostics.CreateScope("AvailablePrivateEndpointTypesOperations.ListByResource
 0159                scope.Start();
 160                try
 161                {
 0162                    var response = await RestClient.ListByResourceGroupNextPageAsync(nextLink, location, resourceGroupNa
 0163                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 164                }
 0165                catch (Exception e)
 166                {
 0167                    scope.Failed(e);
 0168                    throw;
 169                }
 0170            }
 0171            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 172        }
 173
 174        /// <summary> Returns all of the resource types that can be linked to a Private Endpoint in this subscription in
 175        /// <param name="location"> The location of the domain name. </param>
 176        /// <param name="resourceGroupName"> The name of the resource group. </param>
 177        /// <param name="cancellationToken"> The cancellation token to use. </param>
 178        public virtual Pageable<AvailablePrivateEndpointType> ListByResourceGroup(string location, string resourceGroupN
 179        {
 0180            if (location == null)
 181            {
 0182                throw new ArgumentNullException(nameof(location));
 183            }
 0184            if (resourceGroupName == null)
 185            {
 0186                throw new ArgumentNullException(nameof(resourceGroupName));
 187            }
 188
 189            Page<AvailablePrivateEndpointType> FirstPageFunc(int? pageSizeHint)
 190            {
 0191                using var scope = _clientDiagnostics.CreateScope("AvailablePrivateEndpointTypesOperations.ListByResource
 0192                scope.Start();
 193                try
 194                {
 0195                    var response = RestClient.ListByResourceGroup(location, resourceGroupName, cancellationToken);
 0196                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 197                }
 0198                catch (Exception e)
 199                {
 0200                    scope.Failed(e);
 0201                    throw;
 202                }
 0203            }
 204            Page<AvailablePrivateEndpointType> NextPageFunc(string nextLink, int? pageSizeHint)
 205            {
 0206                using var scope = _clientDiagnostics.CreateScope("AvailablePrivateEndpointTypesOperations.ListByResource
 0207                scope.Start();
 208                try
 209                {
 0210                    var response = RestClient.ListByResourceGroupNextPage(nextLink, location, resourceGroupName, cancell
 0211                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 212                }
 0213                catch (Exception e)
 214                {
 0215                    scope.Failed(e);
 0216                    throw;
 217                }
 0218            }
 0219            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 220        }
 221    }
 222}