| | 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.Threading; |
| | 10 | | using System.Threading.Tasks; |
| | 11 | | using Azure; |
| | 12 | | using Azure.Core.Pipeline; |
| | 13 | | using Azure.ResourceManager.EventHubs.Models; |
| | 14 | |
|
| | 15 | | namespace 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; |
| 0 | 22 | | internal ConfigurationRestOperations RestClient { get; } |
| | 23 | | /// <summary> Initializes a new instance of ConfigurationOperations for mocking. </summary> |
| 0 | 24 | | protected ConfigurationOperations() |
| | 25 | | { |
| 0 | 26 | | } |
| | 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> |
| 0 | 32 | | internal ConfigurationOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscription |
| | 33 | | { |
| 0 | 34 | | RestClient = new ConfigurationRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint); |
| 0 | 35 | | _clientDiagnostics = clientDiagnostics; |
| 0 | 36 | | _pipeline = pipeline; |
| 0 | 37 | | } |
| | 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 | | { |
| 0 | 46 | | using var scope = _clientDiagnostics.CreateScope("ConfigurationOperations.Patch"); |
| 0 | 47 | | scope.Start(); |
| | 48 | | try |
| | 49 | | { |
| 0 | 50 | | return await RestClient.PatchAsync(resourceGroupName, clusterName, parameters, cancellationToken).Config |
| | 51 | | } |
| 0 | 52 | | catch (Exception e) |
| | 53 | | { |
| 0 | 54 | | scope.Failed(e); |
| 0 | 55 | | throw; |
| | 56 | | } |
| 0 | 57 | | } |
| | 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 | | { |
| 0 | 66 | | using var scope = _clientDiagnostics.CreateScope("ConfigurationOperations.Patch"); |
| 0 | 67 | | scope.Start(); |
| | 68 | | try |
| | 69 | | { |
| 0 | 70 | | return RestClient.Patch(resourceGroupName, clusterName, parameters, cancellationToken); |
| | 71 | | } |
| 0 | 72 | | catch (Exception e) |
| | 73 | | { |
| 0 | 74 | | scope.Failed(e); |
| 0 | 75 | | throw; |
| | 76 | | } |
| 0 | 77 | | } |
| | 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 | | { |
| 0 | 85 | | using var scope = _clientDiagnostics.CreateScope("ConfigurationOperations.Get"); |
| 0 | 86 | | scope.Start(); |
| | 87 | | try |
| | 88 | | { |
| 0 | 89 | | return await RestClient.GetAsync(resourceGroupName, clusterName, cancellationToken).ConfigureAwait(false |
| | 90 | | } |
| 0 | 91 | | catch (Exception e) |
| | 92 | | { |
| 0 | 93 | | scope.Failed(e); |
| 0 | 94 | | throw; |
| | 95 | | } |
| 0 | 96 | | } |
| | 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 | | { |
| 0 | 104 | | using var scope = _clientDiagnostics.CreateScope("ConfigurationOperations.Get"); |
| 0 | 105 | | scope.Start(); |
| | 106 | | try |
| | 107 | | { |
| 0 | 108 | | return RestClient.Get(resourceGroupName, clusterName, cancellationToken); |
| | 109 | | } |
| 0 | 110 | | catch (Exception e) |
| | 111 | | { |
| 0 | 112 | | scope.Failed(e); |
| 0 | 113 | | throw; |
| | 114 | | } |
| 0 | 115 | | } |
| | 116 | | } |
| | 117 | | } |