| | 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.Text.Json; |
| | 10 | | using System.Threading; |
| | 11 | | using System.Threading.Tasks; |
| | 12 | | using Azure; |
| | 13 | | using Azure.Core; |
| | 14 | | using Azure.Core.Pipeline; |
| | 15 | | using Azure.ResourceManager.EventHubs.Models; |
| | 16 | |
|
| | 17 | | namespace Azure.ResourceManager.EventHubs |
| | 18 | | { |
| | 19 | | internal partial class DisasterRecoveryConfigsRestOperations |
| | 20 | | { |
| | 21 | | private string subscriptionId; |
| | 22 | | private Uri endpoint; |
| | 23 | | private ClientDiagnostics _clientDiagnostics; |
| | 24 | | private HttpPipeline _pipeline; |
| | 25 | |
|
| | 26 | | /// <summary> Initializes a new instance of DisasterRecoveryConfigsRestOperations. </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"> Subscription credentials that uniquely identify a Microsoft Azure subscription |
| | 30 | | /// <param name="endpoint"> server parameter. </param> |
| | 31 | | /// <exception cref="ArgumentNullException"> This occurs when one of the required arguments is null. </exception |
| 48 | 32 | | public DisasterRecoveryConfigsRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string |
| | 33 | | { |
| 48 | 34 | | if (subscriptionId == null) |
| | 35 | | { |
| 0 | 36 | | throw new ArgumentNullException(nameof(subscriptionId)); |
| | 37 | | } |
| 48 | 38 | | endpoint ??= new Uri("https://management.azure.com"); |
| | 39 | |
|
| 48 | 40 | | this.subscriptionId = subscriptionId; |
| 48 | 41 | | this.endpoint = endpoint; |
| 48 | 42 | | _clientDiagnostics = clientDiagnostics; |
| 48 | 43 | | _pipeline = pipeline; |
| 48 | 44 | | } |
| | 45 | |
|
| | 46 | | internal HttpMessage CreateListAuthorizationRulesRequest(string resourceGroupName, string namespaceName, string |
| | 47 | | { |
| 0 | 48 | | var message = _pipeline.CreateMessage(); |
| 0 | 49 | | var request = message.Request; |
| 0 | 50 | | request.Method = RequestMethod.Get; |
| 0 | 51 | | var uri = new RawRequestUriBuilder(); |
| 0 | 52 | | uri.Reset(endpoint); |
| 0 | 53 | | uri.AppendPath("/subscriptions/", false); |
| 0 | 54 | | uri.AppendPath(subscriptionId, true); |
| 0 | 55 | | uri.AppendPath("/resourceGroups/", false); |
| 0 | 56 | | uri.AppendPath(resourceGroupName, true); |
| 0 | 57 | | uri.AppendPath("/providers/Microsoft.EventHub/namespaces/", false); |
| 0 | 58 | | uri.AppendPath(namespaceName, true); |
| 0 | 59 | | uri.AppendPath("/disasterRecoveryConfigs/", false); |
| 0 | 60 | | uri.AppendPath(@alias, true); |
| 0 | 61 | | uri.AppendPath("/authorizationRules", false); |
| 0 | 62 | | uri.AppendQuery("api-version", "2017-04-01", true); |
| 0 | 63 | | request.Uri = uri; |
| 0 | 64 | | return message; |
| | 65 | | } |
| | 66 | |
|
| | 67 | | /// <summary> Gets a list of authorization rules for a Namespace. </summary> |
| | 68 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 69 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 70 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 71 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 72 | | public async Task<Response<AuthorizationRuleListResult>> ListAuthorizationRulesAsync(string resourceGroupName, s |
| | 73 | | { |
| 0 | 74 | | if (resourceGroupName == null) |
| | 75 | | { |
| 0 | 76 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 77 | | } |
| 0 | 78 | | if (namespaceName == null) |
| | 79 | | { |
| 0 | 80 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 81 | | } |
| 0 | 82 | | if (@alias == null) |
| | 83 | | { |
| 0 | 84 | | throw new ArgumentNullException(nameof(@alias)); |
| | 85 | | } |
| | 86 | |
|
| 0 | 87 | | using var message = CreateListAuthorizationRulesRequest(resourceGroupName, namespaceName, @alias); |
| 0 | 88 | | await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); |
| 0 | 89 | | switch (message.Response.Status) |
| | 90 | | { |
| | 91 | | case 200: |
| | 92 | | { |
| 0 | 93 | | AuthorizationRuleListResult value = default; |
| 0 | 94 | | using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc |
| 0 | 95 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 96 | | { |
| 0 | 97 | | value = null; |
| | 98 | | } |
| | 99 | | else |
| | 100 | | { |
| 0 | 101 | | value = AuthorizationRuleListResult.DeserializeAuthorizationRuleListResult(document.RootElem |
| | 102 | | } |
| 0 | 103 | | return Response.FromValue(value, message.Response); |
| | 104 | | } |
| | 105 | | default: |
| 0 | 106 | | throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa |
| | 107 | | } |
| 0 | 108 | | } |
| | 109 | |
|
| | 110 | | /// <summary> Gets a list of authorization rules for a Namespace. </summary> |
| | 111 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 112 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 113 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 114 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 115 | | public Response<AuthorizationRuleListResult> ListAuthorizationRules(string resourceGroupName, string namespaceNa |
| | 116 | | { |
| 0 | 117 | | if (resourceGroupName == null) |
| | 118 | | { |
| 0 | 119 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 120 | | } |
| 0 | 121 | | if (namespaceName == null) |
| | 122 | | { |
| 0 | 123 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 124 | | } |
| 0 | 125 | | if (@alias == null) |
| | 126 | | { |
| 0 | 127 | | throw new ArgumentNullException(nameof(@alias)); |
| | 128 | | } |
| | 129 | |
|
| 0 | 130 | | using var message = CreateListAuthorizationRulesRequest(resourceGroupName, namespaceName, @alias); |
| 0 | 131 | | _pipeline.Send(message, cancellationToken); |
| 0 | 132 | | switch (message.Response.Status) |
| | 133 | | { |
| | 134 | | case 200: |
| | 135 | | { |
| 0 | 136 | | AuthorizationRuleListResult value = default; |
| 0 | 137 | | using var document = JsonDocument.Parse(message.Response.ContentStream); |
| 0 | 138 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 139 | | { |
| 0 | 140 | | value = null; |
| | 141 | | } |
| | 142 | | else |
| | 143 | | { |
| 0 | 144 | | value = AuthorizationRuleListResult.DeserializeAuthorizationRuleListResult(document.RootElem |
| | 145 | | } |
| 0 | 146 | | return Response.FromValue(value, message.Response); |
| | 147 | | } |
| | 148 | | default: |
| 0 | 149 | | throw _clientDiagnostics.CreateRequestFailedException(message.Response); |
| | 150 | | } |
| 0 | 151 | | } |
| | 152 | |
|
| | 153 | | internal HttpMessage CreateGetAuthorizationRuleRequest(string resourceGroupName, string namespaceName, string @a |
| | 154 | | { |
| 8 | 155 | | var message = _pipeline.CreateMessage(); |
| 8 | 156 | | var request = message.Request; |
| 8 | 157 | | request.Method = RequestMethod.Get; |
| 8 | 158 | | var uri = new RawRequestUriBuilder(); |
| 8 | 159 | | uri.Reset(endpoint); |
| 8 | 160 | | uri.AppendPath("/subscriptions/", false); |
| 8 | 161 | | uri.AppendPath(subscriptionId, true); |
| 8 | 162 | | uri.AppendPath("/resourceGroups/", false); |
| 8 | 163 | | uri.AppendPath(resourceGroupName, true); |
| 8 | 164 | | uri.AppendPath("/providers/Microsoft.EventHub/namespaces/", false); |
| 8 | 165 | | uri.AppendPath(namespaceName, true); |
| 8 | 166 | | uri.AppendPath("/disasterRecoveryConfigs/", false); |
| 8 | 167 | | uri.AppendPath(@alias, true); |
| 8 | 168 | | uri.AppendPath("/authorizationRules/", false); |
| 8 | 169 | | uri.AppendPath(authorizationRuleName, true); |
| 8 | 170 | | uri.AppendQuery("api-version", "2017-04-01", true); |
| 8 | 171 | | request.Uri = uri; |
| 8 | 172 | | return message; |
| | 173 | | } |
| | 174 | |
|
| | 175 | | /// <summary> Gets an AuthorizationRule for a Namespace by rule name. </summary> |
| | 176 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 177 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 178 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 179 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 180 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 181 | | public async Task<Response<AuthorizationRule>> GetAuthorizationRuleAsync(string resourceGroupName, string namesp |
| | 182 | | { |
| 4 | 183 | | if (resourceGroupName == null) |
| | 184 | | { |
| 0 | 185 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 186 | | } |
| 4 | 187 | | if (namespaceName == null) |
| | 188 | | { |
| 0 | 189 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 190 | | } |
| 4 | 191 | | if (@alias == null) |
| | 192 | | { |
| 0 | 193 | | throw new ArgumentNullException(nameof(@alias)); |
| | 194 | | } |
| 4 | 195 | | if (authorizationRuleName == null) |
| | 196 | | { |
| 0 | 197 | | throw new ArgumentNullException(nameof(authorizationRuleName)); |
| | 198 | | } |
| | 199 | |
|
| 4 | 200 | | using var message = CreateGetAuthorizationRuleRequest(resourceGroupName, namespaceName, @alias, authorizatio |
| 4 | 201 | | await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); |
| 4 | 202 | | switch (message.Response.Status) |
| | 203 | | { |
| | 204 | | case 200: |
| | 205 | | { |
| 4 | 206 | | AuthorizationRule value = default; |
| 4 | 207 | | using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc |
| 4 | 208 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 209 | | { |
| 0 | 210 | | value = null; |
| | 211 | | } |
| | 212 | | else |
| | 213 | | { |
| 4 | 214 | | value = AuthorizationRule.DeserializeAuthorizationRule(document.RootElement); |
| | 215 | | } |
| 4 | 216 | | return Response.FromValue(value, message.Response); |
| | 217 | | } |
| | 218 | | default: |
| 0 | 219 | | throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa |
| | 220 | | } |
| 4 | 221 | | } |
| | 222 | |
|
| | 223 | | /// <summary> Gets an AuthorizationRule for a Namespace by rule name. </summary> |
| | 224 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 225 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 226 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 227 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 228 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 229 | | public Response<AuthorizationRule> GetAuthorizationRule(string resourceGroupName, string namespaceName, string @ |
| | 230 | | { |
| 4 | 231 | | if (resourceGroupName == null) |
| | 232 | | { |
| 0 | 233 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 234 | | } |
| 4 | 235 | | if (namespaceName == null) |
| | 236 | | { |
| 0 | 237 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 238 | | } |
| 4 | 239 | | if (@alias == null) |
| | 240 | | { |
| 0 | 241 | | throw new ArgumentNullException(nameof(@alias)); |
| | 242 | | } |
| 4 | 243 | | if (authorizationRuleName == null) |
| | 244 | | { |
| 0 | 245 | | throw new ArgumentNullException(nameof(authorizationRuleName)); |
| | 246 | | } |
| | 247 | |
|
| 4 | 248 | | using var message = CreateGetAuthorizationRuleRequest(resourceGroupName, namespaceName, @alias, authorizatio |
| 4 | 249 | | _pipeline.Send(message, cancellationToken); |
| 4 | 250 | | switch (message.Response.Status) |
| | 251 | | { |
| | 252 | | case 200: |
| | 253 | | { |
| 4 | 254 | | AuthorizationRule value = default; |
| 4 | 255 | | using var document = JsonDocument.Parse(message.Response.ContentStream); |
| 4 | 256 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 257 | | { |
| 0 | 258 | | value = null; |
| | 259 | | } |
| | 260 | | else |
| | 261 | | { |
| 4 | 262 | | value = AuthorizationRule.DeserializeAuthorizationRule(document.RootElement); |
| | 263 | | } |
| 4 | 264 | | return Response.FromValue(value, message.Response); |
| | 265 | | } |
| | 266 | | default: |
| 0 | 267 | | throw _clientDiagnostics.CreateRequestFailedException(message.Response); |
| | 268 | | } |
| 4 | 269 | | } |
| | 270 | |
|
| | 271 | | internal HttpMessage CreateListKeysRequest(string resourceGroupName, string namespaceName, string @alias, string |
| | 272 | | { |
| 8 | 273 | | var message = _pipeline.CreateMessage(); |
| 8 | 274 | | var request = message.Request; |
| 8 | 275 | | request.Method = RequestMethod.Post; |
| 8 | 276 | | var uri = new RawRequestUriBuilder(); |
| 8 | 277 | | uri.Reset(endpoint); |
| 8 | 278 | | uri.AppendPath("/subscriptions/", false); |
| 8 | 279 | | uri.AppendPath(subscriptionId, true); |
| 8 | 280 | | uri.AppendPath("/resourceGroups/", false); |
| 8 | 281 | | uri.AppendPath(resourceGroupName, true); |
| 8 | 282 | | uri.AppendPath("/providers/Microsoft.EventHub/namespaces/", false); |
| 8 | 283 | | uri.AppendPath(namespaceName, true); |
| 8 | 284 | | uri.AppendPath("/disasterRecoveryConfigs/", false); |
| 8 | 285 | | uri.AppendPath(@alias, true); |
| 8 | 286 | | uri.AppendPath("/authorizationRules/", false); |
| 8 | 287 | | uri.AppendPath(authorizationRuleName, true); |
| 8 | 288 | | uri.AppendPath("/listKeys", false); |
| 8 | 289 | | uri.AppendQuery("api-version", "2017-04-01", true); |
| 8 | 290 | | request.Uri = uri; |
| 8 | 291 | | return message; |
| | 292 | | } |
| | 293 | |
|
| | 294 | | /// <summary> Gets the primary and secondary connection strings for the Namespace. </summary> |
| | 295 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 296 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 297 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 298 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 299 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 300 | | public async Task<Response<AccessKeys>> ListKeysAsync(string resourceGroupName, string namespaceName, string @al |
| | 301 | | { |
| 4 | 302 | | if (resourceGroupName == null) |
| | 303 | | { |
| 0 | 304 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 305 | | } |
| 4 | 306 | | if (namespaceName == null) |
| | 307 | | { |
| 0 | 308 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 309 | | } |
| 4 | 310 | | if (@alias == null) |
| | 311 | | { |
| 0 | 312 | | throw new ArgumentNullException(nameof(@alias)); |
| | 313 | | } |
| 4 | 314 | | if (authorizationRuleName == null) |
| | 315 | | { |
| 0 | 316 | | throw new ArgumentNullException(nameof(authorizationRuleName)); |
| | 317 | | } |
| | 318 | |
|
| 4 | 319 | | using var message = CreateListKeysRequest(resourceGroupName, namespaceName, @alias, authorizationRuleName); |
| 4 | 320 | | await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); |
| 4 | 321 | | switch (message.Response.Status) |
| | 322 | | { |
| | 323 | | case 200: |
| | 324 | | { |
| 4 | 325 | | AccessKeys value = default; |
| 4 | 326 | | using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc |
| 4 | 327 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 328 | | { |
| 0 | 329 | | value = null; |
| | 330 | | } |
| | 331 | | else |
| | 332 | | { |
| 4 | 333 | | value = AccessKeys.DeserializeAccessKeys(document.RootElement); |
| | 334 | | } |
| 4 | 335 | | return Response.FromValue(value, message.Response); |
| | 336 | | } |
| | 337 | | default: |
| 0 | 338 | | throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa |
| | 339 | | } |
| 4 | 340 | | } |
| | 341 | |
|
| | 342 | | /// <summary> Gets the primary and secondary connection strings for the Namespace. </summary> |
| | 343 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 344 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 345 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 346 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 347 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 348 | | public Response<AccessKeys> ListKeys(string resourceGroupName, string namespaceName, string @alias, string autho |
| | 349 | | { |
| 4 | 350 | | if (resourceGroupName == null) |
| | 351 | | { |
| 0 | 352 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 353 | | } |
| 4 | 354 | | if (namespaceName == null) |
| | 355 | | { |
| 0 | 356 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 357 | | } |
| 4 | 358 | | if (@alias == null) |
| | 359 | | { |
| 0 | 360 | | throw new ArgumentNullException(nameof(@alias)); |
| | 361 | | } |
| 4 | 362 | | if (authorizationRuleName == null) |
| | 363 | | { |
| 0 | 364 | | throw new ArgumentNullException(nameof(authorizationRuleName)); |
| | 365 | | } |
| | 366 | |
|
| 4 | 367 | | using var message = CreateListKeysRequest(resourceGroupName, namespaceName, @alias, authorizationRuleName); |
| 4 | 368 | | _pipeline.Send(message, cancellationToken); |
| 4 | 369 | | switch (message.Response.Status) |
| | 370 | | { |
| | 371 | | case 200: |
| | 372 | | { |
| 4 | 373 | | AccessKeys value = default; |
| 4 | 374 | | using var document = JsonDocument.Parse(message.Response.ContentStream); |
| 4 | 375 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 376 | | { |
| 0 | 377 | | value = null; |
| | 378 | | } |
| | 379 | | else |
| | 380 | | { |
| 4 | 381 | | value = AccessKeys.DeserializeAccessKeys(document.RootElement); |
| | 382 | | } |
| 4 | 383 | | return Response.FromValue(value, message.Response); |
| | 384 | | } |
| | 385 | | default: |
| 0 | 386 | | throw _clientDiagnostics.CreateRequestFailedException(message.Response); |
| | 387 | | } |
| 4 | 388 | | } |
| | 389 | |
|
| | 390 | | internal HttpMessage CreateCheckNameAvailabilityRequest(string resourceGroupName, string namespaceName, CheckNam |
| | 391 | | { |
| 12 | 392 | | var message = _pipeline.CreateMessage(); |
| 12 | 393 | | var request = message.Request; |
| 12 | 394 | | request.Method = RequestMethod.Post; |
| 12 | 395 | | var uri = new RawRequestUriBuilder(); |
| 12 | 396 | | uri.Reset(endpoint); |
| 12 | 397 | | uri.AppendPath("/subscriptions/", false); |
| 12 | 398 | | uri.AppendPath(subscriptionId, true); |
| 12 | 399 | | uri.AppendPath("/resourceGroups/", false); |
| 12 | 400 | | uri.AppendPath(resourceGroupName, true); |
| 12 | 401 | | uri.AppendPath("/providers/Microsoft.EventHub/namespaces/", false); |
| 12 | 402 | | uri.AppendPath(namespaceName, true); |
| 12 | 403 | | uri.AppendPath("/disasterRecoveryConfigs/checkNameAvailability", false); |
| 12 | 404 | | uri.AppendQuery("api-version", "2017-04-01", true); |
| 12 | 405 | | request.Uri = uri; |
| 12 | 406 | | request.Headers.Add("Content-Type", "application/json"); |
| 12 | 407 | | var content = new Utf8JsonRequestContent(); |
| 12 | 408 | | content.JsonWriter.WriteObjectValue(parameters); |
| 12 | 409 | | request.Content = content; |
| 12 | 410 | | return message; |
| | 411 | | } |
| | 412 | |
|
| | 413 | | /// <summary> Check the give Namespace name availability. </summary> |
| | 414 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 415 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 416 | | /// <param name="parameters"> Parameters to check availability of the given Alias name. </param> |
| | 417 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 418 | | public async Task<Response<CheckNameAvailabilityResult>> CheckNameAvailabilityAsync(string resourceGroupName, st |
| | 419 | | { |
| 6 | 420 | | if (resourceGroupName == null) |
| | 421 | | { |
| 0 | 422 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 423 | | } |
| 6 | 424 | | if (namespaceName == null) |
| | 425 | | { |
| 0 | 426 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 427 | | } |
| 6 | 428 | | if (parameters == null) |
| | 429 | | { |
| 0 | 430 | | throw new ArgumentNullException(nameof(parameters)); |
| | 431 | | } |
| | 432 | |
|
| 6 | 433 | | using var message = CreateCheckNameAvailabilityRequest(resourceGroupName, namespaceName, parameters); |
| 6 | 434 | | await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); |
| 6 | 435 | | switch (message.Response.Status) |
| | 436 | | { |
| | 437 | | case 200: |
| | 438 | | { |
| 6 | 439 | | CheckNameAvailabilityResult value = default; |
| 6 | 440 | | using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc |
| 6 | 441 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 442 | | { |
| 0 | 443 | | value = null; |
| | 444 | | } |
| | 445 | | else |
| | 446 | | { |
| 6 | 447 | | value = CheckNameAvailabilityResult.DeserializeCheckNameAvailabilityResult(document.RootElem |
| | 448 | | } |
| 6 | 449 | | return Response.FromValue(value, message.Response); |
| | 450 | | } |
| | 451 | | default: |
| 0 | 452 | | throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa |
| | 453 | | } |
| 6 | 454 | | } |
| | 455 | |
|
| | 456 | | /// <summary> Check the give Namespace name availability. </summary> |
| | 457 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 458 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 459 | | /// <param name="parameters"> Parameters to check availability of the given Alias name. </param> |
| | 460 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 461 | | public Response<CheckNameAvailabilityResult> CheckNameAvailability(string resourceGroupName, string namespaceNam |
| | 462 | | { |
| 6 | 463 | | if (resourceGroupName == null) |
| | 464 | | { |
| 0 | 465 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 466 | | } |
| 6 | 467 | | if (namespaceName == null) |
| | 468 | | { |
| 0 | 469 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 470 | | } |
| 6 | 471 | | if (parameters == null) |
| | 472 | | { |
| 0 | 473 | | throw new ArgumentNullException(nameof(parameters)); |
| | 474 | | } |
| | 475 | |
|
| 6 | 476 | | using var message = CreateCheckNameAvailabilityRequest(resourceGroupName, namespaceName, parameters); |
| 6 | 477 | | _pipeline.Send(message, cancellationToken); |
| 6 | 478 | | switch (message.Response.Status) |
| | 479 | | { |
| | 480 | | case 200: |
| | 481 | | { |
| 6 | 482 | | CheckNameAvailabilityResult value = default; |
| 6 | 483 | | using var document = JsonDocument.Parse(message.Response.ContentStream); |
| 6 | 484 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 485 | | { |
| 0 | 486 | | value = null; |
| | 487 | | } |
| | 488 | | else |
| | 489 | | { |
| 6 | 490 | | value = CheckNameAvailabilityResult.DeserializeCheckNameAvailabilityResult(document.RootElem |
| | 491 | | } |
| 6 | 492 | | return Response.FromValue(value, message.Response); |
| | 493 | | } |
| | 494 | | default: |
| 0 | 495 | | throw _clientDiagnostics.CreateRequestFailedException(message.Response); |
| | 496 | | } |
| 6 | 497 | | } |
| | 498 | |
|
| | 499 | | internal HttpMessage CreateListRequest(string resourceGroupName, string namespaceName) |
| | 500 | | { |
| 0 | 501 | | var message = _pipeline.CreateMessage(); |
| 0 | 502 | | var request = message.Request; |
| 0 | 503 | | request.Method = RequestMethod.Get; |
| 0 | 504 | | var uri = new RawRequestUriBuilder(); |
| 0 | 505 | | uri.Reset(endpoint); |
| 0 | 506 | | uri.AppendPath("/subscriptions/", false); |
| 0 | 507 | | uri.AppendPath(subscriptionId, true); |
| 0 | 508 | | uri.AppendPath("/resourceGroups/", false); |
| 0 | 509 | | uri.AppendPath(resourceGroupName, true); |
| 0 | 510 | | uri.AppendPath("/providers/Microsoft.EventHub/namespaces/", false); |
| 0 | 511 | | uri.AppendPath(namespaceName, true); |
| 0 | 512 | | uri.AppendPath("/disasterRecoveryConfigs", false); |
| 0 | 513 | | uri.AppendQuery("api-version", "2017-04-01", true); |
| 0 | 514 | | request.Uri = uri; |
| 0 | 515 | | return message; |
| | 516 | | } |
| | 517 | |
|
| | 518 | | /// <summary> Gets all Alias(Disaster Recovery configurations). </summary> |
| | 519 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 520 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 521 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 522 | | public async Task<Response<ArmDisasterRecoveryListResult>> ListAsync(string resourceGroupName, string namespaceN |
| | 523 | | { |
| 0 | 524 | | if (resourceGroupName == null) |
| | 525 | | { |
| 0 | 526 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 527 | | } |
| 0 | 528 | | if (namespaceName == null) |
| | 529 | | { |
| 0 | 530 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 531 | | } |
| | 532 | |
|
| 0 | 533 | | using var message = CreateListRequest(resourceGroupName, namespaceName); |
| 0 | 534 | | await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); |
| 0 | 535 | | switch (message.Response.Status) |
| | 536 | | { |
| | 537 | | case 200: |
| | 538 | | { |
| 0 | 539 | | ArmDisasterRecoveryListResult value = default; |
| 0 | 540 | | using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc |
| 0 | 541 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 542 | | { |
| 0 | 543 | | value = null; |
| | 544 | | } |
| | 545 | | else |
| | 546 | | { |
| 0 | 547 | | value = ArmDisasterRecoveryListResult.DeserializeArmDisasterRecoveryListResult(document.Root |
| | 548 | | } |
| 0 | 549 | | return Response.FromValue(value, message.Response); |
| | 550 | | } |
| | 551 | | default: |
| 0 | 552 | | throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa |
| | 553 | | } |
| 0 | 554 | | } |
| | 555 | |
|
| | 556 | | /// <summary> Gets all Alias(Disaster Recovery configurations). </summary> |
| | 557 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 558 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 559 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 560 | | public Response<ArmDisasterRecoveryListResult> List(string resourceGroupName, string namespaceName, Cancellation |
| | 561 | | { |
| 0 | 562 | | if (resourceGroupName == null) |
| | 563 | | { |
| 0 | 564 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 565 | | } |
| 0 | 566 | | if (namespaceName == null) |
| | 567 | | { |
| 0 | 568 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 569 | | } |
| | 570 | |
|
| 0 | 571 | | using var message = CreateListRequest(resourceGroupName, namespaceName); |
| 0 | 572 | | _pipeline.Send(message, cancellationToken); |
| 0 | 573 | | switch (message.Response.Status) |
| | 574 | | { |
| | 575 | | case 200: |
| | 576 | | { |
| 0 | 577 | | ArmDisasterRecoveryListResult value = default; |
| 0 | 578 | | using var document = JsonDocument.Parse(message.Response.ContentStream); |
| 0 | 579 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 580 | | { |
| 0 | 581 | | value = null; |
| | 582 | | } |
| | 583 | | else |
| | 584 | | { |
| 0 | 585 | | value = ArmDisasterRecoveryListResult.DeserializeArmDisasterRecoveryListResult(document.Root |
| | 586 | | } |
| 0 | 587 | | return Response.FromValue(value, message.Response); |
| | 588 | | } |
| | 589 | | default: |
| 0 | 590 | | throw _clientDiagnostics.CreateRequestFailedException(message.Response); |
| | 591 | | } |
| 0 | 592 | | } |
| | 593 | |
|
| | 594 | | internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, string namespaceName, string @alias, |
| | 595 | | { |
| 16 | 596 | | var message = _pipeline.CreateMessage(); |
| 16 | 597 | | var request = message.Request; |
| 16 | 598 | | request.Method = RequestMethod.Put; |
| 16 | 599 | | var uri = new RawRequestUriBuilder(); |
| 16 | 600 | | uri.Reset(endpoint); |
| 16 | 601 | | uri.AppendPath("/subscriptions/", false); |
| 16 | 602 | | uri.AppendPath(subscriptionId, true); |
| 16 | 603 | | uri.AppendPath("/resourceGroups/", false); |
| 16 | 604 | | uri.AppendPath(resourceGroupName, true); |
| 16 | 605 | | uri.AppendPath("/providers/Microsoft.EventHub/namespaces/", false); |
| 16 | 606 | | uri.AppendPath(namespaceName, true); |
| 16 | 607 | | uri.AppendPath("/disasterRecoveryConfigs/", false); |
| 16 | 608 | | uri.AppendPath(@alias, true); |
| 16 | 609 | | uri.AppendQuery("api-version", "2017-04-01", true); |
| 16 | 610 | | request.Uri = uri; |
| 16 | 611 | | request.Headers.Add("Content-Type", "application/json"); |
| 16 | 612 | | var content = new Utf8JsonRequestContent(); |
| 16 | 613 | | content.JsonWriter.WriteObjectValue(parameters); |
| 16 | 614 | | request.Content = content; |
| 16 | 615 | | return message; |
| | 616 | | } |
| | 617 | |
|
| | 618 | | /// <summary> Creates or updates a new Alias(Disaster Recovery configuration). </summary> |
| | 619 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 620 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 621 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 622 | | /// <param name="parameters"> Parameters required to create an Alias(Disaster Recovery configuration). </param> |
| | 623 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 624 | | public async Task<Response<ArmDisasterRecovery>> CreateOrUpdateAsync(string resourceGroupName, string namespaceN |
| | 625 | | { |
| 8 | 626 | | if (resourceGroupName == null) |
| | 627 | | { |
| 0 | 628 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 629 | | } |
| 8 | 630 | | if (namespaceName == null) |
| | 631 | | { |
| 0 | 632 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 633 | | } |
| 8 | 634 | | if (@alias == null) |
| | 635 | | { |
| 0 | 636 | | throw new ArgumentNullException(nameof(@alias)); |
| | 637 | | } |
| 8 | 638 | | if (parameters == null) |
| | 639 | | { |
| 0 | 640 | | throw new ArgumentNullException(nameof(parameters)); |
| | 641 | | } |
| | 642 | |
|
| 8 | 643 | | using var message = CreateCreateOrUpdateRequest(resourceGroupName, namespaceName, @alias, parameters); |
| 8 | 644 | | await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); |
| 8 | 645 | | switch (message.Response.Status) |
| | 646 | | { |
| | 647 | | case 200: |
| | 648 | | { |
| 8 | 649 | | ArmDisasterRecovery value = default; |
| 8 | 650 | | using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc |
| 8 | 651 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 652 | | { |
| 0 | 653 | | value = null; |
| | 654 | | } |
| | 655 | | else |
| | 656 | | { |
| 8 | 657 | | value = ArmDisasterRecovery.DeserializeArmDisasterRecovery(document.RootElement); |
| | 658 | | } |
| 8 | 659 | | return Response.FromValue(value, message.Response); |
| | 660 | | } |
| | 661 | | case 201: |
| 0 | 662 | | return Response.FromValue<ArmDisasterRecovery>(null, message.Response); |
| | 663 | | default: |
| 0 | 664 | | throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa |
| | 665 | | } |
| 8 | 666 | | } |
| | 667 | |
|
| | 668 | | /// <summary> Creates or updates a new Alias(Disaster Recovery configuration). </summary> |
| | 669 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 670 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 671 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 672 | | /// <param name="parameters"> Parameters required to create an Alias(Disaster Recovery configuration). </param> |
| | 673 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 674 | | public Response<ArmDisasterRecovery> CreateOrUpdate(string resourceGroupName, string namespaceName, string @alia |
| | 675 | | { |
| 8 | 676 | | if (resourceGroupName == null) |
| | 677 | | { |
| 0 | 678 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 679 | | } |
| 8 | 680 | | if (namespaceName == null) |
| | 681 | | { |
| 0 | 682 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 683 | | } |
| 8 | 684 | | if (@alias == null) |
| | 685 | | { |
| 0 | 686 | | throw new ArgumentNullException(nameof(@alias)); |
| | 687 | | } |
| 8 | 688 | | if (parameters == null) |
| | 689 | | { |
| 0 | 690 | | throw new ArgumentNullException(nameof(parameters)); |
| | 691 | | } |
| | 692 | |
|
| 8 | 693 | | using var message = CreateCreateOrUpdateRequest(resourceGroupName, namespaceName, @alias, parameters); |
| 8 | 694 | | _pipeline.Send(message, cancellationToken); |
| 8 | 695 | | switch (message.Response.Status) |
| | 696 | | { |
| | 697 | | case 200: |
| | 698 | | { |
| 8 | 699 | | ArmDisasterRecovery value = default; |
| 8 | 700 | | using var document = JsonDocument.Parse(message.Response.ContentStream); |
| 8 | 701 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 702 | | { |
| 0 | 703 | | value = null; |
| | 704 | | } |
| | 705 | | else |
| | 706 | | { |
| 8 | 707 | | value = ArmDisasterRecovery.DeserializeArmDisasterRecovery(document.RootElement); |
| | 708 | | } |
| 8 | 709 | | return Response.FromValue(value, message.Response); |
| | 710 | | } |
| | 711 | | case 201: |
| 0 | 712 | | return Response.FromValue<ArmDisasterRecovery>(null, message.Response); |
| | 713 | | default: |
| 0 | 714 | | throw _clientDiagnostics.CreateRequestFailedException(message.Response); |
| | 715 | | } |
| 8 | 716 | | } |
| | 717 | |
|
| | 718 | | internal HttpMessage CreateDeleteRequest(string resourceGroupName, string namespaceName, string @alias) |
| | 719 | | { |
| 8 | 720 | | var message = _pipeline.CreateMessage(); |
| 8 | 721 | | var request = message.Request; |
| 8 | 722 | | request.Method = RequestMethod.Delete; |
| 8 | 723 | | var uri = new RawRequestUriBuilder(); |
| 8 | 724 | | uri.Reset(endpoint); |
| 8 | 725 | | uri.AppendPath("/subscriptions/", false); |
| 8 | 726 | | uri.AppendPath(subscriptionId, true); |
| 8 | 727 | | uri.AppendPath("/resourceGroups/", false); |
| 8 | 728 | | uri.AppendPath(resourceGroupName, true); |
| 8 | 729 | | uri.AppendPath("/providers/Microsoft.EventHub/namespaces/", false); |
| 8 | 730 | | uri.AppendPath(namespaceName, true); |
| 8 | 731 | | uri.AppendPath("/disasterRecoveryConfigs/", false); |
| 8 | 732 | | uri.AppendPath(@alias, true); |
| 8 | 733 | | uri.AppendQuery("api-version", "2017-04-01", true); |
| 8 | 734 | | request.Uri = uri; |
| 8 | 735 | | return message; |
| | 736 | | } |
| | 737 | |
|
| | 738 | | /// <summary> Deletes an Alias(Disaster Recovery configuration). </summary> |
| | 739 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 740 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 741 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 742 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 743 | | public async Task<Response> DeleteAsync(string resourceGroupName, string namespaceName, string @alias, Cancellat |
| | 744 | | { |
| 4 | 745 | | if (resourceGroupName == null) |
| | 746 | | { |
| 0 | 747 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 748 | | } |
| 4 | 749 | | if (namespaceName == null) |
| | 750 | | { |
| 0 | 751 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 752 | | } |
| 4 | 753 | | if (@alias == null) |
| | 754 | | { |
| 0 | 755 | | throw new ArgumentNullException(nameof(@alias)); |
| | 756 | | } |
| | 757 | |
|
| 4 | 758 | | using var message = CreateDeleteRequest(resourceGroupName, namespaceName, @alias); |
| 4 | 759 | | await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); |
| 4 | 760 | | switch (message.Response.Status) |
| | 761 | | { |
| | 762 | | case 200: |
| 4 | 763 | | return message.Response; |
| | 764 | | default: |
| 0 | 765 | | throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa |
| | 766 | | } |
| 4 | 767 | | } |
| | 768 | |
|
| | 769 | | /// <summary> Deletes an Alias(Disaster Recovery configuration). </summary> |
| | 770 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 771 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 772 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 773 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 774 | | public Response Delete(string resourceGroupName, string namespaceName, string @alias, CancellationToken cancella |
| | 775 | | { |
| 4 | 776 | | if (resourceGroupName == null) |
| | 777 | | { |
| 0 | 778 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 779 | | } |
| 4 | 780 | | if (namespaceName == null) |
| | 781 | | { |
| 0 | 782 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 783 | | } |
| 4 | 784 | | if (@alias == null) |
| | 785 | | { |
| 0 | 786 | | throw new ArgumentNullException(nameof(@alias)); |
| | 787 | | } |
| | 788 | |
|
| 4 | 789 | | using var message = CreateDeleteRequest(resourceGroupName, namespaceName, @alias); |
| 4 | 790 | | _pipeline.Send(message, cancellationToken); |
| 4 | 791 | | switch (message.Response.Status) |
| | 792 | | { |
| | 793 | | case 200: |
| 4 | 794 | | return message.Response; |
| | 795 | | default: |
| 0 | 796 | | throw _clientDiagnostics.CreateRequestFailedException(message.Response); |
| | 797 | | } |
| 4 | 798 | | } |
| | 799 | |
|
| | 800 | | internal HttpMessage CreateGetRequest(string resourceGroupName, string namespaceName, string @alias) |
| | 801 | | { |
| 6056 | 802 | | var message = _pipeline.CreateMessage(); |
| 6056 | 803 | | var request = message.Request; |
| 6056 | 804 | | request.Method = RequestMethod.Get; |
| 6056 | 805 | | var uri = new RawRequestUriBuilder(); |
| 6056 | 806 | | uri.Reset(endpoint); |
| 6056 | 807 | | uri.AppendPath("/subscriptions/", false); |
| 6056 | 808 | | uri.AppendPath(subscriptionId, true); |
| 6056 | 809 | | uri.AppendPath("/resourceGroups/", false); |
| 6056 | 810 | | uri.AppendPath(resourceGroupName, true); |
| 6056 | 811 | | uri.AppendPath("/providers/Microsoft.EventHub/namespaces/", false); |
| 6056 | 812 | | uri.AppendPath(namespaceName, true); |
| 6056 | 813 | | uri.AppendPath("/disasterRecoveryConfigs/", false); |
| 6056 | 814 | | uri.AppendPath(@alias, true); |
| 6056 | 815 | | uri.AppendQuery("api-version", "2017-04-01", true); |
| 6056 | 816 | | request.Uri = uri; |
| 6056 | 817 | | return message; |
| | 818 | | } |
| | 819 | |
|
| | 820 | | /// <summary> Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. </summary> |
| | 821 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 822 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 823 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 824 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 825 | | public async Task<Response<ArmDisasterRecovery>> GetAsync(string resourceGroupName, string namespaceName, string |
| | 826 | | { |
| 3138 | 827 | | if (resourceGroupName == null) |
| | 828 | | { |
| 0 | 829 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 830 | | } |
| 3138 | 831 | | if (namespaceName == null) |
| | 832 | | { |
| 0 | 833 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 834 | | } |
| 3138 | 835 | | if (@alias == null) |
| | 836 | | { |
| 0 | 837 | | throw new ArgumentNullException(nameof(@alias)); |
| | 838 | | } |
| | 839 | |
|
| 3138 | 840 | | using var message = CreateGetRequest(resourceGroupName, namespaceName, @alias); |
| 3138 | 841 | | await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); |
| 3138 | 842 | | switch (message.Response.Status) |
| | 843 | | { |
| | 844 | | case 200: |
| | 845 | | { |
| 3138 | 846 | | ArmDisasterRecovery value = default; |
| 3138 | 847 | | using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc |
| 3138 | 848 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 849 | | { |
| 0 | 850 | | value = null; |
| | 851 | | } |
| | 852 | | else |
| | 853 | | { |
| 3138 | 854 | | value = ArmDisasterRecovery.DeserializeArmDisasterRecovery(document.RootElement); |
| | 855 | | } |
| 3138 | 856 | | return Response.FromValue(value, message.Response); |
| | 857 | | } |
| | 858 | | default: |
| 0 | 859 | | throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa |
| | 860 | | } |
| 3138 | 861 | | } |
| | 862 | |
|
| | 863 | | /// <summary> Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. </summary> |
| | 864 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 865 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 866 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 867 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 868 | | public Response<ArmDisasterRecovery> Get(string resourceGroupName, string namespaceName, string @alias, Cancella |
| | 869 | | { |
| 2918 | 870 | | if (resourceGroupName == null) |
| | 871 | | { |
| 0 | 872 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 873 | | } |
| 2918 | 874 | | if (namespaceName == null) |
| | 875 | | { |
| 0 | 876 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 877 | | } |
| 2918 | 878 | | if (@alias == null) |
| | 879 | | { |
| 0 | 880 | | throw new ArgumentNullException(nameof(@alias)); |
| | 881 | | } |
| | 882 | |
|
| 2918 | 883 | | using var message = CreateGetRequest(resourceGroupName, namespaceName, @alias); |
| 2918 | 884 | | _pipeline.Send(message, cancellationToken); |
| 2918 | 885 | | switch (message.Response.Status) |
| | 886 | | { |
| | 887 | | case 200: |
| | 888 | | { |
| 2918 | 889 | | ArmDisasterRecovery value = default; |
| 2918 | 890 | | using var document = JsonDocument.Parse(message.Response.ContentStream); |
| 2918 | 891 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 892 | | { |
| 0 | 893 | | value = null; |
| | 894 | | } |
| | 895 | | else |
| | 896 | | { |
| 2918 | 897 | | value = ArmDisasterRecovery.DeserializeArmDisasterRecovery(document.RootElement); |
| | 898 | | } |
| 2918 | 899 | | return Response.FromValue(value, message.Response); |
| | 900 | | } |
| | 901 | | default: |
| 0 | 902 | | throw _clientDiagnostics.CreateRequestFailedException(message.Response); |
| | 903 | | } |
| 2918 | 904 | | } |
| | 905 | |
|
| | 906 | | internal HttpMessage CreateBreakPairingRequest(string resourceGroupName, string namespaceName, string @alias) |
| | 907 | | { |
| 8 | 908 | | var message = _pipeline.CreateMessage(); |
| 8 | 909 | | var request = message.Request; |
| 8 | 910 | | request.Method = RequestMethod.Post; |
| 8 | 911 | | var uri = new RawRequestUriBuilder(); |
| 8 | 912 | | uri.Reset(endpoint); |
| 8 | 913 | | uri.AppendPath("/subscriptions/", false); |
| 8 | 914 | | uri.AppendPath(subscriptionId, true); |
| 8 | 915 | | uri.AppendPath("/resourceGroups/", false); |
| 8 | 916 | | uri.AppendPath(resourceGroupName, true); |
| 8 | 917 | | uri.AppendPath("/providers/Microsoft.EventHub/namespaces/", false); |
| 8 | 918 | | uri.AppendPath(namespaceName, true); |
| 8 | 919 | | uri.AppendPath("/disasterRecoveryConfigs/", false); |
| 8 | 920 | | uri.AppendPath(@alias, true); |
| 8 | 921 | | uri.AppendPath("/breakPairing", false); |
| 8 | 922 | | uri.AppendQuery("api-version", "2017-04-01", true); |
| 8 | 923 | | request.Uri = uri; |
| 8 | 924 | | return message; |
| | 925 | | } |
| | 926 | |
|
| | 927 | | /// <summary> This operation disables the Disaster Recovery and stops replicating changes from primary to second |
| | 928 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 929 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 930 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 931 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 932 | | public async Task<Response> BreakPairingAsync(string resourceGroupName, string namespaceName, string @alias, Can |
| | 933 | | { |
| 4 | 934 | | if (resourceGroupName == null) |
| | 935 | | { |
| 0 | 936 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 937 | | } |
| 4 | 938 | | if (namespaceName == null) |
| | 939 | | { |
| 0 | 940 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 941 | | } |
| 4 | 942 | | if (@alias == null) |
| | 943 | | { |
| 0 | 944 | | throw new ArgumentNullException(nameof(@alias)); |
| | 945 | | } |
| | 946 | |
|
| 4 | 947 | | using var message = CreateBreakPairingRequest(resourceGroupName, namespaceName, @alias); |
| 4 | 948 | | await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); |
| 4 | 949 | | switch (message.Response.Status) |
| | 950 | | { |
| | 951 | | case 200: |
| 4 | 952 | | return message.Response; |
| | 953 | | default: |
| 0 | 954 | | throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa |
| | 955 | | } |
| 4 | 956 | | } |
| | 957 | |
|
| | 958 | | /// <summary> This operation disables the Disaster Recovery and stops replicating changes from primary to second |
| | 959 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 960 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 961 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 962 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 963 | | public Response BreakPairing(string resourceGroupName, string namespaceName, string @alias, CancellationToken ca |
| | 964 | | { |
| 4 | 965 | | if (resourceGroupName == null) |
| | 966 | | { |
| 0 | 967 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 968 | | } |
| 4 | 969 | | if (namespaceName == null) |
| | 970 | | { |
| 0 | 971 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 972 | | } |
| 4 | 973 | | if (@alias == null) |
| | 974 | | { |
| 0 | 975 | | throw new ArgumentNullException(nameof(@alias)); |
| | 976 | | } |
| | 977 | |
|
| 4 | 978 | | using var message = CreateBreakPairingRequest(resourceGroupName, namespaceName, @alias); |
| 4 | 979 | | _pipeline.Send(message, cancellationToken); |
| 4 | 980 | | switch (message.Response.Status) |
| | 981 | | { |
| | 982 | | case 200: |
| 4 | 983 | | return message.Response; |
| | 984 | | default: |
| 0 | 985 | | throw _clientDiagnostics.CreateRequestFailedException(message.Response); |
| | 986 | | } |
| 4 | 987 | | } |
| | 988 | |
|
| | 989 | | internal HttpMessage CreateFailOverRequest(string resourceGroupName, string namespaceName, string @alias) |
| | 990 | | { |
| 8 | 991 | | var message = _pipeline.CreateMessage(); |
| 8 | 992 | | var request = message.Request; |
| 8 | 993 | | request.Method = RequestMethod.Post; |
| 8 | 994 | | var uri = new RawRequestUriBuilder(); |
| 8 | 995 | | uri.Reset(endpoint); |
| 8 | 996 | | uri.AppendPath("/subscriptions/", false); |
| 8 | 997 | | uri.AppendPath(subscriptionId, true); |
| 8 | 998 | | uri.AppendPath("/resourceGroups/", false); |
| 8 | 999 | | uri.AppendPath(resourceGroupName, true); |
| 8 | 1000 | | uri.AppendPath("/providers/Microsoft.EventHub/namespaces/", false); |
| 8 | 1001 | | uri.AppendPath(namespaceName, true); |
| 8 | 1002 | | uri.AppendPath("/disasterRecoveryConfigs/", false); |
| 8 | 1003 | | uri.AppendPath(@alias, true); |
| 8 | 1004 | | uri.AppendPath("/failover", false); |
| 8 | 1005 | | uri.AppendQuery("api-version", "2017-04-01", true); |
| 8 | 1006 | | request.Uri = uri; |
| 8 | 1007 | | return message; |
| | 1008 | | } |
| | 1009 | |
|
| | 1010 | | /// <summary> Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. </summary> |
| | 1011 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 1012 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 1013 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 1014 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 1015 | | public async Task<Response> FailOverAsync(string resourceGroupName, string namespaceName, string @alias, Cancell |
| | 1016 | | { |
| 4 | 1017 | | if (resourceGroupName == null) |
| | 1018 | | { |
| 0 | 1019 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 1020 | | } |
| 4 | 1021 | | if (namespaceName == null) |
| | 1022 | | { |
| 0 | 1023 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 1024 | | } |
| 4 | 1025 | | if (@alias == null) |
| | 1026 | | { |
| 0 | 1027 | | throw new ArgumentNullException(nameof(@alias)); |
| | 1028 | | } |
| | 1029 | |
|
| 4 | 1030 | | using var message = CreateFailOverRequest(resourceGroupName, namespaceName, @alias); |
| 4 | 1031 | | await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); |
| 4 | 1032 | | switch (message.Response.Status) |
| | 1033 | | { |
| | 1034 | | case 200: |
| 4 | 1035 | | return message.Response; |
| | 1036 | | default: |
| 0 | 1037 | | throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa |
| | 1038 | | } |
| 4 | 1039 | | } |
| | 1040 | |
|
| | 1041 | | /// <summary> Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. </summary> |
| | 1042 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 1043 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 1044 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 1045 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 1046 | | public Response FailOver(string resourceGroupName, string namespaceName, string @alias, CancellationToken cancel |
| | 1047 | | { |
| 4 | 1048 | | if (resourceGroupName == null) |
| | 1049 | | { |
| 0 | 1050 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 1051 | | } |
| 4 | 1052 | | if (namespaceName == null) |
| | 1053 | | { |
| 0 | 1054 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 1055 | | } |
| 4 | 1056 | | if (@alias == null) |
| | 1057 | | { |
| 0 | 1058 | | throw new ArgumentNullException(nameof(@alias)); |
| | 1059 | | } |
| | 1060 | |
|
| 4 | 1061 | | using var message = CreateFailOverRequest(resourceGroupName, namespaceName, @alias); |
| 4 | 1062 | | _pipeline.Send(message, cancellationToken); |
| 4 | 1063 | | switch (message.Response.Status) |
| | 1064 | | { |
| | 1065 | | case 200: |
| 4 | 1066 | | return message.Response; |
| | 1067 | | default: |
| 0 | 1068 | | throw _clientDiagnostics.CreateRequestFailedException(message.Response); |
| | 1069 | | } |
| 4 | 1070 | | } |
| | 1071 | |
|
| | 1072 | | internal HttpMessage CreateListAuthorizationRulesNextPageRequest(string nextLink, string resourceGroupName, stri |
| | 1073 | | { |
| 0 | 1074 | | var message = _pipeline.CreateMessage(); |
| 0 | 1075 | | var request = message.Request; |
| 0 | 1076 | | request.Method = RequestMethod.Get; |
| 0 | 1077 | | var uri = new RawRequestUriBuilder(); |
| 0 | 1078 | | uri.Reset(endpoint); |
| 0 | 1079 | | uri.AppendRawNextLink(nextLink, false); |
| 0 | 1080 | | request.Uri = uri; |
| 0 | 1081 | | return message; |
| | 1082 | | } |
| | 1083 | |
|
| | 1084 | | /// <summary> Gets a list of authorization rules for a Namespace. </summary> |
| | 1085 | | /// <param name="nextLink"> The URL to the next page of results. </param> |
| | 1086 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 1087 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 1088 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 1089 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 1090 | | public async Task<Response<AuthorizationRuleListResult>> ListAuthorizationRulesNextPageAsync(string nextLink, st |
| | 1091 | | { |
| 0 | 1092 | | if (nextLink == null) |
| | 1093 | | { |
| 0 | 1094 | | throw new ArgumentNullException(nameof(nextLink)); |
| | 1095 | | } |
| 0 | 1096 | | if (resourceGroupName == null) |
| | 1097 | | { |
| 0 | 1098 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 1099 | | } |
| 0 | 1100 | | if (namespaceName == null) |
| | 1101 | | { |
| 0 | 1102 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 1103 | | } |
| 0 | 1104 | | if (@alias == null) |
| | 1105 | | { |
| 0 | 1106 | | throw new ArgumentNullException(nameof(@alias)); |
| | 1107 | | } |
| | 1108 | |
|
| 0 | 1109 | | using var message = CreateListAuthorizationRulesNextPageRequest(nextLink, resourceGroupName, namespaceName, |
| 0 | 1110 | | await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); |
| 0 | 1111 | | switch (message.Response.Status) |
| | 1112 | | { |
| | 1113 | | case 200: |
| | 1114 | | { |
| 0 | 1115 | | AuthorizationRuleListResult value = default; |
| 0 | 1116 | | using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc |
| 0 | 1117 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 1118 | | { |
| 0 | 1119 | | value = null; |
| | 1120 | | } |
| | 1121 | | else |
| | 1122 | | { |
| 0 | 1123 | | value = AuthorizationRuleListResult.DeserializeAuthorizationRuleListResult(document.RootElem |
| | 1124 | | } |
| 0 | 1125 | | return Response.FromValue(value, message.Response); |
| | 1126 | | } |
| | 1127 | | default: |
| 0 | 1128 | | throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa |
| | 1129 | | } |
| 0 | 1130 | | } |
| | 1131 | |
|
| | 1132 | | /// <summary> Gets a list of authorization rules for a Namespace. </summary> |
| | 1133 | | /// <param name="nextLink"> The URL to the next page of results. </param> |
| | 1134 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 1135 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 1136 | | /// <param name="alias"> The Disaster Recovery configuration name. </param> |
| | 1137 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 1138 | | public Response<AuthorizationRuleListResult> ListAuthorizationRulesNextPage(string nextLink, string resourceGrou |
| | 1139 | | { |
| 0 | 1140 | | if (nextLink == null) |
| | 1141 | | { |
| 0 | 1142 | | throw new ArgumentNullException(nameof(nextLink)); |
| | 1143 | | } |
| 0 | 1144 | | if (resourceGroupName == null) |
| | 1145 | | { |
| 0 | 1146 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 1147 | | } |
| 0 | 1148 | | if (namespaceName == null) |
| | 1149 | | { |
| 0 | 1150 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 1151 | | } |
| 0 | 1152 | | if (@alias == null) |
| | 1153 | | { |
| 0 | 1154 | | throw new ArgumentNullException(nameof(@alias)); |
| | 1155 | | } |
| | 1156 | |
|
| 0 | 1157 | | using var message = CreateListAuthorizationRulesNextPageRequest(nextLink, resourceGroupName, namespaceName, |
| 0 | 1158 | | _pipeline.Send(message, cancellationToken); |
| 0 | 1159 | | switch (message.Response.Status) |
| | 1160 | | { |
| | 1161 | | case 200: |
| | 1162 | | { |
| 0 | 1163 | | AuthorizationRuleListResult value = default; |
| 0 | 1164 | | using var document = JsonDocument.Parse(message.Response.ContentStream); |
| 0 | 1165 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 1166 | | { |
| 0 | 1167 | | value = null; |
| | 1168 | | } |
| | 1169 | | else |
| | 1170 | | { |
| 0 | 1171 | | value = AuthorizationRuleListResult.DeserializeAuthorizationRuleListResult(document.RootElem |
| | 1172 | | } |
| 0 | 1173 | | return Response.FromValue(value, message.Response); |
| | 1174 | | } |
| | 1175 | | default: |
| 0 | 1176 | | throw _clientDiagnostics.CreateRequestFailedException(message.Response); |
| | 1177 | | } |
| 0 | 1178 | | } |
| | 1179 | |
|
| | 1180 | | internal HttpMessage CreateListNextPageRequest(string nextLink, string resourceGroupName, string namespaceName) |
| | 1181 | | { |
| 0 | 1182 | | var message = _pipeline.CreateMessage(); |
| 0 | 1183 | | var request = message.Request; |
| 0 | 1184 | | request.Method = RequestMethod.Get; |
| 0 | 1185 | | var uri = new RawRequestUriBuilder(); |
| 0 | 1186 | | uri.Reset(endpoint); |
| 0 | 1187 | | uri.AppendRawNextLink(nextLink, false); |
| 0 | 1188 | | request.Uri = uri; |
| 0 | 1189 | | return message; |
| | 1190 | | } |
| | 1191 | |
|
| | 1192 | | /// <summary> Gets all Alias(Disaster Recovery configurations). </summary> |
| | 1193 | | /// <param name="nextLink"> The URL to the next page of results. </param> |
| | 1194 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 1195 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 1196 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 1197 | | public async Task<Response<ArmDisasterRecoveryListResult>> ListNextPageAsync(string nextLink, string resourceGro |
| | 1198 | | { |
| 0 | 1199 | | if (nextLink == null) |
| | 1200 | | { |
| 0 | 1201 | | throw new ArgumentNullException(nameof(nextLink)); |
| | 1202 | | } |
| 0 | 1203 | | if (resourceGroupName == null) |
| | 1204 | | { |
| 0 | 1205 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 1206 | | } |
| 0 | 1207 | | if (namespaceName == null) |
| | 1208 | | { |
| 0 | 1209 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 1210 | | } |
| | 1211 | |
|
| 0 | 1212 | | using var message = CreateListNextPageRequest(nextLink, resourceGroupName, namespaceName); |
| 0 | 1213 | | await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); |
| 0 | 1214 | | switch (message.Response.Status) |
| | 1215 | | { |
| | 1216 | | case 200: |
| | 1217 | | { |
| 0 | 1218 | | ArmDisasterRecoveryListResult value = default; |
| 0 | 1219 | | using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, canc |
| 0 | 1220 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 1221 | | { |
| 0 | 1222 | | value = null; |
| | 1223 | | } |
| | 1224 | | else |
| | 1225 | | { |
| 0 | 1226 | | value = ArmDisasterRecoveryListResult.DeserializeArmDisasterRecoveryListResult(document.Root |
| | 1227 | | } |
| 0 | 1228 | | return Response.FromValue(value, message.Response); |
| | 1229 | | } |
| | 1230 | | default: |
| 0 | 1231 | | throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(fa |
| | 1232 | | } |
| 0 | 1233 | | } |
| | 1234 | |
|
| | 1235 | | /// <summary> Gets all Alias(Disaster Recovery configurations). </summary> |
| | 1236 | | /// <param name="nextLink"> The URL to the next page of results. </param> |
| | 1237 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 1238 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 1239 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 1240 | | public Response<ArmDisasterRecoveryListResult> ListNextPage(string nextLink, string resourceGroupName, string na |
| | 1241 | | { |
| 0 | 1242 | | if (nextLink == null) |
| | 1243 | | { |
| 0 | 1244 | | throw new ArgumentNullException(nameof(nextLink)); |
| | 1245 | | } |
| 0 | 1246 | | if (resourceGroupName == null) |
| | 1247 | | { |
| 0 | 1248 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 1249 | | } |
| 0 | 1250 | | if (namespaceName == null) |
| | 1251 | | { |
| 0 | 1252 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 1253 | | } |
| | 1254 | |
|
| 0 | 1255 | | using var message = CreateListNextPageRequest(nextLink, resourceGroupName, namespaceName); |
| 0 | 1256 | | _pipeline.Send(message, cancellationToken); |
| 0 | 1257 | | switch (message.Response.Status) |
| | 1258 | | { |
| | 1259 | | case 200: |
| | 1260 | | { |
| 0 | 1261 | | ArmDisasterRecoveryListResult value = default; |
| 0 | 1262 | | using var document = JsonDocument.Parse(message.Response.ContentStream); |
| 0 | 1263 | | if (document.RootElement.ValueKind == JsonValueKind.Null) |
| | 1264 | | { |
| 0 | 1265 | | value = null; |
| | 1266 | | } |
| | 1267 | | else |
| | 1268 | | { |
| 0 | 1269 | | value = ArmDisasterRecoveryListResult.DeserializeArmDisasterRecoveryListResult(document.Root |
| | 1270 | | } |
| 0 | 1271 | | return Response.FromValue(value, message.Response); |
| | 1272 | | } |
| | 1273 | | default: |
| 0 | 1274 | | throw _clientDiagnostics.CreateRequestFailedException(message.Response); |
| | 1275 | | } |
| 0 | 1276 | | } |
| | 1277 | | } |
| | 1278 | | } |