diff --git a/sdk/resourcemanager/Proto.Client/authorization/Azure.ResourceManager.Authorization/Generated/RoleAssignmentsOperations.cs b/sdk/resourcemanager/Proto.Client/authorization/Azure.ResourceManager.Authorization/Generated/RoleAssignmentsOperations.cs index 6a263cd19bbee..f2cff03cada4c 100644 --- a/sdk/resourcemanager/Proto.Client/authorization/Azure.ResourceManager.Authorization/Generated/RoleAssignmentsOperations.cs +++ b/sdk/resourcemanager/Proto.Client/authorization/Azure.ResourceManager.Authorization/Generated/RoleAssignmentsOperations.cs @@ -485,9 +485,9 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) } /// Gets all role assignments for the subscription. - /// The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. + /// The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. /// The cancellation token to use. - public virtual AsyncPageable ListAsync(string filter = null, CancellationToken cancellationToken = default) + public virtual AsyncPageable ListAsync(string nameFilter = null, CancellationToken cancellationToken = default) { async Task> FirstPageFunc(int? pageSizeHint) { @@ -495,7 +495,7 @@ async Task> FirstPageFunc(int? pageSizeHint) scope0.Start(); try { - var response = await RestClient.ListAsync(filter, cancellationToken).ConfigureAwait(false); + var response = await RestClient.ListAsync(nameFilter, cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -510,7 +510,7 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint scope0.Start(); try { - var response = await RestClient.ListNextPageAsync(nextLink, filter, cancellationToken).ConfigureAwait(false); + var response = await RestClient.ListNextPageAsync(nextLink, nameFilter, cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -523,9 +523,9 @@ async Task> NextPageFunc(string nextLink, int? pageSizeHint } /// Gets all role assignments for the subscription. - /// The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. + /// The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. /// The cancellation token to use. - public virtual Pageable List(string filter = null, CancellationToken cancellationToken = default) + public virtual Pageable List(string nameFilter = null, CancellationToken cancellationToken = default) { Page FirstPageFunc(int? pageSizeHint) { @@ -533,7 +533,7 @@ Page FirstPageFunc(int? pageSizeHint) scope0.Start(); try { - var response = RestClient.List(filter, cancellationToken); + var response = RestClient.List(nameFilter, cancellationToken); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -548,7 +548,7 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) scope0.Start(); try { - var response = RestClient.ListNextPage(nextLink, filter, cancellationToken); + var response = RestClient.ListNextPage(nextLink, nameFilter, cancellationToken); return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/resourcemanager/Proto.Client/authorization/Azure.ResourceManager.Authorization/Generated/RoleAssignmentsRestOperations.cs b/sdk/resourcemanager/Proto.Client/authorization/Azure.ResourceManager.Authorization/Generated/RoleAssignmentsRestOperations.cs index 4851b1729f788..a96335cb4f09f 100644 --- a/sdk/resourcemanager/Proto.Client/authorization/Azure.ResourceManager.Authorization/Generated/RoleAssignmentsRestOperations.cs +++ b/sdk/resourcemanager/Proto.Client/authorization/Azure.ResourceManager.Authorization/Generated/RoleAssignmentsRestOperations.cs @@ -761,11 +761,11 @@ internal HttpMessage CreateListRequest(string filter) } /// Gets all role assignments for the subscription. - /// The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. + /// The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. /// The cancellation token to use. - public async Task> ListAsync(string filter = null, CancellationToken cancellationToken = default) + public async Task> ListAsync(string nameFilter = null, CancellationToken cancellationToken = default) { - using var message = CreateListRequest(filter); + using var message = CreateListRequest(nameFilter); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -782,11 +782,11 @@ public async Task> ListAsync(string filter = } /// Gets all role assignments for the subscription. - /// The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. + /// The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. /// The cancellation token to use. - public Response List(string filter = null, CancellationToken cancellationToken = default) + public Response List(string nameFilter = null, CancellationToken cancellationToken = default) { - using var message = CreateListRequest(filter); + using var message = CreateListRequest(nameFilter); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/resourcemanager/Proto.Client/compute/AvailabilitySetContainer.cs b/sdk/resourcemanager/Proto.Client/compute/AvailabilitySetContainer.cs index 11e9b95f5f0b1..fca29f7fcfc7f 100644 --- a/sdk/resourcemanager/Proto.Client/compute/AvailabilitySetContainer.cs +++ b/sdk/resourcemanager/Proto.Client/compute/AvailabilitySetContainer.cs @@ -78,58 +78,58 @@ public ArmBuilder Construct(string skuName } /// - /// Filters the list of availabitlity set for this resource group represented as generic resources. + /// Filters the list of availability set for this resource group represented as generic resources. /// - /// The filter used in this operation. + /// The filter used in this operation. /// The number of results to return. /// A token to allow the caller to cancel the call to the service. The default value is . /// A collection of resource that may take multiple service requests to iterate over. - public Pageable ListByName(string filter, int? top = null, CancellationToken cancellationToken = default) + public Pageable ListAsGenericResource(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { ResourceFilterCollection filters = new ResourceFilterCollection(AvailabilitySetData.ResourceType); - filters.SubstringFilter = filter; + filters.SubstringFilter = nameFilter; return ResourceListOperations.ListAtContext(Parent as ResourceGroupOperations, filters, top, cancellationToken); } /// - /// Filters the list of availabitlity set for this resource group represented as generic resources. + /// Filters the list of availability set for this resource group represented as generic resources. /// - /// The filter used in this operation. + /// The filter used in this operation. /// The number of results to return. /// A token to allow the caller to cancel the call to the service. The default value is . /// An async collection of resource that may take multiple service requests to iterate over. - public AsyncPageable ListByNameAsync(string filter, int? top = null, CancellationToken cancellationToken = default) + public AsyncPageable ListAsGenericResourceAsync(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { ResourceFilterCollection filters = new ResourceFilterCollection(AvailabilitySetData.ResourceType); - filters.SubstringFilter = filter; + filters.SubstringFilter = nameFilter; return ResourceListOperations.ListAtContextAsync(Parent as ResourceGroupOperations, filters, top, cancellationToken); } /// - /// Filters the list of availabitlity set for this resource group. + /// Filters the list of availability set for this resource group. /// Makes an additional network call to retrieve the full data model for each resource group. /// - /// The filter used in this operation. + /// The filter used in this operation. /// The number of results to return. /// A token to allow the caller to cancel the call to the service. The default value is . /// A collection of availability set that may take multiple service requests to iterate over. - public Pageable ListByNameExpanded(string filter, int? top = null, CancellationToken cancellationToken = default) + public Pageable List(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { - var results = ListByName(filter, top, cancellationToken); + var results = ListAsGenericResource(nameFilter, top, cancellationToken); return new PhWrappingPageable(results, s => new AvailabilitySetOperations(s).Get().Value); } /// - /// Filters the list of availabitlity set for this resource group. + /// Filters the list of availability set for this resource group. /// Makes an additional network call to retrieve the full data model for each resource group. /// - /// The filter used in this operation. + /// The filter used in this operation. /// The number of results to return. /// A token to allow the caller to cancel the call to the service. The default value is . /// An asyc collection of availability set that may take multiple service requests to iterate over. - public AsyncPageable ListByNameExpandedAsync(string filter, int? top = null, CancellationToken cancellationToken = default) + public AsyncPageable ListAsync(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { - var results = ListByNameAsync(filter, top, cancellationToken); + var results = ListAsGenericResourceAsync(nameFilter, top, cancellationToken); return new PhWrappingAsyncPageable(results, s => new AvailabilitySetOperations(s).Get().Value); } diff --git a/sdk/resourcemanager/Proto.Client/compute/VirtualMachineContainer.cs b/sdk/resourcemanager/Proto.Client/compute/VirtualMachineContainer.cs index aa8e158fd3496..cd39434e45047 100644 --- a/sdk/resourcemanager/Proto.Client/compute/VirtualMachineContainer.cs +++ b/sdk/resourcemanager/Proto.Client/compute/VirtualMachineContainer.cs @@ -168,28 +168,28 @@ public AsyncPageable ListAsync(CancellationToken cancellationTok /// /// Filters the list of virtual machines for this resource group represented as generic resources. /// - /// The substring to filter by. + /// The substring to filter by. /// The number of items to truncate by. /// A token to allow the caller to cancel the call to the service. The default value is . /// A collection of that may take multiple service requests to iterate over. - public Pageable ListByName(string filter, int? top = null, CancellationToken cancellationToken = default) + public Pageable ListAsGenericResource(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { ResourceFilterCollection filters = new ResourceFilterCollection(VirtualMachineOperations.ResourceType); - filters.SubstringFilter = filter; + filters.SubstringFilter = nameFilter; return ResourceListOperations.ListAtContext(Parent as ResourceGroupOperations, filters, top, cancellationToken); } /// /// Filters the list of virtual machines for this resource group represented as generic resources. /// - /// The substring to filter by. + /// The substring to filter by. /// The number of items to truncate by. /// A token to allow the caller to cancel the call to the service. The default value is . /// An async collection of that may take multiple service requests to iterate over. - public AsyncPageable ListByNameAsync(string filter, int? top = null, CancellationToken cancellationToken = default) + public AsyncPageable ListAsGenericResourceAsync(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { ResourceFilterCollection filters = new ResourceFilterCollection(VirtualMachineOperations.ResourceType); - filters.SubstringFilter = filter; + filters.SubstringFilter = nameFilter; return ResourceListOperations.ListAtContextAsync(Parent as ResourceGroupOperations, filters, top, cancellationToken); } @@ -197,13 +197,13 @@ public AsyncPageable ListByNameAsync(string filter, int? top = /// Filters the list of virtual machines for this resource group represented as generic resources. /// Makes an additional network call to retrieve the full data model for each virtual machine. /// - /// The substring to filter by. + /// The substring to filter by. /// The number of items to truncate by. /// A token to allow the caller to cancel the call to the service. The default value is . /// A collection of that may take multiple service requests to iterate over. - public Pageable ListByNameExpanded(string filter, int? top = null, CancellationToken cancellationToken = default) + public Pageable List(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { - var results = ListByName(filter, top, cancellationToken); + var results = ListAsGenericResource(nameFilter, top, cancellationToken); return new PhWrappingPageable(results, s => (new VirtualMachineOperations(s)).Get().Value); } @@ -211,13 +211,13 @@ public Pageable ListByNameExpanded(string filter, int? top = nul /// Filters the list of virtual machines for this resource group represented as generic resources. /// Makes an additional network call to retrieve the full data model for each virtual machine. /// - /// The substring to filter by. + /// The substring to filter by. /// The number of items to truncate by. /// A token to allow the caller to cancel the call to the service. The default value is . /// An async collection of that may take multiple service requests to iterate over. - public AsyncPageable ListByNameExpandedAsync(string filter, int? top = null, CancellationToken cancellationToken = default) + public AsyncPageable ListAsync(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { - var results = ListByNameAsync(filter, top, cancellationToken); + var results = ListAsGenericResourceAsync(nameFilter, top, cancellationToken); return new PhWrappingAsyncPageable(results, s => (new VirtualMachineOperations(s)).Get().Value); } diff --git a/sdk/resourcemanager/Proto.Client/network/NetworkInterfaceContainer.cs b/sdk/resourcemanager/Proto.Client/network/NetworkInterfaceContainer.cs index 40755a1598727..1baed6cf5a3cd 100644 --- a/sdk/resourcemanager/Proto.Client/network/NetworkInterfaceContainer.cs +++ b/sdk/resourcemanager/Proto.Client/network/NetworkInterfaceContainer.cs @@ -125,30 +125,30 @@ public AsyncPageable ListAsync(CancellationToken can /// /// Filters the list of resources for this represented as generic resources. /// - /// A string to filter the resources by name. + /// A string to filter the resources by name. /// The number of results to return per page of data. /// A token to allow the caller to cancel the call to the service. /// The default value is . /// A collection of resource operations that may take multiple service requests to iterate over. - public Pageable ListByName(string filter, int? top = null, CancellationToken cancellationToken = default) + public Pageable ListAsGenericResource(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { ResourceFilterCollection filters = new ResourceFilterCollection(NetworkInterfaceData.ResourceType); - filters.SubstringFilter = filter; + filters.SubstringFilter = nameFilter; return ResourceListOperations.ListAtContext(Parent as ResourceGroupOperations, filters, top, cancellationToken); } /// /// Filters the list of resources for this represented as generic resources. /// - /// A string to filter the resources by name. + /// A string to filter the resources by name. /// The number of results to return per page of data. /// A token to allow the caller to cancel the call to the service. /// The default value is . /// An async collection of resource operations that may take multiple service requests to iterate over. - public AsyncPageable ListByNameAsync(string filter, int? top = null, CancellationToken cancellationToken = default) + public AsyncPageable ListAsGenericResourceAsync(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { ResourceFilterCollection filters = new ResourceFilterCollection(NetworkInterfaceData.ResourceType); - filters.SubstringFilter = filter; + filters.SubstringFilter = nameFilter; return ResourceListOperations.ListAtContextAsync(Parent as ResourceGroupOperations, filters, top, cancellationToken); } @@ -156,14 +156,14 @@ public AsyncPageable ListByNameAsync(string filter, int? top = /// Filters the list of resources for this . /// Makes an additional network call to retrieve the full data model for each . /// - /// A string to filter the resources by name. + /// A string to filter the resources by name. /// The number of results to return per page of data. /// A token to allow the caller to cancel the call to the service. /// The default value is . /// A collection of resource operations that may take multiple service requests to iterate over. - public Pageable ListByNameExpanded(string filter, int? top = null, CancellationToken cancellationToken = default) + public Pageable List(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { - var results = ListByName(filter, top, cancellationToken); + var results = ListAsGenericResource(nameFilter, top, cancellationToken); return new PhWrappingPageable(results, s => new NetworkInterfaceOperations(s).Get().Value); } @@ -171,14 +171,14 @@ public Pageable ListByNameExpanded(string filter, int? top = n /// Filters the list of resources for this . /// Makes an additional network call to retrieve the full data model for each . /// - /// A string to filter the resources by name. + /// A string to filter the resources by name. /// The number of results to return per page of data. /// A token to allow the caller to cancel the call to the service. /// The default value is . /// An async collection of resource operations that may take multiple service requests to iterate over. - public AsyncPageable ListByNameExpandedAsync(string filter, int? top = null, CancellationToken cancellationToken = default) + public AsyncPageable ListAsync(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { - var results = ListByNameAsync(filter, top, cancellationToken); + var results = ListAsGenericResourceAsync(nameFilter, top, cancellationToken); return new PhWrappingAsyncPageable(results, s => new NetworkInterfaceOperations(s).Get().Value); } diff --git a/sdk/resourcemanager/Proto.Client/network/NetworkSecurityGroupContainer.cs b/sdk/resourcemanager/Proto.Client/network/NetworkSecurityGroupContainer.cs index 325c75e596718..30eea7f6b5af3 100644 --- a/sdk/resourcemanager/Proto.Client/network/NetworkSecurityGroupContainer.cs +++ b/sdk/resourcemanager/Proto.Client/network/NetworkSecurityGroupContainer.cs @@ -176,28 +176,28 @@ public AsyncPageable ListAsync(CancellationToken cancellat /// /// Filters the list of network security groups for this resource group represented as generic resources. /// - /// The substring to filter by. + /// The substring to filter by. /// The number of items to truncate by. /// A token to allow the caller to cancel the call to the service. The default value is . /// A collection of that may take multiple service requests to iterate over. - public Pageable ListByName(string filter, int? top = null, CancellationToken cancellationToken = default) + public Pageable ListAsGenericResource(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { ResourceFilterCollection filters = new ResourceFilterCollection(NetworkSecurityGroupOperations.ResourceType); - filters.SubstringFilter = filter; + filters.SubstringFilter = nameFilter; return ResourceListOperations.ListAtContext(Parent as ResourceGroupOperations, filters, top, cancellationToken); } /// /// Filters the list of network security groups for this resource group represented as generic resources. /// - /// The substring to filter by. + /// The substring to filter by. /// The number of items to truncate by. /// A token to allow the caller to cancel the call to the service. The default value is . /// An async collection of that may take multiple service requests to iterate over. - public AsyncPageable ListByNameAsync(string filter, int? top = null, CancellationToken cancellationToken = default) + public AsyncPageable ListAsGenericResourceAsync(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { ResourceFilterCollection filters = new ResourceFilterCollection(NetworkSecurityGroupOperations.ResourceType); - filters.SubstringFilter = filter; + filters.SubstringFilter = nameFilter; return ResourceListOperations.ListAtContextAsync(Parent as ResourceGroupOperations, filters, top, cancellationToken); } @@ -205,13 +205,13 @@ public AsyncPageable ListByNameAsync(string filter, int? top = /// Filters the list of network security groups for this resource group represented as generic resources. /// Makes an additional network call to retrieve the full data model for each network security group. /// - /// The substring to filter by. + /// The substring to filter by. /// The number of items to truncate by. /// A token to allow the caller to cancel the call to the service. The default value is . /// A collection of that may take multiple service requests to iterate over. - public Pageable ListByNameExpanded(string filter, int? top = null, CancellationToken cancellationToken = default) + public Pageable List(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { - var results = ListByName(filter, top, cancellationToken); + var results = ListAsGenericResource(nameFilter, top, cancellationToken); return new PhWrappingPageable(results, s => new NetworkSecurityGroupOperations(s).Get().Value); } @@ -219,13 +219,13 @@ public Pageable ListByNameExpanded(string filter, int? top /// Filters the list of network security groups for this resource group represented as generic resources. /// Makes an additional network call to retrieve the full data model for each network security group. /// - /// The substring to filter by. + /// The substring to filter by. /// The number of items to truncate by. /// A token to allow the caller to cancel the call to the service. The default value is . /// An async collection of that may take multiple service requests to iterate over. - public AsyncPageable ListByNameExpandedAsync(string filter, int? top = null, CancellationToken cancellationToken = default) + public AsyncPageable ListAsync(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { - var results = ListByNameAsync(filter, top, cancellationToken); + var results = ListAsGenericResourceAsync(nameFilter, top, cancellationToken); return new PhWrappingAsyncPageable(results, s => new NetworkSecurityGroupOperations(s).Get().Value); } diff --git a/sdk/resourcemanager/Proto.Client/network/PublicIpAddressContainer.cs b/sdk/resourcemanager/Proto.Client/network/PublicIpAddressContainer.cs index 6a0ab4e5dadbb..3aeaf9ba17906 100644 --- a/sdk/resourcemanager/Proto.Client/network/PublicIpAddressContainer.cs +++ b/sdk/resourcemanager/Proto.Client/network/PublicIpAddressContainer.cs @@ -116,28 +116,28 @@ public AsyncPageable ListAsync(CancellationToken cancellationTo /// /// Filters the list of public IP addresses for this resource group represented as generic resources. /// - /// The substring to filter by. + /// The substring to filter by. /// The number of items to truncate by. /// A token to allow the caller to cancel the call to the service. The default value is . /// A collection of that may take multiple service requests to iterate over. - public Pageable ListByName(string filter, int? top = null, CancellationToken cancellationToken = default) + public Pageable ListAsGenericResource(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { ResourceFilterCollection filters = new ResourceFilterCollection(PublicIPAddressData.ResourceType); - filters.SubstringFilter = filter; + filters.SubstringFilter = nameFilter; return ResourceListOperations.ListAtContext(Parent as ResourceGroupOperations, filters, top, cancellationToken); } /// /// Filters the list of public IP addresses for this resource group represented as generic resources. /// - /// The substring to filter by. + /// The substring to filter by. /// The number of items to truncate by. /// A token to allow the caller to cancel the call to the service. The default value is . /// An async collection of that may take multiple service requests to iterate over. - public AsyncPageable ListByNameAsync(string filter, int? top = null, CancellationToken cancellationToken = default) + public AsyncPageable ListAsGenericResourceAsync(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { ResourceFilterCollection filters = new ResourceFilterCollection(PublicIPAddressData.ResourceType); - filters.SubstringFilter = filter; + filters.SubstringFilter = nameFilter; return ResourceListOperations.ListAtContextAsync(Parent as ResourceGroupOperations, filters, top, cancellationToken); } @@ -145,13 +145,13 @@ public AsyncPageable ListByNameAsync(string filter, int? top = /// Filters the list of public IP addresses for this resource group represented as generic resources. /// Makes an additional network call to retrieve the full data model for each network security group. /// - /// The substring to filter by. + /// The substring to filter by. /// The number of items to truncate by. /// A token to allow the caller to cancel the call to the service. The default value is . /// A collection of that may take multiple service requests to iterate over. - public Pageable ListByNameExpanded(string filter, int? top = null, CancellationToken cancellationToken = default) + public Pageable List(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { - var results = ListByName(filter, top, cancellationToken); + var results = ListAsGenericResource(nameFilter, top, cancellationToken); return new PhWrappingPageable(results, s => new PublicIpAddressOperations(s).Get().Value); } @@ -159,13 +159,13 @@ public Pageable ListByNameExpanded(string filter, int? top = nu /// Filters the list of public IP addresses for this resource group represented as generic resources. /// Makes an additional network call to retrieve the full data model for each network security group. /// - /// The substring to filter by. + /// The substring to filter by. /// The number of items to truncate by. /// A token to allow the caller to cancel the call to the service. The default value is . /// An async collection of that may take multiple service requests to iterate over. - public AsyncPageable ListByNameExpandedAsync(string filter, int? top = null, CancellationToken cancellationToken = default) + public AsyncPageable ListAsync(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { - var results = ListByNameAsync(filter, top, cancellationToken); + var results = ListAsGenericResourceAsync(nameFilter, top, cancellationToken); return new PhWrappingAsyncPageable(results, s => new PublicIpAddressOperations(s).Get().Value); } diff --git a/sdk/resourcemanager/Proto.Client/network/VirtualNetworkContainer.cs b/sdk/resourcemanager/Proto.Client/network/VirtualNetworkContainer.cs index 8d4bb9475e1ae..022e83e16ea36 100644 --- a/sdk/resourcemanager/Proto.Client/network/VirtualNetworkContainer.cs +++ b/sdk/resourcemanager/Proto.Client/network/VirtualNetworkContainer.cs @@ -14,7 +14,7 @@ namespace Proto.Network { /// - /// A class representing collection of virtual nerwork and their operations over a resource group. + /// A class representing collection of virtual network and their operations over a resource group. /// public class VirtualNetworkContainer : ResourceContainerBase { @@ -71,7 +71,7 @@ await Operations.StartCreateOrUpdateAsync(Id.ResourceGroup, name, resourceDetail } /// - /// Constructs an object used to create a virtual nerwork. + /// Constructs an object used to create a virtual network. /// /// The CIDR of the resource. /// The location of the resource. @@ -114,58 +114,58 @@ public AsyncPageable ListAsync(CancellationToken cancellationTok } /// - /// Filters the list of virtual nerwork for this resource group represented as generic resources. + /// Filters the list of virtual network for this resource group represented as generic resources. /// - /// The filter used in this operation. + /// The filter used in this operation. /// The number of results to return. /// A token to allow the caller to cancel the call to the service. The default value is . /// A collection of resource that may take multiple service requests to iterate over. - public Pageable ListByName(string filter, int? top = null, CancellationToken cancellationToken = default) + public Pageable ListAsGenericResource(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { ResourceFilterCollection filters = new ResourceFilterCollection(VirtualNetworkData.ResourceType); - filters.SubstringFilter = filter; + filters.SubstringFilter = nameFilter; return ResourceListOperations.ListAtContext(Parent as ResourceGroupOperations, filters, top, cancellationToken); } /// - /// Filters the list of virtual nerwork for this resource group represented as generic resources. + /// Filters the list of virtual network for this resource group represented as generic resources. /// - /// The filter used in this operation. + /// The filter used in this operation. /// The number of results to return. /// A token to allow the caller to cancel the call to the service. The default value is . /// An async collection of resource that may take multiple service requests to iterate over. - public AsyncPageable ListByNameAsync(string filter, int? top = null, CancellationToken cancellationToken = default) + public AsyncPageable ListAsGenericResourceAsync(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { ResourceFilterCollection filters = new ResourceFilterCollection(VirtualNetworkData.ResourceType); - filters.SubstringFilter = filter; + filters.SubstringFilter = nameFilter; return ResourceListOperations.ListAtContextAsync(Parent as ResourceGroupOperations, filters, top, cancellationToken); } /// - /// Filters the list of virtual nerwork for this resource group. - /// Makes an additional network call to retrieve the full data model for each virtual nerwork. + /// Filters the list of virtual network for this resource group. + /// Makes an additional network call to retrieve the full data model for each virtual network. /// - /// The filter used in this operation. + /// The filter used in this operation. /// The number of results to return. /// A token to allow the caller to cancel the call to the service. The default value is . /// A collection of resource that may take multiple service requests to iterate over. - public Pageable ListByNameExpanded(string filter, int? top = null, CancellationToken cancellationToken = default) + public Pageable List(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { - var results = ListByName(filter, top, cancellationToken); + var results = ListAsGenericResource(nameFilter, top, cancellationToken); return new PhWrappingPageable(results, s => new VirtualNetworkOperations(s).Get().Value); } /// - /// Filters the list of virtual nerwork for this resource group. - /// Makes an additional network call to retrieve the full data model for each virtual nerwork. + /// Filters the list of virtual network for this resource group. + /// Makes an additional network call to retrieve the full data model for each virtual network. /// - /// The filter used in this operation. + /// The filter used in this operation. /// The number of results to return. /// A token to allow the caller to cancel the call to the service. The default value is . /// An asyc collection of availability set that may take multiple service requests to iterate over. - public AsyncPageable ListByNameExpandedAsync(string filter, int? top = null, CancellationToken cancellationToken = default) + public AsyncPageable ListAsync(string nameFilter, int? top = null, CancellationToken cancellationToken = default) { - var results = ListByNameAsync(filter, top, cancellationToken); + var results = ListAsGenericResourceAsync(nameFilter, top, cancellationToken); return new PhWrappingAsyncPageable(results, s => new VirtualNetworkOperations(s).Get().Value); } diff --git a/sdk/resourcemanager/Proto.Client/src/ScenarioFactory.cs b/sdk/resourcemanager/Proto.Client/src/ScenarioFactory.cs index 07b94ea2a55e8..945e2e21d7e90 100644 --- a/sdk/resourcemanager/Proto.Client/src/ScenarioFactory.cs +++ b/sdk/resourcemanager/Proto.Client/src/ScenarioFactory.cs @@ -20,7 +20,7 @@ enum Scenarios ShutdownVmsByLINQ, ShutdownVmsByNameAcrossResourceGroups, //ShutdownVmsByNameAcrossSubscriptions, - ListByNameExpanded, + List, ClientOptionsOverride, GetSubscription, NullDataValues, diff --git a/sdk/resourcemanager/Proto.Client/src/Scenarios/AddTagToGeneric.cs b/sdk/resourcemanager/Proto.Client/src/Scenarios/AddTagToGeneric.cs index 3178f20698f8f..29890198bdac3 100644 --- a/sdk/resourcemanager/Proto.Client/src/Scenarios/AddTagToGeneric.cs +++ b/sdk/resourcemanager/Proto.Client/src/Scenarios/AddTagToGeneric.cs @@ -12,7 +12,7 @@ public override void Execute() createVm.Execute(); var rgOp = new AzureResourceManagerClient().GetResourceGroupOperations(Context.SubscriptionId, Context.RgName); - foreach (var genericOp in rgOp.GetVirtualMachineContainer().ListByName(Context.VmName)) + foreach (var genericOp in rgOp.GetVirtualMachineContainer().ListAsGenericResource(Context.VmName)) { Console.WriteLine($"Adding tag to {genericOp.Id}"); genericOp.StartAddTag("tagKey", "tagVaue"); diff --git a/sdk/resourcemanager/Proto.Client/src/Scenarios/DeleteGeneric.cs b/sdk/resourcemanager/Proto.Client/src/Scenarios/DeleteGeneric.cs index 12ca505e5a36d..39a03e5eb8409 100644 --- a/sdk/resourcemanager/Proto.Client/src/Scenarios/DeleteGeneric.cs +++ b/sdk/resourcemanager/Proto.Client/src/Scenarios/DeleteGeneric.cs @@ -13,7 +13,7 @@ public override void Execute() createVm.Execute(); var rgOp = new AzureResourceManagerClient().GetResourceGroupOperations(Context.SubscriptionId, Context.RgName); - foreach(var genericOp in rgOp.GetVirtualMachineContainer().ListByName(Context.VmName)) + foreach(var genericOp in rgOp.GetVirtualMachineContainer().ListAsGenericResource(Context.VmName)) { Console.WriteLine($"Deleting {genericOp.Id}"); genericOp.Delete(); diff --git a/sdk/resourcemanager/Proto.Client/src/Scenarios/ListByNameExpanded.cs b/sdk/resourcemanager/Proto.Client/src/Scenarios/ListByNameExpanded.cs index 1b4db26be8cd8..41835b7557365 100644 --- a/sdk/resourcemanager/Proto.Client/src/Scenarios/ListByNameExpanded.cs +++ b/sdk/resourcemanager/Proto.Client/src/Scenarios/ListByNameExpanded.cs @@ -6,7 +6,7 @@ namespace Proto.Client { - class ListByNameExpanded : Scenario + class List : Scenario { public override void Execute() { @@ -14,57 +14,57 @@ public override void Execute() createMultipleVms.Execute(); var rg = new AzureResourceManagerClient().GetResourceGroupOperations(Context.SubscriptionId, Context.RgName).Get().Value; - foreach (var availabilitySet in rg.GetAvailabilitySetContainer().ListByName(Environment.UserName)) + foreach (var availabilitySet in rg.GetAvailabilitySetContainer().ListAsGenericResource(Environment.UserName)) { Console.WriteLine($"--------AvailabilitySet operation id--------: {availabilitySet.Id}"); } - foreach (var availabilitySet in rg.GetAvailabilitySetContainer().ListByNameExpanded(Environment.UserName)) + foreach (var availabilitySet in rg.GetAvailabilitySetContainer().List(Environment.UserName)) { Console.WriteLine($"--------AvailabilitySet id--------: {availabilitySet.Data.Id}"); } - foreach (var vm in rg.GetVirtualMachineContainer().ListByName(Environment.UserName)) + foreach (var vm in rg.GetVirtualMachineContainer().ListAsGenericResource(Environment.UserName)) { Console.WriteLine($"--------VM operation id--------: {vm.Id}"); } - foreach (var vm in rg.GetVirtualMachineContainer().ListByNameExpanded(Environment.UserName)) + foreach (var vm in rg.GetVirtualMachineContainer().List(Environment.UserName)) { Console.WriteLine($"--------VM id--------: {vm.Data.Id}"); } - foreach (var networkInterface in rg.GetNetworkInterfaceContainer().ListByName(Environment.UserName)) + foreach (var networkInterface in rg.GetNetworkInterfaceContainer().ListAsGenericResource(Environment.UserName)) { Console.WriteLine($"--------NetworkInterface operation id--------: {networkInterface.Id}"); } - foreach (var networkInterface in rg.GetNetworkInterfaceContainer().ListByNameExpanded(Environment.UserName)) + foreach (var networkInterface in rg.GetNetworkInterfaceContainer().List(Environment.UserName)) { Console.WriteLine($"--------NetworkInterface id--------: {networkInterface.Data.Id}"); } - foreach (var networkSecurityGroup in rg.GetNetworkSecurityGroupContainer().ListByName(Environment.UserName)) + foreach (var networkSecurityGroup in rg.GetNetworkSecurityGroupContainer().ListAsGenericResource(Environment.UserName)) { Console.WriteLine($"--------NetworkSecurityGroup operation id--------: {networkSecurityGroup.Id}"); } - foreach (var networkSecurityGroup in rg.GetNetworkSecurityGroupContainer().ListByNameExpanded(Environment.UserName)) + foreach (var networkSecurityGroup in rg.GetNetworkSecurityGroupContainer().List(Environment.UserName)) { Console.WriteLine($"--------NetworkSecurityGroup id--------: {networkSecurityGroup.Data.Id}"); } - foreach (var publicIpAddress in rg.GetNetworkSecurityGroupContainer().ListByNameExpanded(Environment.UserName)) + foreach (var publicIpAddress in rg.GetNetworkSecurityGroupContainer().List(Environment.UserName)) { Console.WriteLine($"--------PublicIpAddress id--------: {publicIpAddress.Data.Id}"); } - foreach (var VNet in rg.GetVirtualNetworkContainer().ListByName(Environment.UserName)) + foreach (var VNet in rg.GetVirtualNetworkContainer().ListAsGenericResource(Environment.UserName)) { Console.WriteLine($"--------VNet operation id--------: {VNet.Id}"); } - foreach (var VNet in rg.GetVirtualNetworkContainer().ListByNameExpanded(Environment.UserName)) + foreach (var VNet in rg.GetVirtualNetworkContainer().List(Environment.UserName)) { Console.WriteLine($"--------VNet id--------: {VNet.Data.Id}"); } @@ -74,57 +74,57 @@ public override void Execute() private async Task ExecuteAsync(ResourceGroup rg) { - await foreach (var availabilitySet in rg.GetAvailabilitySetContainer().ListByNameAsync(Environment.UserName)) + await foreach (var availabilitySet in rg.GetAvailabilitySetContainer().ListAsGenericResourceAsync(Environment.UserName)) { Console.WriteLine($"--------AvailabilitySet operation id--------: {availabilitySet.Id}"); } - await foreach (var availabilitySet in rg.GetAvailabilitySetContainer().ListByNameExpandedAsync(Environment.UserName)) + await foreach (var availabilitySet in rg.GetAvailabilitySetContainer().ListAsync(Environment.UserName)) { Console.WriteLine($"--------AvailabilitySet id--------: {availabilitySet.Data.Id}"); } - await foreach (var vm in rg.GetVirtualMachineContainer().ListByNameAsync(Environment.UserName)) + await foreach (var vm in rg.GetVirtualMachineContainer().ListAsGenericResourceAsync(Environment.UserName)) { Console.WriteLine($"--------VM operation id--------: {vm.Id}"); } - await foreach (var vm in rg.GetVirtualMachineContainer().ListByNameExpandedAsync(Environment.UserName)) + await foreach (var vm in rg.GetVirtualMachineContainer().ListAsync(Environment.UserName)) { Console.WriteLine($"--------VM id--------: {vm.Data.Id}"); } - await foreach (var networkInterface in rg.GetNetworkInterfaceContainer().ListByNameAsync(Environment.UserName)) + await foreach (var networkInterface in rg.GetNetworkInterfaceContainer().ListAsGenericResourceAsync(Environment.UserName)) { Console.WriteLine($"--------NetworkInterface operation id--------: {networkInterface.Id}"); } - await foreach (var networkInterface in rg.GetNetworkInterfaceContainer().ListByNameExpandedAsync(Environment.UserName)) + await foreach (var networkInterface in rg.GetNetworkInterfaceContainer().ListAsync(Environment.UserName)) { Console.WriteLine($"--------NetworkInterface id--------: {networkInterface.Data.Id}"); } - await foreach (var networkSecurityGroup in rg.GetNetworkSecurityGroupContainer().ListByNameAsync(Environment.UserName)) + await foreach (var networkSecurityGroup in rg.GetNetworkSecurityGroupContainer().ListAsGenericResourceAsync(Environment.UserName)) { Console.WriteLine($"--------NetworkSecurityGroup operation id--------: {networkSecurityGroup.Id}"); } - await foreach (var networkSecurityGroup in rg.GetNetworkSecurityGroupContainer().ListByNameExpandedAsync(Environment.UserName)) + await foreach (var networkSecurityGroup in rg.GetNetworkSecurityGroupContainer().ListAsync(Environment.UserName)) { Console.WriteLine($"--------NetworkSecurityGroup id--------: {networkSecurityGroup.Data.Id}"); } - await foreach (var publicIpAddress in rg.GetNetworkSecurityGroupContainer().ListByNameExpandedAsync(Environment.UserName)) + await foreach (var publicIpAddress in rg.GetNetworkSecurityGroupContainer().ListAsync(Environment.UserName)) { Console.WriteLine($"--------PublicIpAddress id--------: {publicIpAddress.Data.Id}"); } - await foreach (var VNet in rg.GetVirtualNetworkContainer().ListByNameAsync(Environment.UserName)) + await foreach (var VNet in rg.GetVirtualNetworkContainer().ListAsGenericResourceAsync(Environment.UserName)) { Console.WriteLine($"--------VNet operation id--------: {VNet.Id}"); } - await foreach (var VNet in rg.GetVirtualNetworkContainer().ListByNameExpandedAsync(Environment.UserName)) + await foreach (var VNet in rg.GetVirtualNetworkContainer().ListAsync(Environment.UserName)) { Console.WriteLine($"--------VNet id--------: {VNet.Data.Id}"); } diff --git a/sdk/resourcemanager/Proto.Client/src/Scenarios/ShutdownVmsByTag.cs b/sdk/resourcemanager/Proto.Client/src/Scenarios/ShutdownVmsByTag.cs index b62af442f7102..6f3d771daf06b 100644 --- a/sdk/resourcemanager/Proto.Client/src/Scenarios/ShutdownVmsByTag.cs +++ b/sdk/resourcemanager/Proto.Client/src/Scenarios/ShutdownVmsByTag.cs @@ -16,7 +16,7 @@ public override void Execute() //set tags on random vms Random rand = new Random(Environment.TickCount); - foreach (var generic in rg.GetVirtualMachineContainer().ListByName(Environment.UserName)) + foreach (var generic in rg.GetVirtualMachineContainer().ListAsGenericResource(Environment.UserName)) { var vm = VirtualMachineOperations.FromGeneric(generic); if (rand.NextDouble() > 0.5)