From 290a3d8dcd086096e55694f4e798a3c378b88e2e Mon Sep 17 00:00:00 2001 From: Dapeng Zhang Date: Thu, 27 Jan 2022 17:07:18 +0800 Subject: [PATCH] Fix duplicate files in Azure.ResourceManager.Network (#26637) * delete everything * regenerate everything --- .../CustomIPPrefixCreateOrUpdateOperation.cs | 79 ------------------- .../CustomIPPrefixDeleteOperation.cs | 53 ------------- .../VirtualWanCreateOrUpdateOperation.cs | 79 ------------------- .../VirtualWanDeleteOperation.cs | 53 ------------- 4 files changed, 264 deletions(-) delete mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/CustomIPPrefixCreateOrUpdateOperation.cs delete mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/CustomIPPrefixDeleteOperation.cs delete mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/VirtualWanCreateOrUpdateOperation.cs delete mode 100644 sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/VirtualWanDeleteOperation.cs diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/CustomIPPrefixCreateOrUpdateOperation.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/CustomIPPrefixCreateOrUpdateOperation.cs deleted file mode 100644 index 65553829fd737..0000000000000 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/CustomIPPrefixCreateOrUpdateOperation.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Network; - -namespace Azure.ResourceManager.Network.Models -{ - /// Creates or updates a custom IP prefix. - public partial class CustomIpPrefixCreateOrUpdateOperation : Operation, IOperationSource - { - private readonly OperationInternals _operation; - - private readonly ArmClient _armClient; - - /// Initializes a new instance of CustomIpPrefixCreateOrUpdateOperation for mocking. - protected CustomIpPrefixCreateOrUpdateOperation() - { - } - - internal CustomIpPrefixCreateOrUpdateOperation(ArmClient armClient, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) - { - _operation = new OperationInternals(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "CustomIpPrefixCreateOrUpdateOperation"); - _armClient = armClient; - } - - /// - public override string Id => _operation.Id; - - /// - public override CustomIpPrefix Value => _operation.Value; - - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// - public override bool HasValue => _operation.HasValue; - - /// - public override Response GetRawResponse() => _operation.GetRawResponse(); - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - - /// - public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); - - CustomIpPrefix IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = CustomIpPrefixData.DeserializeCustomIpPrefixData(document.RootElement); - return new CustomIpPrefix(_armClient, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = CustomIpPrefixData.DeserializeCustomIpPrefixData(document.RootElement); - return new CustomIpPrefix(_armClient, data); - } - } -} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/CustomIPPrefixDeleteOperation.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/CustomIPPrefixDeleteOperation.cs deleted file mode 100644 index 199751e027697..0000000000000 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/CustomIPPrefixDeleteOperation.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.Network.Models -{ - /// Deletes the specified custom IP prefix. - public partial class CustomIpPrefixDeleteOperation : Operation - { - private readonly OperationInternals _operation; - - /// Initializes a new instance of CustomIpPrefixDeleteOperation for mocking. - protected CustomIpPrefixDeleteOperation() - { - } - - internal CustomIpPrefixDeleteOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) - { - _operation = new OperationInternals(clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "CustomIpPrefixDeleteOperation"); - } - - /// - public override string Id => _operation.Id; - - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// - public override Response GetRawResponse() => _operation.GetRawResponse(); - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - - /// - public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - - /// - public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); - - /// - public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); - } -} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/VirtualWanCreateOrUpdateOperation.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/VirtualWanCreateOrUpdateOperation.cs deleted file mode 100644 index 32514356ab96c..0000000000000 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/VirtualWanCreateOrUpdateOperation.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Network; - -namespace Azure.ResourceManager.Network.Models -{ - /// Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. - public partial class VirtualWANCreateOrUpdateOperation : Operation, IOperationSource - { - private readonly OperationInternals _operation; - - private readonly ArmClient _armClient; - - /// Initializes a new instance of VirtualWANCreateOrUpdateOperation for mocking. - protected VirtualWANCreateOrUpdateOperation() - { - } - - internal VirtualWANCreateOrUpdateOperation(ArmClient armClient, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) - { - _operation = new OperationInternals(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.AzureAsyncOperation, "VirtualWANCreateOrUpdateOperation"); - _armClient = armClient; - } - - /// - public override string Id => _operation.Id; - - /// - public override VirtualWAN Value => _operation.Value; - - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// - public override bool HasValue => _operation.HasValue; - - /// - public override Response GetRawResponse() => _operation.GetRawResponse(); - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - - /// - public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); - - VirtualWAN IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = VirtualWANData.DeserializeVirtualWANData(document.RootElement); - return new VirtualWAN(_armClient, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = VirtualWANData.DeserializeVirtualWANData(document.RootElement); - return new VirtualWAN(_armClient, data); - } - } -} diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/VirtualWanDeleteOperation.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/VirtualWanDeleteOperation.cs deleted file mode 100644 index 8bb611843fe25..0000000000000 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LongRunningOperation/VirtualWanDeleteOperation.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.ResourceManager.Network.Models -{ - /// Deletes a VirtualWAN. - public partial class VirtualWANDeleteOperation : Operation - { - private readonly OperationInternals _operation; - - /// Initializes a new instance of VirtualWANDeleteOperation for mocking. - protected VirtualWANDeleteOperation() - { - } - - internal VirtualWANDeleteOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) - { - _operation = new OperationInternals(clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "VirtualWANDeleteOperation"); - } - - /// - public override string Id => _operation.Id; - - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// - public override Response GetRawResponse() => _operation.GetRawResponse(); - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - - /// - public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - - /// - public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); - - /// - public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); - } -}