From 9de24560f6fe07ec5d98992b7d2d1e0dbdea7309 Mon Sep 17 00:00:00 2001 From: m-nash <64171366+m-nash@users.noreply.github.com> Date: Tue, 15 Jun 2021 21:45:14 -0700 Subject: [PATCH] remove unused interfaces (#21898) * update to be inside core namespace * update proto references to removed namespace * remove unused interfaces --- .../src/IDeletableResource.cs | 52 ------ .../src/ITaggableResource.cs | 163 ------------------ .../authorization/RoleAssignmentOperations.cs | 2 +- .../compute/AvailabilitySetOperations.cs | 2 +- .../compute/VirtualMachineOperations.cs | 2 +- .../VirtualMachineScaleSetOperations.cs | 2 +- .../network/LoadBalancerOperations.cs | 2 +- .../network/NetworkInterfaceOperations.cs | 2 +- .../network/NetworkSecurityGroupOperations.cs | 2 +- .../network/PublicIpAddressOperations.cs | 2 +- .../Proto.Client/network/SubnetOperations.cs | 2 +- .../network/VirtualNetworkOperations.cs | 2 +- 12 files changed, 10 insertions(+), 225 deletions(-) delete mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/src/IDeletableResource.cs delete mode 100644 sdk/resourcemanager/Azure.ResourceManager.Core/src/ITaggableResource.cs diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/IDeletableResource.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/IDeletableResource.cs deleted file mode 100644 index 3fba06521f18e..0000000000000 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/IDeletableResource.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading; -using System.Threading.Tasks; - -namespace Azure.ResourceManager.Core -{ - /// - /// Interface for operations to delete a resource - /// - public interface IDeletableResource - { - /// - /// Delete the resource. - /// - /// A token allowing immediate cancellation of any blocking call performed during the deletion. - /// The status of the delete operation. - Response Delete(CancellationToken cancellationToken = default); - - /// - /// Delete the resource. - /// - /// A token allowing immediate cancellation of any blocking call performed during the deletion. - /// A that on completion returns the status of the delete operation. - Task DeleteAsync(CancellationToken cancellationToken = default); - - /// - /// Delete the resource. - /// - /// A token allowing immediate cancellation of any blocking call performed during the deletion. - /// A which allows the caller to control polling and waiting for resource deletion. - /// The operation yields the final http response to the delete request when complete. - /// - /// Details on long running operation object. - /// - Operation StartDelete(CancellationToken cancellationToken = default); - - /// - /// Delete the resource. This call returns a Task that blocks until the delete operation is accepted on the service. - /// - /// A token to allow the caller to cancel the call to the service. - /// The default value is . - /// A that on completion returns a which - /// allows the caller to control polling and waiting for resource deletion. - /// The operation yields the final http response to the delete request when complete. - /// - /// Details on long running operation object. - /// - Task StartDeleteAsync(CancellationToken cancellationToken = default); - } -} diff --git a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ITaggableResource.cs b/sdk/resourcemanager/Azure.ResourceManager.Core/src/ITaggableResource.cs deleted file mode 100644 index b22a9500285c8..0000000000000 --- a/sdk/resourcemanager/Azure.ResourceManager.Core/src/ITaggableResource.cs +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; - -namespace Azure.ResourceManager.Core -{ - /// - /// Interface for operations that allow manipulating resource tags. - /// - /// The identifier type for this resource. - /// The typed operations for a specific resource. - public interface ITaggableResource - where TOperations : ResourceOperationsBase - where TIdentifier : TenantResourceIdentifier - { - /// - /// Add a tag to the resource. - /// - /// The tag key. - /// The tag value. - /// A token to allow the caller to cancel the call to the service. - /// The default value is . - /// An that allows the user to control polling and waiting for Tag completion. - Response AddTag( - string key, - string value, - CancellationToken cancellationToken = default); - - /// - /// Add a tag to the resource. - /// - /// The tag key. - /// The tag value. - /// A token to allow the caller to cancel the call to the service. - /// The default value is . - /// A that performs the Tag operation. The Task yields an an - /// that allows the user to control polling and waiting for - /// Tag completion. - Task> AddTagAsync( - string key, - string value, - CancellationToken cancellationToken = default); - - /// - /// Add a tag to the resource. - /// - /// The tag key. - /// The tag value. - /// A token to allow the caller to cancel the call to the service. - /// The default value is . - /// An that allows the user to control polling and waiting for Tag completion. - Operation StartAddTag( - string key, - string value, - CancellationToken cancellationToken = default); - - /// - /// Add a tag to the resource. - /// - /// The tag key. - /// The tag value. - /// A token to allow the caller to cancel the call to the service. - /// The default value is . - /// A that performs the Tag operation. The Task yields an an - /// that allows the user to control polling and waiting for - /// Tag completion. - Task> StartAddTagAsync( - string key, - string value, - CancellationToken cancellationToken = default); - - /// - /// Set the resource tags. - /// - /// The resource tags. - /// A token allowing immediate cancellation of any blocking call performed during the deletion. - /// The status of the delete operation. - Response SetTags( - IDictionary tags, - CancellationToken cancellationToken = default); - - /// - /// Set the resource tags. - /// - /// The resource tags. - /// A token allowing immediate cancellation of any blocking call performed during the deletion. - /// A that on completion returns the status of the delete operation. - Task> SetTagsAsync( - IDictionary tags, - CancellationToken cancellationToken = default); - - /// - /// Set the resource tags. - /// - /// The resource tags. - /// A token to allow the caller to cancel the call to the service. - /// The default value is . - /// An that allows the user to control polling and waiting for Tag completion. - Operation StartSetTags( - IDictionary tags, - CancellationToken cancellationToken = default); - - /// - /// Set the resource tags. - /// - /// The resource tags. - /// A token to allow the caller to cancel the call to the service. - /// The default value is . - /// A that performs the Tag operation. The Task yields an an - /// that allows the user to control polling and waiting for - /// Tag completion. - Task> StartSetTagsAsync( - IDictionary tags, - CancellationToken cancellationToken = default); - - /// - /// Remove the resource tag. - /// - /// The tag key. - /// A token allowing immediate cancellation of any blocking call performed during the deletion. - /// The status of the delete operation. - Response RemoveTag( - string key, - CancellationToken cancellationToken = default); - - /// - /// Remove the resource tag. - /// - /// The tag key. - /// A token allowing immediate cancellation of any blocking call performed during the deletion. - /// A that on completion returns the status of the delete operation. - Task> RemoveTagAsync( - string key, - CancellationToken cancellationToken = default); - - /// - /// Remove the resource tag. - /// - /// The tag key. - /// A token to allow the caller to cancel the call to the service. - /// The default value is . - /// An that allows the user to control polling and waiting for Tag completion. - Operation StartRemoveTag( - string key, - CancellationToken cancellationToken = default); - - /// - /// Remove the resource tag. - /// - /// The tag key. - /// A token to allow the caller to cancel the call to the service. - /// The default value is . - /// A that performs the Tag operation. The Task yields an an - /// that allows the user to control polling and waiting for - /// Tag completion. - Task> StartRemoveTagAsync( - string key, - CancellationToken cancellationToken = default); - } -} diff --git a/sdk/resourcemanager/Proto.Client/authorization/RoleAssignmentOperations.cs b/sdk/resourcemanager/Proto.Client/authorization/RoleAssignmentOperations.cs index 0cabee0f165df..878a227f5a14d 100644 --- a/sdk/resourcemanager/Proto.Client/authorization/RoleAssignmentOperations.cs +++ b/sdk/resourcemanager/Proto.Client/authorization/RoleAssignmentOperations.cs @@ -13,7 +13,7 @@ namespace Proto.Authorization /// /// Operations over Role Assignments for Role-based access control to ARM resources /// - public class RoleAssignmentOperations : ExtensionResourceOperationsBase, IDeletableResource + public class RoleAssignmentOperations : ExtensionResourceOperationsBase { /// /// Gets the resource type for Role Assignments. diff --git a/sdk/resourcemanager/Proto.Client/compute/AvailabilitySetOperations.cs b/sdk/resourcemanager/Proto.Client/compute/AvailabilitySetOperations.cs index 0e4fdb7f4a88b..faaf7ab3d332b 100644 --- a/sdk/resourcemanager/Proto.Client/compute/AvailabilitySetOperations.cs +++ b/sdk/resourcemanager/Proto.Client/compute/AvailabilitySetOperations.cs @@ -12,7 +12,7 @@ namespace Proto.Compute /// /// A class representing the operations that can be performed over a specific availability set. /// - public class AvailabilitySetOperations : ResourceOperationsBase, ITaggableResource, IDeletableResource + public class AvailabilitySetOperations : ResourceOperationsBase { /// /// Initializes a new instance of the class. diff --git a/sdk/resourcemanager/Proto.Client/compute/VirtualMachineOperations.cs b/sdk/resourcemanager/Proto.Client/compute/VirtualMachineOperations.cs index 5303100bc9790..71402ce7e0298 100644 --- a/sdk/resourcemanager/Proto.Client/compute/VirtualMachineOperations.cs +++ b/sdk/resourcemanager/Proto.Client/compute/VirtualMachineOperations.cs @@ -12,7 +12,7 @@ namespace Proto.Compute /// /// A class representing the operations that can be performed over a specific VirtualMachine. /// - public class VirtualMachineOperations : ResourceOperationsBase, ITaggableResource, IDeletableResource + public class VirtualMachineOperations : ResourceOperationsBase { /// /// Initializes a new instance of the class. diff --git a/sdk/resourcemanager/Proto.Client/compute/VirtualMachineScaleSetOperations.cs b/sdk/resourcemanager/Proto.Client/compute/VirtualMachineScaleSetOperations.cs index 4fca4a567b7db..9b5aec1ce870c 100644 --- a/sdk/resourcemanager/Proto.Client/compute/VirtualMachineScaleSetOperations.cs +++ b/sdk/resourcemanager/Proto.Client/compute/VirtualMachineScaleSetOperations.cs @@ -12,7 +12,7 @@ namespace Proto.Compute /// /// A class representing the operations that can be performed over a specific VirtualMachineScaleSet. /// - public class VirtualMachineScaleSetOperations : ResourceOperationsBase, ITaggableResource, IDeletableResource + public class VirtualMachineScaleSetOperations : ResourceOperationsBase { /// /// Initializes a new instance of the class. diff --git a/sdk/resourcemanager/Proto.Client/network/LoadBalancerOperations.cs b/sdk/resourcemanager/Proto.Client/network/LoadBalancerOperations.cs index 977c5e22a7127..ff0c6a8a2e34f 100644 --- a/sdk/resourcemanager/Proto.Client/network/LoadBalancerOperations.cs +++ b/sdk/resourcemanager/Proto.Client/network/LoadBalancerOperations.cs @@ -10,7 +10,7 @@ namespace Proto.Network /// A class representing the operations that can be performed over a specific LoadBalancer. /// // TODO, ITaggable was not added. - public class LoadBalancerOperations : ResourceOperationsBase, IDeletableResource + public class LoadBalancerOperations : ResourceOperationsBase { /// /// Initializes a new instance of the class. diff --git a/sdk/resourcemanager/Proto.Client/network/NetworkInterfaceOperations.cs b/sdk/resourcemanager/Proto.Client/network/NetworkInterfaceOperations.cs index 7faf79a683a13..ed20ef5ac4220 100644 --- a/sdk/resourcemanager/Proto.Client/network/NetworkInterfaceOperations.cs +++ b/sdk/resourcemanager/Proto.Client/network/NetworkInterfaceOperations.cs @@ -11,7 +11,7 @@ namespace Proto.Network /// /// A class representing the operations that can be pefroemd over a specific . /// - public class NetworkInterfaceOperations : ResourceOperationsBase, ITaggableResource, IDeletableResource + public class NetworkInterfaceOperations : ResourceOperationsBase { internal NetworkInterfaceOperations(GenericResourceOperations genericOperations) : base(genericOperations, genericOperations.Id) diff --git a/sdk/resourcemanager/Proto.Client/network/NetworkSecurityGroupOperations.cs b/sdk/resourcemanager/Proto.Client/network/NetworkSecurityGroupOperations.cs index 6fd813f145b42..b72e8d4f0c6d6 100644 --- a/sdk/resourcemanager/Proto.Client/network/NetworkSecurityGroupOperations.cs +++ b/sdk/resourcemanager/Proto.Client/network/NetworkSecurityGroupOperations.cs @@ -15,7 +15,7 @@ namespace Proto.Network /// /// A class representing the operations that can be performed over a specific NetworkSecurityGroup. /// - public class NetworkSecurityGroupOperations : ResourceOperationsBase, ITaggableResource, IDeletableResource + public class NetworkSecurityGroupOperations : ResourceOperationsBase { /// /// Initializes a new instance of the class. diff --git a/sdk/resourcemanager/Proto.Client/network/PublicIpAddressOperations.cs b/sdk/resourcemanager/Proto.Client/network/PublicIpAddressOperations.cs index ff004662dd5c8..ed3a8e4aebbe6 100644 --- a/sdk/resourcemanager/Proto.Client/network/PublicIpAddressOperations.cs +++ b/sdk/resourcemanager/Proto.Client/network/PublicIpAddressOperations.cs @@ -14,7 +14,7 @@ namespace Proto.Network /// /// A class representing the operations that can be performed over a specific NetworkSecurityGroup. /// - public class PublicIpAddressOperations : ResourceOperationsBase, ITaggableResource, IDeletableResource + public class PublicIpAddressOperations : ResourceOperationsBase { /// /// Initializes a new instance of the class. diff --git a/sdk/resourcemanager/Proto.Client/network/SubnetOperations.cs b/sdk/resourcemanager/Proto.Client/network/SubnetOperations.cs index 8c158a331fe2a..f100ac5461524 100644 --- a/sdk/resourcemanager/Proto.Client/network/SubnetOperations.cs +++ b/sdk/resourcemanager/Proto.Client/network/SubnetOperations.cs @@ -9,7 +9,7 @@ namespace Proto.Network /// /// A class representing the operations that can be performed over a specific subnet. /// - public class SubnetOperations : ResourceOperationsBase, IDeletableResource + public class SubnetOperations : ResourceOperationsBase { /// /// Initializes a new instance of the class. diff --git a/sdk/resourcemanager/Proto.Client/network/VirtualNetworkOperations.cs b/sdk/resourcemanager/Proto.Client/network/VirtualNetworkOperations.cs index aff6409efe729..3a2de8a6f0efa 100644 --- a/sdk/resourcemanager/Proto.Client/network/VirtualNetworkOperations.cs +++ b/sdk/resourcemanager/Proto.Client/network/VirtualNetworkOperations.cs @@ -11,7 +11,7 @@ namespace Proto.Network /// /// A class representing the operations that can be performed over a specific virtual nerwork. /// - public class VirtualNetworkOperations : ResourceOperationsBase, ITaggableResource, IDeletableResource + public class VirtualNetworkOperations : ResourceOperationsBase { /// /// Initializes a new instance of the class.