< Summary

Class:Azure.ResourceManager.EventHubs.ConfigurationOperations
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\ConfigurationOperations.cs
Covered lines:0
Uncovered lines:36
Coverable lines:36
Total lines:117
Line coverage:0% (0 of 36)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-0%100%
.ctor()-0%100%
.ctor(...)-0%100%
PatchAsync()-0%100%
Patch(...)-0%100%
GetAsync()-0%100%
Get(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\ConfigurationOperations.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.Pipeline;
 13using Azure.ResourceManager.EventHubs.Models;
 14
 15namespace Azure.ResourceManager.EventHubs
 16{
 17    /// <summary> The Configuration service client. </summary>
 18    public partial class ConfigurationOperations
 19    {
 20        private readonly ClientDiagnostics _clientDiagnostics;
 21        private readonly HttpPipeline _pipeline;
 022        internal ConfigurationRestOperations RestClient { get; }
 23        /// <summary> Initializes a new instance of ConfigurationOperations for mocking. </summary>
 024        protected ConfigurationOperations()
 25        {
 026        }
 27        /// <summary> Initializes a new instance of ConfigurationOperations. </summary>
 28        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
 29        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
 30        /// <param name="subscriptionId"> Subscription credentials that uniquely identify a Microsoft Azure subscription
 31        /// <param name="endpoint"> server parameter. </param>
 032        internal ConfigurationOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscription
 33        {
 034            RestClient = new ConfigurationRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
 035            _clientDiagnostics = clientDiagnostics;
 036            _pipeline = pipeline;
 037        }
 38
 39        /// <summary> Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves
 40        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 41        /// <param name="clusterName"> The name of the Event Hubs Cluster. </param>
 42        /// <param name="parameters"> Parameters for creating an Event Hubs Cluster resource. </param>
 43        /// <param name="cancellationToken"> The cancellation token to use. </param>
 44        public virtual async Task<Response<ClusterQuotaConfigurationProperties>> PatchAsync(string resourceGroupName, st
 45        {
 046            using var scope = _clientDiagnostics.CreateScope("ConfigurationOperations.Patch");
 047            scope.Start();
 48            try
 49            {
 050                return await RestClient.PatchAsync(resourceGroupName, clusterName, parameters, cancellationToken).Config
 51            }
 052            catch (Exception e)
 53            {
 054                scope.Failed(e);
 055                throw;
 56            }
 057        }
 58
 59        /// <summary> Replace all specified Event Hubs Cluster settings with those contained in the request body. Leaves
 60        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 61        /// <param name="clusterName"> The name of the Event Hubs Cluster. </param>
 62        /// <param name="parameters"> Parameters for creating an Event Hubs Cluster resource. </param>
 63        /// <param name="cancellationToken"> The cancellation token to use. </param>
 64        public virtual Response<ClusterQuotaConfigurationProperties> Patch(string resourceGroupName, string clusterName,
 65        {
 066            using var scope = _clientDiagnostics.CreateScope("ConfigurationOperations.Patch");
 067            scope.Start();
 68            try
 69            {
 070                return RestClient.Patch(resourceGroupName, clusterName, parameters, cancellationToken);
 71            }
 072            catch (Exception e)
 73            {
 074                scope.Failed(e);
 075                throw;
 76            }
 077        }
 78
 79        /// <summary> Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas a
 80        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 81        /// <param name="clusterName"> The name of the Event Hubs Cluster. </param>
 82        /// <param name="cancellationToken"> The cancellation token to use. </param>
 83        public virtual async Task<Response<ClusterQuotaConfigurationProperties>> GetAsync(string resourceGroupName, stri
 84        {
 085            using var scope = _clientDiagnostics.CreateScope("ConfigurationOperations.Get");
 086            scope.Start();
 87            try
 88            {
 089                return await RestClient.GetAsync(resourceGroupName, clusterName, cancellationToken).ConfigureAwait(false
 90            }
 091            catch (Exception e)
 92            {
 093                scope.Failed(e);
 094                throw;
 95            }
 096        }
 97
 98        /// <summary> Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the quotas a
 99        /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param>
 100        /// <param name="clusterName"> The name of the Event Hubs Cluster. </param>
 101        /// <param name="cancellationToken"> The cancellation token to use. </param>
 102        public virtual Response<ClusterQuotaConfigurationProperties> Get(string resourceGroupName, string clusterName, C
 103        {
 0104            using var scope = _clientDiagnostics.CreateScope("ConfigurationOperations.Get");
 0105            scope.Start();
 106            try
 107            {
 0108                return RestClient.Get(resourceGroupName, clusterName, cancellationToken);
 109            }
 0110            catch (Exception e)
 111            {
 0112                scope.Failed(e);
 0113                throw;
 114            }
 0115        }
 116    }
 117}