From ff0cfc98c18b59f8a166b2220bef62c85c264da5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 14 Apr 2023 12:18:57 +0000 Subject: [PATCH] CodeGen from PR 23562 in Azure/azure-rest-api-specs Merge caaa752602b7c10d715f641fa7a2b67b5b2dc21d into c40f4463b29e994e69e3a4e7881ee88dbd64ac25 --- ...mainPrivateEndpointConnectionCollection.cs | 25 +++---- ...DomainPrivateEndpointConnectionResource.cs | 21 +++--- .../EventGridDomainPrivateLinkResource.cs | 5 +- ...GridDomainPrivateLinkResourceCollection.cs | 17 ++--- ...pacePrivateEndpointConnectionCollection.cs | 25 +++---- ...espacePrivateEndpointConnectionResource.cs | 21 +++--- ...opicPrivateEndpointConnectionCollection.cs | 25 +++---- ...dTopicPrivateEndpointConnectionResource.cs | 21 +++--- .../EventGridTopicPrivateLinkResource.cs | 5 +- ...tGridTopicPrivateLinkResourceCollection.cs | 17 ++--- .../src/Generated/Models/ParentType.cs | 54 -------------- .../PrivateEndpointConnectionsParentType.cs | 54 ++++++++++++++ .../PartnerNamespacePrivateLinkResource.cs | 5 +- ...rNamespacePrivateLinkResourceCollection.cs | 17 ++--- ...rivateEndpointConnectionsRestOperations.cs | 73 +++++++++---------- .../PrivateLinkResourcesRestOperations.cs | 45 ++++++------ .../src/autorest.md | 2 +- 17 files changed, 205 insertions(+), 227 deletions(-) delete mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ParentType.cs create mode 100644 sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PrivateEndpointConnectionsParentType.cs diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionCollection.cs index 3c47c38861e9..dcdc41e85a50 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionCollection.cs @@ -15,7 +15,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.EventGrid.Models; namespace Azure.ResourceManager.EventGrid { @@ -81,8 +80,8 @@ public virtual async Task(new EventGridDomainPrivateEndpointConnectionOperationSource(Client), _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); + var response = await _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(new EventGridDomainPrivateEndpointConnectionOperationSource(Client), _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -122,8 +121,8 @@ public virtual ArmOperation Cr scope.Start(); try { - var response = _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, privateEndpointConnectionName, data, cancellationToken); - var operation = new EventGridArmOperation(new EventGridDomainPrivateEndpointConnectionOperationSource(Client), _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); + var response = _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var operation = new EventGridArmOperation(new EventGridDomainPrivateEndpointConnectionOperationSource(Client), _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -160,7 +159,7 @@ public virtual async Task Get(st scope.Start(); try { - var response = _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, privateEndpointConnectionName, cancellationToken); + var response = _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventGridDomainPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); @@ -228,8 +227,8 @@ public virtual Response Get(st /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, filter, top); + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventGridDomainPrivateEndpointConnectionResource(Client, EventGridPrivateEndpointConnectionData.DeserializeEventGridPrivateEndpointConnectionData(e)), _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "EventGridDomainPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -252,8 +251,8 @@ public virtual AsyncPageable G /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, filter, top); + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventGridDomainPrivateEndpointConnectionResource(Client, EventGridPrivateEndpointConnectionData.DeserializeEventGridPrivateEndpointConnectionData(e)), _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "EventGridDomainPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -282,7 +281,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn scope.Start(); try { - var response = await _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -317,7 +316,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance scope.Start(); try { - var response = _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken); + var response = _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.cs index f283c28d78d5..e6c03ba04927 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.cs @@ -13,7 +13,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.EventGrid.Models; namespace Azure.ResourceManager.EventGrid { @@ -107,7 +106,7 @@ public virtual async Task Get(Ca scope.Start(); try { - var response = _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Name, Id.Name, cancellationToken); + var response = _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventGridDomainPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); @@ -172,8 +171,8 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell scope.Start(); try { - var response = await _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new EventGridArmOperation(_eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(_eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -206,8 +205,8 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel scope.Start(); try { - var response = _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Name, Id.Name, cancellationToken); - var operation = new EventGridArmOperation(_eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new EventGridArmOperation(_eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -244,8 +243,8 @@ public virtual async Task(new EventGridDomainPrivateEndpointConnectionOperationSource(Client), _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(new EventGridDomainPrivateEndpointConnectionOperationSource(Client), _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -282,8 +281,8 @@ public virtual ArmOperation Up scope.Start(); try { - var response = _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new EventGridArmOperation(new EventGridDomainPrivateEndpointConnectionOperationSource(Client), _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new EventGridArmOperation(new EventGridDomainPrivateEndpointConnectionOperationSource(Client), _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridDomainPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResource.cs index aba54fb0a55e..b6e4f0803f6b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResource.cs @@ -13,7 +13,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.EventGrid.Models; namespace Azure.ResourceManager.EventGrid { @@ -107,7 +106,7 @@ public virtual async Task> GetAsync scope.Start(); try { - var response = await _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventGridDomainPrivateLinkResource(Client, response.Value), response.GetRawResponse()); @@ -139,7 +138,7 @@ public virtual Response Get(CancellationToke scope.Start(); try { - var response = _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Parent.Name, Id.Name, cancellationToken); + var response = _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventGridDomainPrivateLinkResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResourceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResourceCollection.cs index 28e50c8dc468..2aec16aa7a4b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResourceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResourceCollection.cs @@ -15,7 +15,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.EventGrid.Models; namespace Azure.ResourceManager.EventGrid { @@ -78,7 +77,7 @@ public virtual async Task> GetAsync scope.Start(); try { - var response = await _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, privateLinkResourceName, cancellationToken).ConfigureAwait(false); + var response = await _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventGridDomainPrivateLinkResource(Client, response.Value), response.GetRawResponse()); @@ -115,7 +114,7 @@ public virtual Response Get(string privateLi scope.Start(); try { - var response = _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, privateLinkResourceName, cancellationToken); + var response = _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventGridDomainPrivateLinkResource(Client, response.Value), response.GetRawResponse()); @@ -146,8 +145,8 @@ public virtual Response Get(string privateLi /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, filter, top); + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventGridDomainPrivateLinkResource(Client, EventGridPrivateLinkResourceData.DeserializeEventGridPrivateLinkResourceData(e)), _eventGridDomainPrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "EventGridDomainPrivateLinkResourceCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -170,8 +169,8 @@ public virtual AsyncPageable GetAllAsync(str /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, filter, top); + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventGridDomainPrivateLinkResource(Client, EventGridPrivateLinkResourceData.DeserializeEventGridPrivateLinkResourceData(e)), _eventGridDomainPrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "EventGridDomainPrivateLinkResourceCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -200,7 +199,7 @@ public virtual async Task> ExistsAsync(string privateLinkResource scope.Start(); try { - var response = await _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, privateLinkResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -235,7 +234,7 @@ public virtual Response Exists(string privateLinkResourceName, Cancellatio scope.Start(); try { - var response = _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "domains", Id.Name, privateLinkResourceName, cancellationToken: cancellationToken); + var response = _eventGridDomainPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs index 79dfe2cf60c4..e9cbf983041a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs @@ -15,7 +15,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.EventGrid.Models; namespace Azure.ResourceManager.EventGrid { @@ -81,8 +80,8 @@ public virtual async Task(new EventGridPartnerNamespacePrivateEndpointConnectionOperationSource(Client), _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); + var response = await _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(new EventGridPartnerNamespacePrivateEndpointConnectionOperationSource(Client), _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -122,8 +121,8 @@ public virtual ArmOperation(new EventGridPartnerNamespacePrivateEndpointConnectionOperationSource(Client), _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); + var response = _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var operation = new EventGridArmOperation(new EventGridPartnerNamespacePrivateEndpointConnectionOperationSource(Client), _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -160,7 +159,7 @@ public virtual async Task An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, filter, top); + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventGridPartnerNamespacePrivateEndpointConnectionResource(Client, EventGridPrivateEndpointConnectionData.DeserializeEventGridPrivateEndpointConnectionData(e)), _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "EventGridPartnerNamespacePrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -252,8 +251,8 @@ public virtual AsyncPageable A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, filter, top); + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventGridPartnerNamespacePrivateEndpointConnectionResource(Client, EventGridPrivateEndpointConnectionData.DeserializeEventGridPrivateEndpointConnectionData(e)), _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "EventGridPartnerNamespacePrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -282,7 +281,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn scope.Start(); try { - var response = await _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -317,7 +316,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance scope.Start(); try { - var response = _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken); + var response = _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.cs index 6589b227d55f..9e86c6abfb82 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.cs @@ -13,7 +13,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.EventGrid.Models; namespace Azure.ResourceManager.EventGrid { @@ -107,7 +106,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell scope.Start(); try { - var response = await _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new EventGridArmOperation(_eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(_eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -206,8 +205,8 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel scope.Start(); try { - var response = _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Parent.Name, Id.Name, cancellationToken); - var operation = new EventGridArmOperation(_eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new EventGridArmOperation(_eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -244,8 +243,8 @@ public virtual async Task(new EventGridPartnerNamespacePrivateEndpointConnectionOperationSource(Client), _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(new EventGridPartnerNamespacePrivateEndpointConnectionOperationSource(Client), _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -282,8 +281,8 @@ public virtual ArmOperation(new EventGridPartnerNamespacePrivateEndpointConnectionOperationSource(Client), _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new EventGridArmOperation(new EventGridPartnerNamespacePrivateEndpointConnectionOperationSource(Client), _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridPartnerNamespacePrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionCollection.cs index b837efea17a5..7020711ac624 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionCollection.cs @@ -15,7 +15,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.EventGrid.Models; namespace Azure.ResourceManager.EventGrid { @@ -81,8 +80,8 @@ public virtual async Task(new EventGridTopicPrivateEndpointConnectionOperationSource(Client), _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); + var response = await _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(new EventGridTopicPrivateEndpointConnectionOperationSource(Client), _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -122,8 +121,8 @@ public virtual ArmOperation Cre scope.Start(); try { - var response = _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, privateEndpointConnectionName, data, cancellationToken); - var operation = new EventGridArmOperation(new EventGridTopicPrivateEndpointConnectionOperationSource(Client), _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); + var response = _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); + var operation = new EventGridArmOperation(new EventGridTopicPrivateEndpointConnectionOperationSource(Client), _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; @@ -160,7 +159,7 @@ public virtual async Task Get(str scope.Start(); try { - var response = _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, privateEndpointConnectionName, cancellationToken); + var response = _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventGridTopicPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); @@ -228,8 +227,8 @@ public virtual Response Get(str /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, filter, top); + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventGridTopicPrivateEndpointConnectionResource(Client, EventGridPrivateEndpointConnectionData.DeserializeEventGridPrivateEndpointConnectionData(e)), _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "EventGridTopicPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -252,8 +251,8 @@ public virtual AsyncPageable Ge /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, filter, top); + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventGridTopicPrivateEndpointConnectionResource(Client, EventGridPrivateEndpointConnectionData.DeserializeEventGridPrivateEndpointConnectionData(e)), _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, "EventGridTopicPrivateEndpointConnectionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -282,7 +281,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn scope.Start(); try { - var response = await _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -317,7 +316,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance scope.Start(); try { - var response = _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken); + var response = _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.cs index 39bb08bfdded..7e72ae3aca2b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.cs @@ -13,7 +13,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.EventGrid.Models; namespace Azure.ResourceManager.EventGrid { @@ -107,7 +106,7 @@ public virtual async Task Get(Can scope.Start(); try { - var response = _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Name, Id.Name, cancellationToken); + var response = _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventGridTopicPrivateEndpointConnectionResource(Client, response.Value), response.GetRawResponse()); @@ -172,8 +171,8 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell scope.Start(); try { - var response = await _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new EventGridArmOperation(_eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(_eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -206,8 +205,8 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel scope.Start(); try { - var response = _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Name, Id.Name, cancellationToken); - var operation = new EventGridArmOperation(_eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new EventGridArmOperation(_eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -244,8 +243,8 @@ public virtual async Task(new EventGridTopicPrivateEndpointConnectionOperationSource(Client), _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = await _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new EventGridArmOperation(new EventGridTopicPrivateEndpointConnectionOperationSource(Client), _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -282,8 +281,8 @@ public virtual ArmOperation Upd scope.Start(); try { - var response = _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new EventGridArmOperation(new EventGridTopicPrivateEndpointConnectionOperationSource(Client), _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); + var response = _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new EventGridArmOperation(new EventGridTopicPrivateEndpointConnectionOperationSource(Client), _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _eventGridTopicPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResource.cs index 33086aa01377..48883c81ec34 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResource.cs @@ -13,7 +13,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.EventGrid.Models; namespace Azure.ResourceManager.EventGrid { @@ -107,7 +106,7 @@ public virtual async Task> GetAsync( scope.Start(); try { - var response = await _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventGridTopicPrivateLinkResource(Client, response.Value), response.GetRawResponse()); @@ -139,7 +138,7 @@ public virtual Response Get(CancellationToken scope.Start(); try { - var response = _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Parent.Name, Id.Name, cancellationToken); + var response = _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventGridTopicPrivateLinkResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResourceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResourceCollection.cs index 3e823b947df1..eef99f41b7c5 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResourceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResourceCollection.cs @@ -15,7 +15,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.EventGrid.Models; namespace Azure.ResourceManager.EventGrid { @@ -78,7 +77,7 @@ public virtual async Task> GetAsync( scope.Start(); try { - var response = await _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, privateLinkResourceName, cancellationToken).ConfigureAwait(false); + var response = await _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventGridTopicPrivateLinkResource(Client, response.Value), response.GetRawResponse()); @@ -115,7 +114,7 @@ public virtual Response Get(string privateLin scope.Start(); try { - var response = _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, privateLinkResourceName, cancellationToken); + var response = _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new EventGridTopicPrivateLinkResource(Client, response.Value), response.GetRawResponse()); @@ -146,8 +145,8 @@ public virtual Response Get(string privateLin /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, filter, top); + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventGridTopicPrivateLinkResource(Client, EventGridPrivateLinkResourceData.DeserializeEventGridPrivateLinkResourceData(e)), _eventGridTopicPrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "EventGridTopicPrivateLinkResourceCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -170,8 +169,8 @@ public virtual AsyncPageable GetAllAsync(stri /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, filter, top); + HttpMessage FirstPageRequest(int? pageSizeHint) => _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventGridTopicPrivateLinkResource(Client, EventGridPrivateLinkResourceData.DeserializeEventGridPrivateLinkResourceData(e)), _eventGridTopicPrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "EventGridTopicPrivateLinkResourceCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -200,7 +199,7 @@ public virtual async Task> ExistsAsync(string privateLinkResource scope.Start(); try { - var response = await _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, privateLinkResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -235,7 +234,7 @@ public virtual Response Exists(string privateLinkResourceName, Cancellatio scope.Start(); try { - var response = _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "topics", Id.Name, privateLinkResourceName, cancellationToken: cancellationToken); + var response = _eventGridTopicPrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ParentType.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ParentType.cs deleted file mode 100644 index a8afde02b5a6..000000000000 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ParentType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.EventGrid.Models -{ - /// The ParentType. - internal readonly partial struct ParentType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ParentType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TopicsValue = "topics"; - private const string DomainsValue = "domains"; - private const string PartnerNamespacesValue = "partnerNamespaces"; - - /// topics. - public static ParentType Topics { get; } = new ParentType(TopicsValue); - /// domains. - public static ParentType Domains { get; } = new ParentType(DomainsValue); - /// partnerNamespaces. - public static ParentType PartnerNamespaces { get; } = new ParentType(PartnerNamespacesValue); - /// Determines if two values are the same. - public static bool operator ==(ParentType left, ParentType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ParentType left, ParentType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ParentType(string value) => new ParentType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ParentType other && Equals(other); - /// - public bool Equals(ParentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PrivateEndpointConnectionsParentType.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PrivateEndpointConnectionsParentType.cs new file mode 100644 index 000000000000..6a4fc37fa961 --- /dev/null +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PrivateEndpointConnectionsParentType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.EventGrid.Models +{ + /// The PrivateEndpointConnectionsParentType. + internal readonly partial struct PrivateEndpointConnectionsParentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PrivateEndpointConnectionsParentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TopicsValue = "topics"; + private const string DomainsValue = "domains"; + private const string PartnerNamespacesValue = "partnerNamespaces"; + + /// topics. + public static PrivateEndpointConnectionsParentType Topics { get; } = new PrivateEndpointConnectionsParentType(TopicsValue); + /// domains. + public static PrivateEndpointConnectionsParentType Domains { get; } = new PrivateEndpointConnectionsParentType(DomainsValue); + /// partnerNamespaces. + public static PrivateEndpointConnectionsParentType PartnerNamespaces { get; } = new PrivateEndpointConnectionsParentType(PartnerNamespacesValue); + /// Determines if two values are the same. + public static bool operator ==(PrivateEndpointConnectionsParentType left, PrivateEndpointConnectionsParentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PrivateEndpointConnectionsParentType left, PrivateEndpointConnectionsParentType right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator PrivateEndpointConnectionsParentType(string value) => new PrivateEndpointConnectionsParentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PrivateEndpointConnectionsParentType other && Equals(other); + /// + public bool Equals(PrivateEndpointConnectionsParentType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResource.cs index db5d55da9ba4..a983f7166e56 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResource.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResource.cs @@ -13,7 +13,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.EventGrid.Models; namespace Azure.ResourceManager.EventGrid { @@ -107,7 +106,7 @@ public virtual async Task> GetAsyn scope.Start(); try { - var response = await _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PartnerNamespacePrivateLinkResource(Client, response.Value), response.GetRawResponse()); @@ -139,7 +138,7 @@ public virtual Response Get(CancellationTok scope.Start(); try { - var response = _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Parent.Name, Id.Name, cancellationToken); + var response = _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PartnerNamespacePrivateLinkResource(Client, response.Value), response.GetRawResponse()); diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResourceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResourceCollection.cs index 702d4a380089..bb3a0704a90a 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResourceCollection.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResourceCollection.cs @@ -15,7 +15,6 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager; -using Azure.ResourceManager.EventGrid.Models; namespace Azure.ResourceManager.EventGrid { @@ -78,7 +77,7 @@ public virtual async Task> GetAsyn scope.Start(); try { - var response = await _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, privateLinkResourceName, cancellationToken).ConfigureAwait(false); + var response = await _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken).ConfigureAwait(false); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PartnerNamespacePrivateLinkResource(Client, response.Value), response.GetRawResponse()); @@ -115,7 +114,7 @@ public virtual Response Get(string privateL scope.Start(); try { - var response = _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, privateLinkResourceName, cancellationToken); + var response = _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken); if (response.Value == null) throw new RequestFailedException(response.GetRawResponse()); return Response.FromValue(new PartnerNamespacePrivateLinkResource(Client, response.Value), response.GetRawResponse()); @@ -146,8 +145,8 @@ public virtual Response Get(string privateL /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, filter, top); + HttpMessage FirstPageRequest(int? pageSizeHint) => _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PartnerNamespacePrivateLinkResource(Client, EventGridPrivateLinkResourceData.DeserializeEventGridPrivateLinkResourceData(e)), _partnerNamespacePrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "PartnerNamespacePrivateLinkResourceCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -170,8 +169,8 @@ public virtual AsyncPageable GetAllAsync(st /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(string filter = null, int? top = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, filter, top); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, filter, top); + HttpMessage FirstPageRequest(int? pageSizeHint) => _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.CreateListByResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top); return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PartnerNamespacePrivateLinkResource(Client, EventGridPrivateLinkResourceData.DeserializeEventGridPrivateLinkResourceData(e)), _partnerNamespacePrivateLinkResourcePrivateLinkResourcesClientDiagnostics, Pipeline, "PartnerNamespacePrivateLinkResourceCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -200,7 +199,7 @@ public virtual async Task> ExistsAsync(string privateLinkResource scope.Start(); try { - var response = await _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, privateLinkResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken: cancellationToken).ConfigureAwait(false); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) @@ -235,7 +234,7 @@ public virtual Response Exists(string privateLinkResourceName, Cancellatio scope.Start(); try { - var response = _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, "partnerNamespaces", Id.Name, privateLinkResourceName, cancellationToken: cancellationToken); + var response = _partnerNamespacePrivateLinkResourcePrivateLinkResourcesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateLinkResourceName, cancellationToken: cancellationToken); return Response.FromValue(response.Value != null, response.GetRawResponse()); } catch (Exception e) diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 55bfe4aa8253..07d40115fe48 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -20,24 +20,27 @@ internal partial class PrivateEndpointConnectionsRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly PrivateEndpointConnectionsParentType _parentType; private readonly Uri _endpoint; private readonly string _apiVersion; /// Initializes a new instance of PrivateEndpointConnectionsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. + /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// server parameter. /// Api Version. /// or is null. - public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string applicationId, PrivateEndpointConnectionsParentType parentType, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _parentType = parentType; _endpoint = endpoint ?? new Uri("https://management.azure.com"); _apiVersion = apiVersion ?? "2022-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string privateEndpointConnectionName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string parentName, string privateEndpointConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,7 +52,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.EventGrid/", false); - uri.AppendPath(parentType.ToString(), true); + uri.AppendPath(_parentType.ToString(), true); uri.AppendPath("/", false); uri.AppendPath(parentName, true); uri.AppendPath("/privateEndpointConnections/", false); @@ -64,20 +67,19 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Get a specific private endpoint connection under a topic, domain, or partner namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The name of the private endpoint connection connection. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string parentName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, parentType, parentName, privateEndpointConnectionName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, parentName, privateEndpointConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -98,20 +100,19 @@ public async Task> GetAsync(str /// Get a specific private endpoint connection under a topic, domain, or partner namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The name of the private endpoint connection connection. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string parentName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, parentType, parentName, privateEndpointConnectionName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, parentName, privateEndpointConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -129,7 +130,7 @@ public Response Get(string subscriptionI } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string privateEndpointConnectionName, EventGridPrivateEndpointConnectionData data) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string parentName, string privateEndpointConnectionName, EventGridPrivateEndpointConnectionData data) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -141,7 +142,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.EventGrid/", false); - uri.AppendPath(parentType.ToString(), true); + uri.AppendPath(_parentType.ToString(), true); uri.AppendPath("/", false); uri.AppendPath(parentName, true); uri.AppendPath("/privateEndpointConnections/", false); @@ -160,14 +161,13 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Update a specific private endpoint connection under a topic, domain or partner namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The name of the private endpoint connection connection. /// The private endpoint connection object to update. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string privateEndpointConnectionName, EventGridPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string parentName, string privateEndpointConnectionName, EventGridPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -175,7 +175,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, parentType, parentName, privateEndpointConnectionName, data); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, parentName, privateEndpointConnectionName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -190,14 +190,13 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// Update a specific private endpoint connection under a topic, domain or partner namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The name of the private endpoint connection connection. /// The private endpoint connection object to update. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string privateEndpointConnectionName, EventGridPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string parentName, string privateEndpointConnectionName, EventGridPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -205,7 +204,7 @@ public Response Update(string subscriptionId, string resourceGroupName, ParentTy Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); Argument.AssertNotNull(data, nameof(data)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, parentType, parentName, privateEndpointConnectionName, data); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, parentName, privateEndpointConnectionName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -217,7 +216,7 @@ public Response Update(string subscriptionId, string resourceGroupName, ParentTy } } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string privateEndpointConnectionName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string parentName, string privateEndpointConnectionName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -229,7 +228,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.EventGrid/", false); - uri.AppendPath(parentType.ToString(), true); + uri.AppendPath(_parentType.ToString(), true); uri.AppendPath("/", false); uri.AppendPath(parentName, true); uri.AppendPath("/privateEndpointConnections/", false); @@ -243,20 +242,19 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Delete a specific private endpoint connection under a topic, domain, or partner namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The name of the private endpoint connection connection. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string parentName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, parentType, parentName, privateEndpointConnectionName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, parentName, privateEndpointConnectionName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -271,20 +269,19 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Delete a specific private endpoint connection under a topic, domain, or partner namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The name of the private endpoint connection connection. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string parentName, string privateEndpointConnectionName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, parentType, parentName, privateEndpointConnectionName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, parentName, privateEndpointConnectionName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -296,7 +293,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, ParentTy } } - internal HttpMessage CreateListByResourceRequest(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string filter, int? top) + internal HttpMessage CreateListByResourceRequest(string subscriptionId, string resourceGroupName, string parentName, string filter, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -308,7 +305,7 @@ internal HttpMessage CreateListByResourceRequest(string subscriptionId, string r uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.EventGrid/", false); - uri.AppendPath(parentType.ToString(), true); + uri.AppendPath(_parentType.ToString(), true); uri.AppendPath("/", false); uri.AppendPath(parentName, true); uri.AppendPath("/privateEndpointConnections", false); @@ -330,20 +327,19 @@ internal HttpMessage CreateListByResourceRequest(string subscriptionId, string r /// Get all private endpoint connections under a topic, domain, or partner namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. /// The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceAsync(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) + public async Task> ListByResourceAsync(string subscriptionId, string resourceGroupName, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); - using var message = CreateListByResourceRequest(subscriptionId, resourceGroupName, parentType, parentName, filter, top); + using var message = CreateListByResourceRequest(subscriptionId, resourceGroupName, parentName, filter, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -362,20 +358,19 @@ public async Task> ListBy /// Get all private endpoint connections under a topic, domain, or partner namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. /// The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByResource(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) + public Response ListByResource(string subscriptionId, string resourceGroupName, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); - using var message = CreateListByResourceRequest(subscriptionId, resourceGroupName, parentType, parentName, filter, top); + using var message = CreateListByResourceRequest(subscriptionId, resourceGroupName, parentName, filter, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -391,7 +386,7 @@ public Response ListByResource(str } } - internal HttpMessage CreateListByResourceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string filter, int? top) + internal HttpMessage CreateListByResourceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string parentName, string filter, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -409,21 +404,20 @@ internal HttpMessage CreateListByResourceNextPageRequest(string nextLink, string /// The URL to the next page of results. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. /// The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) + public async Task> ListByResourceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); - using var message = CreateListByResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, parentType, parentName, filter, top); + using var message = CreateListByResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, parentName, filter, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -443,21 +437,20 @@ public async Task> ListBy /// The URL to the next page of results. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. /// The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByResourceNextPage(string nextLink, string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) + public Response ListByResourceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); - using var message = CreateListByResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, parentType, parentName, filter, top); + using var message = CreateListByResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, parentName, filter, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 9b1d34fd4870..a17d53f9a93d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -20,24 +20,27 @@ internal partial class PrivateLinkResourcesRestOperations { private readonly TelemetryDetails _userAgent; private readonly HttpPipeline _pipeline; + private readonly PrivateEndpointConnectionsParentType _parentType; private readonly Uri _endpoint; private readonly string _apiVersion; /// Initializes a new instance of PrivateLinkResourcesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. + /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// server parameter. /// Api Version. /// or is null. - public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicationId, PrivateEndpointConnectionsParentType parentType, Uri endpoint = null, string apiVersion = default) { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _parentType = parentType; _endpoint = endpoint ?? new Uri("https://management.azure.com"); _apiVersion = apiVersion ?? "2022-06-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string privateLinkResourceName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string parentName, string privateLinkResourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -49,7 +52,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.EventGrid/", false); - uri.AppendPath(parentType.ToString(), true); + uri.AppendPath(_parentType.ToString(), true); uri.AppendPath("/", false); uri.AppendPath(parentName, true); uri.AppendPath("/privateLinkResources/", false); @@ -64,20 +67,19 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Get properties of a private link resource. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The name of private link resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string privateLinkResourceName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string parentName, string privateLinkResourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, parentType, parentName, privateLinkResourceName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, parentName, privateLinkResourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -98,20 +100,19 @@ public async Task> GetAsync(string su /// Get properties of a private link resource. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The name of private link resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string privateLinkResourceName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string parentName, string privateLinkResourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); Argument.AssertNotNullOrEmpty(privateLinkResourceName, nameof(privateLinkResourceName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, parentType, parentName, privateLinkResourceName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, parentName, privateLinkResourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -129,7 +130,7 @@ public Response Get(string subscriptionId, str } } - internal HttpMessage CreateListByResourceRequest(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string filter, int? top) + internal HttpMessage CreateListByResourceRequest(string subscriptionId, string resourceGroupName, string parentName, string filter, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -141,7 +142,7 @@ internal HttpMessage CreateListByResourceRequest(string subscriptionId, string r uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.EventGrid/", false); - uri.AppendPath(parentType.ToString(), true); + uri.AppendPath(_parentType.ToString(), true); uri.AppendPath("/", false); uri.AppendPath(parentName, true); uri.AppendPath("/privateLinkResources", false); @@ -163,20 +164,19 @@ internal HttpMessage CreateListByResourceRequest(string subscriptionId, string r /// List all the private link resources under a topic, domain, or partner namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. /// The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceAsync(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) + public async Task> ListByResourceAsync(string subscriptionId, string resourceGroupName, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); - using var message = CreateListByResourceRequest(subscriptionId, resourceGroupName, parentType, parentName, filter, top); + using var message = CreateListByResourceRequest(subscriptionId, resourceGroupName, parentName, filter, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -195,20 +195,19 @@ public async Task> ListByResourceAsync( /// List all the private link resources under a topic, domain, or partner namespace. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. /// The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByResource(string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) + public Response ListByResource(string subscriptionId, string resourceGroupName, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); - using var message = CreateListByResourceRequest(subscriptionId, resourceGroupName, parentType, parentName, filter, top); + using var message = CreateListByResourceRequest(subscriptionId, resourceGroupName, parentName, filter, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -224,7 +223,7 @@ public Response ListByResource(string subscripti } } - internal HttpMessage CreateListByResourceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string filter, int? top) + internal HttpMessage CreateListByResourceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string parentName, string filter, int? top) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -242,21 +241,20 @@ internal HttpMessage CreateListByResourceNextPageRequest(string nextLink, string /// The URL to the next page of results. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. /// The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) + public async Task> ListByResourceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); - using var message = CreateListByResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, parentType, parentName, filter, top); + using var message = CreateListByResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, parentName, filter, top); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -276,21 +274,20 @@ public async Task> ListByResourceNextPa /// The URL to the next page of results. /// Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. /// The name of the resource group within the user's subscription. - /// The type of the parent resource. This can be either \'topics\', \'domains\', or \'partnerNamespaces\'. /// The name of the parent resource (namely, either, the topic name, domain name, or partner namespace name). /// The query used to filter the search results using OData syntax. Filtering is permitted on the 'name' property only and with limited number of OData operations. These operations are: the 'contains' function as well as the following logical operations: not, and, or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. The following is not a valid filter example: $filter=location eq 'westus'. /// The number of results to return per page for the list operation. Valid range for top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 items per page. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByResourceNextPage(string nextLink, string subscriptionId, string resourceGroupName, ParentType parentType, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) + public Response ListByResourceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string parentName, string filter = null, int? top = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(parentName, nameof(parentName)); - using var message = CreateListByResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, parentType, parentName, filter, top); + using var message = CreateListByResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, parentName, filter, top); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md index 44da997a5567..6c4169fa7505 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/autorest.md @@ -9,7 +9,7 @@ generate-model-factory: false csharp: true library-name: EventGrid namespace: Azure.ResourceManager.EventGrid -require: https://github.com/Azure/azure-rest-api-specs/blob/df70965d3a207eb2a628c96aa6ed935edc6b7911/specification/eventgrid/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/eventgrid/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true