From c01247338bc64d505856260d8c356b69fbea1e09 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 2 Aug 2023 04:27:52 +0000 Subject: [PATCH 1/4] Update Generator Version 3.0.0-beta.20230801.2 --- eng/Packages.Data.props | 2 +- eng/emitter-package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 0e4363cb40d87..10f398f941727 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -174,7 +174,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package.json b/eng/emitter-package.json index ef225a75ffe27..704845a6ab22c 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,6 +1,6 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20230801.1" + "@azure-tools/typespec-csharp": "0.2.0-beta.20230801.2" } } From 5ae4826d21cb9f01c1b6845ad5e7292aec0e766f Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 2 Aug 2023 04:43:05 +0000 Subject: [PATCH 2/4] Update SDK codes --- .../Generated/ArmNetworkCloudModelFactory.cs | 19 +++ .../OperationStatusResultOperationSource.cs | 31 +++++ .../OperationStatusResult.Serialization.cs | 117 +++++++++++++++++ .../Generated/Models/OperationStatusResult.cs | 71 +++++++++++ .../NetworkCloudBareMetalMachineResource.cs | 120 +++++++++--------- .../Generated/NetworkCloudClusterResource.cs | 24 ++-- .../NetworkCloudKubernetesClusterResource.cs | 12 +- .../NetworkCloudStorageApplianceResource.cs | 24 ++-- .../NetworkCloudVirtualMachineResource.cs | 48 +++---- .../BareMetalMachinesRestOperations.cs | 20 +++ .../RestOperations/ClustersRestOperations.cs | 4 + .../KubernetesClustersRestOperations.cs | 2 + .../StorageAppliancesRestOperations.cs | 4 + .../VirtualMachinesRestOperations.cs | 8 ++ 14 files changed, 390 insertions(+), 114 deletions(-) create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.Serialization.cs create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.cs diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/ArmNetworkCloudModelFactory.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/ArmNetworkCloudModelFactory.cs index 83c85e2a60850..f33d5206289d8 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/ArmNetworkCloudModelFactory.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/ArmNetworkCloudModelFactory.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Linq; using System.Net; +using Azure; using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.NetworkCloud; @@ -715,6 +716,24 @@ public static NetworkCloudVolumeData NetworkCloudVolumeData(ResourceIdentifier i return new NetworkCloudVolumeData(id, name, resourceType, systemData, tags, location, extendedLocation, attachedTo?.ToList(), detailedStatus, detailedStatusMessage, provisioningState, serialNumber, sizeInMiB); } + /// Initializes a new instance of OperationStatusResult. + /// Fully qualified ID for the async operation. + /// Fully qualified ID of the resource against which the original async operation was started. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + /// A new instance for mocking. + public static OperationStatusResult OperationStatusResult(ResourceIdentifier id = null, ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null) + { + operations ??= new List(); + + return new OperationStatusResult(id, resourceId, name, status, percentComplete, startOn, endOn, operations?.ToList(), error); + } + /// Initializes a new instance of NetworkCloudBareMetalMachineKeySetData. /// The id. /// The name. diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs new file mode 100644 index 0000000000000..101db1ae1daae --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + internal class OperationStatusResultOperationSource : IOperationSource + { + OperationStatusResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return OperationStatusResult.DeserializeOperationStatusResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return OperationStatusResult.DeserializeOperationStatusResult(document.RootElement); + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.Serialization.cs new file mode 100644 index 0000000000000..cd7388a53a7c6 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + public partial class OperationStatusResult + { + internal static OperationStatusResult DeserializeOperationStatusResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional id = default; + Optional resourceId = default; + Optional name = default; + string status = default; + Optional percentComplete = default; + Optional startTime = default; + Optional endTime = default; + Optional> operations = default; + Optional error = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("percentComplete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentComplete = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("operations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializeOperationStatusResult(item)); + } + operations = array; + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + } + return new OperationStatusResult(id.Value, resourceId.Value, name.Value, status, Optional.ToNullable(percentComplete), Optional.ToNullable(startTime), Optional.ToNullable(endTime), Optional.ToList(operations), error.Value); + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.cs new file mode 100644 index 0000000000000..744107f3ebc7e --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure; +using Azure.Core; + +namespace Azure.ResourceManager.NetworkCloud.Models +{ + /// The current status of an async operation. + public partial class OperationStatusResult + { + /// Initializes a new instance of OperationStatusResult. + /// Operation status. + /// is null. + internal OperationStatusResult(string status) + { + Argument.AssertNotNull(status, nameof(status)); + + Status = status; + Operations = new ChangeTrackingList(); + } + + /// Initializes a new instance of OperationStatusResult. + /// Fully qualified ID for the async operation. + /// Fully qualified ID of the resource against which the original async operation was started. + /// Name of the async operation. + /// Operation status. + /// Percent of the operation that is complete. + /// The start time of the operation. + /// The end time of the operation. + /// The operations list. + /// If present, details of the operation error. + internal OperationStatusResult(ResourceIdentifier id, ResourceIdentifier resourceId, string name, string status, float? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList operations, ResponseError error) + { + Id = id; + ResourceId = resourceId; + Name = name; + Status = status; + PercentComplete = percentComplete; + StartOn = startOn; + EndOn = endOn; + Operations = operations; + Error = error; + } + + /// Fully qualified ID for the async operation. + public ResourceIdentifier Id { get; } + /// Fully qualified ID of the resource against which the original async operation was started. + public ResourceIdentifier ResourceId { get; } + /// Name of the async operation. + public string Name { get; } + /// Operation status. + public string Status { get; } + /// Percent of the operation that is complete. + public float? PercentComplete { get; } + /// The start time of the operation. + public DateTimeOffset? StartOn { get; } + /// The end time of the operation. + public DateTimeOffset? EndOn { get; } + /// The operations list. + public IReadOnlyList Operations { get; } + /// If present, details of the operation error. + public ResponseError Error { get; } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.cs index 26677fdcc92a6..20eb0f17050e3 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.cs @@ -245,16 +245,16 @@ public virtual ArmOperation Update(WaitUnt /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual async Task CordonAsync(WaitUntil waitUntil, BareMetalMachineCordonContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> CordonAsync(WaitUntil waitUntil, BareMetalMachineCordonContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Cordon"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.CordonAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateCordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateCordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -280,16 +280,16 @@ public virtual async Task CordonAsync(WaitUntil waitUntil, BareMet /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual ArmOperation Cordon(WaitUntil waitUntil, BareMetalMachineCordonContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Cordon(WaitUntil waitUntil, BareMetalMachineCordonContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Cordon"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.Cordon(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateCordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateCordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -315,16 +315,16 @@ public virtual ArmOperation Cordon(WaitUntil waitUntil, BareMetalMachineCordonCo /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual async Task PowerOffAsync(WaitUntil waitUntil, BareMetalMachinePowerOffContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> PowerOffAsync(WaitUntil waitUntil, BareMetalMachinePowerOffContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.PowerOff"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.PowerOffAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -350,16 +350,16 @@ public virtual async Task PowerOffAsync(WaitUntil waitUntil, BareM /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual ArmOperation PowerOff(WaitUntil waitUntil, BareMetalMachinePowerOffContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation PowerOff(WaitUntil waitUntil, BareMetalMachinePowerOffContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.PowerOff"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.PowerOff(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -384,16 +384,16 @@ public virtual ArmOperation PowerOff(WaitUntil waitUntil, BareMetalMachinePowerO /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task ReimageAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> ReimageAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Reimage"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.ReimageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -418,16 +418,16 @@ public virtual async Task ReimageAsync(WaitUntil waitUntil, Cancel /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Reimage(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Reimage(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Reimage"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.Reimage(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -453,16 +453,16 @@ public virtual ArmOperation Reimage(WaitUntil waitUntil, CancellationToken cance /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual async Task ReplaceAsync(WaitUntil waitUntil, BareMetalMachineReplaceContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> ReplaceAsync(WaitUntil waitUntil, BareMetalMachineReplaceContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Replace"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.ReplaceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -488,16 +488,16 @@ public virtual async Task ReplaceAsync(WaitUntil waitUntil, BareMe /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual ArmOperation Replace(WaitUntil waitUntil, BareMetalMachineReplaceContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Replace(WaitUntil waitUntil, BareMetalMachineReplaceContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Replace"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.Replace(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -522,16 +522,16 @@ public virtual ArmOperation Replace(WaitUntil waitUntil, BareMetalMachineReplace /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task RestartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> RestartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Restart"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -556,16 +556,16 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, Cancel /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Restart"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -592,7 +592,7 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cance /// The request body. /// The cancellation token to use. /// is null. - public virtual async Task RunCommandAsync(WaitUntil waitUntil, BareMetalMachineRunCommandContent content, CancellationToken cancellationToken = default) + public virtual async Task> RunCommandAsync(WaitUntil waitUntil, BareMetalMachineRunCommandContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -601,9 +601,9 @@ public virtual async Task RunCommandAsync(WaitUntil waitUntil, Bar try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.RunCommandAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunCommandRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunCommandRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -630,7 +630,7 @@ public virtual async Task RunCommandAsync(WaitUntil waitUntil, Bar /// The request body. /// The cancellation token to use. /// is null. - public virtual ArmOperation RunCommand(WaitUntil waitUntil, BareMetalMachineRunCommandContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation RunCommand(WaitUntil waitUntil, BareMetalMachineRunCommandContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -639,9 +639,9 @@ public virtual ArmOperation RunCommand(WaitUntil waitUntil, BareMetalMachineRunC try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.RunCommand(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunCommandRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunCommandRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -668,7 +668,7 @@ public virtual ArmOperation RunCommand(WaitUntil waitUntil, BareMetalMachineRunC /// The request body. /// The cancellation token to use. /// is null. - public virtual async Task RunDataExtractsAsync(WaitUntil waitUntil, BareMetalMachineRunDataExtractsContent content, CancellationToken cancellationToken = default) + public virtual async Task> RunDataExtractsAsync(WaitUntil waitUntil, BareMetalMachineRunDataExtractsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -677,9 +677,9 @@ public virtual async Task RunDataExtractsAsync(WaitUntil waitUntil try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.RunDataExtractsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunDataExtractsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunDataExtractsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -706,7 +706,7 @@ public virtual async Task RunDataExtractsAsync(WaitUntil waitUntil /// The request body. /// The cancellation token to use. /// is null. - public virtual ArmOperation RunDataExtracts(WaitUntil waitUntil, BareMetalMachineRunDataExtractsContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation RunDataExtracts(WaitUntil waitUntil, BareMetalMachineRunDataExtractsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -715,9 +715,9 @@ public virtual ArmOperation RunDataExtracts(WaitUntil waitUntil, BareMetalMachin try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.RunDataExtracts(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunDataExtractsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunDataExtractsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -744,7 +744,7 @@ public virtual ArmOperation RunDataExtracts(WaitUntil waitUntil, BareMetalMachin /// The request body. /// The cancellation token to use. /// is null. - public virtual async Task RunReadCommandsAsync(WaitUntil waitUntil, BareMetalMachineRunReadCommandsContent content, CancellationToken cancellationToken = default) + public virtual async Task> RunReadCommandsAsync(WaitUntil waitUntil, BareMetalMachineRunReadCommandsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -753,9 +753,9 @@ public virtual async Task RunReadCommandsAsync(WaitUntil waitUntil try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.RunReadCommandsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunReadCommandsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunReadCommandsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -782,7 +782,7 @@ public virtual async Task RunReadCommandsAsync(WaitUntil waitUntil /// The request body. /// The cancellation token to use. /// is null. - public virtual ArmOperation RunReadCommands(WaitUntil waitUntil, BareMetalMachineRunReadCommandsContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation RunReadCommands(WaitUntil waitUntil, BareMetalMachineRunReadCommandsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -791,9 +791,9 @@ public virtual ArmOperation RunReadCommands(WaitUntil waitUntil, BareMetalMachin try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.RunReadCommands(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunReadCommandsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunReadCommandsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -818,16 +818,16 @@ public virtual ArmOperation RunReadCommands(WaitUntil waitUntil, BareMetalMachin /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Start"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -852,16 +852,16 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Start"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -886,16 +886,16 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task UncordonAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> UncordonAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Uncordon"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.UncordonAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateUncordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateUncordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -920,16 +920,16 @@ public virtual async Task UncordonAsync(WaitUntil waitUntil, Cance /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Uncordon(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Uncordon(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Uncordon"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.Uncordon(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateUncordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateUncordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.cs index dcdc5ed420ab3..649d5a859ddb2 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.cs @@ -472,16 +472,16 @@ public virtual ArmOperation Update(WaitUntil waitUn /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual async Task DeployAsync(WaitUntil waitUntil, ClusterDeployContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> DeployAsync(WaitUntil waitUntil, ClusterDeployContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Deploy"); scope.Start(); try { var response = await _networkCloudClusterClustersRestClient.DeployAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -507,16 +507,16 @@ public virtual async Task DeployAsync(WaitUntil waitUntil, Cluster /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual ArmOperation Deploy(WaitUntil waitUntil, ClusterDeployContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Deploy(WaitUntil waitUntil, ClusterDeployContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Deploy"); scope.Start(); try { var response = _networkCloudClusterClustersRestClient.Deploy(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -543,7 +543,7 @@ public virtual ArmOperation Deploy(WaitUntil waitUntil, ClusterDeployContent con /// The request body. /// The cancellation token to use. /// is null. - public virtual async Task UpdateVersionAsync(WaitUntil waitUntil, ClusterUpdateVersionContent content, CancellationToken cancellationToken = default) + public virtual async Task> UpdateVersionAsync(WaitUntil waitUntil, ClusterUpdateVersionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -552,9 +552,9 @@ public virtual async Task UpdateVersionAsync(WaitUntil waitUntil, try { var response = await _networkCloudClusterClustersRestClient.UpdateVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateUpdateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateUpdateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -581,7 +581,7 @@ public virtual async Task UpdateVersionAsync(WaitUntil waitUntil, /// The request body. /// The cancellation token to use. /// is null. - public virtual ArmOperation UpdateVersion(WaitUntil waitUntil, ClusterUpdateVersionContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation UpdateVersion(WaitUntil waitUntil, ClusterUpdateVersionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -590,9 +590,9 @@ public virtual ArmOperation UpdateVersion(WaitUntil waitUntil, ClusterUpdateVers try { var response = _networkCloudClusterClustersRestClient.UpdateVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateUpdateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateUpdateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.cs index 5c195e54e8025..592b27c53a7d1 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.cs @@ -367,7 +367,7 @@ public virtual ArmOperation Update(WaitUn /// The request body. /// The cancellation token to use. /// is null. - public virtual async Task RestartNodeAsync(WaitUntil waitUntil, KubernetesClusterRestartNodeContent content, CancellationToken cancellationToken = default) + public virtual async Task> RestartNodeAsync(WaitUntil waitUntil, KubernetesClusterRestartNodeContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -376,9 +376,9 @@ public virtual async Task RestartNodeAsync(WaitUntil waitUntil, Ku try { var response = await _networkCloudKubernetesClusterKubernetesClustersRestClient.RestartNodeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateRestartNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateRestartNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -405,7 +405,7 @@ public virtual async Task RestartNodeAsync(WaitUntil waitUntil, Ku /// The request body. /// The cancellation token to use. /// is null. - public virtual ArmOperation RestartNode(WaitUntil waitUntil, KubernetesClusterRestartNodeContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation RestartNode(WaitUntil waitUntil, KubernetesClusterRestartNodeContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -414,9 +414,9 @@ public virtual ArmOperation RestartNode(WaitUntil waitUntil, KubernetesClusterRe try { var response = _networkCloudKubernetesClusterKubernetesClustersRestClient.RestartNode(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateRestartNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateRestartNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.cs index 2768334487d21..be33fcb1816ac 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.cs @@ -244,16 +244,16 @@ public virtual ArmOperation Update(WaitUnt /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task DisableRemoteVendorManagementAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> DisableRemoteVendorManagementAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudStorageApplianceStorageAppliancesClientDiagnostics.CreateScope("NetworkCloudStorageApplianceResource.DisableRemoteVendorManagement"); scope.Start(); try { var response = await _networkCloudStorageApplianceStorageAppliancesRestClient.DisableRemoteVendorManagementAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateDisableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateDisableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -278,16 +278,16 @@ public virtual async Task DisableRemoteVendorManagementAsync(WaitU /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation DisableRemoteVendorManagement(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation DisableRemoteVendorManagement(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudStorageApplianceStorageAppliancesClientDiagnostics.CreateScope("NetworkCloudStorageApplianceResource.DisableRemoteVendorManagement"); scope.Start(); try { var response = _networkCloudStorageApplianceStorageAppliancesRestClient.DisableRemoteVendorManagement(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateDisableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateDisableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -313,16 +313,16 @@ public virtual ArmOperation DisableRemoteVendorManagement(WaitUntil waitUntil, C /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual async Task EnableRemoteVendorManagementAsync(WaitUntil waitUntil, StorageApplianceEnableRemoteVendorManagementContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> EnableRemoteVendorManagementAsync(WaitUntil waitUntil, StorageApplianceEnableRemoteVendorManagementContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudStorageApplianceStorageAppliancesClientDiagnostics.CreateScope("NetworkCloudStorageApplianceResource.EnableRemoteVendorManagement"); scope.Start(); try { var response = await _networkCloudStorageApplianceStorageAppliancesRestClient.EnableRemoteVendorManagementAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateEnableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateEnableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -348,16 +348,16 @@ public virtual async Task EnableRemoteVendorManagementAsync(WaitUn /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual ArmOperation EnableRemoteVendorManagement(WaitUntil waitUntil, StorageApplianceEnableRemoteVendorManagementContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation EnableRemoteVendorManagement(WaitUntil waitUntil, StorageApplianceEnableRemoteVendorManagementContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudStorageApplianceStorageAppliancesClientDiagnostics.CreateScope("NetworkCloudStorageApplianceResource.EnableRemoteVendorManagement"); scope.Start(); try { var response = _networkCloudStorageApplianceStorageAppliancesRestClient.EnableRemoteVendorManagement(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateEnableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateEnableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.cs index 28b2baf6f3511..104cfda8b834d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.cs @@ -366,16 +366,16 @@ public virtual ArmOperation Update(WaitUntil /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual async Task PowerOffAsync(WaitUntil waitUntil, VirtualMachinePowerOffContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> PowerOffAsync(WaitUntil waitUntil, VirtualMachinePowerOffContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.PowerOff"); scope.Start(); try { var response = await _networkCloudVirtualMachineVirtualMachinesRestClient.PowerOffAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -401,16 +401,16 @@ public virtual async Task PowerOffAsync(WaitUntil waitUntil, Virtu /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual ArmOperation PowerOff(WaitUntil waitUntil, VirtualMachinePowerOffContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation PowerOff(WaitUntil waitUntil, VirtualMachinePowerOffContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.PowerOff"); scope.Start(); try { var response = _networkCloudVirtualMachineVirtualMachinesRestClient.PowerOff(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -435,16 +435,16 @@ public virtual ArmOperation PowerOff(WaitUntil waitUntil, VirtualMachinePowerOff /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task ReimageAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> ReimageAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Reimage"); scope.Start(); try { var response = await _networkCloudVirtualMachineVirtualMachinesRestClient.ReimageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -469,16 +469,16 @@ public virtual async Task ReimageAsync(WaitUntil waitUntil, Cancel /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Reimage(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Reimage(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Reimage"); scope.Start(); try { var response = _networkCloudVirtualMachineVirtualMachinesRestClient.Reimage(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -503,16 +503,16 @@ public virtual ArmOperation Reimage(WaitUntil waitUntil, CancellationToken cance /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task RestartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> RestartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Restart"); scope.Start(); try { var response = await _networkCloudVirtualMachineVirtualMachinesRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -537,16 +537,16 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, Cancel /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Restart"); scope.Start(); try { var response = _networkCloudVirtualMachineVirtualMachinesRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) @@ -571,16 +571,16 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cance /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Start"); scope.Start(); try { var response = await _networkCloudVirtualMachineVirtualMachinesRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(_networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; } catch (Exception e) @@ -605,16 +605,16 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Start"); scope.Start(); try { var response = _networkCloudVirtualMachineVirtualMachinesRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(_networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); + operation.WaitForCompletion(cancellationToken); return operation; } catch (Exception e) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BareMetalMachinesRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BareMetalMachinesRestOperations.cs index c25f3684b2912..9f3ff52538c88 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BareMetalMachinesRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/BareMetalMachinesRestOperations.cs @@ -383,6 +383,7 @@ public async Task CordonAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -409,6 +410,7 @@ public Response Cordon(string subscriptionId, string resourceGroupName, string b _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -463,6 +465,7 @@ public async Task PowerOffAsync(string subscriptionId, string resource await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -489,6 +492,7 @@ public Response PowerOff(string subscriptionId, string resourceGroupName, string _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -535,6 +539,7 @@ public async Task ReimageAsync(string subscriptionId, string resourceG await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -560,6 +565,7 @@ public Response Reimage(string subscriptionId, string resourceGroupName, string _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -614,6 +620,7 @@ public async Task ReplaceAsync(string subscriptionId, string resourceG await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -640,6 +647,7 @@ public Response Replace(string subscriptionId, string resourceGroupName, string _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -686,6 +694,7 @@ public async Task RestartAsync(string subscriptionId, string resourceG await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -711,6 +720,7 @@ public Response Restart(string subscriptionId, string resourceGroupName, string _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -763,6 +773,7 @@ public async Task RunCommandAsync(string subscriptionId, string resour await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -790,6 +801,7 @@ public Response RunCommand(string subscriptionId, string resourceGroupName, stri _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -842,6 +854,7 @@ public async Task RunDataExtractsAsync(string subscriptionId, string r await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -869,6 +882,7 @@ public Response RunDataExtracts(string subscriptionId, string resourceGroupName, _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -921,6 +935,7 @@ public async Task RunReadCommandsAsync(string subscriptionId, string r await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -948,6 +963,7 @@ public Response RunReadCommands(string subscriptionId, string resourceGroupName, _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -994,6 +1010,7 @@ public async Task StartAsync(string subscriptionId, string resourceGro await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -1019,6 +1036,7 @@ public Response Start(string subscriptionId, string resourceGroupName, string ba _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -1065,6 +1083,7 @@ public async Task UncordonAsync(string subscriptionId, string resource await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -1090,6 +1109,7 @@ public Response Uncordon(string subscriptionId, string resourceGroupName, string _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ClustersRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ClustersRestOperations.cs index 71e4574464689..b0fc397b769e0 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ClustersRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/ClustersRestOperations.cs @@ -533,6 +533,7 @@ public async Task DeployAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -559,6 +560,7 @@ public Response Deploy(string subscriptionId, string resourceGroupName, string c _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -611,6 +613,7 @@ public async Task UpdateVersionAsync(string subscriptionId, string res await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -638,6 +641,7 @@ public Response UpdateVersion(string subscriptionId, string resourceGroupName, s _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/KubernetesClustersRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/KubernetesClustersRestOperations.cs index 4670154cc1ae9..c9221f8fc351a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/KubernetesClustersRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/KubernetesClustersRestOperations.cs @@ -531,6 +531,7 @@ public async Task RestartNodeAsync(string subscriptionId, string resou await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -558,6 +559,7 @@ public Response RestartNode(string subscriptionId, string resourceGroupName, str _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/StorageAppliancesRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/StorageAppliancesRestOperations.cs index 127745b64e368..4eab290602542 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/StorageAppliancesRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/StorageAppliancesRestOperations.cs @@ -375,6 +375,7 @@ public async Task DisableRemoteVendorManagementAsync(string subscripti await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -400,6 +401,7 @@ public Response DisableRemoteVendorManagement(string subscriptionId, string reso _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -454,6 +456,7 @@ public async Task EnableRemoteVendorManagementAsync(string subscriptio await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -480,6 +483,7 @@ public Response EnableRemoteVendorManagement(string subscriptionId, string resou _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/VirtualMachinesRestOperations.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/VirtualMachinesRestOperations.cs index 48b99590654b7..a24b014901a96 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/VirtualMachinesRestOperations.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/RestOperations/VirtualMachinesRestOperations.cs @@ -533,6 +533,7 @@ public async Task PowerOffAsync(string subscriptionId, string resource await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -559,6 +560,7 @@ public Response PowerOff(string subscriptionId, string resourceGroupName, string _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -605,6 +607,7 @@ public async Task ReimageAsync(string subscriptionId, string resourceG await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -630,6 +633,7 @@ public Response Reimage(string subscriptionId, string resourceGroupName, string _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -676,6 +680,7 @@ public async Task RestartAsync(string subscriptionId, string resourceG await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -701,6 +706,7 @@ public Response Restart(string subscriptionId, string resourceGroupName, string _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -747,6 +753,7 @@ public async Task StartAsync(string subscriptionId, string resourceGro await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; @@ -772,6 +779,7 @@ public Response Start(string subscriptionId, string resourceGroupName, string vi _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: case 204: return message.Response; From 78348f491903b9648770b06eeabcca78aece6616 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 2 Aug 2023 04:43:43 +0000 Subject: [PATCH 3/4] Update SDK samples m*,n*,o*,p*,q*,r* --- ...le_NetworkCloudBareMetalMachineResource.cs | 50 +++++++++++-------- .../Sample_NetworkCloudClusterResource.cs | 15 +++--- ...e_NetworkCloudKubernetesClusterResource.cs | 5 +- ...le_NetworkCloudStorageApplianceResource.cs | 10 ++-- ...mple_NetworkCloudVirtualMachineResource.cs | 20 +++++--- 5 files changed, 60 insertions(+), 40 deletions(-) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs index 329a5ba66c870..42f6e2b7428bb 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs @@ -149,9 +149,10 @@ public async Task Cordon_CordonBareMetalMachine() { Evacuate = BareMetalMachineEvacuate.True, }; - await networkCloudBareMetalMachine.CordonAsync(WaitUntil.Completed, content: content); + ArmOperation lro = await networkCloudBareMetalMachine.CordonAsync(WaitUntil.Completed, content: content); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Power off bare metal machine @@ -180,9 +181,10 @@ public async Task PowerOff_PowerOffBareMetalMachine() { SkipShutdown = BareMetalMachineSkipShutdown.True, }; - await networkCloudBareMetalMachine.PowerOffAsync(WaitUntil.Completed, content: content); + ArmOperation lro = await networkCloudBareMetalMachine.PowerOffAsync(WaitUntil.Completed, content: content); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Reimage bare metal machine @@ -207,9 +209,10 @@ public async Task Reimage_ReimageBareMetalMachine() NetworkCloudBareMetalMachineResource networkCloudBareMetalMachine = client.GetNetworkCloudBareMetalMachineResource(networkCloudBareMetalMachineResourceId); // invoke the operation - await networkCloudBareMetalMachine.ReimageAsync(WaitUntil.Completed); + ArmOperation lro = await networkCloudBareMetalMachine.ReimageAsync(WaitUntil.Completed); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Replace bare metal machine @@ -245,9 +248,10 @@ public async Task Replace_ReplaceBareMetalMachine() MachineName = "name", SerialNumber = "BM1219XXX", }; - await networkCloudBareMetalMachine.ReplaceAsync(WaitUntil.Completed, content: content); + ArmOperation lro = await networkCloudBareMetalMachine.ReplaceAsync(WaitUntil.Completed, content: content); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Restart bare metal machine @@ -272,9 +276,10 @@ public async Task Restart_RestartBareMetalMachine() NetworkCloudBareMetalMachineResource networkCloudBareMetalMachine = client.GetNetworkCloudBareMetalMachineResource(networkCloudBareMetalMachineResourceId); // invoke the operation - await networkCloudBareMetalMachine.RestartAsync(WaitUntil.Completed); + ArmOperation lro = await networkCloudBareMetalMachine.RestartAsync(WaitUntil.Completed); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Run command on bare metal machine @@ -306,9 +311,10 @@ public async Task RunCommand_RunCommandOnBareMetalMachine() "--argument1","argument2" }, }; - await networkCloudBareMetalMachine.RunCommandAsync(WaitUntil.Completed, content); + ArmOperation lro = await networkCloudBareMetalMachine.RunCommandAsync(WaitUntil.Completed, content); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Run data extraction on bare metal machine @@ -343,9 +349,10 @@ public async Task RunDataExtracts_RunDataExtractionOnBareMetalMachine() }, } }, 60); - await networkCloudBareMetalMachine.RunDataExtractsAsync(WaitUntil.Completed, content); + ArmOperation lro = await networkCloudBareMetalMachine.RunDataExtractsAsync(WaitUntil.Completed, content); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Run and retrieve output from read only commands on bare metal machine. @@ -386,9 +393,10 @@ public async Task RunReadCommands_RunAndRetrieveOutputFromReadOnlyCommandsOnBare }, } }, 60); - await networkCloudBareMetalMachine.RunReadCommandsAsync(WaitUntil.Completed, content); + ArmOperation lro = await networkCloudBareMetalMachine.RunReadCommandsAsync(WaitUntil.Completed, content); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Start bare metal machine @@ -413,9 +421,10 @@ public async Task Start_StartBareMetalMachine() NetworkCloudBareMetalMachineResource networkCloudBareMetalMachine = client.GetNetworkCloudBareMetalMachineResource(networkCloudBareMetalMachineResourceId); // invoke the operation - await networkCloudBareMetalMachine.StartAsync(WaitUntil.Completed); + ArmOperation lro = await networkCloudBareMetalMachine.StartAsync(WaitUntil.Completed); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Uncordon bare metal machine @@ -440,9 +449,10 @@ public async Task Uncordon_UncordonBareMetalMachine() NetworkCloudBareMetalMachineResource networkCloudBareMetalMachine = client.GetNetworkCloudBareMetalMachineResource(networkCloudBareMetalMachineResourceId); // invoke the operation - await networkCloudBareMetalMachine.UncordonAsync(WaitUntil.Completed); + ArmOperation lro = await networkCloudBareMetalMachine.UncordonAsync(WaitUntil.Completed); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs index 2182084fc7ccc..477acf7cdc7ed 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs @@ -246,9 +246,10 @@ public async Task Deploy_DeployCluster() // invoke the operation ClusterDeployContent content = new ClusterDeployContent(); - await networkCloudCluster.DeployAsync(WaitUntil.Completed, content: content); + ArmOperation lro = await networkCloudCluster.DeployAsync(WaitUntil.Completed, content: content); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Deploy cluster skipping validation @@ -280,9 +281,10 @@ public async Task Deploy_DeployClusterSkippingValidation() "bmmName1" }, }; - await networkCloudCluster.DeployAsync(WaitUntil.Completed, content: content); + ArmOperation lro = await networkCloudCluster.DeployAsync(WaitUntil.Completed, content: content); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Update cluster version @@ -308,9 +310,10 @@ public async Task UpdateVersion_UpdateClusterVersion() // invoke the operation ClusterUpdateVersionContent content = new ClusterUpdateVersionContent("2.0"); - await networkCloudCluster.UpdateVersionAsync(WaitUntil.Completed, content); + ArmOperation lro = await networkCloudCluster.UpdateVersionAsync(WaitUntil.Completed, content); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs index 66ed104839945..a3a46bf62181f 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs @@ -174,9 +174,10 @@ public async Task RestartNode_RestartAKubernetesClusterNode() // invoke the operation KubernetesClusterRestartNodeContent content = new KubernetesClusterRestartNodeContent("nodeName"); - await networkCloudKubernetesCluster.RestartNodeAsync(WaitUntil.Completed, content); + ArmOperation lro = await networkCloudKubernetesCluster.RestartNodeAsync(WaitUntil.Completed, content); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceResource.cs index 0a051eac34b04..9ed43b68f1635 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceResource.cs @@ -145,9 +145,10 @@ public async Task DisableRemoteVendorManagement_TurnOffRemoteVendorManagementFor NetworkCloudStorageApplianceResource networkCloudStorageAppliance = client.GetNetworkCloudStorageApplianceResource(networkCloudStorageApplianceResourceId); // invoke the operation - await networkCloudStorageAppliance.DisableRemoteVendorManagementAsync(WaitUntil.Completed); + ArmOperation lro = await networkCloudStorageAppliance.DisableRemoteVendorManagementAsync(WaitUntil.Completed); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Turn on remote vendor management for storage appliance @@ -179,9 +180,10 @@ public async Task EnableRemoteVendorManagement_TurnOnRemoteVendorManagementForSt "10.0.0.0/24" }, }; - await networkCloudStorageAppliance.EnableRemoteVendorManagementAsync(WaitUntil.Completed, content: content); + ArmOperation lro = await networkCloudStorageAppliance.EnableRemoteVendorManagementAsync(WaitUntil.Completed, content: content); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineResource.cs index 0f3de344e766e..91ff80075b9f4 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineResource.cs @@ -179,9 +179,10 @@ public async Task PowerOff_PowerOffVirtualMachine() { SkipShutdown = SkipShutdown.True, }; - await networkCloudVirtualMachine.PowerOffAsync(WaitUntil.Completed, content: content); + ArmOperation lro = await networkCloudVirtualMachine.PowerOffAsync(WaitUntil.Completed, content: content); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Reimage virtual machine @@ -206,9 +207,10 @@ public async Task Reimage_ReimageVirtualMachine() NetworkCloudVirtualMachineResource networkCloudVirtualMachine = client.GetNetworkCloudVirtualMachineResource(networkCloudVirtualMachineResourceId); // invoke the operation - await networkCloudVirtualMachine.ReimageAsync(WaitUntil.Completed); + ArmOperation lro = await networkCloudVirtualMachine.ReimageAsync(WaitUntil.Completed); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Restart virtual machine @@ -233,9 +235,10 @@ public async Task Restart_RestartVirtualMachine() NetworkCloudVirtualMachineResource networkCloudVirtualMachine = client.GetNetworkCloudVirtualMachineResource(networkCloudVirtualMachineResourceId); // invoke the operation - await networkCloudVirtualMachine.RestartAsync(WaitUntil.Completed); + ArmOperation lro = await networkCloudVirtualMachine.RestartAsync(WaitUntil.Completed); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } // Start virtual machine @@ -260,9 +263,10 @@ public async Task Start_StartVirtualMachine() NetworkCloudVirtualMachineResource networkCloudVirtualMachine = client.GetNetworkCloudVirtualMachineResource(networkCloudVirtualMachineResourceId); // invoke the operation - await networkCloudVirtualMachine.StartAsync(WaitUntil.Completed); + ArmOperation lro = await networkCloudVirtualMachine.StartAsync(WaitUntil.Completed); + Models.OperationStatusResult result = lro.Value; - Console.WriteLine($"Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } From d09e7be7c365eda75a0ae6bc89113e8175e4c753 Mon Sep 17 00:00:00 2001 From: Wei Hu Date: Wed, 2 Aug 2023 14:04:57 +0800 Subject: [PATCH 4/4] Rename and update --- ...urceManager.NetworkCloud.netstandard2.0.cs | 90 +++++++++++-------- ...le_NetworkCloudBareMetalMachineResource.cs | 40 ++++----- .../Sample_NetworkCloudClusterResource.cs | 12 +-- ...e_NetworkCloudKubernetesClusterResource.cs | 4 +- ...le_NetworkCloudStorageApplianceResource.cs | 8 +- ...mple_NetworkCloudVirtualMachineResource.cs | 16 ++-- .../Generated/ArmNetworkCloudModelFactory.cs | 10 +-- ...oudOperationStatusResultOperationSource.cs | 31 +++++++ .../OperationStatusResultOperationSource.cs | 31 ------- ...oudOperationStatusResult.Serialization.cs} | 12 +-- ...s => NetworkCloudOperationStatusResult.cs} | 14 +-- .../NetworkCloudBareMetalMachineResource.cs | 80 ++++++++--------- .../Generated/NetworkCloudClusterResource.cs | 16 ++-- .../NetworkCloudKubernetesClusterResource.cs | 8 +- .../NetworkCloudStorageApplianceResource.cs | 16 ++-- .../NetworkCloudVirtualMachineResource.cs | 32 +++---- .../src/autorest.md | 3 +- 17 files changed, 219 insertions(+), 204 deletions(-) create mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/NetworkCloudOperationStatusResultOperationSource.cs delete mode 100644 sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs rename sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/{OperationStatusResult.Serialization.cs => NetworkCloudOperationStatusResult.Serialization.cs} (84%) rename sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/{OperationStatusResult.cs => NetworkCloudOperationStatusResult.cs} (77%) diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.netstandard2.0.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.netstandard2.0.cs index 9a564b5c7baf1..c36a68311d7d4 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.netstandard2.0.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/api/Azure.ResourceManager.NetworkCloud.netstandard2.0.cs @@ -159,33 +159,33 @@ protected NetworkCloudBareMetalMachineResource() { } public virtual bool HasData { get { throw null; } } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Cordon(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCordonContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CordonAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCordonContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Cordon(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCordonContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CordonAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineCordonContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string bareMetalMachineName) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation PowerOff(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachinePowerOffContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task PowerOffAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachinePowerOffContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Reimage(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ReimageAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PowerOff(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachinePowerOffContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PowerOffAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachinePowerOffContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Reimage(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ReimageAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Replace(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReplaceContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ReplaceAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReplaceContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Restart(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task RestartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation RunCommand(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunCommandContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task RunCommandAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunCommandContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation RunDataExtracts(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunDataExtractsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task RunDataExtractsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunDataExtractsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation RunReadCommands(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunReadCommandsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task RunReadCommandsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunReadCommandsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Replace(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReplaceContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ReplaceAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineReplaceContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Restart(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RestartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RunCommand(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunCommandContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RunCommandAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunCommandContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RunDataExtracts(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunDataExtractsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RunDataExtractsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunDataExtractsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RunReadCommands(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunReadCommandsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RunReadCommandsAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.BareMetalMachineRunReadCommandsContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Uncordon(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UncordonAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Uncordon(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UncordonAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudBareMetalMachinePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudBareMetalMachinePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -438,8 +438,8 @@ protected NetworkCloudClusterResource() { } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName) { throw null; } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Deploy(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterDeployContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeployAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterDeployContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Deploy(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterDeployContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeployAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterDeployContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetNetworkCloudBareMetalMachineKeySet(string bareMetalMachineKeySetName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -457,8 +457,8 @@ protected NetworkCloudClusterResource() { } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudClusterPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudClusterPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation UpdateVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation UpdateVersion(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateVersionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.ClusterUpdateVersionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public static partial class NetworkCloudExtensions { @@ -599,8 +599,8 @@ protected NetworkCloudKubernetesClusterResource() { } public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudAgentPoolCollection GetNetworkCloudAgentPools() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation RestartNode(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterRestartNodeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task RestartNodeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterRestartNodeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation RestartNode(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterRestartNodeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RestartNodeAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.KubernetesClusterRestartNodeContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudKubernetesClusterPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -831,10 +831,10 @@ protected NetworkCloudStorageApplianceResource() { } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storageApplianceName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation DisableRemoteVendorManagement(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DisableRemoteVendorManagementAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation EnableRemoteVendorManagement(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.StorageApplianceEnableRemoteVendorManagementContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task EnableRemoteVendorManagementAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.StorageApplianceEnableRemoteVendorManagementContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation DisableRemoteVendorManagement(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DisableRemoteVendorManagementAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation EnableRemoteVendorManagement(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.StorageApplianceEnableRemoteVendorManagementContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> EnableRemoteVendorManagementAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.StorageApplianceEnableRemoteVendorManagementContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1003,18 +1003,18 @@ protected NetworkCloudVirtualMachineResource() { } public virtual Azure.Response GetNetworkCloudVirtualMachineConsole(string consoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetNetworkCloudVirtualMachineConsoleAsync(string consoleName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.NetworkCloud.NetworkCloudVirtualMachineConsoleCollection GetNetworkCloudVirtualMachineConsoles() { throw null; } - public virtual Azure.ResourceManager.ArmOperation PowerOff(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.VirtualMachinePowerOffContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task PowerOffAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.VirtualMachinePowerOffContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Reimage(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ReimageAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation PowerOff(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.VirtualMachinePowerOffContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> PowerOffAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.VirtualMachinePowerOffContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Reimage(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ReimageAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Restart(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task RestartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Restart(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RestartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Start(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> StartAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudVirtualMachinePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.NetworkCloud.Models.NetworkCloudVirtualMachinePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -1169,6 +1169,7 @@ public static partial class ArmNetworkCloudModelFactory public static Azure.ResourceManager.NetworkCloud.NetworkCloudL3NetworkData NetworkCloudL3NetworkData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, System.Collections.Generic.IEnumerable associatedResourceIds = null, Azure.Core.ResourceIdentifier clusterId = null, Azure.ResourceManager.NetworkCloud.Models.L3NetworkDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.L3NetworkDetailedStatus?), string detailedStatusMessage = null, System.Collections.Generic.IEnumerable hybridAksClustersAssociatedIds = null, Azure.ResourceManager.NetworkCloud.Models.HybridAksIpamEnabled? hybridAksIpamEnabled = default(Azure.ResourceManager.NetworkCloud.Models.HybridAksIpamEnabled?), Azure.ResourceManager.NetworkCloud.Models.HybridAksPluginType? hybridAksPluginType = default(Azure.ResourceManager.NetworkCloud.Models.HybridAksPluginType?), string interfaceName = null, Azure.ResourceManager.NetworkCloud.Models.IPAllocationType? ipAllocationType = default(Azure.ResourceManager.NetworkCloud.Models.IPAllocationType?), string ipv4ConnectedPrefix = null, string ipv6ConnectedPrefix = null, Azure.Core.ResourceIdentifier l3IsolationDomainId = null, Azure.ResourceManager.NetworkCloud.Models.L3NetworkProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.L3NetworkProvisioningState?), System.Collections.Generic.IEnumerable virtualMachinesAssociatedIds = null, long vlan = (long)0) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.NetworkCloudNetworkInterface NetworkCloudNetworkInterface(string address = null, Azure.ResourceManager.NetworkCloud.Models.DeviceConnectionType? deviceConnectionType = default(Azure.ResourceManager.NetworkCloud.Models.DeviceConnectionType?), string model = null, long? physicalSlot = default(long?), long? portCount = default(long?), long? portSpeed = default(long?), string vendor = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.Models.NetworkCloudNic NetworkCloudNic(Azure.ResourceManager.NetworkCloud.Models.LldpNeighbor lldpNeighbor = null, string macAddress = null, string name = null) { throw null; } + public static Azure.ResourceManager.NetworkCloud.Models.NetworkCloudOperationStatusResult NetworkCloudOperationStatusResult(Azure.Core.ResourceIdentifier id = null, Azure.Core.ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = default(float?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? endOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable operations = null, Azure.ResponseError error = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudRackData NetworkCloudRackData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, string availabilityZone = null, Azure.Core.ResourceIdentifier clusterId = null, Azure.ResourceManager.NetworkCloud.Models.RackDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.RackDetailedStatus?), string detailedStatusMessage = null, Azure.ResourceManager.NetworkCloud.Models.RackProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.RackProvisioningState?), string rackLocation = null, string rackSerialNumber = null, Azure.Core.ResourceIdentifier rackSkuId = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudRackSkuData NetworkCloudRackSkuData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable computeMachines = null, System.Collections.Generic.IEnumerable controllerMachines = null, string description = null, long? maxClusterSlots = default(long?), Azure.ResourceManager.NetworkCloud.Models.RackSkuProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.RackSkuProvisioningState?), Azure.ResourceManager.NetworkCloud.Models.RackSkuType? rackType = default(Azure.ResourceManager.NetworkCloud.Models.RackSkuType?), System.Collections.Generic.IEnumerable storageAppliances = null, System.Collections.Generic.IEnumerable supportedRackSkuIds = null) { throw null; } public static Azure.ResourceManager.NetworkCloud.NetworkCloudStorageApplianceData NetworkCloudStorageApplianceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.NetworkCloud.Models.ExtendedLocation extendedLocation = null, Azure.ResourceManager.NetworkCloud.Models.AdministrativeCredentials administratorCredentials = null, long? capacity = default(long?), long? capacityUsed = default(long?), Azure.Core.ResourceIdentifier clusterId = null, Azure.ResourceManager.NetworkCloud.Models.StorageApplianceDetailedStatus? detailedStatus = default(Azure.ResourceManager.NetworkCloud.Models.StorageApplianceDetailedStatus?), string detailedStatusMessage = null, System.Net.IPAddress managementIPv4Address = null, Azure.ResourceManager.NetworkCloud.Models.StorageApplianceProvisioningState? provisioningState = default(Azure.ResourceManager.NetworkCloud.Models.StorageApplianceProvisioningState?), Azure.Core.ResourceIdentifier rackId = null, long rackSlot = (long)0, Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementFeature? remoteVendorManagementFeature = default(Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementFeature?), Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementStatus? remoteVendorManagementStatus = default(Azure.ResourceManager.NetworkCloud.Models.RemoteVendorManagementStatus?), string serialNumber = null, string storageApplianceSkuId = null) { throw null; } @@ -2705,6 +2706,19 @@ internal NetworkCloudNic() { } public string MacAddress { get { throw null; } } public string Name { get { throw null; } } } + public partial class NetworkCloudOperationStatusResult + { + internal NetworkCloudOperationStatusResult() { } + public System.DateTimeOffset? EndOn { get { throw null; } } + public Azure.ResponseError Error { get { throw null; } } + public Azure.Core.ResourceIdentifier Id { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Operations { get { throw null; } } + public float? PercentComplete { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public string Status { get { throw null; } } + } public partial class NetworkCloudOSDisk { public NetworkCloudOSDisk(long diskSizeInGB) { } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs index 42f6e2b7428bb..e57c96e76bb8d 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudBareMetalMachineResource.cs @@ -149,8 +149,8 @@ public async Task Cordon_CordonBareMetalMachine() { Evacuate = BareMetalMachineEvacuate.True, }; - ArmOperation lro = await networkCloudBareMetalMachine.CordonAsync(WaitUntil.Completed, content: content); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudBareMetalMachine.CordonAsync(WaitUntil.Completed, content: content); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -181,8 +181,8 @@ public async Task PowerOff_PowerOffBareMetalMachine() { SkipShutdown = BareMetalMachineSkipShutdown.True, }; - ArmOperation lro = await networkCloudBareMetalMachine.PowerOffAsync(WaitUntil.Completed, content: content); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudBareMetalMachine.PowerOffAsync(WaitUntil.Completed, content: content); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -209,8 +209,8 @@ public async Task Reimage_ReimageBareMetalMachine() NetworkCloudBareMetalMachineResource networkCloudBareMetalMachine = client.GetNetworkCloudBareMetalMachineResource(networkCloudBareMetalMachineResourceId); // invoke the operation - ArmOperation lro = await networkCloudBareMetalMachine.ReimageAsync(WaitUntil.Completed); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudBareMetalMachine.ReimageAsync(WaitUntil.Completed); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -248,8 +248,8 @@ public async Task Replace_ReplaceBareMetalMachine() MachineName = "name", SerialNumber = "BM1219XXX", }; - ArmOperation lro = await networkCloudBareMetalMachine.ReplaceAsync(WaitUntil.Completed, content: content); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudBareMetalMachine.ReplaceAsync(WaitUntil.Completed, content: content); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -276,8 +276,8 @@ public async Task Restart_RestartBareMetalMachine() NetworkCloudBareMetalMachineResource networkCloudBareMetalMachine = client.GetNetworkCloudBareMetalMachineResource(networkCloudBareMetalMachineResourceId); // invoke the operation - ArmOperation lro = await networkCloudBareMetalMachine.RestartAsync(WaitUntil.Completed); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudBareMetalMachine.RestartAsync(WaitUntil.Completed); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -311,8 +311,8 @@ public async Task RunCommand_RunCommandOnBareMetalMachine() "--argument1","argument2" }, }; - ArmOperation lro = await networkCloudBareMetalMachine.RunCommandAsync(WaitUntil.Completed, content); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudBareMetalMachine.RunCommandAsync(WaitUntil.Completed, content); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -349,8 +349,8 @@ public async Task RunDataExtracts_RunDataExtractionOnBareMetalMachine() }, } }, 60); - ArmOperation lro = await networkCloudBareMetalMachine.RunDataExtractsAsync(WaitUntil.Completed, content); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudBareMetalMachine.RunDataExtractsAsync(WaitUntil.Completed, content); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -393,8 +393,8 @@ public async Task RunReadCommands_RunAndRetrieveOutputFromReadOnlyCommandsOnBare }, } }, 60); - ArmOperation lro = await networkCloudBareMetalMachine.RunReadCommandsAsync(WaitUntil.Completed, content); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudBareMetalMachine.RunReadCommandsAsync(WaitUntil.Completed, content); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -421,8 +421,8 @@ public async Task Start_StartBareMetalMachine() NetworkCloudBareMetalMachineResource networkCloudBareMetalMachine = client.GetNetworkCloudBareMetalMachineResource(networkCloudBareMetalMachineResourceId); // invoke the operation - ArmOperation lro = await networkCloudBareMetalMachine.StartAsync(WaitUntil.Completed); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudBareMetalMachine.StartAsync(WaitUntil.Completed); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -449,8 +449,8 @@ public async Task Uncordon_UncordonBareMetalMachine() NetworkCloudBareMetalMachineResource networkCloudBareMetalMachine = client.GetNetworkCloudBareMetalMachineResource(networkCloudBareMetalMachineResourceId); // invoke the operation - ArmOperation lro = await networkCloudBareMetalMachine.UncordonAsync(WaitUntil.Completed); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudBareMetalMachine.UncordonAsync(WaitUntil.Completed); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs index 477acf7cdc7ed..96047885fff0e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudClusterResource.cs @@ -246,8 +246,8 @@ public async Task Deploy_DeployCluster() // invoke the operation ClusterDeployContent content = new ClusterDeployContent(); - ArmOperation lro = await networkCloudCluster.DeployAsync(WaitUntil.Completed, content: content); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudCluster.DeployAsync(WaitUntil.Completed, content: content); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -281,8 +281,8 @@ public async Task Deploy_DeployClusterSkippingValidation() "bmmName1" }, }; - ArmOperation lro = await networkCloudCluster.DeployAsync(WaitUntil.Completed, content: content); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudCluster.DeployAsync(WaitUntil.Completed, content: content); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -310,8 +310,8 @@ public async Task UpdateVersion_UpdateClusterVersion() // invoke the operation ClusterUpdateVersionContent content = new ClusterUpdateVersionContent("2.0"); - ArmOperation lro = await networkCloudCluster.UpdateVersionAsync(WaitUntil.Completed, content); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudCluster.UpdateVersionAsync(WaitUntil.Completed, content); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs index a3a46bf62181f..4b94c11a78ed2 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudKubernetesClusterResource.cs @@ -174,8 +174,8 @@ public async Task RestartNode_RestartAKubernetesClusterNode() // invoke the operation KubernetesClusterRestartNodeContent content = new KubernetesClusterRestartNodeContent("nodeName"); - ArmOperation lro = await networkCloudKubernetesCluster.RestartNodeAsync(WaitUntil.Completed, content); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudKubernetesCluster.RestartNodeAsync(WaitUntil.Completed, content); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceResource.cs index 9ed43b68f1635..db7cdf4478db6 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudStorageApplianceResource.cs @@ -145,8 +145,8 @@ public async Task DisableRemoteVendorManagement_TurnOffRemoteVendorManagementFor NetworkCloudStorageApplianceResource networkCloudStorageAppliance = client.GetNetworkCloudStorageApplianceResource(networkCloudStorageApplianceResourceId); // invoke the operation - ArmOperation lro = await networkCloudStorageAppliance.DisableRemoteVendorManagementAsync(WaitUntil.Completed); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudStorageAppliance.DisableRemoteVendorManagementAsync(WaitUntil.Completed); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -180,8 +180,8 @@ public async Task EnableRemoteVendorManagement_TurnOnRemoteVendorManagementForSt "10.0.0.0/24" }, }; - ArmOperation lro = await networkCloudStorageAppliance.EnableRemoteVendorManagementAsync(WaitUntil.Completed, content: content); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudStorageAppliance.EnableRemoteVendorManagementAsync(WaitUntil.Completed, content: content); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineResource.cs index 91ff80075b9f4..fe0cb4c628ab5 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/samples/Generated/Samples/Sample_NetworkCloudVirtualMachineResource.cs @@ -179,8 +179,8 @@ public async Task PowerOff_PowerOffVirtualMachine() { SkipShutdown = SkipShutdown.True, }; - ArmOperation lro = await networkCloudVirtualMachine.PowerOffAsync(WaitUntil.Completed, content: content); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudVirtualMachine.PowerOffAsync(WaitUntil.Completed, content: content); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -207,8 +207,8 @@ public async Task Reimage_ReimageVirtualMachine() NetworkCloudVirtualMachineResource networkCloudVirtualMachine = client.GetNetworkCloudVirtualMachineResource(networkCloudVirtualMachineResourceId); // invoke the operation - ArmOperation lro = await networkCloudVirtualMachine.ReimageAsync(WaitUntil.Completed); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudVirtualMachine.ReimageAsync(WaitUntil.Completed); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -235,8 +235,8 @@ public async Task Restart_RestartVirtualMachine() NetworkCloudVirtualMachineResource networkCloudVirtualMachine = client.GetNetworkCloudVirtualMachineResource(networkCloudVirtualMachineResourceId); // invoke the operation - ArmOperation lro = await networkCloudVirtualMachine.RestartAsync(WaitUntil.Completed); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudVirtualMachine.RestartAsync(WaitUntil.Completed); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } @@ -263,8 +263,8 @@ public async Task Start_StartVirtualMachine() NetworkCloudVirtualMachineResource networkCloudVirtualMachine = client.GetNetworkCloudVirtualMachineResource(networkCloudVirtualMachineResourceId); // invoke the operation - ArmOperation lro = await networkCloudVirtualMachine.StartAsync(WaitUntil.Completed); - Models.OperationStatusResult result = lro.Value; + ArmOperation lro = await networkCloudVirtualMachine.StartAsync(WaitUntil.Completed); + NetworkCloudOperationStatusResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/ArmNetworkCloudModelFactory.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/ArmNetworkCloudModelFactory.cs index f33d5206289d8..fcb41774c39ab 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/ArmNetworkCloudModelFactory.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/ArmNetworkCloudModelFactory.cs @@ -716,7 +716,7 @@ public static NetworkCloudVolumeData NetworkCloudVolumeData(ResourceIdentifier i return new NetworkCloudVolumeData(id, name, resourceType, systemData, tags, location, extendedLocation, attachedTo?.ToList(), detailedStatus, detailedStatusMessage, provisioningState, serialNumber, sizeInMiB); } - /// Initializes a new instance of OperationStatusResult. + /// Initializes a new instance of NetworkCloudOperationStatusResult. /// Fully qualified ID for the async operation. /// Fully qualified ID of the resource against which the original async operation was started. /// Name of the async operation. @@ -726,12 +726,12 @@ public static NetworkCloudVolumeData NetworkCloudVolumeData(ResourceIdentifier i /// The end time of the operation. /// The operations list. /// If present, details of the operation error. - /// A new instance for mocking. - public static OperationStatusResult OperationStatusResult(ResourceIdentifier id = null, ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null) + /// A new instance for mocking. + public static NetworkCloudOperationStatusResult NetworkCloudOperationStatusResult(ResourceIdentifier id = null, ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null) { - operations ??= new List(); + operations ??= new List(); - return new OperationStatusResult(id, resourceId, name, status, percentComplete, startOn, endOn, operations?.ToList(), error); + return new NetworkCloudOperationStatusResult(id, resourceId, name, status, percentComplete, startOn, endOn, operations?.ToList(), error); } /// Initializes a new instance of NetworkCloudBareMetalMachineKeySetData. diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/NetworkCloudOperationStatusResultOperationSource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/NetworkCloudOperationStatusResultOperationSource.cs new file mode 100644 index 0000000000000..ceaf413a1b808 --- /dev/null +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/NetworkCloudOperationStatusResultOperationSource.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.ResourceManager.NetworkCloud.Models; + +namespace Azure.ResourceManager.NetworkCloud +{ + internal class NetworkCloudOperationStatusResultOperationSource : IOperationSource + { + NetworkCloudOperationStatusResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + return NetworkCloudOperationStatusResult.DeserializeNetworkCloudOperationStatusResult(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + return NetworkCloudOperationStatusResult.DeserializeNetworkCloudOperationStatusResult(document.RootElement); + } + } +} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs deleted file mode 100644 index 101db1ae1daae..0000000000000 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/LongRunningOperation/OperationStatusResultOperationSource.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager.NetworkCloud.Models; - -namespace Azure.ResourceManager.NetworkCloud -{ - internal class OperationStatusResultOperationSource : IOperationSource - { - OperationStatusResult IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - return OperationStatusResult.DeserializeOperationStatusResult(document.RootElement); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - return OperationStatusResult.DeserializeOperationStatusResult(document.RootElement); - } - } -} diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.Serialization.cs similarity index 84% rename from sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.Serialization.cs rename to sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.Serialization.cs index cd7388a53a7c6..7323972297ba7 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.Serialization.cs @@ -13,9 +13,9 @@ namespace Azure.ResourceManager.NetworkCloud.Models { - public partial class OperationStatusResult + public partial class NetworkCloudOperationStatusResult { - internal static OperationStatusResult DeserializeOperationStatusResult(JsonElement element) + internal static NetworkCloudOperationStatusResult DeserializeNetworkCloudOperationStatusResult(JsonElement element) { if (element.ValueKind == JsonValueKind.Null) { @@ -28,7 +28,7 @@ internal static OperationStatusResult DeserializeOperationStatusResult(JsonEleme Optional percentComplete = default; Optional startTime = default; Optional endTime = default; - Optional> operations = default; + Optional> operations = default; Optional error = default; foreach (var property in element.EnumerateObject()) { @@ -93,10 +93,10 @@ internal static OperationStatusResult DeserializeOperationStatusResult(JsonEleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(DeserializeOperationStatusResult(item)); + array.Add(DeserializeNetworkCloudOperationStatusResult(item)); } operations = array; continue; @@ -111,7 +111,7 @@ internal static OperationStatusResult DeserializeOperationStatusResult(JsonEleme continue; } } - return new OperationStatusResult(id.Value, resourceId.Value, name.Value, status, Optional.ToNullable(percentComplete), Optional.ToNullable(startTime), Optional.ToNullable(endTime), Optional.ToList(operations), error.Value); + return new NetworkCloudOperationStatusResult(id.Value, resourceId.Value, name.Value, status, Optional.ToNullable(percentComplete), Optional.ToNullable(startTime), Optional.ToNullable(endTime), Optional.ToList(operations), error.Value); } } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.cs similarity index 77% rename from sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.cs rename to sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.cs index 744107f3ebc7e..cc4f67f61f033 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/OperationStatusResult.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/Models/NetworkCloudOperationStatusResult.cs @@ -13,20 +13,20 @@ namespace Azure.ResourceManager.NetworkCloud.Models { /// The current status of an async operation. - public partial class OperationStatusResult + public partial class NetworkCloudOperationStatusResult { - /// Initializes a new instance of OperationStatusResult. + /// Initializes a new instance of NetworkCloudOperationStatusResult. /// Operation status. /// is null. - internal OperationStatusResult(string status) + internal NetworkCloudOperationStatusResult(string status) { Argument.AssertNotNull(status, nameof(status)); Status = status; - Operations = new ChangeTrackingList(); + Operations = new ChangeTrackingList(); } - /// Initializes a new instance of OperationStatusResult. + /// Initializes a new instance of NetworkCloudOperationStatusResult. /// Fully qualified ID for the async operation. /// Fully qualified ID of the resource against which the original async operation was started. /// Name of the async operation. @@ -36,7 +36,7 @@ internal OperationStatusResult(string status) /// The end time of the operation. /// The operations list. /// If present, details of the operation error. - internal OperationStatusResult(ResourceIdentifier id, ResourceIdentifier resourceId, string name, string status, float? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList operations, ResponseError error) + internal NetworkCloudOperationStatusResult(ResourceIdentifier id, ResourceIdentifier resourceId, string name, string status, float? percentComplete, DateTimeOffset? startOn, DateTimeOffset? endOn, IReadOnlyList operations, ResponseError error) { Id = id; ResourceId = resourceId; @@ -64,7 +64,7 @@ internal OperationStatusResult(ResourceIdentifier id, ResourceIdentifier resourc /// The end time of the operation. public DateTimeOffset? EndOn { get; } /// The operations list. - public IReadOnlyList Operations { get; } + public IReadOnlyList Operations { get; } /// If present, details of the operation error. public ResponseError Error { get; } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.cs index 20eb0f17050e3..d326e95649871 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.cs @@ -245,14 +245,14 @@ public virtual ArmOperation Update(WaitUnt /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual async Task> CordonAsync(WaitUntil waitUntil, BareMetalMachineCordonContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> CordonAsync(WaitUntil waitUntil, BareMetalMachineCordonContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Cordon"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.CordonAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateCordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateCordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -280,14 +280,14 @@ public virtual async Task> CordonAsync(WaitU /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual ArmOperation Cordon(WaitUntil waitUntil, BareMetalMachineCordonContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Cordon(WaitUntil waitUntil, BareMetalMachineCordonContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Cordon"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.Cordon(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateCordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateCordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -315,14 +315,14 @@ public virtual ArmOperation Cordon(WaitUntil waitUntil, B /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual async Task> PowerOffAsync(WaitUntil waitUntil, BareMetalMachinePowerOffContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> PowerOffAsync(WaitUntil waitUntil, BareMetalMachinePowerOffContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.PowerOff"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.PowerOffAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -350,14 +350,14 @@ public virtual async Task> PowerOffAsync(Wai /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual ArmOperation PowerOff(WaitUntil waitUntil, BareMetalMachinePowerOffContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation PowerOff(WaitUntil waitUntil, BareMetalMachinePowerOffContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.PowerOff"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.PowerOff(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -384,14 +384,14 @@ public virtual ArmOperation PowerOff(WaitUntil waitUntil, /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task> ReimageAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> ReimageAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Reimage"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.ReimageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -418,14 +418,14 @@ public virtual async Task> ReimageAsync(Wait /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Reimage(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Reimage(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Reimage"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.Reimage(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -453,14 +453,14 @@ public virtual ArmOperation Reimage(WaitUntil waitUntil, /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual async Task> ReplaceAsync(WaitUntil waitUntil, BareMetalMachineReplaceContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> ReplaceAsync(WaitUntil waitUntil, BareMetalMachineReplaceContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Replace"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.ReplaceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -488,14 +488,14 @@ public virtual async Task> ReplaceAsync(Wait /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual ArmOperation Replace(WaitUntil waitUntil, BareMetalMachineReplaceContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Replace(WaitUntil waitUntil, BareMetalMachineReplaceContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Replace"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.Replace(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateReplaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -522,14 +522,14 @@ public virtual ArmOperation Replace(WaitUntil waitUntil, /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task> RestartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> RestartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Restart"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -556,14 +556,14 @@ public virtual async Task> RestartAsync(Wait /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Restart"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -592,7 +592,7 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, /// The request body. /// The cancellation token to use. /// is null. - public virtual async Task> RunCommandAsync(WaitUntil waitUntil, BareMetalMachineRunCommandContent content, CancellationToken cancellationToken = default) + public virtual async Task> RunCommandAsync(WaitUntil waitUntil, BareMetalMachineRunCommandContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -601,7 +601,7 @@ public virtual async Task> RunCommandAsync(W try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.RunCommandAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunCommandRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunCommandRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -630,7 +630,7 @@ public virtual async Task> RunCommandAsync(W /// The request body. /// The cancellation token to use. /// is null. - public virtual ArmOperation RunCommand(WaitUntil waitUntil, BareMetalMachineRunCommandContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation RunCommand(WaitUntil waitUntil, BareMetalMachineRunCommandContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -639,7 +639,7 @@ public virtual ArmOperation RunCommand(WaitUntil waitUnti try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.RunCommand(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunCommandRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunCommandRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -668,7 +668,7 @@ public virtual ArmOperation RunCommand(WaitUntil waitUnti /// The request body. /// The cancellation token to use. /// is null. - public virtual async Task> RunDataExtractsAsync(WaitUntil waitUntil, BareMetalMachineRunDataExtractsContent content, CancellationToken cancellationToken = default) + public virtual async Task> RunDataExtractsAsync(WaitUntil waitUntil, BareMetalMachineRunDataExtractsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -677,7 +677,7 @@ public virtual async Task> RunDataExtractsAs try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.RunDataExtractsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunDataExtractsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunDataExtractsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -706,7 +706,7 @@ public virtual async Task> RunDataExtractsAs /// The request body. /// The cancellation token to use. /// is null. - public virtual ArmOperation RunDataExtracts(WaitUntil waitUntil, BareMetalMachineRunDataExtractsContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation RunDataExtracts(WaitUntil waitUntil, BareMetalMachineRunDataExtractsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -715,7 +715,7 @@ public virtual ArmOperation RunDataExtracts(WaitUntil wai try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.RunDataExtracts(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunDataExtractsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunDataExtractsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -744,7 +744,7 @@ public virtual ArmOperation RunDataExtracts(WaitUntil wai /// The request body. /// The cancellation token to use. /// is null. - public virtual async Task> RunReadCommandsAsync(WaitUntil waitUntil, BareMetalMachineRunReadCommandsContent content, CancellationToken cancellationToken = default) + public virtual async Task> RunReadCommandsAsync(WaitUntil waitUntil, BareMetalMachineRunReadCommandsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -753,7 +753,7 @@ public virtual async Task> RunReadCommandsAs try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.RunReadCommandsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunReadCommandsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunReadCommandsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -782,7 +782,7 @@ public virtual async Task> RunReadCommandsAs /// The request body. /// The cancellation token to use. /// is null. - public virtual ArmOperation RunReadCommands(WaitUntil waitUntil, BareMetalMachineRunReadCommandsContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation RunReadCommands(WaitUntil waitUntil, BareMetalMachineRunReadCommandsContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -791,7 +791,7 @@ public virtual ArmOperation RunReadCommands(WaitUntil wai try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.RunReadCommands(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunReadCommandsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateRunReadCommandsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -818,14 +818,14 @@ public virtual ArmOperation RunReadCommands(WaitUntil wai /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task> StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Start"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -852,14 +852,14 @@ public virtual async Task> StartAsync(WaitUn /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Start"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -886,14 +886,14 @@ public virtual ArmOperation Start(WaitUntil waitUntil, Ca /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task> UncordonAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> UncordonAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Uncordon"); scope.Start(); try { var response = await _networkCloudBareMetalMachineBareMetalMachinesRestClient.UncordonAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateUncordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateUncordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -920,14 +920,14 @@ public virtual async Task> UncordonAsync(Wai /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Uncordon(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Uncordon(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics.CreateScope("NetworkCloudBareMetalMachineResource.Uncordon"); scope.Start(); try { var response = _networkCloudBareMetalMachineBareMetalMachinesRestClient.Uncordon(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateUncordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudBareMetalMachineBareMetalMachinesClientDiagnostics, Pipeline, _networkCloudBareMetalMachineBareMetalMachinesRestClient.CreateUncordonRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.cs index 649d5a859ddb2..e1669745e9e52 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.cs @@ -472,14 +472,14 @@ public virtual ArmOperation Update(WaitUntil waitUn /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual async Task> DeployAsync(WaitUntil waitUntil, ClusterDeployContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> DeployAsync(WaitUntil waitUntil, ClusterDeployContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Deploy"); scope.Start(); try { var response = await _networkCloudClusterClustersRestClient.DeployAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -507,14 +507,14 @@ public virtual async Task> DeployAsync(WaitU /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual ArmOperation Deploy(WaitUntil waitUntil, ClusterDeployContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation Deploy(WaitUntil waitUntil, ClusterDeployContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudClusterClustersClientDiagnostics.CreateScope("NetworkCloudClusterResource.Deploy"); scope.Start(); try { var response = _networkCloudClusterClustersRestClient.Deploy(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateDeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -543,7 +543,7 @@ public virtual ArmOperation Deploy(WaitUntil waitUntil, C /// The request body. /// The cancellation token to use. /// is null. - public virtual async Task> UpdateVersionAsync(WaitUntil waitUntil, ClusterUpdateVersionContent content, CancellationToken cancellationToken = default) + public virtual async Task> UpdateVersionAsync(WaitUntil waitUntil, ClusterUpdateVersionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -552,7 +552,7 @@ public virtual async Task> UpdateVersionAsyn try { var response = await _networkCloudClusterClustersRestClient.UpdateVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateUpdateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateUpdateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -581,7 +581,7 @@ public virtual async Task> UpdateVersionAsyn /// The request body. /// The cancellation token to use. /// is null. - public virtual ArmOperation UpdateVersion(WaitUntil waitUntil, ClusterUpdateVersionContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation UpdateVersion(WaitUntil waitUntil, ClusterUpdateVersionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -590,7 +590,7 @@ public virtual ArmOperation UpdateVersion(WaitUntil waitU try { var response = _networkCloudClusterClustersRestClient.UpdateVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateUpdateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudClusterClustersClientDiagnostics, Pipeline, _networkCloudClusterClustersRestClient.CreateUpdateVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.cs index 592b27c53a7d1..e4e93223528ba 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.cs @@ -367,7 +367,7 @@ public virtual ArmOperation Update(WaitUn /// The request body. /// The cancellation token to use. /// is null. - public virtual async Task> RestartNodeAsync(WaitUntil waitUntil, KubernetesClusterRestartNodeContent content, CancellationToken cancellationToken = default) + public virtual async Task> RestartNodeAsync(WaitUntil waitUntil, KubernetesClusterRestartNodeContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -376,7 +376,7 @@ public virtual async Task> RestartNodeAsync( try { var response = await _networkCloudKubernetesClusterKubernetesClustersRestClient.RestartNodeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateRestartNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateRestartNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -405,7 +405,7 @@ public virtual async Task> RestartNodeAsync( /// The request body. /// The cancellation token to use. /// is null. - public virtual ArmOperation RestartNode(WaitUntil waitUntil, KubernetesClusterRestartNodeContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation RestartNode(WaitUntil waitUntil, KubernetesClusterRestartNodeContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); @@ -414,7 +414,7 @@ public virtual ArmOperation RestartNode(WaitUntil waitUnt try { var response = _networkCloudKubernetesClusterKubernetesClustersRestClient.RestartNode(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateRestartNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudKubernetesClusterKubernetesClustersClientDiagnostics, Pipeline, _networkCloudKubernetesClusterKubernetesClustersRestClient.CreateRestartNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.cs index be33fcb1816ac..f046532f69cde 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.cs @@ -244,14 +244,14 @@ public virtual ArmOperation Update(WaitUnt /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task> DisableRemoteVendorManagementAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> DisableRemoteVendorManagementAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudStorageApplianceStorageAppliancesClientDiagnostics.CreateScope("NetworkCloudStorageApplianceResource.DisableRemoteVendorManagement"); scope.Start(); try { var response = await _networkCloudStorageApplianceStorageAppliancesRestClient.DisableRemoteVendorManagementAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateDisableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateDisableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -278,14 +278,14 @@ public virtual async Task> DisableRemoteVend /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation DisableRemoteVendorManagement(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation DisableRemoteVendorManagement(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudStorageApplianceStorageAppliancesClientDiagnostics.CreateScope("NetworkCloudStorageApplianceResource.DisableRemoteVendorManagement"); scope.Start(); try { var response = _networkCloudStorageApplianceStorageAppliancesRestClient.DisableRemoteVendorManagement(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateDisableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateDisableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -313,14 +313,14 @@ public virtual ArmOperation DisableRemoteVendorManagement /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual async Task> EnableRemoteVendorManagementAsync(WaitUntil waitUntil, StorageApplianceEnableRemoteVendorManagementContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> EnableRemoteVendorManagementAsync(WaitUntil waitUntil, StorageApplianceEnableRemoteVendorManagementContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudStorageApplianceStorageAppliancesClientDiagnostics.CreateScope("NetworkCloudStorageApplianceResource.EnableRemoteVendorManagement"); scope.Start(); try { var response = await _networkCloudStorageApplianceStorageAppliancesRestClient.EnableRemoteVendorManagementAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateEnableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateEnableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -348,14 +348,14 @@ public virtual async Task> EnableRemoteVendo /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual ArmOperation EnableRemoteVendorManagement(WaitUntil waitUntil, StorageApplianceEnableRemoteVendorManagementContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation EnableRemoteVendorManagement(WaitUntil waitUntil, StorageApplianceEnableRemoteVendorManagementContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudStorageApplianceStorageAppliancesClientDiagnostics.CreateScope("NetworkCloudStorageApplianceResource.EnableRemoteVendorManagement"); scope.Start(); try { var response = _networkCloudStorageApplianceStorageAppliancesRestClient.EnableRemoteVendorManagement(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateEnableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudStorageApplianceStorageAppliancesClientDiagnostics, Pipeline, _networkCloudStorageApplianceStorageAppliancesRestClient.CreateEnableRemoteVendorManagementRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.cs index 104cfda8b834d..fee8d99c22c67 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.cs @@ -366,14 +366,14 @@ public virtual ArmOperation Update(WaitUntil /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual async Task> PowerOffAsync(WaitUntil waitUntil, VirtualMachinePowerOffContent content = null, CancellationToken cancellationToken = default) + public virtual async Task> PowerOffAsync(WaitUntil waitUntil, VirtualMachinePowerOffContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.PowerOff"); scope.Start(); try { var response = await _networkCloudVirtualMachineVirtualMachinesRestClient.PowerOffAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -401,14 +401,14 @@ public virtual async Task> PowerOffAsync(Wai /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The request body. /// The cancellation token to use. - public virtual ArmOperation PowerOff(WaitUntil waitUntil, VirtualMachinePowerOffContent content = null, CancellationToken cancellationToken = default) + public virtual ArmOperation PowerOff(WaitUntil waitUntil, VirtualMachinePowerOffContent content = null, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.PowerOff"); scope.Start(); try { var response = _networkCloudVirtualMachineVirtualMachinesRestClient.PowerOff(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreatePowerOffRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -435,14 +435,14 @@ public virtual ArmOperation PowerOff(WaitUntil waitUntil, /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task> ReimageAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> ReimageAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Reimage"); scope.Start(); try { var response = await _networkCloudVirtualMachineVirtualMachinesRestClient.ReimageAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -469,14 +469,14 @@ public virtual async Task> ReimageAsync(Wait /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Reimage(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Reimage(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Reimage"); scope.Start(); try { var response = _networkCloudVirtualMachineVirtualMachinesRestClient.Reimage(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateReimageRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -503,14 +503,14 @@ public virtual ArmOperation Reimage(WaitUntil waitUntil, /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task> RestartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> RestartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Restart"); scope.Start(); try { var response = await _networkCloudVirtualMachineVirtualMachinesRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -537,14 +537,14 @@ public virtual async Task> RestartAsync(Wait /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Restart(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Restart"); scope.Start(); try { var response = _networkCloudVirtualMachineVirtualMachinesRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -571,14 +571,14 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual async Task> StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task> StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Start"); scope.Start(); try { var response = await _networkCloudVirtualMachineVirtualMachinesRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -605,14 +605,14 @@ public virtual async Task> StartAsync(WaitUn /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The cancellation token to use. - public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) { using var scope = _networkCloudVirtualMachineVirtualMachinesClientDiagnostics.CreateScope("NetworkCloudVirtualMachineResource.Start"); scope.Start(); try { var response = _networkCloudVirtualMachineVirtualMachinesRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new NetworkCloudArmOperation(new OperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new NetworkCloudArmOperation(new NetworkCloudOperationStatusResultOperationSource(), _networkCloudVirtualMachineVirtualMachinesClientDiagnostics, Pipeline, _networkCloudVirtualMachineVirtualMachinesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/autorest.md b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/autorest.md index 40626a89af265..b129540c2e0ba 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/autorest.md +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/autorest.md @@ -15,7 +15,7 @@ skip-csproj: true modelerfour: flatten-payloads: false -#mgmt-debug: +# mgmt-debug: # show-serialized-names: true # 'tenantId': 'uuid' cannot be used globally as it break our list clusters API where tenantId sometimes is an empty string @@ -129,6 +129,7 @@ prepend-rp-prefix: - TrunkedNetwork - VirtualMachine - Volume + - OperationStatusResult rename-rules: CPU: Cpu