| | 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.Storage.Models; |
| | 14 | |
|
| | 15 | | namespace Azure.ResourceManager.Storage |
| | 16 | | { |
| | 17 | | /// <summary> The TableServices service client. </summary> |
| | 18 | | public partial class TableServicesOperations |
| | 19 | | { |
| | 20 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 21 | | private readonly HttpPipeline _pipeline; |
| 0 | 22 | | internal TableServicesRestOperations RestClient { get; } |
| | 23 | | /// <summary> Initializes a new instance of TableServicesOperations for mocking. </summary> |
| 0 | 24 | | protected TableServicesOperations() |
| | 25 | | { |
| 0 | 26 | | } |
| | 27 | | /// <summary> Initializes a new instance of TableServicesOperations. </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"> The ID of the target subscription. </param> |
| | 31 | | /// <param name="endpoint"> server parameter. </param> |
| | 32 | | /// <param name="apiVersion"> Api Version. </param> |
| 0 | 33 | | internal TableServicesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscription |
| | 34 | | { |
| 0 | 35 | | RestClient = new TableServicesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersi |
| 0 | 36 | | _clientDiagnostics = clientDiagnostics; |
| 0 | 37 | | _pipeline = pipeline; |
| 0 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> List all table services for the storage account. </summary> |
| | 41 | | /// <param name="resourceGroupName"> The name of the resource group within the user's subscription. The nam |
| | 42 | | /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco |
| | 43 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 44 | | public virtual async Task<Response<ListTableServices>> ListAsync(string resourceGroupName, string accountName, C |
| | 45 | | { |
| 0 | 46 | | using var scope = _clientDiagnostics.CreateScope("TableServicesOperations.List"); |
| 0 | 47 | | scope.Start(); |
| | 48 | | try |
| | 49 | | { |
| 0 | 50 | | return await RestClient.ListAsync(resourceGroupName, accountName, cancellationToken).ConfigureAwait(fals |
| | 51 | | } |
| 0 | 52 | | catch (Exception e) |
| | 53 | | { |
| 0 | 54 | | scope.Failed(e); |
| 0 | 55 | | throw; |
| | 56 | | } |
| 0 | 57 | | } |
| | 58 | |
|
| | 59 | | /// <summary> List all table services for the storage account. </summary> |
| | 60 | | /// <param name="resourceGroupName"> The name of the resource group within the user's subscription. The nam |
| | 61 | | /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco |
| | 62 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 63 | | public virtual Response<ListTableServices> List(string resourceGroupName, string accountName, CancellationToken |
| | 64 | | { |
| 0 | 65 | | using var scope = _clientDiagnostics.CreateScope("TableServicesOperations.List"); |
| 0 | 66 | | scope.Start(); |
| | 67 | | try |
| | 68 | | { |
| 0 | 69 | | return RestClient.List(resourceGroupName, accountName, cancellationToken); |
| | 70 | | } |
| 0 | 71 | | catch (Exception e) |
| | 72 | | { |
| 0 | 73 | | scope.Failed(e); |
| 0 | 74 | | throw; |
| | 75 | | } |
| 0 | 76 | | } |
| | 77 | |
|
| | 78 | | /// <summary> Sets the properties of a storage account’s Table service, including properties for Storage Analyti |
| | 79 | | /// <param name="resourceGroupName"> The name of the resource group within the user's subscription. The nam |
| | 80 | | /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco |
| | 81 | | /// <param name="parameters"> The properties of a storage account’s Table service, only properties for Storage A |
| | 82 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 83 | | public virtual async Task<Response<TableServiceProperties>> SetServicePropertiesAsync(string resourceGroupName, |
| | 84 | | { |
| 0 | 85 | | using var scope = _clientDiagnostics.CreateScope("TableServicesOperations.SetServiceProperties"); |
| 0 | 86 | | scope.Start(); |
| | 87 | | try |
| | 88 | | { |
| 0 | 89 | | return await RestClient.SetServicePropertiesAsync(resourceGroupName, accountName, parameters, cancellati |
| | 90 | | } |
| 0 | 91 | | catch (Exception e) |
| | 92 | | { |
| 0 | 93 | | scope.Failed(e); |
| 0 | 94 | | throw; |
| | 95 | | } |
| 0 | 96 | | } |
| | 97 | |
|
| | 98 | | /// <summary> Sets the properties of a storage account’s Table service, including properties for Storage Analyti |
| | 99 | | /// <param name="resourceGroupName"> The name of the resource group within the user's subscription. The nam |
| | 100 | | /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco |
| | 101 | | /// <param name="parameters"> The properties of a storage account’s Table service, only properties for Storage A |
| | 102 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 103 | | public virtual Response<TableServiceProperties> SetServiceProperties(string resourceGroupName, string accountNam |
| | 104 | | { |
| 0 | 105 | | using var scope = _clientDiagnostics.CreateScope("TableServicesOperations.SetServiceProperties"); |
| 0 | 106 | | scope.Start(); |
| | 107 | | try |
| | 108 | | { |
| 0 | 109 | | return RestClient.SetServiceProperties(resourceGroupName, accountName, parameters, cancellationToken); |
| | 110 | | } |
| 0 | 111 | | catch (Exception e) |
| | 112 | | { |
| 0 | 113 | | scope.Failed(e); |
| 0 | 114 | | throw; |
| | 115 | | } |
| 0 | 116 | | } |
| | 117 | |
|
| | 118 | | /// <summary> Gets the properties of a storage account’s Table service, including properties for Storage Analyti |
| | 119 | | /// <param name="resourceGroupName"> The name of the resource group within the user's subscription. The nam |
| | 120 | | /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco |
| | 121 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 122 | | public virtual async Task<Response<TableServiceProperties>> GetServicePropertiesAsync(string resourceGroupName, |
| | 123 | | { |
| 0 | 124 | | using var scope = _clientDiagnostics.CreateScope("TableServicesOperations.GetServiceProperties"); |
| 0 | 125 | | scope.Start(); |
| | 126 | | try |
| | 127 | | { |
| 0 | 128 | | return await RestClient.GetServicePropertiesAsync(resourceGroupName, accountName, cancellationToken).Con |
| | 129 | | } |
| 0 | 130 | | catch (Exception e) |
| | 131 | | { |
| 0 | 132 | | scope.Failed(e); |
| 0 | 133 | | throw; |
| | 134 | | } |
| 0 | 135 | | } |
| | 136 | |
|
| | 137 | | /// <summary> Gets the properties of a storage account’s Table service, including properties for Storage Analyti |
| | 138 | | /// <param name="resourceGroupName"> The name of the resource group within the user's subscription. The nam |
| | 139 | | /// <param name="accountName"> The name of the storage account within the specified resource group. Storage acco |
| | 140 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 141 | | public virtual Response<TableServiceProperties> GetServiceProperties(string resourceGroupName, string accountNam |
| | 142 | | { |
| 0 | 143 | | using var scope = _clientDiagnostics.CreateScope("TableServicesOperations.GetServiceProperties"); |
| 0 | 144 | | scope.Start(); |
| | 145 | | try |
| | 146 | | { |
| 0 | 147 | | return RestClient.GetServiceProperties(resourceGroupName, accountName, cancellationToken); |
| | 148 | | } |
| 0 | 149 | | catch (Exception e) |
| | 150 | | { |
| 0 | 151 | | scope.Failed(e); |
| 0 | 152 | | throw; |
| | 153 | | } |
| 0 | 154 | | } |
| | 155 | | } |
| | 156 | | } |