< Summary

Class:Azure.ResourceManager.Network.VpnSitesConfigurationOperations
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\VpnSitesConfigurationOperations.cs
Covered lines:0
Uncovered lines:36
Coverable lines:36
Total lines:106
Line coverage:0% (0 of 36)
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%
StartDownloadAsync()-0%0%
StartDownload(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\VpnSitesConfigurationOperations.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.Core.Pipeline;
 12using Azure.ResourceManager.Network.Models;
 13
 14namespace Azure.ResourceManager.Network
 15{
 16    /// <summary> The VpnSitesConfiguration service client. </summary>
 17    public partial class VpnSitesConfigurationOperations
 18    {
 19        private readonly ClientDiagnostics _clientDiagnostics;
 20        private readonly HttpPipeline _pipeline;
 021        internal VpnSitesConfigurationRestOperations RestClient { get; }
 22        /// <summary> Initializes a new instance of VpnSitesConfigurationOperations for mocking. </summary>
 023        protected VpnSitesConfigurationOperations()
 24        {
 025        }
 26        /// <summary> Initializes a new instance of VpnSitesConfigurationOperations. </summary>
 27        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
 28        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
 29        /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subsc
 30        /// <param name="endpoint"> server parameter. </param>
 031        internal VpnSitesConfigurationOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subs
 32        {
 033            RestClient = new VpnSitesConfigurationRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
 034            _clientDiagnostics = clientDiagnostics;
 035            _pipeline = pipeline;
 036        }
 37
 38        /// <summary> Gives the sas-url to download the configurations for vpn-sites in a resource group. </summary>
 39        /// <param name="resourceGroupName"> The resource group name. </param>
 40        /// <param name="virtualWANName"> The name of the VirtualWAN for which configuration of all vpn-sites is needed.
 41        /// <param name="request"> Parameters supplied to download vpn-sites configuration. </param>
 42        /// <param name="cancellationToken"> The cancellation token to use. </param>
 43        public virtual async Task<VpnSitesConfigurationDownloadOperation> StartDownloadAsync(string resourceGroupName, s
 44        {
 045            if (resourceGroupName == null)
 46            {
 047                throw new ArgumentNullException(nameof(resourceGroupName));
 48            }
 049            if (virtualWANName == null)
 50            {
 051                throw new ArgumentNullException(nameof(virtualWANName));
 52            }
 053            if (request == null)
 54            {
 055                throw new ArgumentNullException(nameof(request));
 56            }
 57
 058            using var scope = _clientDiagnostics.CreateScope("VpnSitesConfigurationOperations.StartDownload");
 059            scope.Start();
 60            try
 61            {
 062                var originalResponse = await RestClient.DownloadAsync(resourceGroupName, virtualWANName, request, cancel
 063                return new VpnSitesConfigurationDownloadOperation(_clientDiagnostics, _pipeline, RestClient.CreateDownlo
 64            }
 065            catch (Exception e)
 66            {
 067                scope.Failed(e);
 068                throw;
 69            }
 070        }
 71
 72        /// <summary> Gives the sas-url to download the configurations for vpn-sites in a resource group. </summary>
 73        /// <param name="resourceGroupName"> The resource group name. </param>
 74        /// <param name="virtualWANName"> The name of the VirtualWAN for which configuration of all vpn-sites is needed.
 75        /// <param name="request"> Parameters supplied to download vpn-sites configuration. </param>
 76        /// <param name="cancellationToken"> The cancellation token to use. </param>
 77        public virtual VpnSitesConfigurationDownloadOperation StartDownload(string resourceGroupName, string virtualWANN
 78        {
 079            if (resourceGroupName == null)
 80            {
 081                throw new ArgumentNullException(nameof(resourceGroupName));
 82            }
 083            if (virtualWANName == null)
 84            {
 085                throw new ArgumentNullException(nameof(virtualWANName));
 86            }
 087            if (request == null)
 88            {
 089                throw new ArgumentNullException(nameof(request));
 90            }
 91
 092            using var scope = _clientDiagnostics.CreateScope("VpnSitesConfigurationOperations.StartDownload");
 093            scope.Start();
 94            try
 95            {
 096                var originalResponse = RestClient.Download(resourceGroupName, virtualWANName, request, cancellationToken
 097                return new VpnSitesConfigurationDownloadOperation(_clientDiagnostics, _pipeline, RestClient.CreateDownlo
 98            }
 099            catch (Exception e)
 100            {
 0101                scope.Failed(e);
 0102                throw;
 103            }
 0104        }
 105    }
 106}