diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateCollection.cs
new file mode 100644
index 000000000000..433f9a7697b1
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateCollection.cs
@@ -0,0 +1,344 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetCaCertificates method from an instance of .
+ ///
+ public partial class CaCertificateCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _caCertificateClientDiagnostics;
+ private readonly CaCertificatesRestOperations _caCertificateRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected CaCertificateCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal CaCertificateCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _caCertificateClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", CaCertificateResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(CaCertificateResource.ResourceType, out string caCertificateApiVersion);
+ _caCertificateRestClient = new CaCertificatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, caCertificateApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != NamespaceResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NamespaceResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Create or update a CA certificate with the specified parameters.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The CA certificate name.
+ /// CA certificate information.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string caCertificateName, CaCertificateData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(caCertificateName, nameof(caCertificateName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _caCertificateClientDiagnostics.CreateScope("CaCertificateCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _caCertificateRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, caCertificateName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new EventGridArmOperation(new CaCertificateOperationSource(Client), _caCertificateClientDiagnostics, Pipeline, _caCertificateRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, caCertificateName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create or update a CA certificate with the specified parameters.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The CA certificate name.
+ /// CA certificate information.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string caCertificateName, CaCertificateData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(caCertificateName, nameof(caCertificateName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _caCertificateClientDiagnostics.CreateScope("CaCertificateCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _caCertificateRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, caCertificateName, data, cancellationToken);
+ var operation = new EventGridArmOperation(new CaCertificateOperationSource(Client), _caCertificateClientDiagnostics, Pipeline, _caCertificateRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, caCertificateName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get properties of a CA certificate.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_Get
+ ///
+ ///
+ ///
+ /// Name of the CA certificate.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string caCertificateName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(caCertificateName, nameof(caCertificateName));
+
+ using var scope = _caCertificateClientDiagnostics.CreateScope("CaCertificateCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _caCertificateRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, caCertificateName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CaCertificateResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get properties of a CA certificate.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_Get
+ ///
+ ///
+ ///
+ /// Name of the CA certificate.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string caCertificateName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(caCertificateName, nameof(caCertificateName));
+
+ using var scope = _caCertificateClientDiagnostics.CreateScope("CaCertificateCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _caCertificateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, caCertificateName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CaCertificateResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get all the CA certificates under a namespace.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_ListByNamespace
+ ///
+ ///
+ ///
+ /// 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.
+ /// 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) => _caCertificateRestClient.CreateListByNamespaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _caCertificateRestClient.CreateListByNamespaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top);
+ return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CaCertificateResource(Client, CaCertificateData.DeserializeCaCertificateData(e)), _caCertificateClientDiagnostics, Pipeline, "CaCertificateCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Get all the CA certificates under a namespace.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_ListByNamespace
+ ///
+ ///
+ ///
+ /// 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.
+ /// 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) => _caCertificateRestClient.CreateListByNamespaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _caCertificateRestClient.CreateListByNamespaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top);
+ return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CaCertificateResource(Client, CaCertificateData.DeserializeCaCertificateData(e)), _caCertificateClientDiagnostics, Pipeline, "CaCertificateCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_Get
+ ///
+ ///
+ ///
+ /// Name of the CA certificate.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string caCertificateName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(caCertificateName, nameof(caCertificateName));
+
+ using var scope = _caCertificateClientDiagnostics.CreateScope("CaCertificateCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _caCertificateRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, caCertificateName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_Get
+ ///
+ ///
+ ///
+ /// Name of the CA certificate.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string caCertificateName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(caCertificateName, nameof(caCertificateName));
+
+ using var scope = _caCertificateClientDiagnostics.CreateScope("CaCertificateCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _caCertificateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, caCertificateName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateData.cs
new file mode 100644
index 000000000000..31779d4645e7
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateData.cs
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ ///
+ /// A class representing the CaCertificate data model.
+ /// The CA Certificate resource.
+ ///
+ public partial class CaCertificateData : ResourceData
+ {
+ /// Initializes a new instance of CaCertificateData.
+ public CaCertificateData()
+ {
+ }
+
+ /// Initializes a new instance of CaCertificateData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Description for the CA Certificate resource.
+ /// Base64 encoded PEM (Privacy Enhanced Mail) format certificate data.
+ /// Certificate issue time in UTC. This is a read-only field.
+ /// Certificate expiry time in UTC. This is a read-only field.
+ /// Provisioning state of the CA Certificate resource.
+ internal CaCertificateData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, string encodedCertificate, DateTimeOffset? issueTimeInUtc, DateTimeOffset? expiryTimeInUtc, CaCertificateProvisioningState? provisioningState) : base(id, name, resourceType, systemData)
+ {
+ Description = description;
+ EncodedCertificate = encodedCertificate;
+ IssueTimeInUtc = issueTimeInUtc;
+ ExpiryTimeInUtc = expiryTimeInUtc;
+ ProvisioningState = provisioningState;
+ }
+
+ /// Description for the CA Certificate resource.
+ public string Description { get; set; }
+ /// Base64 encoded PEM (Privacy Enhanced Mail) format certificate data.
+ public string EncodedCertificate { get; set; }
+ /// Certificate issue time in UTC. This is a read-only field.
+ public DateTimeOffset? IssueTimeInUtc { get; }
+ /// Certificate expiry time in UTC. This is a read-only field.
+ public DateTimeOffset? ExpiryTimeInUtc { get; }
+ /// Provisioning state of the CA Certificate resource.
+ public CaCertificateProvisioningState? ProvisioningState { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateResource.cs
new file mode 100644
index 000000000000..71065a5446ce
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateResource.cs
@@ -0,0 +1,297 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ ///
+ /// A Class representing a CaCertificate along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetCaCertificateResource method.
+ /// Otherwise you can get one from its parent resource using the GetCaCertificate method.
+ ///
+ public partial class CaCertificateResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string namespaceName, string caCertificateName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _caCertificateClientDiagnostics;
+ private readonly CaCertificatesRestOperations _caCertificateRestClient;
+ private readonly CaCertificateData _data;
+
+ /// Initializes a new instance of the class for mocking.
+ protected CaCertificateResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal CaCertificateResource(ArmClient client, CaCertificateData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal CaCertificateResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _caCertificateClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string caCertificateApiVersion);
+ _caCertificateRestClient = new CaCertificatesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, caCertificateApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.EventGrid/namespaces/caCertificates";
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual CaCertificateData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get properties of a CA certificate.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_Get
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _caCertificateClientDiagnostics.CreateScope("CaCertificateResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _caCertificateRestClient.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 CaCertificateResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get properties of a CA certificate.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_Get
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _caCertificateClientDiagnostics.CreateScope("CaCertificateResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _caCertificateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new CaCertificateResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete an existing CA certificate.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_Delete
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _caCertificateClientDiagnostics.CreateScope("CaCertificateResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _caCertificateRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new EventGridArmOperation(_caCertificateClientDiagnostics, Pipeline, _caCertificateRestClient.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;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete an existing CA certificate.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_Delete
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _caCertificateClientDiagnostics.CreateScope("CaCertificateResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _caCertificateRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ var operation = new EventGridArmOperation(_caCertificateClientDiagnostics, Pipeline, _caCertificateRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create or update a CA certificate with the specified parameters.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// CA certificate information.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, CaCertificateData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _caCertificateClientDiagnostics.CreateScope("CaCertificateResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _caCertificateRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false);
+ var operation = new EventGridArmOperation(new CaCertificateOperationSource(Client), _caCertificateClientDiagnostics, Pipeline, _caCertificateRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create or update a CA certificate with the specified parameters.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/caCertificates/{caCertificateName}
+ ///
+ /// -
+ /// Operation Id
+ /// CaCertificates_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// CA certificate information.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, CaCertificateData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _caCertificateClientDiagnostics.CreateScope("CaCertificateResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _caCertificateRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken);
+ var operation = new EventGridArmOperation(new CaCertificateOperationSource(Client), _caCertificateClientDiagnostics, Pipeline, _caCertificateRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientCollection.cs
new file mode 100644
index 000000000000..e7b0f981a3cc
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientCollection.cs
@@ -0,0 +1,344 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetClients method from an instance of .
+ ///
+ public partial class ClientCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _clientClientDiagnostics;
+ private readonly ClientsRestOperations _clientRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected ClientCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal ClientCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _clientClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", ClientResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ClientResource.ResourceType, out string clientApiVersion);
+ _clientRestClient = new ClientsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, clientApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != NamespaceResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NamespaceResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Create or update a client with the specified parameters.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The client name.
+ /// Client information.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string clientName, ClientData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(clientName, nameof(clientName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _clientClientDiagnostics.CreateScope("ClientCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _clientRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new EventGridArmOperation(new ClientOperationSource(Client), _clientClientDiagnostics, Pipeline, _clientRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create or update a client with the specified parameters.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The client name.
+ /// Client information.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string clientName, ClientData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(clientName, nameof(clientName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _clientClientDiagnostics.CreateScope("ClientCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _clientRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientName, data, cancellationToken);
+ var operation = new EventGridArmOperation(new ClientOperationSource(Client), _clientClientDiagnostics, Pipeline, _clientRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get properties of a client.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_Get
+ ///
+ ///
+ ///
+ /// Name of the client.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string clientName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(clientName, nameof(clientName));
+
+ using var scope = _clientClientDiagnostics.CreateScope("ClientCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _clientRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ClientResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get properties of a client.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_Get
+ ///
+ ///
+ ///
+ /// Name of the client.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string clientName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(clientName, nameof(clientName));
+
+ using var scope = _clientClientDiagnostics.CreateScope("ClientCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _clientRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ClientResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get all the permission bindings under a namespace.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_ListByNamespace
+ ///
+ ///
+ ///
+ /// 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.
+ /// 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) => _clientRestClient.CreateListByNamespaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _clientRestClient.CreateListByNamespaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top);
+ return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ClientResource(Client, ClientData.DeserializeClientData(e)), _clientClientDiagnostics, Pipeline, "ClientCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Get all the permission bindings under a namespace.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_ListByNamespace
+ ///
+ ///
+ ///
+ /// 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.
+ /// 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) => _clientRestClient.CreateListByNamespaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _clientRestClient.CreateListByNamespaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top);
+ return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ClientResource(Client, ClientData.DeserializeClientData(e)), _clientClientDiagnostics, Pipeline, "ClientCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_Get
+ ///
+ ///
+ ///
+ /// Name of the client.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string clientName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(clientName, nameof(clientName));
+
+ using var scope = _clientClientDiagnostics.CreateScope("ClientCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _clientRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_Get
+ ///
+ ///
+ ///
+ /// Name of the client.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string clientName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(clientName, nameof(clientName));
+
+ using var scope = _clientClientDiagnostics.CreateScope("ClientCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _clientRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientData.cs
new file mode 100644
index 000000000000..d7da4c66562e
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientData.cs
@@ -0,0 +1,101 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ ///
+ /// A class representing the Client data model.
+ /// The Client resource.
+ ///
+ public partial class ClientData : ResourceData
+ {
+ /// Initializes a new instance of ClientData.
+ public ClientData()
+ {
+ Attributes = new ChangeTrackingDictionary();
+ }
+
+ /// Initializes a new instance of ClientData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Description for the Client resource.
+ /// The name presented by the client for authentication. The default value is the name of the resource.
+ /// Authentication information for the client.
+ /// The client certificate authentication information.
+ /// Indicates if the client is enabled or not. Default value is Enabled.
+ ///
+ /// Attributes for the client. Supported values are int, bool, string, string[].
+ /// Example:
+ /// "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }
+ ///
+ /// Provisioning state of the Client resource.
+ internal ClientData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, string authenticationName, ClientAuthentication authentication, ClientCertificateAuthentication clientCertificateAuthentication, ClientState? state, IDictionary attributes, ClientProvisioningState? provisioningState) : base(id, name, resourceType, systemData)
+ {
+ Description = description;
+ AuthenticationName = authenticationName;
+ Authentication = authentication;
+ ClientCertificateAuthentication = clientCertificateAuthentication;
+ State = state;
+ Attributes = attributes;
+ ProvisioningState = provisioningState;
+ }
+
+ /// Description for the Client resource.
+ public string Description { get; set; }
+ /// The name presented by the client for authentication. The default value is the name of the resource.
+ public string AuthenticationName { get; set; }
+ /// Authentication information for the client.
+ public ClientAuthentication Authentication { get; set; }
+ /// The client certificate authentication information.
+ public ClientCertificateAuthentication ClientCertificateAuthentication { get; set; }
+ /// Indicates if the client is enabled or not. Default value is Enabled.
+ public ClientState? State { get; set; }
+ ///
+ /// Attributes for the client. Supported values are int, bool, string, string[].
+ /// Example:
+ /// "attributes": { "room": "345", "floor": 12, "deviceTypes": ["Fan", "Light"] }
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formated json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ public IDictionary Attributes { get; }
+ /// Provisioning state of the Client resource.
+ public ClientProvisioningState? ProvisioningState { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientGroupCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientGroupCollection.cs
new file mode 100644
index 000000000000..8d6e257224fb
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientGroupCollection.cs
@@ -0,0 +1,344 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetClientGroups method from an instance of .
+ ///
+ public partial class ClientGroupCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _clientGroupClientDiagnostics;
+ private readonly ClientGroupsRestOperations _clientGroupRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected ClientGroupCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal ClientGroupCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _clientGroupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", ClientGroupResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ClientGroupResource.ResourceType, out string clientGroupApiVersion);
+ _clientGroupRestClient = new ClientGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, clientGroupApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != NamespaceResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, NamespaceResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Create or update a client group with the specified parameters.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The client group name.
+ /// Client group information.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string clientGroupName, ClientGroupData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(clientGroupName, nameof(clientGroupName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _clientGroupClientDiagnostics.CreateScope("ClientGroupCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _clientGroupRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientGroupName, data, cancellationToken).ConfigureAwait(false);
+ var operation = new EventGridArmOperation(new ClientGroupOperationSource(Client), _clientGroupClientDiagnostics, Pipeline, _clientGroupRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientGroupName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create or update a client group with the specified parameters.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The client group name.
+ /// Client group information.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string clientGroupName, ClientGroupData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(clientGroupName, nameof(clientGroupName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _clientGroupClientDiagnostics.CreateScope("ClientGroupCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _clientGroupRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientGroupName, data, cancellationToken);
+ var operation = new EventGridArmOperation(new ClientGroupOperationSource(Client), _clientGroupClientDiagnostics, Pipeline, _clientGroupRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientGroupName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get properties of a client group.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_Get
+ ///
+ ///
+ ///
+ /// Name of the client group.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string clientGroupName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(clientGroupName, nameof(clientGroupName));
+
+ using var scope = _clientGroupClientDiagnostics.CreateScope("ClientGroupCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _clientGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientGroupName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ClientGroupResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get properties of a client group.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_Get
+ ///
+ ///
+ ///
+ /// Name of the client group.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string clientGroupName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(clientGroupName, nameof(clientGroupName));
+
+ using var scope = _clientGroupClientDiagnostics.CreateScope("ClientGroupCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _clientGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientGroupName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ClientGroupResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get all the client groups under a namespace.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_ListByNamespace
+ ///
+ ///
+ ///
+ /// 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.
+ /// 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) => _clientGroupRestClient.CreateListByNamespaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _clientGroupRestClient.CreateListByNamespaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top);
+ return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ClientGroupResource(Client, ClientGroupData.DeserializeClientGroupData(e)), _clientGroupClientDiagnostics, Pipeline, "ClientGroupCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Get all the client groups under a namespace.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_ListByNamespace
+ ///
+ ///
+ ///
+ /// 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.
+ /// 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) => _clientGroupRestClient.CreateListByNamespaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _clientGroupRestClient.CreateListByNamespaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, top);
+ return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ClientGroupResource(Client, ClientGroupData.DeserializeClientGroupData(e)), _clientGroupClientDiagnostics, Pipeline, "ClientGroupCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_Get
+ ///
+ ///
+ ///
+ /// Name of the client group.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string clientGroupName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(clientGroupName, nameof(clientGroupName));
+
+ using var scope = _clientGroupClientDiagnostics.CreateScope("ClientGroupCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _clientGroupRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientGroupName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_Get
+ ///
+ ///
+ ///
+ /// Name of the client group.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string clientGroupName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(clientGroupName, nameof(clientGroupName));
+
+ using var scope = _clientGroupClientDiagnostics.CreateScope("ClientGroupCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _clientGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientGroupName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientGroupData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientGroupData.cs
new file mode 100644
index 000000000000..41e6403f6ed7
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientGroupData.cs
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using Azure.Core;
+using Azure.ResourceManager.EventGrid.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ ///
+ /// A class representing the ClientGroup data model.
+ /// The Client group resource.
+ ///
+ public partial class ClientGroupData : ResourceData
+ {
+ /// Initializes a new instance of ClientGroupData.
+ public ClientGroupData()
+ {
+ }
+
+ /// Initializes a new instance of ClientGroupData.
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Description for the Client Group resource.
+ ///
+ /// The grouping query for the clients.
+ /// Example : attributes.keyName IN ['a', 'b', 'c'].
+ ///
+ /// Provisioning state of the ClientGroup resource.
+ internal ClientGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, string query, ClientGroupProvisioningState? provisioningState) : base(id, name, resourceType, systemData)
+ {
+ Description = description;
+ Query = query;
+ ProvisioningState = provisioningState;
+ }
+
+ /// Description for the Client Group resource.
+ public string Description { get; set; }
+ ///
+ /// The grouping query for the clients.
+ /// Example : attributes.keyName IN ['a', 'b', 'c'].
+ ///
+ public string Query { get; set; }
+ /// Provisioning state of the ClientGroup resource.
+ public ClientGroupProvisioningState? ProvisioningState { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientGroupResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientGroupResource.cs
new file mode 100644
index 000000000000..f073f2e091e4
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientGroupResource.cs
@@ -0,0 +1,297 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ ///
+ /// A Class representing a ClientGroup along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetClientGroupResource method.
+ /// Otherwise you can get one from its parent resource using the GetClientGroup method.
+ ///
+ public partial class ClientGroupResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string namespaceName, string clientGroupName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _clientGroupClientDiagnostics;
+ private readonly ClientGroupsRestOperations _clientGroupRestClient;
+ private readonly ClientGroupData _data;
+
+ /// Initializes a new instance of the class for mocking.
+ protected ClientGroupResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal ClientGroupResource(ArmClient client, ClientGroupData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal ClientGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _clientGroupClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string clientGroupApiVersion);
+ _clientGroupRestClient = new ClientGroupsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, clientGroupApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.EventGrid/namespaces/clientGroups";
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual ClientGroupData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get properties of a client group.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_Get
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientGroupClientDiagnostics.CreateScope("ClientGroupResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _clientGroupRestClient.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 ClientGroupResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get properties of a client group.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_Get
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientGroupClientDiagnostics.CreateScope("ClientGroupResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _clientGroupRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ClientGroupResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete an existing client group.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_Delete
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientGroupClientDiagnostics.CreateScope("ClientGroupResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _clientGroupRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new EventGridArmOperation(_clientGroupClientDiagnostics, Pipeline, _clientGroupRestClient.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;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete an existing client group.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_Delete
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientGroupClientDiagnostics.CreateScope("ClientGroupResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _clientGroupRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ var operation = new EventGridArmOperation(_clientGroupClientDiagnostics, Pipeline, _clientGroupRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create or update a client group with the specified parameters.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Client group information.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, ClientGroupData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _clientGroupClientDiagnostics.CreateScope("ClientGroupResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _clientGroupRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false);
+ var operation = new EventGridArmOperation(new ClientGroupOperationSource(Client), _clientGroupClientDiagnostics, Pipeline, _clientGroupRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create or update a client group with the specified parameters.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clientGroups/{clientGroupName}
+ ///
+ /// -
+ /// Operation Id
+ /// ClientGroups_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Client group information.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, ClientGroupData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _clientGroupClientDiagnostics.CreateScope("ClientGroupResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _clientGroupRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken);
+ var operation = new EventGridArmOperation(new ClientGroupOperationSource(Client), _clientGroupClientDiagnostics, Pipeline, _clientGroupRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientResource.cs
new file mode 100644
index 000000000000..bf23719f0b8b
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ClientResource.cs
@@ -0,0 +1,297 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ ///
+ /// A Class representing a Client along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetClientResource method.
+ /// Otherwise you can get one from its parent resource using the GetClient method.
+ ///
+ public partial class ClientResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string namespaceName, string clientName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _clientClientDiagnostics;
+ private readonly ClientsRestOperations _clientRestClient;
+ private readonly ClientData _data;
+
+ /// Initializes a new instance of the class for mocking.
+ protected ClientResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal ClientResource(ArmClient client, ClientData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal ClientResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _clientClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.EventGrid", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string clientApiVersion);
+ _clientRestClient = new ClientsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, clientApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.EventGrid/namespaces/clients";
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual ClientData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get properties of a client.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_Get
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientClientDiagnostics.CreateScope("ClientResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _clientRestClient.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 ClientResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get properties of a client.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_Get
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientClientDiagnostics.CreateScope("ClientResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _clientRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ClientResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete an existing client.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_Delete
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientClientDiagnostics.CreateScope("ClientResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _clientRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new EventGridArmOperation(_clientClientDiagnostics, Pipeline, _clientRestClient.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;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Delete an existing client.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_Delete
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientClientDiagnostics.CreateScope("ClientResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _clientRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ var operation = new EventGridArmOperation(_clientClientDiagnostics, Pipeline, _clientRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create or update a client with the specified parameters.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Client information.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, ClientData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _clientClientDiagnostics.CreateScope("ClientResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _clientRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false);
+ var operation = new EventGridArmOperation(new ClientOperationSource(Client), _clientClientDiagnostics, Pipeline, _clientRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Create or update a client with the specified parameters.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}/clients/{clientName}
+ ///
+ /// -
+ /// Operation Id
+ /// Clients_CreateOrUpdate
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// Client information.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, ClientData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _clientClientDiagnostics.CreateScope("ClientResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _clientRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken);
+ var operation = new EventGridArmOperation(new ClientOperationSource(Client), _clientClientDiagnostics, Pipeline, _clientRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionResource.cs
index 86e5a382138f..9296ccbe74c8 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionResource.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionResource.cs
@@ -295,6 +295,48 @@ public virtual ArmOperation Update(WaitUnt
}
}
+ ///
+ /// Get all delivery attributes for an event subscription for domain topic.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes
+ ///
+ /// -
+ /// Operation Id
+ /// DomainTopicEventSubscriptions_GetDeliveryAttributes
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetDeliveryAttributesAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _domainTopicEventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name);
+ return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping, _domainTopicEventSubscriptionClientDiagnostics, Pipeline, "DomainTopicEventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken);
+ }
+
+ ///
+ /// Get all delivery attributes for an event subscription for domain topic.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes
+ ///
+ /// -
+ /// Operation Id
+ /// DomainTopicEventSubscriptions_GetDeliveryAttributes
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetDeliveryAttributes(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _domainTopicEventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name);
+ return PageableHelpers.CreatePageable(FirstPageRequest, null, DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping, _domainTopicEventSubscriptionClientDiagnostics, Pipeline, "DomainTopicEventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken);
+ }
+
///
/// Get the full endpoint URL for a nested event subscription for domain topic.
///
@@ -354,47 +396,5 @@ public virtual Response GetFullUri(CancellationToken c
throw;
}
}
-
- ///
- /// Get all delivery attributes for an event subscription for domain topic.
- ///
- /// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes
- ///
- /// -
- /// Operation Id
- /// DomainTopicEventSubscriptions_GetDeliveryAttributes
- ///
- ///
- ///
- /// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetDeliveryAttributesAsync(CancellationToken cancellationToken = default)
- {
- HttpMessage FirstPageRequest(int? pageSizeHint) => _domainTopicEventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name);
- return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping, _domainTopicEventSubscriptionClientDiagnostics, Pipeline, "DomainTopicEventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken);
- }
-
- ///
- /// Get all delivery attributes for an event subscription for domain topic.
- ///
- /// -
- /// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/topics/{topicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes
- ///
- /// -
- /// Operation Id
- /// DomainTopicEventSubscriptions_GetDeliveryAttributes
- ///
- ///
- ///
- /// The cancellation token to use.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetDeliveryAttributes(CancellationToken cancellationToken = default)
- {
- HttpMessage FirstPageRequest(int? pageSizeHint) => _domainTopicEventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name);
- return PageableHelpers.CreatePageable(FirstPageRequest, null, DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping, _domainTopicEventSubscriptionClientDiagnostics, Pipeline, "DomainTopicEventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken);
- }
}
}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.cs
index acd0be426b09..767e11ed7f53 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainData.cs
@@ -34,11 +34,17 @@ public EventGridDomainData(AzureLocation location) : base(location)
/// The systemData.
/// The tags.
/// The location.
+ /// The Sku pricing tier for the Event Grid Domain resource.
/// Identity information for the Event Grid Domain resource.
- /// List of private endpoint connections.
+ ///
/// Provisioning state of the Event Grid Domain Resource.
+ /// Minimum TLS version of the publisher allowed to publish to this domain.
/// Endpoint for the Event Grid Domain Resource which is used for publishing the events.
/// This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain Resource.
+ ///
+ /// Event Type Information for the domain. This information is provided by the publisher and can be used by the
+ /// subscriber to view different types of events that are published.
+ ///
///
/// Information about the InputSchemaMapping which specified the info about mapping event payload.
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
@@ -70,13 +76,16 @@ public EventGridDomainData(AzureLocation location) : base(location)
/// resources by the user.
///
/// Data Residency Boundary of the resource.
- internal EventGridDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, IReadOnlyList privateEndpointConnections, EventGridDomainProvisioningState? provisioningState, Uri endpoint, EventGridInputSchema? inputSchema, EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, bool? isLocalAuthDisabled, bool? autoCreateTopicWithFirstSubscription, bool? autoDeleteTopicWithLastSubscription, DataResidencyBoundary? dataResidencyBoundary) : base(id, name, resourceType, systemData, tags, location)
+ internal EventGridDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceSku sku, ManagedServiceIdentity identity, IReadOnlyList privateEndpointConnections, EventGridDomainProvisioningState? provisioningState, TlsVersion? minimumTlsVersionAllowed, Uri endpoint, EventGridInputSchema? inputSchema, PartnerTopicEventTypeInfo eventTypeInfo, EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, bool? isLocalAuthDisabled, bool? autoCreateTopicWithFirstSubscription, bool? autoDeleteTopicWithLastSubscription, DataResidencyBoundary? dataResidencyBoundary) : base(id, name, resourceType, systemData, tags, location)
{
+ Sku = sku;
Identity = identity;
PrivateEndpointConnections = privateEndpointConnections;
ProvisioningState = provisioningState;
+ MinimumTlsVersionAllowed = minimumTlsVersionAllowed;
Endpoint = endpoint;
InputSchema = inputSchema;
+ EventTypeInfo = eventTypeInfo;
InputSchemaMapping = inputSchemaMapping;
MetricResourceId = metricResourceId;
PublicNetworkAccess = publicNetworkAccess;
@@ -87,17 +96,38 @@ internal EventGridDomainData(ResourceIdentifier id, string name, ResourceType re
DataResidencyBoundary = dataResidencyBoundary;
}
+ /// The Sku pricing tier for the Event Grid Domain resource.
+ internal ResourceSku Sku { get; set; }
+ /// The Sku name of the resource. The possible values are: Basic or Premium.
+ public EventGridSku? SkuName
+ {
+ get => Sku is null ? default : Sku.Name;
+ set
+ {
+ if (Sku is null)
+ Sku = new ResourceSku();
+ Sku.Name = value;
+ }
+ }
+
/// Identity information for the Event Grid Domain resource.
public ManagedServiceIdentity Identity { get; set; }
- /// List of private endpoint connections.
+ /// Gets the private endpoint connections.
public IReadOnlyList PrivateEndpointConnections { get; }
/// Provisioning state of the Event Grid Domain Resource.
public EventGridDomainProvisioningState? ProvisioningState { get; }
+ /// Minimum TLS version of the publisher allowed to publish to this domain.
+ public TlsVersion? MinimumTlsVersionAllowed { get; set; }
/// Endpoint for the Event Grid Domain Resource which is used for publishing the events.
public Uri Endpoint { get; }
/// This determines the format that Event Grid should expect for incoming events published to the Event Grid Domain Resource.
public EventGridInputSchema? InputSchema { get; set; }
///
+ /// Event Type Information for the domain. This information is provided by the publisher and can be used by the
+ /// subscriber to view different types of events that are published.
+ ///
+ public PartnerTopicEventTypeInfo EventTypeInfo { get; set; }
+ ///
/// Information about the InputSchemaMapping which specified the info about mapping event payload.
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include .
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionCollection.cs
index 3c47c38861e9..65882b3a1044 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionCollection.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionCollection.cs
@@ -136,7 +136,7 @@ public virtual ArmOperation Cr
}
///
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -173,7 +173,7 @@ public virtual async Task
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -210,7 +210,7 @@ public virtual Response Get(st
}
///
- /// Get all private endpoint connections under a topic, domain, or partner namespace.
+ /// Get all private endpoint connections under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -234,7 +234,7 @@ public virtual AsyncPageable G
}
///
- /// Get all private endpoint connections under a topic, domain, or partner namespace.
+ /// Get all private endpoint connections under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.cs
index f283c28d78d5..7d5b44971389 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.cs
@@ -88,7 +88,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
}
///
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -120,7 +120,7 @@ public virtual async Task
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -152,7 +152,7 @@ public virtual Response Get(Ca
}
///
- /// Delete a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -186,7 +186,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
}
///
- /// Delete a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResourceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResourceCollection.cs
index 28e50c8dc468..11f2fe9ca591 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResourceCollection.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResourceCollection.cs
@@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
///
///
- /// The name of private link resource.
+ /// The name of private link resource will be either topic, domain, partnerNamespace or namespace.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -103,7 +103,7 @@ public virtual async Task> GetAsync
///
///
///
- /// The name of private link resource.
+ /// The name of private link resource will be either topic, domain, partnerNamespace or namespace.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -128,7 +128,7 @@ public virtual Response Get(string privateLi
}
///
- /// List all the private link resources under a topic, domain, or partner namespace.
+ /// List all the private link resources under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -152,7 +152,7 @@ public virtual AsyncPageable GetAllAsync(str
}
///
- /// List all the private link resources under a topic, domain, or partner namespace.
+ /// List all the private link resources under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -188,7 +188,7 @@ public virtual Pageable GetAll(string filter
///
///
///
- /// The name of private link resource.
+ /// The name of private link resource will be either topic, domain, partnerNamespace or namespace.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -223,7 +223,7 @@ public virtual async Task> ExistsAsync(string privateLinkResource
///
///
///
- /// The name of private link resource.
+ /// The name of private link resource will be either topic, domain, partnerNamespace or namespace.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainResource.cs
index e6f0fe7c1a7e..58992f129f9d 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainResource.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainResource.cs
@@ -203,7 +203,7 @@ public virtual EventGridDomainPrivateEndpointConnectionCollection GetEventGridDo
}
///
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -226,7 +226,7 @@ public virtual async Task
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -268,7 +268,7 @@ public virtual EventGridDomainPrivateLinkResourceCollection GetEventGridDomainPr
///
///
///
- /// The name of private link resource.
+ /// The name of private link resource will be either topic, domain, partnerNamespace or namespace.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -291,7 +291,7 @@ public virtual async Task> GetEvent
///
///
///
- /// The name of private link resource.
+ /// The name of private link resource will be either topic, domain, partnerNamespace or namespace.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs
index 79dfe2cf60c4..4233185ec5e2 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionCollection.cs
@@ -136,7 +136,7 @@ public virtual ArmOperation
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -173,7 +173,7 @@ public virtual async Task
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -210,7 +210,7 @@ public virtual Response
- /// Get all private endpoint connections under a topic, domain, or partner namespace.
+ /// Get all private endpoint connections under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -234,7 +234,7 @@ public virtual AsyncPageable
- /// Get all private endpoint connections under a topic, domain, or partner namespace.
+ /// Get all private endpoint connections under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.cs
index 6589b227d55f..b8ba91893a21 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.cs
@@ -88,7 +88,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
}
///
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -120,7 +120,7 @@ public virtual async Task
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -152,7 +152,7 @@ public virtual Response
- /// Delete a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -186,7 +186,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
}
///
- /// Delete a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.cs
index 172613f6420b..8e16fe4ae45a 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridSubscriptionData.cs
@@ -15,7 +15,7 @@ namespace Azure.ResourceManager.EventGrid
{
///
/// A class representing the EventGridSubscription data model.
- /// Event Subscription
+ /// Event Subscription.
///
public partial class EventGridSubscriptionData : ResourceData
{
@@ -36,7 +36,7 @@ public EventGridSubscriptionData()
/// Information about the destination where events have to be delivered for the event subscription.
/// Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , , , , , and .
+ /// The available derived classes include , , , , , , and .
///
///
/// Information about the destination where events have to be delivered for the event subscription.
@@ -80,7 +80,7 @@ internal EventGridSubscriptionData(ResourceIdentifier id, string name, ResourceT
/// Information about the destination where events have to be delivered for the event subscription.
/// Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , , , , , and .
+ /// The available derived classes include , , , , , , and .
///
public EventSubscriptionDestination Destination { get; set; }
///
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.cs
index d98bdc069533..05f8a5b91095 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicData.cs
@@ -10,6 +10,7 @@
using Azure.Core;
using Azure.ResourceManager.EventGrid.Models;
using Azure.ResourceManager.Models;
+using Azure.ResourceManager.Resources.Models;
namespace Azure.ResourceManager.EventGrid
{
@@ -34,10 +35,18 @@ public EventGridTopicData(AzureLocation location) : base(location)
/// The systemData.
/// The tags.
/// The location.
+ /// The Sku pricing tier for the topic.
/// Identity information for the resource.
+ /// Kind of the resource.
+ /// Extended location of the resource.
///
/// Provisioning state of the topic.
/// Endpoint for the topic.
+ ///
+ /// Event Type Information for the user topic. This information is provided by the publisher and can be used by the
+ /// subscriber to view different types of events that are published.
+ ///
+ /// Minimum TLS version of the publisher allowed to publish to this topic.
/// This determines the format that Event Grid should expect for incoming events published to the topic.
///
/// This enables publishing using custom event schemas. An InputSchemaMapping can be specified to map various properties of a source schema to various required properties of the EventGridEvent schema.
@@ -52,12 +61,17 @@ public EventGridTopicData(AzureLocation location) : base(location)
/// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
/// This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the topic.
/// Data Residency Boundary of the resource.
- internal EventGridTopicData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, IReadOnlyList privateEndpointConnections, EventGridTopicProvisioningState? provisioningState, Uri endpoint, EventGridInputSchema? inputSchema, EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, bool? isLocalAuthDisabled, DataResidencyBoundary? dataResidencyBoundary) : base(id, name, resourceType, systemData, tags, location)
+ internal EventGridTopicData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ResourceSku sku, ManagedServiceIdentity identity, ResourceKind? kind, ExtendedLocation extendedLocation, IReadOnlyList privateEndpointConnections, EventGridTopicProvisioningState? provisioningState, Uri endpoint, PartnerTopicEventTypeInfo eventTypeInfo, TlsVersion? minimumTlsVersionAllowed, EventGridInputSchema? inputSchema, EventGridInputSchemaMapping inputSchemaMapping, string metricResourceId, EventGridPublicNetworkAccess? publicNetworkAccess, IList inboundIPRules, bool? isLocalAuthDisabled, DataResidencyBoundary? dataResidencyBoundary) : base(id, name, resourceType, systemData, tags, location)
{
+ Sku = sku;
Identity = identity;
+ Kind = kind;
+ ExtendedLocation = extendedLocation;
PrivateEndpointConnections = privateEndpointConnections;
ProvisioningState = provisioningState;
Endpoint = endpoint;
+ EventTypeInfo = eventTypeInfo;
+ MinimumTlsVersionAllowed = minimumTlsVersionAllowed;
InputSchema = inputSchema;
InputSchemaMapping = inputSchemaMapping;
MetricResourceId = metricResourceId;
@@ -67,14 +81,39 @@ internal EventGridTopicData(ResourceIdentifier id, string name, ResourceType res
DataResidencyBoundary = dataResidencyBoundary;
}
+ /// The Sku pricing tier for the topic.
+ internal ResourceSku Sku { get; set; }
+ /// The Sku name of the resource. The possible values are: Basic or Premium.
+ public EventGridSku? SkuName
+ {
+ get => Sku is null ? default : Sku.Name;
+ set
+ {
+ if (Sku is null)
+ Sku = new ResourceSku();
+ Sku.Name = value;
+ }
+ }
+
/// Identity information for the resource.
public ManagedServiceIdentity Identity { get; set; }
+ /// Kind of the resource.
+ public ResourceKind? Kind { get; set; }
+ /// Extended location of the resource.
+ public ExtendedLocation ExtendedLocation { get; set; }
/// Gets the private endpoint connections.
public IReadOnlyList PrivateEndpointConnections { get; }
/// Provisioning state of the topic.
public EventGridTopicProvisioningState? ProvisioningState { get; }
/// Endpoint for the topic.
public Uri Endpoint { get; }
+ ///
+ /// Event Type Information for the user topic. This information is provided by the publisher and can be used by the
+ /// subscriber to view different types of events that are published.
+ ///
+ public PartnerTopicEventTypeInfo EventTypeInfo { get; set; }
+ /// Minimum TLS version of the publisher allowed to publish to this topic.
+ public TlsVersion? MinimumTlsVersionAllowed { get; set; }
/// This determines the format that Event Grid should expect for incoming events published to the topic.
public EventGridInputSchema? InputSchema { get; set; }
///
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionCollection.cs
index b837efea17a5..e817b3007f3d 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionCollection.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionCollection.cs
@@ -136,7 +136,7 @@ public virtual ArmOperation Cre
}
///
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -173,7 +173,7 @@ public virtual async Task
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -210,7 +210,7 @@ public virtual Response Get(str
}
///
- /// Get all private endpoint connections under a topic, domain, or partner namespace.
+ /// Get all private endpoint connections under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -234,7 +234,7 @@ public virtual AsyncPageable Ge
}
///
- /// Get all private endpoint connections under a topic, domain, or partner namespace.
+ /// Get all private endpoint connections under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.cs
index 39bb08bfdded..c5fd14011f3a 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.cs
@@ -88,7 +88,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
}
///
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -120,7 +120,7 @@ public virtual async Task
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -152,7 +152,7 @@ public virtual Response Get(Can
}
///
- /// Delete a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -186,7 +186,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
}
///
- /// Delete a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResourceCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResourceCollection.cs
index 3e823b947df1..34447b3c0f1f 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResourceCollection.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResourceCollection.cs
@@ -66,7 +66,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
///
///
- /// The name of private link resource.
+ /// The name of private link resource will be either topic, domain, partnerNamespace or namespace.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -103,7 +103,7 @@ public virtual async Task> GetAsync(
///
///
///
- /// The name of private link resource.
+ /// The name of private link resource will be either topic, domain, partnerNamespace or namespace.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -128,7 +128,7 @@ public virtual Response Get(string privateLin
}
///
- /// List all the private link resources under a topic, domain, or partner namespace.
+ /// List all the private link resources under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -152,7 +152,7 @@ public virtual AsyncPageable GetAllAsync(stri
}
///
- /// List all the private link resources under a topic, domain, or partner namespace.
+ /// List all the private link resources under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -188,7 +188,7 @@ public virtual Pageable GetAll(string filter
///
///
///
- /// The name of private link resource.
+ /// The name of private link resource will be either topic, domain, partnerNamespace or namespace.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -223,7 +223,7 @@ public virtual async Task> ExistsAsync(string privateLinkResource
///
///
///
- /// The name of private link resource.
+ /// The name of private link resource will be either topic, domain, partnerNamespace or namespace.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicResource.cs
index cba6185e040d..181807ba19e7 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicResource.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicResource.cs
@@ -150,7 +150,7 @@ public virtual EventGridTopicPrivateEndpointConnectionCollection GetEventGridTop
}
///
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -173,7 +173,7 @@ public virtual async Task
- /// Get a specific private endpoint connection under a topic, domain, or partner namespace.
+ /// Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace.
///
/// -
/// Request Path
@@ -215,7 +215,7 @@ public virtual EventGridTopicPrivateLinkResourceCollection GetEventGridTopicPriv
///
///
///
- /// The name of private link resource.
+ /// The name of private link resource will be either topic, domain, partnerNamespace or namespace.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -238,7 +238,7 @@ public virtual async Task> GetEventG
///
///
///
- /// The name of private link resource.
+ /// The name of private link resource will be either topic, domain, partnerNamespace or namespace.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// is null.
@@ -530,19 +530,19 @@ public virtual Response GetSharedAccessKeys(CancellationT
///
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Request body to regenerate key.
+ /// Request body to regenerate key.
/// The cancellation token to use.
- /// is null.
- public virtual async Task> RegenerateKeyAsync(WaitUntil waitUntil, TopicRegenerateKeyContent content, CancellationToken cancellationToken = default)
+ /// is null.
+ public virtual async Task> RegenerateKeyAsync(WaitUntil waitUntil, TopicRegenerateKeyRequest regenerateKeyRequest, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNull(regenerateKeyRequest, nameof(regenerateKeyRequest));
using var scope = _eventGridTopicTopicsClientDiagnostics.CreateScope("EventGridTopicResource.RegenerateKey");
scope.Start();
try
{
- var response = await _eventGridTopicTopicsRestClient.RegenerateKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false);
- var operation = new EventGridArmOperation(new TopicSharedAccessKeysOperationSource(), _eventGridTopicTopicsClientDiagnostics, Pipeline, _eventGridTopicTopicsRestClient.CreateRegenerateKeyRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location);
+ var response = await _eventGridTopicTopicsRestClient.RegenerateKeyAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, regenerateKeyRequest, cancellationToken).ConfigureAwait(false);
+ var operation = new EventGridArmOperation(new TopicSharedAccessKeysOperationSource(), _eventGridTopicTopicsClientDiagnostics, Pipeline, _eventGridTopicTopicsRestClient.CreateRegenerateKeyRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, regenerateKeyRequest).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -568,19 +568,19 @@ public virtual async Task> RegenerateKeyAsyn
///
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- /// Request body to regenerate key.
+ /// Request body to regenerate key.
/// The cancellation token to use.
- /// is null.
- public virtual ArmOperation RegenerateKey(WaitUntil waitUntil, TopicRegenerateKeyContent content, CancellationToken cancellationToken = default)
+ /// is null.
+ public virtual ArmOperation RegenerateKey(WaitUntil waitUntil, TopicRegenerateKeyRequest regenerateKeyRequest, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNull(content, nameof(content));
+ Argument.AssertNotNull(regenerateKeyRequest, nameof(regenerateKeyRequest));
using var scope = _eventGridTopicTopicsClientDiagnostics.CreateScope("EventGridTopicResource.RegenerateKey");
scope.Start();
try
{
- var response = _eventGridTopicTopicsRestClient.RegenerateKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken);
- var operation = new EventGridArmOperation(new TopicSharedAccessKeysOperationSource(), _eventGridTopicTopicsClientDiagnostics, Pipeline, _eventGridTopicTopicsRestClient.CreateRegenerateKeyRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location);
+ var response = _eventGridTopicTopicsRestClient.RegenerateKey(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, regenerateKeyRequest, cancellationToken);
+ var operation = new EventGridArmOperation(new TopicSharedAccessKeysOperationSource(), _eventGridTopicTopicsClientDiagnostics, Pipeline, _eventGridTopicTopicsRestClient.CreateRegenerateKeyRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, regenerateKeyRequest).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionCollection.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionCollection.cs
index c58aee9a80db..f6f8c99e3730 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionCollection.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionCollection.cs
@@ -243,7 +243,7 @@ public virtual Response Get(string eventSubscriptionN
/// 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)
{
- if (Id.ResourceType == SubscriptionResource.ResourceType)
+ if (Id.ResourceType == Resources.SubscriptionResource.ResourceType)
{
HttpMessage FirstPageRequest(int? pageSizeHint) => _eventSubscriptionRestClient.CreateListGlobalBySubscriptionRequest(Id.SubscriptionId, filter, top);
HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventSubscriptionRestClient.CreateListGlobalBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top);
@@ -312,7 +312,7 @@ public virtual AsyncPageable GetAllAsync(string filte
/// 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)
{
- if (Id.ResourceType == SubscriptionResource.ResourceType)
+ if (Id.ResourceType == Resources.SubscriptionResource.ResourceType)
{
HttpMessage FirstPageRequest(int? pageSizeHint) => _eventSubscriptionRestClient.CreateListGlobalBySubscriptionRequest(Id.SubscriptionId, filter, top);
HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _eventSubscriptionRestClient.CreateListGlobalBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top);
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionResource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionResource.cs
index 8abbc1a75e35..7e6b61fc6423 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionResource.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionResource.cs
@@ -295,6 +295,48 @@ public virtual ArmOperation Update(WaitUntil waitUnti
}
}
+ ///
+ /// Get all delivery attributes for an event subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes
+ ///
+ /// -
+ /// Operation Id
+ /// EventSubscriptions_GetDeliveryAttributes
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetDeliveryAttributesAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _eventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.Parent, Id.Name);
+ return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping, _eventSubscriptionClientDiagnostics, Pipeline, "EventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken);
+ }
+
+ ///
+ /// Get all delivery attributes for an event subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes
+ ///
+ /// -
+ /// Operation Id
+ /// EventSubscriptions_GetDeliveryAttributes
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetDeliveryAttributes(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _eventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.Parent, Id.Name);
+ return PageableHelpers.CreatePageable(FirstPageRequest, null, DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping, _eventSubscriptionClientDiagnostics, Pipeline, "EventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken);
+ }
+
///
/// Get the full endpoint URL for an event subscription.
///
@@ -354,47 +396,5 @@ public virtual Response GetFullUri(CancellationToken c
throw;
}
}
-
- ///
- /// Get all delivery attributes for an event subscription.
- ///
- /// -
- /// Request Path
- /// /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes
- ///
- /// -
- /// Operation Id
- /// EventSubscriptions_GetDeliveryAttributes
- ///
- ///
- ///
- /// The cancellation token to use.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetDeliveryAttributesAsync(CancellationToken cancellationToken = default)
- {
- HttpMessage FirstPageRequest(int? pageSizeHint) => _eventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.Parent, Id.Name);
- return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping, _eventSubscriptionClientDiagnostics, Pipeline, "EventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken);
- }
-
- ///
- /// Get all delivery attributes for an event subscription.
- ///
- /// -
- /// Request Path
- /// /{scope}/providers/Microsoft.EventGrid/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes
- ///
- /// -
- /// Operation Id
- /// EventSubscriptions_GetDeliveryAttributes
- ///
- ///
- ///
- /// The cancellation token to use.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetDeliveryAttributes(CancellationToken cancellationToken = default)
- {
- HttpMessage FirstPageRequest(int? pageSizeHint) => _eventSubscriptionRestClient.CreateGetDeliveryAttributesRequest(Id.Parent, Id.Name);
- return PageableHelpers.CreatePageable(FirstPageRequest, null, DeliveryAttributeMapping.DeserializeDeliveryAttributeMapping, _eventSubscriptionClientDiagnostics, Pipeline, "EventSubscriptionResource.GetDeliveryAttributes", "value", null, cancellationToken);
- }
}
}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/EventGridExtensions.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/EventGridExtensions.cs
index 8195ec15ffdf..001da3d816d1 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/EventGridExtensions.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/EventGridExtensions.cs
@@ -82,6 +82,25 @@ private static TenantResourceExtensionClient GetTenantResourceExtensionClient(Ar
return new TenantResourceExtensionClient(client, scope);
});
}
+ #region CaCertificateResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static CaCertificateResource GetCaCertificateResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ CaCertificateResource.ValidateResourceId(id);
+ return new CaCertificateResource(client, id);
+ }
+ );
+ }
+ #endregion
+
#region PartnerNamespaceChannelResource
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
@@ -101,6 +120,44 @@ public static PartnerNamespaceChannelResource GetPartnerNamespaceChannelResource
}
#endregion
+ #region ClientGroupResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static ClientGroupResource GetClientGroupResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ ClientGroupResource.ValidateResourceId(id);
+ return new ClientGroupResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region ClientResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static ClientResource GetClientResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ ClientResource.ValidateResourceId(id);
+ return new ClientResource(client, id);
+ }
+ );
+ }
+ #endregion
+
#region EventGridDomainResource
///
/// Gets an object representing an along with the instance operations that can be performed on it but with no data.
@@ -139,6 +196,25 @@ public static DomainTopicResource GetDomainTopicResource(this ArmClient client,
}
#endregion
+ #region DomainTopicEventSubscriptionResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static DomainTopicEventSubscriptionResource GetDomainTopicEventSubscriptionResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ DomainTopicEventSubscriptionResource.ValidateResourceId(id);
+ return new DomainTopicEventSubscriptionResource(client, id);
+ }
+ );
+ }
+ #endregion
+
#region TopicEventSubscriptionResource
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
@@ -196,25 +272,6 @@ public static EventSubscriptionResource GetEventSubscriptionResource(this ArmCli
}
#endregion
- #region DomainTopicEventSubscriptionResource
- ///
- /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
- /// You can use to create a from its components.
- ///
- /// The instance the method will execute against.
- /// The resource ID of the resource to get.
- /// Returns a object.
- public static DomainTopicEventSubscriptionResource GetDomainTopicEventSubscriptionResource(this ArmClient client, ResourceIdentifier id)
- {
- return client.GetResourceClient(() =>
- {
- DomainTopicEventSubscriptionResource.ValidateResourceId(id);
- return new DomainTopicEventSubscriptionResource(client, id);
- }
- );
- }
- #endregion
-
#region SystemTopicEventSubscriptionResource
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
@@ -253,20 +310,58 @@ public static PartnerTopicEventSubscriptionResource GetPartnerTopicEventSubscrip
}
#endregion
- #region EventGridTopicResource
+ #region SubscriptionResource
///
- /// Gets an object representing an along with the instance operations that can be performed on it but with no data.
- /// You can use to create an from its components.
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
///
/// The instance the method will execute against.
/// The resource ID of the resource to get.
- /// Returns a object.
- public static EventGridTopicResource GetEventGridTopicResource(this ArmClient client, ResourceIdentifier id)
+ /// Returns a object.
+ public static SubscriptionResource GetSubscriptionResource(this ArmClient client, ResourceIdentifier id)
{
return client.GetResourceClient(() =>
{
- EventGridTopicResource.ValidateResourceId(id);
- return new EventGridTopicResource(client, id);
+ SubscriptionResource.ValidateResourceId(id);
+ return new SubscriptionResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region NamespaceResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static NamespaceResource GetNamespaceResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ NamespaceResource.ValidateResourceId(id);
+ return new NamespaceResource(client, id);
+ }
+ );
+ }
+ #endregion
+
+ #region NamespaceTopicResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static NamespaceTopicResource GetNamespaceTopicResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ NamespaceTopicResource.ValidateResourceId(id);
+ return new NamespaceTopicResource(client, id);
}
);
}
@@ -291,6 +386,25 @@ public static PartnerConfigurationResource GetPartnerConfigurationResource(this
}
#endregion
+ #region PartnerDestinationResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static PartnerDestinationResource GetPartnerDestinationResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ PartnerDestinationResource.ValidateResourceId(id);
+ return new PartnerDestinationResource(client, id);
+ }
+ );
+ }
+ #endregion
+
#region PartnerNamespaceResource
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
@@ -348,6 +462,25 @@ public static PartnerTopicResource GetPartnerTopicResource(this ArmClient client
}
#endregion
+ #region PermissionBindingResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static PermissionBindingResource GetPermissionBindingResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ PermissionBindingResource.ValidateResourceId(id);
+ return new PermissionBindingResource(client, id);
+ }
+ );
+ }
+ #endregion
+
#region EventGridTopicPrivateEndpointConnectionResource
///
/// Gets an object representing an along with the instance operations that can be performed on it but with no data.
@@ -481,6 +614,25 @@ public static SystemTopicResource GetSystemTopicResource(this ArmClient client,
}
#endregion
+ #region EventGridTopicResource
+ ///
+ /// Gets an object representing an along with the instance operations that can be performed on it but with no data.
+ /// You can use to create an from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static EventGridTopicResource GetEventGridTopicResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ EventGridTopicResource.ValidateResourceId(id);
+ return new EventGridTopicResource(client, id);
+ }
+ );
+ }
+ #endregion
+
#region ExtensionTopicResource
///
/// Gets an object representing an along with the instance operations that can be performed on it but with no data.
@@ -500,6 +652,25 @@ public static ExtensionTopicResource GetExtensionTopicResource(this ArmClient cl
}
#endregion
+ #region TopicSpaceResource
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public static TopicSpaceResource GetTopicSpaceResource(this ArmClient client, ResourceIdentifier id)
+ {
+ return client.GetResourceClient(() =>
+ {
+ TopicSpaceResource.ValidateResourceId(id);
+ return new TopicSpaceResource(client, id);
+ }
+ );
+ }
+ #endregion
+
#region TopicTypeResource
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
@@ -662,60 +833,60 @@ public static Response GetEventGridDomain(this Resource
return resourceGroupResource.GetEventGridDomains().Get(domainName, cancellationToken);
}
- /// Gets a collection of EventGridTopicResources in the ResourceGroupResource.
+ /// Gets a collection of NamespaceResources in the ResourceGroupResource.
/// The instance the method will execute against.
- /// An object representing collection of EventGridTopicResources and their operations over a EventGridTopicResource.
- public static EventGridTopicCollection GetEventGridTopics(this ResourceGroupResource resourceGroupResource)
+ /// An object representing collection of NamespaceResources and their operations over a NamespaceResource.
+ public static NamespaceCollection GetNamespaces(this ResourceGroupResource resourceGroupResource)
{
- return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetEventGridTopics();
+ return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetNamespaces();
}
///
- /// Get properties of a topic.
+ /// Get properties of a namespace.
///
/// -
/// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}
///
/// -
/// Operation Id
- /// Topics_Get
+ /// Namespaces_Get
///
///
///
/// The instance the method will execute against.
- /// Name of the topic.
+ /// Name of the namespace.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
- public static async Task> GetEventGridTopicAsync(this ResourceGroupResource resourceGroupResource, string topicName, CancellationToken cancellationToken = default)
+ public static async Task> GetNamespaceAsync(this ResourceGroupResource resourceGroupResource, string namespaceName, CancellationToken cancellationToken = default)
{
- return await resourceGroupResource.GetEventGridTopics().GetAsync(topicName, cancellationToken).ConfigureAwait(false);
+ return await resourceGroupResource.GetNamespaces().GetAsync(namespaceName, cancellationToken).ConfigureAwait(false);
}
///
- /// Get properties of a topic.
+ /// Get properties of a namespace.
///
/// -
/// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/namespaces/{namespaceName}
///
/// -
/// Operation Id
- /// Topics_Get
+ /// Namespaces_Get
///
///
///
/// The instance the method will execute against.
- /// Name of the topic.
+ /// Name of the namespace.
/// The cancellation token to use.
- /// is an empty string, and was expected to be non-empty.
- /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
[ForwardsClientCalls]
- public static Response GetEventGridTopic(this ResourceGroupResource resourceGroupResource, string topicName, CancellationToken cancellationToken = default)
+ public static Response GetNamespace(this ResourceGroupResource resourceGroupResource, string namespaceName, CancellationToken cancellationToken = default)
{
- return resourceGroupResource.GetEventGridTopics().Get(topicName, cancellationToken);
+ return resourceGroupResource.GetNamespaces().Get(namespaceName, cancellationToken);
}
/// Gets an object representing a PartnerConfigurationResource along with the instance operations that can be performed on it in the ResourceGroupResource.
@@ -726,6 +897,62 @@ public static PartnerConfigurationResource GetPartnerConfiguration(this Resource
return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetPartnerConfiguration();
}
+ /// Gets a collection of PartnerDestinationResources in the ResourceGroupResource.
+ /// The instance the method will execute against.
+ /// An object representing collection of PartnerDestinationResources and their operations over a PartnerDestinationResource.
+ public static PartnerDestinationCollection GetPartnerDestinations(this ResourceGroupResource resourceGroupResource)
+ {
+ return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetPartnerDestinations();
+ }
+
+ ///
+ /// Get properties of a partner destination.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}
+ ///
+ /// -
+ /// Operation Id
+ /// PartnerDestinations_Get
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Name of the partner destination.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public static async Task> GetPartnerDestinationAsync(this ResourceGroupResource resourceGroupResource, string partnerDestinationName, CancellationToken cancellationToken = default)
+ {
+ return await resourceGroupResource.GetPartnerDestinations().GetAsync(partnerDestinationName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get properties of a partner destination.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}
+ ///
+ /// -
+ /// Operation Id
+ /// PartnerDestinations_Get
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Name of the partner destination.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public static Response GetPartnerDestination(this ResourceGroupResource resourceGroupResource, string partnerDestinationName, CancellationToken cancellationToken = default)
+ {
+ return resourceGroupResource.GetPartnerDestinations().Get(partnerDestinationName, cancellationToken);
+ }
+
/// Gets a collection of PartnerNamespaceResources in the ResourceGroupResource.
/// The instance the method will execute against.
/// An object representing collection of PartnerNamespaceResources and their operations over a PartnerNamespaceResource.
@@ -950,6 +1177,62 @@ public static Response GetSystemTopic(this ResourceGroupRes
return resourceGroupResource.GetSystemTopics().Get(systemTopicName, cancellationToken);
}
+ /// Gets a collection of EventGridTopicResources in the ResourceGroupResource.
+ /// The instance the method will execute against.
+ /// An object representing collection of EventGridTopicResources and their operations over a EventGridTopicResource.
+ public static EventGridTopicCollection GetEventGridTopics(this ResourceGroupResource resourceGroupResource)
+ {
+ return GetResourceGroupResourceExtensionClient(resourceGroupResource).GetEventGridTopics();
+ }
+
+ ///
+ /// Get properties of a topic.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}
+ ///
+ /// -
+ /// Operation Id
+ /// Topics_Get
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Name of the topic.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public static async Task> GetEventGridTopicAsync(this ResourceGroupResource resourceGroupResource, string topicName, CancellationToken cancellationToken = default)
+ {
+ return await resourceGroupResource.GetEventGridTopics().GetAsync(topicName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get properties of a topic.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/topics/{topicName}
+ ///
+ /// -
+ /// Operation Id
+ /// Topics_Get
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Name of the topic.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ [ForwardsClientCalls]
+ public static Response GetEventGridTopic(this ResourceGroupResource resourceGroupResource, string topicName, CancellationToken cancellationToken = default)
+ {
+ return resourceGroupResource.GetEventGridTopics().Get(topicName, cancellationToken);
+ }
+
///
/// List all the domains under an Azure subscription.
///
@@ -963,12 +1246,12 @@ public static Response GetSystemTopic(this ResourceGroupRes
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// 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.
/// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetEventGridDomainsAsync(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ public static AsyncPageable GetEventGridDomainsAsync(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetEventGridDomainsAsync(filter, top, cancellationToken);
}
@@ -986,60 +1269,222 @@ public static AsyncPageable GetEventGridDomainsAsync(th
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// 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.
/// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetEventGridDomains(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ public static Pageable GetEventGridDomains(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetEventGridDomains(filter, top, cancellationToken);
}
///
- /// List all the topics under an Azure subscription.
+ /// List all global event subscriptions under an Azure subscription for a topic type.
///
/// -
/// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions
///
/// -
/// Operation Id
- /// Topics_ListBySubscription
+ /// EventSubscriptions_ListGlobalBySubscriptionForTopicType
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
+ /// Name of the topic type.
/// 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.
- /// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetEventGridTopicsAsync(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetGlobalEventSubscriptionsDataForTopicTypeAsync(this Resources.SubscriptionResource subscriptionResource, string topicTypeName, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
- return GetSubscriptionResourceExtensionClient(subscriptionResource).GetEventGridTopicsAsync(filter, top, cancellationToken);
+ Argument.AssertNotNullOrEmpty(topicTypeName, nameof(topicTypeName));
+
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetGlobalEventSubscriptionsDataForTopicTypeAsync(topicTypeName, filter, top, cancellationToken);
}
///
- /// List all the topics under an Azure subscription.
+ /// List all global event subscriptions under an Azure subscription for a topic type.
///
/// -
/// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topicTypes/{topicTypeName}/eventSubscriptions
///
/// -
/// Operation Id
- /// Topics_ListBySubscription
+ /// EventSubscriptions_ListGlobalBySubscriptionForTopicType
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
+ /// Name of the topic type.
/// 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.
- /// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetEventGridTopics(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetGlobalEventSubscriptionsDataForTopicType(this Resources.SubscriptionResource subscriptionResource, string topicTypeName, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
- return GetSubscriptionResourceExtensionClient(subscriptionResource).GetEventGridTopics(filter, top, cancellationToken);
+ Argument.AssertNotNullOrEmpty(topicTypeName, nameof(topicTypeName));
+
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetGlobalEventSubscriptionsDataForTopicType(topicTypeName, filter, top, cancellationToken);
+ }
+
+ ///
+ /// List all event subscriptions from the given location under a specific Azure subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions
+ ///
+ /// -
+ /// Operation Id
+ /// EventSubscriptions_ListRegionalBySubscription
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Name of the location.
+ /// 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.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetRegionalEventSubscriptionsDataAsync(this Resources.SubscriptionResource subscriptionResource, AzureLocation location, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetRegionalEventSubscriptionsDataAsync(location, filter, top, cancellationToken);
+ }
+
+ ///
+ /// List all event subscriptions from the given location under a specific Azure subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/eventSubscriptions
+ ///
+ /// -
+ /// Operation Id
+ /// EventSubscriptions_ListRegionalBySubscription
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Name of the location.
+ /// 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.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetRegionalEventSubscriptionsData(this Resources.SubscriptionResource subscriptionResource, AzureLocation location, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetRegionalEventSubscriptionsData(location, filter, top, cancellationToken);
+ }
+
+ ///
+ /// List all event subscriptions from the given location under a specific Azure subscription and topic type.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions
+ ///
+ /// -
+ /// Operation Id
+ /// EventSubscriptions_ListRegionalBySubscriptionForTopicType
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Name of the location.
+ /// Name of the topic type.
+ /// 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.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetRegionalEventSubscriptionsDataForTopicTypeAsync(this Resources.SubscriptionResource subscriptionResource, AzureLocation location, string topicTypeName, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(topicTypeName, nameof(topicTypeName));
+
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetRegionalEventSubscriptionsDataForTopicTypeAsync(location, topicTypeName, filter, top, cancellationToken);
+ }
+
+ ///
+ /// List all event subscriptions from the given location under a specific Azure subscription and topic type.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/locations/{location}/topicTypes/{topicTypeName}/eventSubscriptions
+ ///
+ /// -
+ /// Operation Id
+ /// EventSubscriptions_ListRegionalBySubscriptionForTopicType
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// Name of the location.
+ /// Name of the topic type.
+ /// 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.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetRegionalEventSubscriptionsDataForTopicType(this Resources.SubscriptionResource subscriptionResource, AzureLocation location, string topicTypeName, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(topicTypeName, nameof(topicTypeName));
+
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetRegionalEventSubscriptionsDataForTopicType(location, topicTypeName, filter, top, cancellationToken);
+ }
+
+ ///
+ /// List all the namespaces under an Azure subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/namespaces
+ ///
+ /// -
+ /// Operation Id
+ /// Namespaces_ListBySubscription
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// 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.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetNamespacesAsync(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNamespacesAsync(filter, top, cancellationToken);
+ }
+
+ ///
+ /// List all the namespaces under an Azure subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/namespaces
+ ///
+ /// -
+ /// Operation Id
+ /// Namespaces_ListBySubscription
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// 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.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetNamespaces(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetNamespaces(filter, top, cancellationToken);
}
///
@@ -1055,12 +1500,12 @@ public static Pageable GetEventGridTopics(this Subscript
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// 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.
/// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetPartnerConfigurationsAsync(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ public static AsyncPageable GetPartnerConfigurationsAsync(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetPartnerConfigurationsAsync(filter, top, cancellationToken);
}
@@ -1078,16 +1523,62 @@ public static AsyncPageable GetPartnerConfiguratio
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// 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.
/// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetPartnerConfigurations(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ public static Pageable GetPartnerConfigurations(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetPartnerConfigurations(filter, top, cancellationToken);
}
+ ///
+ /// List all the partner destinations under an Azure subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations
+ ///
+ /// -
+ /// Operation Id
+ /// PartnerDestinations_ListBySubscription
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// 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.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetPartnerDestinationsAsync(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetPartnerDestinationsAsync(filter, top, cancellationToken);
+ }
+
+ ///
+ /// List all the partner destinations under an Azure subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations
+ ///
+ /// -
+ /// Operation Id
+ /// PartnerDestinations_ListBySubscription
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// 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.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetPartnerDestinations(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetPartnerDestinations(filter, top, cancellationToken);
+ }
+
///
/// List all the partner namespaces under an Azure subscription.
///
@@ -1101,12 +1592,12 @@ public static Pageable GetPartnerConfigurations(th
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// 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.
/// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetPartnerNamespacesAsync(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ public static AsyncPageable GetPartnerNamespacesAsync(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetPartnerNamespacesAsync(filter, top, cancellationToken);
}
@@ -1124,12 +1615,12 @@ public static AsyncPageable GetPartnerNamespacesAsync(
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// 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.
/// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetPartnerNamespaces(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ public static Pageable GetPartnerNamespaces(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetPartnerNamespaces(filter, top, cancellationToken);
}
@@ -1147,12 +1638,12 @@ public static Pageable GetPartnerNamespaces(this Subsc
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// 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.
/// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetPartnerRegistrationsAsync(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ public static AsyncPageable GetPartnerRegistrationsAsync(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetPartnerRegistrationsAsync(filter, top, cancellationToken);
}
@@ -1170,12 +1661,12 @@ public static AsyncPageable GetPartnerRegistrations
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// 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.
/// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetPartnerRegistrations(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ public static Pageable GetPartnerRegistrations(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetPartnerRegistrations(filter, top, cancellationToken);
}
@@ -1193,12 +1684,12 @@ public static Pageable GetPartnerRegistrations(this
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// 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.
/// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetPartnerTopicsAsync(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ public static AsyncPageable GetPartnerTopicsAsync(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetPartnerTopicsAsync(filter, top, cancellationToken);
}
@@ -1216,12 +1707,12 @@ public static AsyncPageable GetPartnerTopicsAsync(this Sub
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// 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.
/// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetPartnerTopics(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ public static Pageable GetPartnerTopics(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetPartnerTopics(filter, top, cancellationToken);
}
@@ -1239,12 +1730,12 @@ public static Pageable GetPartnerTopics(this SubscriptionR
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// 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.
/// An async collection of that may take multiple service requests to iterate over.
- public static AsyncPageable GetSystemTopicsAsync(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ public static AsyncPageable GetSystemTopicsAsync(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetSystemTopicsAsync(filter, top, cancellationToken);
}
@@ -1262,16 +1753,62 @@ public static AsyncPageable GetSystemTopicsAsync(this Subsc
///
///
///
- /// The instance the method will execute against.
+ /// The instance the method will execute against.
/// 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.
/// A collection of that may take multiple service requests to iterate over.
- public static Pageable GetSystemTopics(this SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ public static Pageable GetSystemTopics(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
return GetSubscriptionResourceExtensionClient(subscriptionResource).GetSystemTopics(filter, top, cancellationToken);
}
+ ///
+ /// List all the topics under an Azure subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics
+ ///
+ /// -
+ /// Operation Id
+ /// Topics_ListBySubscription
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// 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.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetEventGridTopicsAsync(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetEventGridTopicsAsync(filter, top, cancellationToken);
+ }
+
+ ///
+ /// List all the topics under an Azure subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics
+ ///
+ /// -
+ /// Operation Id
+ /// Topics_ListBySubscription
+ ///
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// 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.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetEventGridTopics(this Resources.SubscriptionResource subscriptionResource, string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ return GetSubscriptionResourceExtensionClient(subscriptionResource).GetEventGridTopics(filter, top, cancellationToken);
+ }
+
/// Gets a collection of TopicTypeResources in the TenantResource.
/// The instance the method will execute against.
/// An object representing collection of TopicTypeResources and their operations over a TopicTypeResource.
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs
index 8e4c0f582bd3..132ac941b402 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/ResourceGroupResourceExtensionClient.cs
@@ -52,11 +52,11 @@ public virtual EventGridDomainCollection GetEventGridDomains()
return GetCachedClient(Client => new EventGridDomainCollection(Client, Id));
}
- /// Gets a collection of EventGridTopicResources in the ResourceGroupResource.
- /// An object representing collection of EventGridTopicResources and their operations over a EventGridTopicResource.
- public virtual EventGridTopicCollection GetEventGridTopics()
+ /// Gets a collection of NamespaceResources in the ResourceGroupResource.
+ /// An object representing collection of NamespaceResources and their operations over a NamespaceResource.
+ public virtual NamespaceCollection GetNamespaces()
{
- return GetCachedClient(Client => new EventGridTopicCollection(Client, Id));
+ return GetCachedClient(Client => new NamespaceCollection(Client, Id));
}
/// Gets an object representing a PartnerConfigurationResource along with the instance operations that can be performed on it in the ResourceGroupResource.
@@ -66,6 +66,13 @@ public virtual PartnerConfigurationResource GetPartnerConfiguration()
return new PartnerConfigurationResource(Client, Id.AppendProviderResource("Microsoft.EventGrid", "partnerConfigurations", "default"));
}
+ /// Gets a collection of PartnerDestinationResources in the ResourceGroupResource.
+ /// An object representing collection of PartnerDestinationResources and their operations over a PartnerDestinationResource.
+ public virtual PartnerDestinationCollection GetPartnerDestinations()
+ {
+ return GetCachedClient(Client => new PartnerDestinationCollection(Client, Id));
+ }
+
/// Gets a collection of PartnerNamespaceResources in the ResourceGroupResource.
/// An object representing collection of PartnerNamespaceResources and their operations over a PartnerNamespaceResource.
public virtual PartnerNamespaceCollection GetPartnerNamespaces()
@@ -94,6 +101,13 @@ public virtual SystemTopicCollection GetSystemTopics()
return GetCachedClient(Client => new SystemTopicCollection(Client, Id));
}
+ /// Gets a collection of EventGridTopicResources in the ResourceGroupResource.
+ /// An object representing collection of EventGridTopicResources and their operations over a EventGridTopicResource.
+ public virtual EventGridTopicCollection GetEventGridTopics()
+ {
+ return GetCachedClient(Client => new EventGridTopicCollection(Client, Id));
+ }
+
///
/// List event types for a topic.
///
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs
index efdf348f58b5..e51509089e75 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs
@@ -20,10 +20,12 @@ internal partial class SubscriptionResourceExtensionClient : ArmResource
private DomainsRestOperations _eventGridDomainDomainsRestClient;
private ClientDiagnostics _eventSubscriptionClientDiagnostics;
private EventSubscriptionsRestOperations _eventSubscriptionRestClient;
- private ClientDiagnostics _eventGridTopicTopicsClientDiagnostics;
- private TopicsRestOperations _eventGridTopicTopicsRestClient;
+ private ClientDiagnostics _namespaceClientDiagnostics;
+ private NamespacesRestOperations _namespaceRestClient;
private ClientDiagnostics _partnerConfigurationClientDiagnostics;
private PartnerConfigurationsRestOperations _partnerConfigurationRestClient;
+ private ClientDiagnostics _partnerDestinationClientDiagnostics;
+ private PartnerDestinationsRestOperations _partnerDestinationRestClient;
private ClientDiagnostics _partnerNamespaceClientDiagnostics;
private PartnerNamespacesRestOperations _partnerNamespaceRestClient;
private ClientDiagnostics _partnerRegistrationClientDiagnostics;
@@ -32,6 +34,8 @@ internal partial class SubscriptionResourceExtensionClient : ArmResource
private PartnerTopicsRestOperations _partnerTopicRestClient;
private ClientDiagnostics _systemTopicClientDiagnostics;
private SystemTopicsRestOperations _systemTopicRestClient;
+ private ClientDiagnostics _eventGridTopicTopicsClientDiagnostics;
+ private TopicsRestOperations _eventGridTopicTopicsRestClient;
/// Initializes a new instance of the class for mocking.
protected SubscriptionResourceExtensionClient()
@@ -49,10 +53,12 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie
private DomainsRestOperations EventGridDomainDomainsRestClient => _eventGridDomainDomainsRestClient ??= new DomainsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EventGridDomainResource.ResourceType));
private ClientDiagnostics EventSubscriptionClientDiagnostics => _eventSubscriptionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", EventSubscriptionResource.ResourceType.Namespace, Diagnostics);
private EventSubscriptionsRestOperations EventSubscriptionRestClient => _eventSubscriptionRestClient ??= new EventSubscriptionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EventSubscriptionResource.ResourceType));
- private ClientDiagnostics EventGridTopicTopicsClientDiagnostics => _eventGridTopicTopicsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", EventGridTopicResource.ResourceType.Namespace, Diagnostics);
- private TopicsRestOperations EventGridTopicTopicsRestClient => _eventGridTopicTopicsRestClient ??= new TopicsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EventGridTopicResource.ResourceType));
+ private ClientDiagnostics NamespaceClientDiagnostics => _namespaceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", NamespaceResource.ResourceType.Namespace, Diagnostics);
+ private NamespacesRestOperations NamespaceRestClient => _namespaceRestClient ??= new NamespacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NamespaceResource.ResourceType));
private ClientDiagnostics PartnerConfigurationClientDiagnostics => _partnerConfigurationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", PartnerConfigurationResource.ResourceType.Namespace, Diagnostics);
private PartnerConfigurationsRestOperations PartnerConfigurationRestClient => _partnerConfigurationRestClient ??= new PartnerConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(PartnerConfigurationResource.ResourceType));
+ private ClientDiagnostics PartnerDestinationClientDiagnostics => _partnerDestinationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", PartnerDestinationResource.ResourceType.Namespace, Diagnostics);
+ private PartnerDestinationsRestOperations PartnerDestinationRestClient => _partnerDestinationRestClient ??= new PartnerDestinationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(PartnerDestinationResource.ResourceType));
private ClientDiagnostics PartnerNamespaceClientDiagnostics => _partnerNamespaceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", PartnerNamespaceResource.ResourceType.Namespace, Diagnostics);
private PartnerNamespacesRestOperations PartnerNamespaceRestClient => _partnerNamespaceRestClient ??= new PartnerNamespacesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(PartnerNamespaceResource.ResourceType));
private ClientDiagnostics PartnerRegistrationClientDiagnostics => _partnerRegistrationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", PartnerRegistrationResource.ResourceType.Namespace, Diagnostics);
@@ -61,6 +67,8 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie
private PartnerTopicsRestOperations PartnerTopicRestClient => _partnerTopicRestClient ??= new PartnerTopicsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(PartnerTopicResource.ResourceType));
private ClientDiagnostics SystemTopicClientDiagnostics => _systemTopicClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", SystemTopicResource.ResourceType.Namespace, Diagnostics);
private SystemTopicsRestOperations SystemTopicRestClient => _systemTopicRestClient ??= new SystemTopicsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SystemTopicResource.ResourceType));
+ private ClientDiagnostics EventGridTopicTopicsClientDiagnostics => _eventGridTopicTopicsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.EventGrid", EventGridTopicResource.ResourceType.Namespace, Diagnostics);
+ private TopicsRestOperations EventGridTopicTopicsRestClient => _eventGridTopicTopicsRestClient ??= new TopicsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(EventGridTopicResource.ResourceType));
private string GetApiVersionOrNull(ResourceType resourceType)
{
@@ -117,51 +125,51 @@ public virtual Pageable GetEventGridDomains(string filt
}
///
- /// List all the topics under an Azure subscription.
+ /// List all the namespaces under an Azure subscription.
///
/// -
/// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/namespaces
///
/// -
/// Operation Id
- /// Topics_ListBySubscription
+ /// Namespaces_ListBySubscription
///
///
///
/// 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.
- /// An async collection of that may take multiple service requests to iterate over.
- public virtual AsyncPageable GetEventGridTopicsAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetNamespacesAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
- HttpMessage FirstPageRequest(int? pageSizeHint) => EventGridTopicTopicsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EventGridTopicTopicsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top);
- return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventGridTopicResource(Client, EventGridTopicData.DeserializeEventGridTopicData(e)), EventGridTopicTopicsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetEventGridTopics", "value", "nextLink", cancellationToken);
+ HttpMessage FirstPageRequest(int? pageSizeHint) => NamespaceRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NamespaceRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top);
+ return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NamespaceResource(Client, NamespaceData.DeserializeNamespaceData(e)), NamespaceClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNamespaces", "value", "nextLink", cancellationToken);
}
///
- /// List all the topics under an Azure subscription.
+ /// List all the namespaces under an Azure subscription.
///
/// -
/// Request Path
- /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/namespaces
///
/// -
/// Operation Id
- /// Topics_ListBySubscription
+ /// Namespaces_ListBySubscription
///
///
///
/// 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.
- /// A collection of that may take multiple service requests to iterate over.
- public virtual Pageable GetEventGridTopics(string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetNamespaces(string filter = null, int? top = null, CancellationToken cancellationToken = default)
{
- HttpMessage FirstPageRequest(int? pageSizeHint) => EventGridTopicTopicsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top);
- HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EventGridTopicTopicsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top);
- return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventGridTopicResource(Client, EventGridTopicData.DeserializeEventGridTopicData(e)), EventGridTopicTopicsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetEventGridTopics", "value", "nextLink", cancellationToken);
+ HttpMessage FirstPageRequest(int? pageSizeHint) => NamespaceRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => NamespaceRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top);
+ return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NamespaceResource(Client, NamespaceData.DeserializeNamespaceData(e)), NamespaceClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetNamespaces", "value", "nextLink", cancellationToken);
}
///
@@ -212,6 +220,54 @@ public virtual Pageable GetPartnerConfigurations(s
return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PartnerConfigurationResource(Client, PartnerConfigurationData.DeserializePartnerConfigurationData(e)), PartnerConfigurationClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetPartnerConfigurations", "value", "nextLink", cancellationToken);
}
+ ///
+ /// List all the partner destinations under an Azure subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations
+ ///
+ /// -
+ /// Operation Id
+ /// PartnerDestinations_ListBySubscription
+ ///
+ ///
+ ///
+ /// 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.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetPartnerDestinationsAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => PartnerDestinationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PartnerDestinationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top);
+ return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PartnerDestinationResource(Client, PartnerDestinationData.DeserializePartnerDestinationData(e)), PartnerDestinationClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetPartnerDestinations", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List all the partner destinations under an Azure subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations
+ ///
+ /// -
+ /// Operation Id
+ /// PartnerDestinations_ListBySubscription
+ ///
+ ///
+ ///
+ /// 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.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetPartnerDestinations(string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => PartnerDestinationRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PartnerDestinationRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top);
+ return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PartnerDestinationResource(Client, PartnerDestinationData.DeserializePartnerDestinationData(e)), PartnerDestinationClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetPartnerDestinations", "value", "nextLink", cancellationToken);
+ }
+
///
/// List all the partner namespaces under an Azure subscription.
///
@@ -403,5 +459,53 @@ public virtual Pageable GetSystemTopics(string filter = nul
HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SystemTopicRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top);
return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SystemTopicResource(Client, SystemTopicData.DeserializeSystemTopicData(e)), SystemTopicClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetSystemTopics", "value", "nextLink", cancellationToken);
}
+
+ ///
+ /// List all the topics under an Azure subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics
+ ///
+ /// -
+ /// Operation Id
+ /// Topics_ListBySubscription
+ ///
+ ///
+ ///
+ /// 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.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetEventGridTopicsAsync(string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => EventGridTopicTopicsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EventGridTopicTopicsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top);
+ return PageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new EventGridTopicResource(Client, EventGridTopicData.DeserializeEventGridTopicData(e)), EventGridTopicTopicsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetEventGridTopics", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// List all the topics under an Azure subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/topics
+ ///
+ /// -
+ /// Operation Id
+ /// Topics_ListBySubscription
+ ///
+ ///
+ ///
+ /// 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.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetEventGridTopics(string filter = null, int? top = null, CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => EventGridTopicTopicsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, filter, top);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => EventGridTopicTopicsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, filter, top);
+ return PageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new EventGridTopicResource(Client, EventGridTopicData.DeserializeEventGridTopicData(e)), EventGridTopicTopicsClientDiagnostics, Pipeline, "SubscriptionResourceExtensionClient.GetEventGridTopics", "value", "nextLink", cancellationToken);
+ }
}
}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/CaCertificateOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/CaCertificateOperationSource.cs
new file mode 100644
index 000000000000..93f135752874
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/CaCertificateOperationSource.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ internal class CaCertificateOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal CaCertificateOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ CaCertificateResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ var data = CaCertificateData.DeserializeCaCertificateData(document.RootElement);
+ return new CaCertificateResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ var data = CaCertificateData.DeserializeCaCertificateData(document.RootElement);
+ return new CaCertificateResource(_client, data);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/ClientGroupOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/ClientGroupOperationSource.cs
new file mode 100644
index 000000000000..47b587381d8f
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/ClientGroupOperationSource.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ internal class ClientGroupOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal ClientGroupOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ ClientGroupResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ var data = ClientGroupData.DeserializeClientGroupData(document.RootElement);
+ return new ClientGroupResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ var data = ClientGroupData.DeserializeClientGroupData(document.RootElement);
+ return new ClientGroupResource(_client, data);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/ClientOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/ClientOperationSource.cs
new file mode 100644
index 000000000000..21cb95df6a28
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/ClientOperationSource.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ internal class ClientOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal ClientOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ ClientResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ var data = ClientData.DeserializeClientData(document.RootElement);
+ return new ClientResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ var data = ClientData.DeserializeClientData(document.RootElement);
+ return new ClientResource(_client, data);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/NamespaceOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/NamespaceOperationSource.cs
new file mode 100644
index 000000000000..f6225800eab7
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/NamespaceOperationSource.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ internal class NamespaceOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal NamespaceOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ NamespaceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ var data = NamespaceData.DeserializeNamespaceData(document.RootElement);
+ return new NamespaceResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ var data = NamespaceData.DeserializeNamespaceData(document.RootElement);
+ return new NamespaceResource(_client, data);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/NamespaceSharedAccessKeysOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/NamespaceSharedAccessKeysOperationSource.cs
new file mode 100644
index 000000000000..9916f6859050
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/NamespaceSharedAccessKeysOperationSource.cs
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid.Models;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ internal class NamespaceSharedAccessKeysOperationSource : IOperationSource
+ {
+ NamespaceSharedAccessKeys IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ return NamespaceSharedAccessKeys.DeserializeNamespaceSharedAccessKeys(document.RootElement);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ return NamespaceSharedAccessKeys.DeserializeNamespaceSharedAccessKeys(document.RootElement);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/NamespaceTopicOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/NamespaceTopicOperationSource.cs
new file mode 100644
index 000000000000..9176a8175c06
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/NamespaceTopicOperationSource.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ internal class NamespaceTopicOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal NamespaceTopicOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ NamespaceTopicResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ var data = NamespaceTopicData.DeserializeNamespaceTopicData(document.RootElement);
+ return new NamespaceTopicResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ var data = NamespaceTopicData.DeserializeNamespaceTopicData(document.RootElement);
+ return new NamespaceTopicResource(_client, data);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/PartnerDestinationOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/PartnerDestinationOperationSource.cs
new file mode 100644
index 000000000000..fdc95fc24803
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/PartnerDestinationOperationSource.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ internal class PartnerDestinationOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal PartnerDestinationOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ PartnerDestinationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ var data = PartnerDestinationData.DeserializePartnerDestinationData(document.RootElement);
+ return new PartnerDestinationResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ var data = PartnerDestinationData.DeserializePartnerDestinationData(document.RootElement);
+ return new PartnerDestinationResource(_client, data);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/PermissionBindingOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/PermissionBindingOperationSource.cs
new file mode 100644
index 000000000000..f78ba20d9d7c
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/PermissionBindingOperationSource.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ internal class PermissionBindingOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal PermissionBindingOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ PermissionBindingResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ var data = PermissionBindingData.DeserializePermissionBindingData(document.RootElement);
+ return new PermissionBindingResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ var data = PermissionBindingData.DeserializePermissionBindingData(document.RootElement);
+ return new PermissionBindingResource(_client, data);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/SubscriptionOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/SubscriptionOperationSource.cs
new file mode 100644
index 000000000000..261f269ae5cc
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/SubscriptionOperationSource.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ internal class SubscriptionOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal SubscriptionOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ SubscriptionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ var data = SubscriptionData.DeserializeSubscriptionData(document.RootElement);
+ return new SubscriptionResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ var data = SubscriptionData.DeserializeSubscriptionData(document.RootElement);
+ return new SubscriptionResource(_client, data);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/TopicSpaceOperationSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/TopicSpaceOperationSource.cs
new file mode 100644
index 000000000000..db97a3d20bb4
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/LongRunningOperation/TopicSpaceOperationSource.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.ResourceManager;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ internal class TopicSpaceOperationSource : IOperationSource
+ {
+ private readonly ArmClient _client;
+
+ internal TopicSpaceOperationSource(ArmClient client)
+ {
+ _client = client;
+ }
+
+ TopicSpaceResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ using var document = JsonDocument.Parse(response.ContentStream);
+ var data = TopicSpaceData.DeserializeTopicSpaceData(document.RootElement);
+ return new TopicSpaceResource(_client, data);
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ var data = TopicSpaceData.DeserializeTopicSpaceData(document.RootElement);
+ return new TopicSpaceResource(_client, data);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AlternativeAuthenticationNameSource.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AlternativeAuthenticationNameSource.cs
new file mode 100644
index 000000000000..fb7e59c3339c
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AlternativeAuthenticationNameSource.cs
@@ -0,0 +1,60 @@
+// 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 AlternativeAuthenticationNameSource.
+ public readonly partial struct AlternativeAuthenticationNameSource : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public AlternativeAuthenticationNameSource(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string ClientCertificateSubjectValue = "ClientCertificateSubject";
+ private const string ClientCertificateDnsValue = "ClientCertificateDns";
+ private const string ClientCertificateUriValue = "ClientCertificateUri";
+ private const string ClientCertificateIPValue = "ClientCertificateIp";
+ private const string ClientCertificateEmailValue = "ClientCertificateEmail";
+
+ /// ClientCertificateSubject.
+ public static AlternativeAuthenticationNameSource ClientCertificateSubject { get; } = new AlternativeAuthenticationNameSource(ClientCertificateSubjectValue);
+ /// ClientCertificateDns.
+ public static AlternativeAuthenticationNameSource ClientCertificateDns { get; } = new AlternativeAuthenticationNameSource(ClientCertificateDnsValue);
+ /// ClientCertificateUri.
+ public static AlternativeAuthenticationNameSource ClientCertificateUri { get; } = new AlternativeAuthenticationNameSource(ClientCertificateUriValue);
+ /// ClientCertificateIp.
+ public static AlternativeAuthenticationNameSource ClientCertificateIP { get; } = new AlternativeAuthenticationNameSource(ClientCertificateIPValue);
+ /// ClientCertificateEmail.
+ public static AlternativeAuthenticationNameSource ClientCertificateEmail { get; } = new AlternativeAuthenticationNameSource(ClientCertificateEmailValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(AlternativeAuthenticationNameSource left, AlternativeAuthenticationNameSource right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(AlternativeAuthenticationNameSource left, AlternativeAuthenticationNameSource right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator AlternativeAuthenticationNameSource(string value) => new AlternativeAuthenticationNameSource(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is AlternativeAuthenticationNameSource other && Equals(other);
+ ///
+ public bool Equals(AlternativeAuthenticationNameSource 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/AzureADPartnerClientAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs
new file mode 100644
index 000000000000..099de3942cdc
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.Serialization.cs
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class AzureADPartnerClientAuthentication : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("clientAuthenticationType"u8);
+ writer.WriteStringValue(ClientAuthenticationType.ToString());
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (Optional.IsDefined(AzureActiveDirectoryTenantId))
+ {
+ writer.WritePropertyName("azureActiveDirectoryTenantId"u8);
+ writer.WriteStringValue(AzureActiveDirectoryTenantId);
+ }
+ if (Optional.IsDefined(AzureActiveDirectoryApplicationIdOrUri))
+ {
+ writer.WritePropertyName("azureActiveDirectoryApplicationIdOrUri"u8);
+ writer.WriteStringValue(AzureActiveDirectoryApplicationIdOrUri.AbsoluteUri);
+ }
+ writer.WriteEndObject();
+ writer.WriteEndObject();
+ }
+
+ internal static AzureADPartnerClientAuthentication DeserializeAzureADPartnerClientAuthentication(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ PartnerClientAuthenticationType clientAuthenticationType = default;
+ Optional azureActiveDirectoryTenantId = default;
+ Optional azureActiveDirectoryApplicationIdOrUri = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("clientAuthenticationType"u8))
+ {
+ clientAuthenticationType = new PartnerClientAuthenticationType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("azureActiveDirectoryTenantId"u8))
+ {
+ azureActiveDirectoryTenantId = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("azureActiveDirectoryApplicationIdOrUri"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ azureActiveDirectoryApplicationIdOrUri = new Uri(property0.Value.GetString());
+ continue;
+ }
+ }
+ continue;
+ }
+ }
+ return new AzureADPartnerClientAuthentication(clientAuthenticationType, azureActiveDirectoryTenantId.Value, azureActiveDirectoryApplicationIdOrUri.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.cs
new file mode 100644
index 000000000000..b00c101f8f67
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Azure Active Directory Partner Client Authentication.
+ public partial class AzureADPartnerClientAuthentication : PartnerClientAuthentication
+ {
+ /// Initializes a new instance of AzureADPartnerClientAuthentication.
+ public AzureADPartnerClientAuthentication()
+ {
+ ClientAuthenticationType = PartnerClientAuthenticationType.AzureAD;
+ }
+
+ /// Initializes a new instance of AzureADPartnerClientAuthentication.
+ /// Type of client authentication.
+ /// The Azure Active Directory Tenant ID to get the access token that will be included as the bearer token in delivery requests.
+ /// The Azure Active Directory Application ID or URI to get the access token that will be included as the bearer token in delivery requests.
+ internal AzureADPartnerClientAuthentication(PartnerClientAuthenticationType clientAuthenticationType, string azureActiveDirectoryTenantId, Uri azureActiveDirectoryApplicationIdOrUri) : base(clientAuthenticationType)
+ {
+ AzureActiveDirectoryTenantId = azureActiveDirectoryTenantId;
+ AzureActiveDirectoryApplicationIdOrUri = azureActiveDirectoryApplicationIdOrUri;
+ ClientAuthenticationType = clientAuthenticationType;
+ }
+
+ /// The Azure Active Directory Tenant ID to get the access token that will be included as the bearer token in delivery requests.
+ public string AzureActiveDirectoryTenantId { get; set; }
+ /// The Azure Active Directory Application ID or URI to get the access token that will be included as the bearer token in delivery requests.
+ public Uri AzureActiveDirectoryApplicationIdOrUri { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.Serialization.cs
new file mode 100644
index 000000000000..8b3569b91c7b
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.Serialization.cs
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class BoolEqualsFilter : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteBooleanValue(Value.Value);
+ }
+ writer.WritePropertyName("operatorType"u8);
+ writer.WriteStringValue(OperatorType.ToString());
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static BoolEqualsFilter DeserializeBoolEqualsFilter(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional value = default;
+ FilterOperatorType operatorType = default;
+ Optional key = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ value = property.Value.GetBoolean();
+ continue;
+ }
+ if (property.NameEquals("operatorType"u8))
+ {
+ operatorType = new FilterOperatorType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ }
+ return new BoolEqualsFilter(operatorType, key.Value, Optional.ToNullable(value));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.cs
new file mode 100644
index 000000000000..e5f556e6c864
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/BoolEqualsFilter.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// BoolEquals Filter.
+ public partial class BoolEqualsFilter : Filter
+ {
+ /// Initializes a new instance of BoolEqualsFilter.
+ public BoolEqualsFilter()
+ {
+ OperatorType = FilterOperatorType.BoolEquals;
+ }
+
+ /// Initializes a new instance of BoolEqualsFilter.
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ /// The field/property in the event based on which you want to filter.
+ /// The boolean filter value.
+ internal BoolEqualsFilter(FilterOperatorType operatorType, string key, bool? value) : base(operatorType, key)
+ {
+ Value = value;
+ OperatorType = operatorType;
+ }
+
+ /// The boolean filter value.
+ public bool? Value { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificateData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificateData.Serialization.cs
new file mode 100644
index 000000000000..2a07b8cba992
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificateData.Serialization.cs
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ public partial class CaCertificateData : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Description))
+ {
+ writer.WritePropertyName("description"u8);
+ writer.WriteStringValue(Description);
+ }
+ if (Optional.IsDefined(EncodedCertificate))
+ {
+ writer.WritePropertyName("encodedCertificate"u8);
+ writer.WriteStringValue(EncodedCertificate);
+ }
+ writer.WriteEndObject();
+ writer.WriteEndObject();
+ }
+
+ internal static CaCertificateData DeserializeCaCertificateData(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ Optional systemData = default;
+ Optional description = default;
+ Optional encodedCertificate = default;
+ Optional issueTimeInUtc = default;
+ Optional expiryTimeInUtc = default;
+ Optional provisioningState = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("description"u8))
+ {
+ description = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("encodedCertificate"u8))
+ {
+ encodedCertificate = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("issueTimeInUtc"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ issueTimeInUtc = property0.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property0.NameEquals("expiryTimeInUtc"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ expiryTimeInUtc = property0.Value.GetDateTimeOffset("O");
+ continue;
+ }
+ if (property0.NameEquals("provisioningState"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ provisioningState = new CaCertificateProvisioningState(property0.Value.GetString());
+ continue;
+ }
+ }
+ continue;
+ }
+ }
+ return new CaCertificateData(id, name, type, systemData.Value, description.Value, encodedCertificate.Value, Optional.ToNullable(issueTimeInUtc), Optional.ToNullable(expiryTimeInUtc), Optional.ToNullable(provisioningState));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificateProvisioningState.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificateProvisioningState.cs
new file mode 100644
index 000000000000..f72f4c03aca4
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificateProvisioningState.cs
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Provisioning state of the CA Certificate resource.
+ public readonly partial struct CaCertificateProvisioningState : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public CaCertificateProvisioningState(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string CreatingValue = "Creating";
+ private const string UpdatingValue = "Updating";
+ private const string DeletingValue = "Deleting";
+ private const string SucceededValue = "Succeeded";
+ private const string CanceledValue = "Canceled";
+ private const string FailedValue = "Failed";
+ private const string DeletedValue = "Deleted";
+
+ /// Creating.
+ public static CaCertificateProvisioningState Creating { get; } = new CaCertificateProvisioningState(CreatingValue);
+ /// Updating.
+ public static CaCertificateProvisioningState Updating { get; } = new CaCertificateProvisioningState(UpdatingValue);
+ /// Deleting.
+ public static CaCertificateProvisioningState Deleting { get; } = new CaCertificateProvisioningState(DeletingValue);
+ /// Succeeded.
+ public static CaCertificateProvisioningState Succeeded { get; } = new CaCertificateProvisioningState(SucceededValue);
+ /// Canceled.
+ public static CaCertificateProvisioningState Canceled { get; } = new CaCertificateProvisioningState(CanceledValue);
+ /// Failed.
+ public static CaCertificateProvisioningState Failed { get; } = new CaCertificateProvisioningState(FailedValue);
+ /// Deleted.
+ public static CaCertificateProvisioningState Deleted { get; } = new CaCertificateProvisioningState(DeletedValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(CaCertificateProvisioningState left, CaCertificateProvisioningState right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(CaCertificateProvisioningState left, CaCertificateProvisioningState right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator CaCertificateProvisioningState(string value) => new CaCertificateProvisioningState(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is CaCertificateProvisioningState other && Equals(other);
+ ///
+ public bool Equals(CaCertificateProvisioningState 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/CaCertificatesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.Serialization.cs
new file mode 100644
index 000000000000..a04bb03c1581
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.Serialization.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ internal partial class CaCertificatesListResult
+ {
+ internal static CaCertificatesListResult DeserializeCaCertificatesListResult(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional> value = default;
+ Optional nextLink = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(CaCertificateData.DeserializeCaCertificateData(item));
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"u8))
+ {
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ }
+ return new CaCertificatesListResult(Optional.ToList(value), nextLink.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.cs
new file mode 100644
index 000000000000..3c1c37a9a71a
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/CaCertificatesListResult.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Result of the List CA Certificate operation.
+ internal partial class CaCertificatesListResult
+ {
+ /// Initializes a new instance of CaCertificatesListResult.
+ internal CaCertificatesListResult()
+ {
+ Value = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of CaCertificatesListResult.
+ /// A collection of CA Certificate.
+ /// A link for the next page of CA Certificate.
+ internal CaCertificatesListResult(IReadOnlyList value, string nextLink)
+ {
+ Value = value;
+ NextLink = nextLink;
+ }
+
+ /// A collection of CA Certificate.
+ public IReadOnlyList Value { get; }
+ /// A link for the next page of CA Certificate.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthentication.Serialization.cs
new file mode 100644
index 000000000000..0a2f92ed067f
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthentication.Serialization.cs
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class ClientAuthentication : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(CertificateThumbprint))
+ {
+ writer.WritePropertyName("certificateThumbprint"u8);
+ writer.WriteObjectValue(CertificateThumbprint);
+ }
+ if (Optional.IsDefined(CertificateSubject))
+ {
+ writer.WritePropertyName("certificateSubject"u8);
+ writer.WriteObjectValue(CertificateSubject);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static ClientAuthentication DeserializeClientAuthentication(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional certificateThumbprint = default;
+ Optional certificateSubject = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("certificateThumbprint"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ certificateThumbprint = ClientCertificateThumbprint.DeserializeClientCertificateThumbprint(property.Value);
+ continue;
+ }
+ if (property.NameEquals("certificateSubject"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ certificateSubject = ClientCertificateSubjectDistinguishedName.DeserializeClientCertificateSubjectDistinguishedName(property.Value);
+ continue;
+ }
+ }
+ return new ClientAuthentication(certificateThumbprint.Value, certificateSubject.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthentication.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthentication.cs
new file mode 100644
index 000000000000..505f1d6af97f
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthentication.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// The Authentication properties for the client.
+ public partial class ClientAuthentication
+ {
+ /// Initializes a new instance of ClientAuthentication.
+ public ClientAuthentication()
+ {
+ }
+
+ /// Initializes a new instance of ClientAuthentication.
+ /// The self signed certificate's thumbprints data used for authentication.
+ /// The CA certificate subject name used for authentication.
+ internal ClientAuthentication(ClientCertificateThumbprint certificateThumbprint, ClientCertificateSubjectDistinguishedName certificateSubject)
+ {
+ CertificateThumbprint = certificateThumbprint;
+ CertificateSubject = certificateSubject;
+ }
+
+ /// The self signed certificate's thumbprints data used for authentication.
+ public ClientCertificateThumbprint CertificateThumbprint { get; set; }
+ /// The CA certificate subject name used for authentication.
+ public ClientCertificateSubjectDistinguishedName CertificateSubject { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs
new file mode 100644
index 000000000000..19b87f11be30
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.Serialization.cs
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ internal partial class ClientAuthenticationSettings : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsCollectionDefined(AlternativeAuthenticationNameSources))
+ {
+ writer.WritePropertyName("alternativeAuthenticationNameSources"u8);
+ writer.WriteStartArray();
+ foreach (var item in AlternativeAuthenticationNameSources)
+ {
+ writer.WriteStringValue(item.ToString());
+ }
+ writer.WriteEndArray();
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static ClientAuthenticationSettings DeserializeClientAuthenticationSettings(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional> alternativeAuthenticationNameSources = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("alternativeAuthenticationNameSources"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(new AlternativeAuthenticationNameSource(item.GetString()));
+ }
+ alternativeAuthenticationNameSources = array;
+ continue;
+ }
+ }
+ return new ClientAuthenticationSettings(Optional.ToList(alternativeAuthenticationNameSources));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.cs
new file mode 100644
index 000000000000..963f174c6cf2
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientAuthenticationSettings.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Client authentication settings for namespace resource.
+ internal partial class ClientAuthenticationSettings
+ {
+ /// Initializes a new instance of ClientAuthenticationSettings.
+ public ClientAuthenticationSettings()
+ {
+ AlternativeAuthenticationNameSources = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of ClientAuthenticationSettings.
+ /// Alternative authentication name sources related to client authentication settings for namespace resource.
+ internal ClientAuthenticationSettings(IList alternativeAuthenticationNameSources)
+ {
+ AlternativeAuthenticationNameSources = alternativeAuthenticationNameSources;
+ }
+
+ /// Alternative authentication name sources related to client authentication settings for namespace resource.
+ public IList AlternativeAuthenticationNameSources { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.Serialization.cs
new file mode 100644
index 000000000000..6cd5767d47c7
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.Serialization.cs
@@ -0,0 +1,74 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class ClientCertificateAuthentication : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(ValidationScheme))
+ {
+ writer.WritePropertyName("validationScheme"u8);
+ writer.WriteStringValue(ValidationScheme.Value.ToString());
+ }
+ if (Optional.IsCollectionDefined(AllowedThumbprints))
+ {
+ writer.WritePropertyName("allowedThumbprints"u8);
+ writer.WriteStartArray();
+ foreach (var item in AllowedThumbprints)
+ {
+ writer.WriteStringValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static ClientCertificateAuthentication DeserializeClientCertificateAuthentication(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional validationScheme = default;
+ Optional> allowedThumbprints = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("validationScheme"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ validationScheme = new ClientCertificateValidationScheme(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("allowedThumbprints"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(item.GetString());
+ }
+ allowedThumbprints = array;
+ continue;
+ }
+ }
+ return new ClientCertificateAuthentication(Optional.ToNullable(validationScheme), Optional.ToList(allowedThumbprints));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.cs
new file mode 100644
index 000000000000..b73561104dda
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateAuthentication.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// The certificate authentication properties for the client.
+ public partial class ClientCertificateAuthentication
+ {
+ /// Initializes a new instance of ClientCertificateAuthentication.
+ public ClientCertificateAuthentication()
+ {
+ AllowedThumbprints = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of ClientCertificateAuthentication.
+ /// The validation scheme used to authenticate the client. Default value is SubjectMatchesAuthenticationName.
+ /// The list of thumbprints that are allowed during client authentication. This property is required only if the validationScheme is 'ThumbprintMatch'.
+ internal ClientCertificateAuthentication(ClientCertificateValidationScheme? validationScheme, IList allowedThumbprints)
+ {
+ ValidationScheme = validationScheme;
+ AllowedThumbprints = allowedThumbprints;
+ }
+
+ /// The validation scheme used to authenticate the client. Default value is SubjectMatchesAuthenticationName.
+ public ClientCertificateValidationScheme? ValidationScheme { get; set; }
+ /// The list of thumbprints that are allowed during client authentication. This property is required only if the validationScheme is 'ThumbprintMatch'.
+ public IList AllowedThumbprints { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateSubjectDistinguishedName.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateSubjectDistinguishedName.Serialization.cs
new file mode 100644
index 000000000000..76dbda8fa59c
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateSubjectDistinguishedName.Serialization.cs
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class ClientCertificateSubjectDistinguishedName : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(CommonName))
+ {
+ writer.WritePropertyName("commonName"u8);
+ writer.WriteStringValue(CommonName);
+ }
+ if (Optional.IsDefined(Organization))
+ {
+ writer.WritePropertyName("organization"u8);
+ writer.WriteStringValue(Organization);
+ }
+ if (Optional.IsDefined(OrganizationUnit))
+ {
+ writer.WritePropertyName("organizationUnit"u8);
+ writer.WriteStringValue(OrganizationUnit);
+ }
+ if (Optional.IsDefined(CountryCode))
+ {
+ writer.WritePropertyName("countryCode"u8);
+ writer.WriteStringValue(CountryCode);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static ClientCertificateSubjectDistinguishedName DeserializeClientCertificateSubjectDistinguishedName(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional commonName = default;
+ Optional organization = default;
+ Optional organizationUnit = default;
+ Optional countryCode = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("commonName"u8))
+ {
+ commonName = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("organization"u8))
+ {
+ organization = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("organizationUnit"u8))
+ {
+ organizationUnit = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("countryCode"u8))
+ {
+ countryCode = property.Value.GetString();
+ continue;
+ }
+ }
+ return new ClientCertificateSubjectDistinguishedName(commonName.Value, organization.Value, organizationUnit.Value, countryCode.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateSubjectDistinguishedName.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateSubjectDistinguishedName.cs
new file mode 100644
index 000000000000..0e3487e040d8
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateSubjectDistinguishedName.cs
@@ -0,0 +1,43 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ ///
+ /// CA certificate subject distinguished name information used by service to authenticate clients.
+ /// For more information, see https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.x509certificates.x500distinguishedname?view=net-6.0#remarks
+ ///
+ public partial class ClientCertificateSubjectDistinguishedName
+ {
+ /// Initializes a new instance of ClientCertificateSubjectDistinguishedName.
+ public ClientCertificateSubjectDistinguishedName()
+ {
+ }
+
+ /// Initializes a new instance of ClientCertificateSubjectDistinguishedName.
+ /// The common name field in the subject name. The allowed limit is 64 characters and it should be specified.
+ /// The organization field in the subject name. If present, the allowed limit is 64 characters.
+ /// The organization unit field in the subject name. If present, the allowed limit is 32 characters.
+ /// The country code field in the subject name. If present, the country code should be represented by two-letter code defined in ISO 2166-1 (alpha-2). For example: 'US'.
+ internal ClientCertificateSubjectDistinguishedName(string commonName, string organization, string organizationUnit, string countryCode)
+ {
+ CommonName = commonName;
+ Organization = organization;
+ OrganizationUnit = organizationUnit;
+ CountryCode = countryCode;
+ }
+
+ /// The common name field in the subject name. The allowed limit is 64 characters and it should be specified.
+ public string CommonName { get; set; }
+ /// The organization field in the subject name. If present, the allowed limit is 64 characters.
+ public string Organization { get; set; }
+ /// The organization unit field in the subject name. If present, the allowed limit is 32 characters.
+ public string OrganizationUnit { get; set; }
+ /// The country code field in the subject name. If present, the country code should be represented by two-letter code defined in ISO 2166-1 (alpha-2). For example: 'US'.
+ public string CountryCode { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateThumbprint.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateThumbprint.Serialization.cs
new file mode 100644
index 000000000000..621feff18cda
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateThumbprint.Serialization.cs
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class ClientCertificateThumbprint : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Primary))
+ {
+ writer.WritePropertyName("primary"u8);
+ writer.WriteStringValue(Primary);
+ }
+ if (Optional.IsDefined(Secondary))
+ {
+ writer.WritePropertyName("secondary"u8);
+ writer.WriteStringValue(Secondary);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static ClientCertificateThumbprint DeserializeClientCertificateThumbprint(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional primary = default;
+ Optional secondary = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("primary"u8))
+ {
+ primary = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("secondary"u8))
+ {
+ secondary = property.Value.GetString();
+ continue;
+ }
+ }
+ return new ClientCertificateThumbprint(primary.Value, secondary.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateThumbprint.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateThumbprint.cs
new file mode 100644
index 000000000000..4b1e0137f51a
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateThumbprint.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Thumbprints are used by the service to validate the device permission when authentication is done using self signed certificate.
+ public partial class ClientCertificateThumbprint
+ {
+ /// Initializes a new instance of ClientCertificateThumbprint.
+ public ClientCertificateThumbprint()
+ {
+ }
+
+ /// Initializes a new instance of ClientCertificateThumbprint.
+ /// The primary thumbprint used for validation.
+ /// The secondary thumbprint used for validation.
+ internal ClientCertificateThumbprint(string primary, string secondary)
+ {
+ Primary = primary;
+ Secondary = secondary;
+ }
+
+ /// The primary thumbprint used for validation.
+ public string Primary { get; set; }
+ /// The secondary thumbprint used for validation.
+ public string Secondary { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateValidationScheme.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateValidationScheme.cs
new file mode 100644
index 000000000000..f52087c1807e
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientCertificateValidationScheme.cs
@@ -0,0 +1,63 @@
+// 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 validation scheme used to authenticate the client. Default value is SubjectMatchesAuthenticationName.
+ public readonly partial struct ClientCertificateValidationScheme : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public ClientCertificateValidationScheme(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string SubjectMatchesAuthenticationNameValue = "SubjectMatchesAuthenticationName";
+ private const string DnsMatchesAuthenticationNameValue = "DnsMatchesAuthenticationName";
+ private const string UriMatchesAuthenticationNameValue = "UriMatchesAuthenticationName";
+ private const string IPMatchesAuthenticationNameValue = "IpMatchesAuthenticationName";
+ private const string EmailMatchesAuthenticationNameValue = "EmailMatchesAuthenticationName";
+ private const string ThumbprintMatchValue = "ThumbprintMatch";
+
+ /// SubjectMatchesAuthenticationName.
+ public static ClientCertificateValidationScheme SubjectMatchesAuthenticationName { get; } = new ClientCertificateValidationScheme(SubjectMatchesAuthenticationNameValue);
+ /// DnsMatchesAuthenticationName.
+ public static ClientCertificateValidationScheme DnsMatchesAuthenticationName { get; } = new ClientCertificateValidationScheme(DnsMatchesAuthenticationNameValue);
+ /// UriMatchesAuthenticationName.
+ public static ClientCertificateValidationScheme UriMatchesAuthenticationName { get; } = new ClientCertificateValidationScheme(UriMatchesAuthenticationNameValue);
+ /// IpMatchesAuthenticationName.
+ public static ClientCertificateValidationScheme IPMatchesAuthenticationName { get; } = new ClientCertificateValidationScheme(IPMatchesAuthenticationNameValue);
+ /// EmailMatchesAuthenticationName.
+ public static ClientCertificateValidationScheme EmailMatchesAuthenticationName { get; } = new ClientCertificateValidationScheme(EmailMatchesAuthenticationNameValue);
+ /// ThumbprintMatch.
+ public static ClientCertificateValidationScheme ThumbprintMatch { get; } = new ClientCertificateValidationScheme(ThumbprintMatchValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(ClientCertificateValidationScheme left, ClientCertificateValidationScheme right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(ClientCertificateValidationScheme left, ClientCertificateValidationScheme right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator ClientCertificateValidationScheme(string value) => new ClientCertificateValidationScheme(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is ClientCertificateValidationScheme other && Equals(other);
+ ///
+ public bool Equals(ClientCertificateValidationScheme 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/ClientData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientData.Serialization.cs
new file mode 100644
index 000000000000..c76242420cfb
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientData.Serialization.cs
@@ -0,0 +1,199 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ public partial class ClientData : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Description))
+ {
+ writer.WritePropertyName("description"u8);
+ writer.WriteStringValue(Description);
+ }
+ if (Optional.IsDefined(AuthenticationName))
+ {
+ writer.WritePropertyName("authenticationName"u8);
+ writer.WriteStringValue(AuthenticationName);
+ }
+ if (Optional.IsDefined(Authentication))
+ {
+ writer.WritePropertyName("authentication"u8);
+ writer.WriteObjectValue(Authentication);
+ }
+ if (Optional.IsDefined(ClientCertificateAuthentication))
+ {
+ writer.WritePropertyName("clientCertificateAuthentication"u8);
+ writer.WriteObjectValue(ClientCertificateAuthentication);
+ }
+ if (Optional.IsDefined(State))
+ {
+ writer.WritePropertyName("state"u8);
+ writer.WriteStringValue(State.Value.ToString());
+ }
+ if (Optional.IsCollectionDefined(Attributes))
+ {
+ writer.WritePropertyName("attributes"u8);
+ writer.WriteStartObject();
+ foreach (var item in Attributes)
+ {
+ writer.WritePropertyName(item.Key);
+ if (item.Value == null)
+ {
+ writer.WriteNullValue();
+ continue;
+ }
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement);
+#endif
+ }
+ writer.WriteEndObject();
+ }
+ writer.WriteEndObject();
+ writer.WriteEndObject();
+ }
+
+ internal static ClientData DeserializeClientData(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ Optional systemData = default;
+ Optional description = default;
+ Optional authenticationName = default;
+ Optional authentication = default;
+ Optional clientCertificateAuthentication = default;
+ Optional state = default;
+ Optional> attributes = default;
+ Optional provisioningState = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("description"u8))
+ {
+ description = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("authenticationName"u8))
+ {
+ authenticationName = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("authentication"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ authentication = ClientAuthentication.DeserializeClientAuthentication(property0.Value);
+ continue;
+ }
+ if (property0.NameEquals("clientCertificateAuthentication"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ clientCertificateAuthentication = ClientCertificateAuthentication.DeserializeClientCertificateAuthentication(property0.Value);
+ continue;
+ }
+ if (property0.NameEquals("state"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ state = new ClientState(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("attributes"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property1 in property0.Value.EnumerateObject())
+ {
+ if (property1.Value.ValueKind == JsonValueKind.Null)
+ {
+ dictionary.Add(property1.Name, null);
+ }
+ else
+ {
+ dictionary.Add(property1.Name, BinaryData.FromString(property1.Value.GetRawText()));
+ }
+ }
+ attributes = dictionary;
+ continue;
+ }
+ if (property0.NameEquals("provisioningState"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ provisioningState = new ClientProvisioningState(property0.Value.GetString());
+ continue;
+ }
+ }
+ continue;
+ }
+ }
+ return new ClientData(id, name, type, systemData.Value, description.Value, authenticationName.Value, authentication.Value, clientCertificateAuthentication.Value, Optional.ToNullable(state), Optional.ToDictionary(attributes), Optional.ToNullable(provisioningState));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupData.Serialization.cs
new file mode 100644
index 000000000000..9bb042b075bb
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupData.Serialization.cs
@@ -0,0 +1,110 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ public partial class ClientGroupData : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Description))
+ {
+ writer.WritePropertyName("description"u8);
+ writer.WriteStringValue(Description);
+ }
+ if (Optional.IsDefined(Query))
+ {
+ writer.WritePropertyName("query"u8);
+ writer.WriteStringValue(Query);
+ }
+ writer.WriteEndObject();
+ writer.WriteEndObject();
+ }
+
+ internal static ClientGroupData DeserializeClientGroupData(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ Optional systemData = default;
+ Optional description = default;
+ Optional query = default;
+ Optional provisioningState = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("description"u8))
+ {
+ description = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("query"u8))
+ {
+ query = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("provisioningState"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ provisioningState = new ClientGroupProvisioningState(property0.Value.GetString());
+ continue;
+ }
+ }
+ continue;
+ }
+ }
+ return new ClientGroupData(id, name, type, systemData.Value, description.Value, query.Value, Optional.ToNullable(provisioningState));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupProvisioningState.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupProvisioningState.cs
new file mode 100644
index 000000000000..2550b5f67835
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupProvisioningState.cs
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Provisioning state of the ClientGroup resource.
+ public readonly partial struct ClientGroupProvisioningState : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public ClientGroupProvisioningState(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string CreatingValue = "Creating";
+ private const string UpdatingValue = "Updating";
+ private const string DeletingValue = "Deleting";
+ private const string SucceededValue = "Succeeded";
+ private const string CanceledValue = "Canceled";
+ private const string FailedValue = "Failed";
+ private const string DeletedValue = "Deleted";
+
+ /// Creating.
+ public static ClientGroupProvisioningState Creating { get; } = new ClientGroupProvisioningState(CreatingValue);
+ /// Updating.
+ public static ClientGroupProvisioningState Updating { get; } = new ClientGroupProvisioningState(UpdatingValue);
+ /// Deleting.
+ public static ClientGroupProvisioningState Deleting { get; } = new ClientGroupProvisioningState(DeletingValue);
+ /// Succeeded.
+ public static ClientGroupProvisioningState Succeeded { get; } = new ClientGroupProvisioningState(SucceededValue);
+ /// Canceled.
+ public static ClientGroupProvisioningState Canceled { get; } = new ClientGroupProvisioningState(CanceledValue);
+ /// Failed.
+ public static ClientGroupProvisioningState Failed { get; } = new ClientGroupProvisioningState(FailedValue);
+ /// Deleted.
+ public static ClientGroupProvisioningState Deleted { get; } = new ClientGroupProvisioningState(DeletedValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(ClientGroupProvisioningState left, ClientGroupProvisioningState right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(ClientGroupProvisioningState left, ClientGroupProvisioningState right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator ClientGroupProvisioningState(string value) => new ClientGroupProvisioningState(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is ClientGroupProvisioningState other && Equals(other);
+ ///
+ public bool Equals(ClientGroupProvisioningState 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/ClientGroupsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.Serialization.cs
new file mode 100644
index 000000000000..d39cd4c75e69
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.Serialization.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ internal partial class ClientGroupsListResult
+ {
+ internal static ClientGroupsListResult DeserializeClientGroupsListResult(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional> value = default;
+ Optional nextLink = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ClientGroupData.DeserializeClientGroupData(item));
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"u8))
+ {
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ }
+ return new ClientGroupsListResult(Optional.ToList(value), nextLink.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.cs
new file mode 100644
index 000000000000..c5c0944418a0
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientGroupsListResult.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Result of the List Client Group operation.
+ internal partial class ClientGroupsListResult
+ {
+ /// Initializes a new instance of ClientGroupsListResult.
+ internal ClientGroupsListResult()
+ {
+ Value = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of ClientGroupsListResult.
+ /// A collection of Client Group.
+ /// A link for the next page of Client Group.
+ internal ClientGroupsListResult(IReadOnlyList value, string nextLink)
+ {
+ Value = value;
+ NextLink = nextLink;
+ }
+
+ /// A collection of Client Group.
+ public IReadOnlyList Value { get; }
+ /// A link for the next page of Client Group.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientProvisioningState.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientProvisioningState.cs
new file mode 100644
index 000000000000..d242bca997a0
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientProvisioningState.cs
@@ -0,0 +1,66 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Provisioning state of the Client resource.
+ public readonly partial struct ClientProvisioningState : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public ClientProvisioningState(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string CreatingValue = "Creating";
+ private const string UpdatingValue = "Updating";
+ private const string DeletingValue = "Deleting";
+ private const string SucceededValue = "Succeeded";
+ private const string CanceledValue = "Canceled";
+ private const string FailedValue = "Failed";
+ private const string DeletedValue = "Deleted";
+
+ /// Creating.
+ public static ClientProvisioningState Creating { get; } = new ClientProvisioningState(CreatingValue);
+ /// Updating.
+ public static ClientProvisioningState Updating { get; } = new ClientProvisioningState(UpdatingValue);
+ /// Deleting.
+ public static ClientProvisioningState Deleting { get; } = new ClientProvisioningState(DeletingValue);
+ /// Succeeded.
+ public static ClientProvisioningState Succeeded { get; } = new ClientProvisioningState(SucceededValue);
+ /// Canceled.
+ public static ClientProvisioningState Canceled { get; } = new ClientProvisioningState(CanceledValue);
+ /// Failed.
+ public static ClientProvisioningState Failed { get; } = new ClientProvisioningState(FailedValue);
+ /// Deleted.
+ public static ClientProvisioningState Deleted { get; } = new ClientProvisioningState(DeletedValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(ClientProvisioningState left, ClientProvisioningState right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(ClientProvisioningState left, ClientProvisioningState right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator ClientProvisioningState(string value) => new ClientProvisioningState(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is ClientProvisioningState other && Equals(other);
+ ///
+ public bool Equals(ClientProvisioningState 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/ClientState.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientState.cs
new file mode 100644
index 000000000000..ab5ab23abb59
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientState.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Indicates if the client is enabled or not. Default value is Enabled.
+ public readonly partial struct ClientState : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public ClientState(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string EnabledValue = "Enabled";
+ private const string DisabledValue = "Disabled";
+
+ /// Enabled.
+ public static ClientState Enabled { get; } = new ClientState(EnabledValue);
+ /// Disabled.
+ public static ClientState Disabled { get; } = new ClientState(DisabledValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(ClientState left, ClientState right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(ClientState left, ClientState right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator ClientState(string value) => new ClientState(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is ClientState other && Equals(other);
+ ///
+ public bool Equals(ClientState 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/ClientsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.Serialization.cs
new file mode 100644
index 000000000000..bca88cb5079e
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.Serialization.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ internal partial class ClientsListResult
+ {
+ internal static ClientsListResult DeserializeClientsListResult(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional> value = default;
+ Optional nextLink = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(ClientData.DeserializeClientData(item));
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"u8))
+ {
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ }
+ return new ClientsListResult(Optional.ToList(value), nextLink.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.cs
new file mode 100644
index 000000000000..f5786320eaba
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/ClientsListResult.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Result of the List Client operation.
+ internal partial class ClientsListResult
+ {
+ /// Initializes a new instance of ClientsListResult.
+ internal ClientsListResult()
+ {
+ Value = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of ClientsListResult.
+ /// A collection of Client.
+ /// A link for the next page of Client.
+ internal ClientsListResult(IReadOnlyList value, string nextLink)
+ {
+ Value = value;
+ NextLink = nextLink;
+ }
+
+ /// A collection of Client.
+ public IReadOnlyList Value { get; }
+ /// A link for the next page of Client.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.Serialization.cs
new file mode 100644
index 000000000000..82d34de1a46a
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.Serialization.cs
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class DeliveryConfiguration : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(DeliveryMode))
+ {
+ writer.WritePropertyName("deliveryMode"u8);
+ writer.WriteStringValue(DeliveryMode.Value.ToString());
+ }
+ if (Optional.IsDefined(Queue))
+ {
+ writer.WritePropertyName("queue"u8);
+ writer.WriteObjectValue(Queue);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static DeliveryConfiguration DeserializeDeliveryConfiguration(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional deliveryMode = default;
+ Optional queue = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("deliveryMode"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ deliveryMode = new DeliveryMode(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("queue"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ queue = QueueInfo.DeserializeQueueInfo(property.Value);
+ continue;
+ }
+ }
+ return new DeliveryConfiguration(Optional.ToNullable(deliveryMode), queue.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.cs
new file mode 100644
index 000000000000..1e92fb62b94a
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryConfiguration.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Properties of the delivery configuration information of the event subscription.
+ public partial class DeliveryConfiguration
+ {
+ /// Initializes a new instance of DeliveryConfiguration.
+ public DeliveryConfiguration()
+ {
+ }
+
+ /// Initializes a new instance of DeliveryConfiguration.
+ /// Delivery mode of the event subscription.
+ /// This property should be populated when deliveryMode is queue and represents information about the queue subscription.
+ internal DeliveryConfiguration(DeliveryMode? deliveryMode, QueueInfo queue)
+ {
+ DeliveryMode = deliveryMode;
+ Queue = queue;
+ }
+
+ /// Delivery mode of the event subscription.
+ public DeliveryMode? DeliveryMode { get; set; }
+ /// This property should be populated when deliveryMode is queue and represents information about the queue subscription.
+ public QueueInfo Queue { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryMode.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryMode.cs
new file mode 100644
index 000000000000..ebd0e1ed2749
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryMode.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Delivery mode of the event subscription.
+ public readonly partial struct DeliveryMode : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public DeliveryMode(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string QueueValue = "Queue";
+
+ /// Queue.
+ public static DeliveryMode Queue { get; } = new DeliveryMode(QueueValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(DeliveryMode left, DeliveryMode right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(DeliveryMode left, DeliveryMode right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator DeliveryMode(string value) => new DeliveryMode(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is DeliveryMode other && Equals(other);
+ ///
+ public bool Equals(DeliveryMode 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/DeliverySchema.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliverySchema.cs
new file mode 100644
index 000000000000..c51b5524b865
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliverySchema.cs
@@ -0,0 +1,48 @@
+// 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 event delivery schema for the event subscription.
+ public readonly partial struct DeliverySchema : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public DeliverySchema(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string CloudEventSchemaV10Value = "CloudEventSchemaV1_0";
+
+ /// CloudEventSchemaV1_0.
+ public static DeliverySchema CloudEventSchemaV10 { get; } = new DeliverySchema(CloudEventSchemaV10Value);
+ /// Determines if two values are the same.
+ public static bool operator ==(DeliverySchema left, DeliverySchema right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(DeliverySchema left, DeliverySchema right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator DeliverySchema(string value) => new DeliverySchema(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is DeliverySchema other && Equals(other);
+ ///
+ public bool Equals(DeliverySchema 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/DeliveryWithResourceIdentity.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.cs
index a5a8193e3a07..896b5dd91664 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DeliveryWithResourceIdentity.cs
@@ -21,7 +21,7 @@ public DeliveryWithResourceIdentity()
/// Information about the destination where events have to be delivered for the event subscription.
/// Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , , , , , and .
+ /// The available derived classes include , , , , , , and .
///
internal DeliveryWithResourceIdentity(EventSubscriptionIdentity identity, EventSubscriptionDestination destination)
{
@@ -35,7 +35,7 @@ internal DeliveryWithResourceIdentity(EventSubscriptionIdentity identity, EventS
/// Information about the destination where events have to be delivered for the event subscription.
/// Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , , , , , and .
+ /// The available derived classes include , , , , , , and .
///
public EventSubscriptionDestination Destination { get; set; }
}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.Serialization.cs
new file mode 100644
index 000000000000..891b8598c36a
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.Serialization.cs
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class DynamicRoutingEnrichment : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ if (Optional.IsDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteStringValue(Value);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static DynamicRoutingEnrichment DeserializeDynamicRoutingEnrichment(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional key = default;
+ Optional value = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("value"u8))
+ {
+ value = property.Value.GetString();
+ continue;
+ }
+ }
+ return new DynamicRoutingEnrichment(key.Value, value.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.cs
new file mode 100644
index 000000000000..410508974472
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/DynamicRoutingEnrichment.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// The DynamicRoutingEnrichment.
+ public partial class DynamicRoutingEnrichment
+ {
+ /// Initializes a new instance of DynamicRoutingEnrichment.
+ public DynamicRoutingEnrichment()
+ {
+ }
+
+ /// Initializes a new instance of DynamicRoutingEnrichment.
+ /// Dynamic routing enrichment key.
+ /// Dynamic routing enrichment value.
+ internal DynamicRoutingEnrichment(string key, string value)
+ {
+ Key = key;
+ Value = value;
+ }
+
+ /// Dynamic routing enrichment key.
+ public string Key { get; set; }
+ /// Dynamic routing enrichment value.
+ public string Value { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EndpointType.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EndpointType.cs
index ea804db8d689..4975b9926628 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EndpointType.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EndpointType.cs
@@ -29,6 +29,7 @@ public EndpointType(string value)
private const string ServiceBusQueueValue = "ServiceBusQueue";
private const string ServiceBusTopicValue = "ServiceBusTopic";
private const string AzureFunctionValue = "AzureFunction";
+ private const string PartnerDestinationValue = "PartnerDestination";
/// WebHook.
public static EndpointType WebHook { get; } = new EndpointType(WebHookValue);
@@ -44,6 +45,8 @@ public EndpointType(string value)
public static EndpointType ServiceBusTopic { get; } = new EndpointType(ServiceBusTopicValue);
/// AzureFunction.
public static EndpointType AzureFunction { get; } = new EndpointType(AzureFunctionValue);
+ /// PartnerDestination.
+ public static EndpointType PartnerDestination { get; } = new EndpointType(PartnerDestinationValue);
/// Determines if two values are the same.
public static bool operator ==(EndpointType left, EndpointType right) => left.Equals(right);
/// Determines if two values are not the same.
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainData.Serialization.cs
index 5bf5bcd7de5a..889739b6e3c9 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainData.Serialization.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainData.Serialization.cs
@@ -19,6 +19,11 @@ public partial class EventGridDomainData : IUtf8JsonSerializable
void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
{
writer.WriteStartObject();
+ if (Optional.IsDefined(Sku))
+ {
+ writer.WritePropertyName("sku"u8);
+ writer.WriteObjectValue(Sku);
+ }
if (Optional.IsDefined(Identity))
{
writer.WritePropertyName("identity"u8);
@@ -39,11 +44,21 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WriteStringValue(Location);
writer.WritePropertyName("properties"u8);
writer.WriteStartObject();
+ if (Optional.IsDefined(MinimumTlsVersionAllowed))
+ {
+ writer.WritePropertyName("minimumTlsVersionAllowed"u8);
+ writer.WriteStringValue(MinimumTlsVersionAllowed.Value.ToString());
+ }
if (Optional.IsDefined(InputSchema))
{
writer.WritePropertyName("inputSchema"u8);
writer.WriteStringValue(InputSchema.Value.ToString());
}
+ if (Optional.IsDefined(EventTypeInfo))
+ {
+ writer.WritePropertyName("eventTypeInfo"u8);
+ writer.WriteObjectValue(EventTypeInfo);
+ }
if (Optional.IsDefined(InputSchemaMapping))
{
writer.WritePropertyName("inputSchemaMapping"u8);
@@ -94,6 +109,7 @@ internal static EventGridDomainData DeserializeEventGridDomainData(JsonElement e
{
return null;
}
+ Optional sku = default;
Optional identity = default;
Optional> tags = default;
AzureLocation location = default;
@@ -103,8 +119,10 @@ internal static EventGridDomainData DeserializeEventGridDomainData(JsonElement e
Optional systemData = default;
Optional> privateEndpointConnections = default;
Optional provisioningState = default;
+ Optional minimumTlsVersionAllowed = default;
Optional endpoint = default;
Optional inputSchema = default;
+ Optional eventTypeInfo = default;
Optional inputSchemaMapping = default;
Optional metricResourceId = default;
Optional publicNetworkAccess = default;
@@ -115,6 +133,15 @@ internal static EventGridDomainData DeserializeEventGridDomainData(JsonElement e
Optional dataResidencyBoundary = default;
foreach (var property in element.EnumerateObject())
{
+ if (property.NameEquals("sku"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ sku = ResourceSku.DeserializeResourceSku(property.Value);
+ continue;
+ }
if (property.NameEquals("identity"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -199,6 +226,15 @@ internal static EventGridDomainData DeserializeEventGridDomainData(JsonElement e
provisioningState = new EventGridDomainProvisioningState(property0.Value.GetString());
continue;
}
+ if (property0.NameEquals("minimumTlsVersionAllowed"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ minimumTlsVersionAllowed = new TlsVersion(property0.Value.GetString());
+ continue;
+ }
if (property0.NameEquals("endpoint"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -217,6 +253,15 @@ internal static EventGridDomainData DeserializeEventGridDomainData(JsonElement e
inputSchema = new EventGridInputSchema(property0.Value.GetString());
continue;
}
+ if (property0.NameEquals("eventTypeInfo"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ eventTypeInfo = PartnerTopicEventTypeInfo.DeserializePartnerTopicEventTypeInfo(property0.Value);
+ continue;
+ }
if (property0.NameEquals("inputSchemaMapping"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -294,7 +339,7 @@ internal static EventGridDomainData DeserializeEventGridDomainData(JsonElement e
continue;
}
}
- return new EventGridDomainData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, Optional.ToList(privateEndpointConnections), Optional.ToNullable(provisioningState), endpoint.Value, Optional.ToNullable(inputSchema), inputSchemaMapping.Value, metricResourceId.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToList(inboundIPRules), Optional.ToNullable(disableLocalAuth), Optional.ToNullable(autoCreateTopicWithFirstSubscription), Optional.ToNullable(autoDeleteTopicWithLastSubscription), Optional.ToNullable(dataResidencyBoundary));
+ return new EventGridDomainData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, identity, Optional.ToList(privateEndpointConnections), Optional.ToNullable(provisioningState), Optional.ToNullable(minimumTlsVersionAllowed), endpoint.Value, Optional.ToNullable(inputSchema), eventTypeInfo.Value, inputSchemaMapping.Value, metricResourceId.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToList(inboundIPRules), Optional.ToNullable(disableLocalAuth), Optional.ToNullable(autoCreateTopicWithFirstSubscription), Optional.ToNullable(autoDeleteTopicWithLastSubscription), Optional.ToNullable(dataResidencyBoundary));
}
}
}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs
index b56dc4dd2a53..a147cf64c7af 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.Serialization.cs
@@ -31,6 +31,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WritePropertyName("identity"u8);
JsonSerializer.Serialize(writer, Identity);
}
+ if (Optional.IsDefined(Sku))
+ {
+ writer.WritePropertyName("sku"u8);
+ writer.WriteObjectValue(Sku);
+ }
writer.WritePropertyName("properties"u8);
writer.WriteStartObject();
if (Optional.IsDefined(PublicNetworkAccess))
@@ -48,6 +53,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
}
writer.WriteEndArray();
}
+ if (Optional.IsDefined(MinimumTlsVersionAllowed))
+ {
+ writer.WritePropertyName("minimumTlsVersionAllowed"u8);
+ writer.WriteStringValue(MinimumTlsVersionAllowed.Value.ToString());
+ }
if (Optional.IsDefined(IsLocalAuthDisabled))
{
writer.WritePropertyName("disableLocalAuth"u8);
@@ -68,6 +78,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WritePropertyName("dataResidencyBoundary"u8);
writer.WriteStringValue(DataResidencyBoundary.Value.ToString());
}
+ if (Optional.IsDefined(EventTypeInfo))
+ {
+ writer.WritePropertyName("eventTypeInfo"u8);
+ writer.WriteObjectValue(EventTypeInfo);
+ }
writer.WriteEndObject();
writer.WriteEndObject();
}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.cs
index 654a2542ca11..9d9d71b78adc 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridDomainPatch.cs
@@ -25,6 +25,20 @@ public EventGridDomainPatch()
public IDictionary Tags { get; }
/// Identity information for the resource.
public ManagedServiceIdentity Identity { get; set; }
+ /// The Sku pricing tier for the domain.
+ internal ResourceSku Sku { get; set; }
+ /// The Sku name of the resource. The possible values are: Basic or Premium.
+ public EventGridSku? SkuName
+ {
+ get => Sku is null ? default : Sku.Name;
+ set
+ {
+ if (Sku is null)
+ Sku = new ResourceSku();
+ Sku.Name = value;
+ }
+ }
+
///
/// This determines if traffic is allowed over public network. By default it is enabled.
/// You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.DomainUpdateParameterProperties.InboundIpRules" />
@@ -32,6 +46,8 @@ public EventGridDomainPatch()
public EventGridPublicNetworkAccess? PublicNetworkAccess { get; set; }
/// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
public IList InboundIPRules { get; }
+ /// Minimum TLS version of the publisher allowed to publish to this domain.
+ public TlsVersion? MinimumTlsVersionAllowed { get; set; }
/// This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the domain.
public bool? IsLocalAuthDisabled { get; set; }
///
@@ -56,5 +72,7 @@ public EventGridDomainPatch()
public bool? AutoDeleteTopicWithLastSubscription { get; set; }
/// The data residency boundary for the domain.
public DataResidencyBoundary? DataResidencyBoundary { get; set; }
+ /// The eventTypeInfo for the domain.
+ public PartnerTopicEventTypeInfo EventTypeInfo { get; set; }
}
}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSku.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSku.cs
new file mode 100644
index 000000000000..1e69c97494f1
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSku.cs
@@ -0,0 +1,51 @@
+// 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 Sku name of the resource. The possible values are: Basic or Premium.
+ public readonly partial struct EventGridSku : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public EventGridSku(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string BasicValue = "Basic";
+ private const string PremiumValue = "Premium";
+
+ /// Basic.
+ public static EventGridSku Basic { get; } = new EventGridSku(BasicValue);
+ /// Premium.
+ public static EventGridSku Premium { get; } = new EventGridSku(PremiumValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(EventGridSku left, EventGridSku right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(EventGridSku left, EventGridSku right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator EventGridSku(string value) => new EventGridSku(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is EventGridSku other && Equals(other);
+ ///
+ public bool Equals(EventGridSku 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/EventGridSkuName.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSkuName.cs
new file mode 100644
index 000000000000..51b784304615
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSkuName.cs
@@ -0,0 +1,48 @@
+// 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 name of the SKU.
+ public readonly partial struct EventGridSkuName : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public EventGridSkuName(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string StandardValue = "Standard";
+
+ /// Standard.
+ public static EventGridSkuName Standard { get; } = new EventGridSkuName(StandardValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(EventGridSkuName left, EventGridSkuName right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(EventGridSkuName left, EventGridSkuName right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator EventGridSkuName(string value) => new EventGridSkuName(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is EventGridSkuName other && Equals(other);
+ ///
+ public bool Equals(EventGridSkuName 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/EventGridSubscriptionPatch.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.cs
index bc5ed15a99e8..d4845fcef8f6 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridSubscriptionPatch.cs
@@ -24,7 +24,7 @@ public EventGridSubscriptionPatch()
/// Information about the destination where events have to be delivered for the event subscription.
/// Uses Azure Event Grid's identity to acquire the authentication tokens being used during delivery / dead-lettering.
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , , , , , and .
+ /// The available derived classes include , , , , , , and .
///
public EventSubscriptionDestination Destination { get; set; }
///
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicData.Serialization.cs
index 4ae465f741fe..bc25345342f1 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicData.Serialization.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicData.Serialization.cs
@@ -11,6 +11,7 @@
using Azure.Core;
using Azure.ResourceManager.EventGrid.Models;
using Azure.ResourceManager.Models;
+using Azure.ResourceManager.Resources.Models;
namespace Azure.ResourceManager.EventGrid
{
@@ -19,11 +20,26 @@ public partial class EventGridTopicData : IUtf8JsonSerializable
void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
{
writer.WriteStartObject();
+ if (Optional.IsDefined(Sku))
+ {
+ writer.WritePropertyName("sku"u8);
+ writer.WriteObjectValue(Sku);
+ }
if (Optional.IsDefined(Identity))
{
writer.WritePropertyName("identity"u8);
JsonSerializer.Serialize(writer, Identity);
}
+ if (Optional.IsDefined(Kind))
+ {
+ writer.WritePropertyName("kind"u8);
+ writer.WriteStringValue(Kind.Value.ToString());
+ }
+ if (Optional.IsDefined(ExtendedLocation))
+ {
+ writer.WritePropertyName("extendedLocation"u8);
+ JsonSerializer.Serialize(writer, ExtendedLocation);
+ }
if (Optional.IsCollectionDefined(Tags))
{
writer.WritePropertyName("tags"u8);
@@ -39,6 +55,16 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WriteStringValue(Location);
writer.WritePropertyName("properties"u8);
writer.WriteStartObject();
+ if (Optional.IsDefined(EventTypeInfo))
+ {
+ writer.WritePropertyName("eventTypeInfo"u8);
+ writer.WriteObjectValue(EventTypeInfo);
+ }
+ if (Optional.IsDefined(MinimumTlsVersionAllowed))
+ {
+ writer.WritePropertyName("minimumTlsVersionAllowed"u8);
+ writer.WriteStringValue(MinimumTlsVersionAllowed.Value.ToString());
+ }
if (Optional.IsDefined(InputSchema))
{
writer.WritePropertyName("inputSchema"u8);
@@ -84,7 +110,10 @@ internal static EventGridTopicData DeserializeEventGridTopicData(JsonElement ele
{
return null;
}
+ Optional sku = default;
Optional identity = default;
+ Optional kind = default;
+ Optional extendedLocation = default;
Optional> tags = default;
AzureLocation location = default;
ResourceIdentifier id = default;
@@ -94,6 +123,8 @@ internal static EventGridTopicData DeserializeEventGridTopicData(JsonElement ele
Optional> privateEndpointConnections = default;
Optional provisioningState = default;
Optional endpoint = default;
+ Optional eventTypeInfo = default;
+ Optional minimumTlsVersionAllowed = default;
Optional inputSchema = default;
Optional inputSchemaMapping = default;
Optional metricResourceId = default;
@@ -103,6 +134,15 @@ internal static EventGridTopicData DeserializeEventGridTopicData(JsonElement ele
Optional dataResidencyBoundary = default;
foreach (var property in element.EnumerateObject())
{
+ if (property.NameEquals("sku"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ sku = ResourceSku.DeserializeResourceSku(property.Value);
+ continue;
+ }
if (property.NameEquals("identity"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -112,6 +152,24 @@ internal static EventGridTopicData DeserializeEventGridTopicData(JsonElement ele
identity = JsonSerializer.Deserialize(property.Value.GetRawText());
continue;
}
+ if (property.NameEquals("kind"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ kind = new ResourceKind(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("extendedLocation"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
if (property.NameEquals("tags"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -196,6 +254,24 @@ internal static EventGridTopicData DeserializeEventGridTopicData(JsonElement ele
endpoint = new Uri(property0.Value.GetString());
continue;
}
+ if (property0.NameEquals("eventTypeInfo"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ eventTypeInfo = PartnerTopicEventTypeInfo.DeserializePartnerTopicEventTypeInfo(property0.Value);
+ continue;
+ }
+ if (property0.NameEquals("minimumTlsVersionAllowed"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ minimumTlsVersionAllowed = new TlsVersion(property0.Value.GetString());
+ continue;
+ }
if (property0.NameEquals("inputSchema"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -264,7 +340,7 @@ internal static EventGridTopicData DeserializeEventGridTopicData(JsonElement ele
continue;
}
}
- return new EventGridTopicData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, identity, Optional.ToList(privateEndpointConnections), Optional.ToNullable(provisioningState), endpoint.Value, Optional.ToNullable(inputSchema), inputSchemaMapping.Value, metricResourceId.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToList(inboundIPRules), Optional.ToNullable(disableLocalAuth), Optional.ToNullable(dataResidencyBoundary));
+ return new EventGridTopicData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, identity, Optional.ToNullable(kind), extendedLocation, Optional.ToList(privateEndpointConnections), Optional.ToNullable(provisioningState), endpoint.Value, eventTypeInfo.Value, Optional.ToNullable(minimumTlsVersionAllowed), Optional.ToNullable(inputSchema), inputSchemaMapping.Value, metricResourceId.Value, Optional.ToNullable(publicNetworkAccess), Optional.ToList(inboundIPRules), Optional.ToNullable(disableLocalAuth), Optional.ToNullable(dataResidencyBoundary));
}
}
}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs
index a1ba27d47ba6..a67371f398eb 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.Serialization.cs
@@ -31,6 +31,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WritePropertyName("identity"u8);
JsonSerializer.Serialize(writer, Identity);
}
+ if (Optional.IsDefined(Sku))
+ {
+ writer.WritePropertyName("sku"u8);
+ writer.WriteObjectValue(Sku);
+ }
writer.WritePropertyName("properties"u8);
writer.WriteStartObject();
if (Optional.IsDefined(PublicNetworkAccess))
@@ -48,6 +53,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
}
writer.WriteEndArray();
}
+ if (Optional.IsDefined(MinimumTlsVersionAllowed))
+ {
+ writer.WritePropertyName("minimumTlsVersionAllowed"u8);
+ writer.WriteStringValue(MinimumTlsVersionAllowed.Value.ToString());
+ }
if (Optional.IsDefined(IsLocalAuthDisabled))
{
writer.WritePropertyName("disableLocalAuth"u8);
@@ -58,6 +68,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WritePropertyName("dataResidencyBoundary"u8);
writer.WriteStringValue(DataResidencyBoundary.Value.ToString());
}
+ if (Optional.IsDefined(EventTypeInfo))
+ {
+ writer.WritePropertyName("eventTypeInfo"u8);
+ writer.WriteObjectValue(EventTypeInfo);
+ }
writer.WriteEndObject();
writer.WriteEndObject();
}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.cs
index 8737859ae9e2..f601dec9f208 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventGridTopicPatch.cs
@@ -25,6 +25,20 @@ public EventGridTopicPatch()
public IDictionary Tags { get; }
/// Topic resource identity information.
public ManagedServiceIdentity Identity { get; set; }
+ /// The Sku pricing tier for the topic.
+ internal ResourceSku Sku { get; set; }
+ /// The Sku name of the resource. The possible values are: Basic or Premium.
+ public EventGridSku? SkuName
+ {
+ get => Sku is null ? default : Sku.Name;
+ set
+ {
+ if (Sku is null)
+ Sku = new ResourceSku();
+ Sku.Name = value;
+ }
+ }
+
///
/// This determines if traffic is allowed over public network. By default it is enabled.
/// You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.TopicUpdateParameterProperties.InboundIpRules" />
@@ -32,9 +46,13 @@ public EventGridTopicPatch()
public EventGridPublicNetworkAccess? PublicNetworkAccess { get; set; }
/// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
public IList InboundIPRules { get; }
+ /// Minimum TLS version of the publisher allowed to publish to this domain.
+ public TlsVersion? MinimumTlsVersionAllowed { get; set; }
/// This boolean is used to enable or disable local auth. Default value is false. When the property is set to true, only AAD token will be used to authenticate if user is allowed to publish to the topic.
public bool? IsLocalAuthDisabled { get; set; }
/// The data residency boundary for the topic.
public DataResidencyBoundary? DataResidencyBoundary { get; set; }
+ /// The eventTypeInfo for the topic.
+ public PartnerTopicEventTypeInfo EventTypeInfo { get; set; }
}
}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventInputSchema.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventInputSchema.cs
new file mode 100644
index 000000000000..fdbb28207357
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventInputSchema.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// This determines the format that is expected for incoming events published to the topic.
+ public readonly partial struct EventInputSchema : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public EventInputSchema(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string CloudEventSchemaV10Value = "CloudEventSchemaV1_0";
+
+ /// CloudEventSchemaV1_0.
+ public static EventInputSchema CloudEventSchemaV10 { get; } = new EventInputSchema(CloudEventSchemaV10Value);
+ /// Determines if two values are the same.
+ public static bool operator ==(EventInputSchema left, EventInputSchema right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(EventInputSchema left, EventInputSchema right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator EventInputSchema(string value) => new EventInputSchema(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is EventInputSchema other && Equals(other);
+ ///
+ public bool Equals(EventInputSchema 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/EventSubscriptionDestination.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs
index a2e761147651..ec5dadb637c4 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.Serialization.cs
@@ -33,6 +33,7 @@ internal static EventSubscriptionDestination DeserializeEventSubscriptionDestina
case "AzureFunction": return AzureFunctionEventSubscriptionDestination.DeserializeAzureFunctionEventSubscriptionDestination(element);
case "EventHub": return EventHubEventSubscriptionDestination.DeserializeEventHubEventSubscriptionDestination(element);
case "HybridConnection": return HybridConnectionEventSubscriptionDestination.DeserializeHybridConnectionEventSubscriptionDestination(element);
+ case "PartnerDestination": return PartnerEventSubscriptionDestination.DeserializePartnerEventSubscriptionDestination(element);
case "ServiceBusQueue": return ServiceBusQueueEventSubscriptionDestination.DeserializeServiceBusQueueEventSubscriptionDestination(element);
case "ServiceBusTopic": return ServiceBusTopicEventSubscriptionDestination.DeserializeServiceBusTopicEventSubscriptionDestination(element);
case "StorageQueue": return StorageQueueEventSubscriptionDestination.DeserializeStorageQueueEventSubscriptionDestination(element);
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.cs
index 43297be6e165..9c50399816f0 100644
--- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.cs
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/EventSubscriptionDestination.cs
@@ -10,7 +10,7 @@ namespace Azure.ResourceManager.EventGrid.Models
///
/// Information about the destination for an event subscription.
/// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
- /// The available derived classes include , , , , , and .
+ /// The available derived classes include , , , , , , and .
///
public abstract partial class EventSubscriptionDestination
{
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/Filter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/Filter.Serialization.cs
new file mode 100644
index 000000000000..be646792d58c
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/Filter.Serialization.cs
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class Filter : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("operatorType"u8);
+ writer.WriteStringValue(OperatorType.ToString());
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static Filter DeserializeFilter(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ if (element.TryGetProperty("operatorType", out JsonElement discriminator))
+ {
+ switch (discriminator.GetString())
+ {
+ case "BoolEquals": return BoolEqualsFilter.DeserializeBoolEqualsFilter(element);
+ case "IsNotNull": return IsNotNullFilter.DeserializeIsNotNullFilter(element);
+ case "IsNullOrUndefined": return IsNullOrUndefinedFilter.DeserializeIsNullOrUndefinedFilter(element);
+ case "NumberGreaterThan": return NumberGreaterThanFilter.DeserializeNumberGreaterThanFilter(element);
+ case "NumberGreaterThanOrEquals": return NumberGreaterThanOrEqualsFilter.DeserializeNumberGreaterThanOrEqualsFilter(element);
+ case "NumberIn": return NumberInFilter.DeserializeNumberInFilter(element);
+ case "NumberInRange": return NumberInRangeFilter.DeserializeNumberInRangeFilter(element);
+ case "NumberLessThan": return NumberLessThanFilter.DeserializeNumberLessThanFilter(element);
+ case "NumberLessThanOrEquals": return NumberLessThanOrEqualsFilter.DeserializeNumberLessThanOrEqualsFilter(element);
+ case "NumberNotIn": return NumberNotInFilter.DeserializeNumberNotInFilter(element);
+ case "NumberNotInRange": return NumberNotInRangeFilter.DeserializeNumberNotInRangeFilter(element);
+ case "StringBeginsWith": return StringBeginsWithFilter.DeserializeStringBeginsWithFilter(element);
+ case "StringContains": return StringContainsFilter.DeserializeStringContainsFilter(element);
+ case "StringEndsWith": return StringEndsWithFilter.DeserializeStringEndsWithFilter(element);
+ case "StringIn": return StringInFilter.DeserializeStringInFilter(element);
+ case "StringNotBeginsWith": return StringNotBeginsWithFilter.DeserializeStringNotBeginsWithFilter(element);
+ case "StringNotContains": return StringNotContainsFilter.DeserializeStringNotContainsFilter(element);
+ case "StringNotEndsWith": return StringNotEndsWithFilter.DeserializeStringNotEndsWithFilter(element);
+ case "StringNotIn": return StringNotInFilter.DeserializeStringNotInFilter(element);
+ }
+ }
+ return UnknownFilter.DeserializeUnknownFilter(element);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/Filter.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/Filter.cs
new file mode 100644
index 000000000000..f9fa0356f9ff
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/Filter.cs
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ ///
+ /// This is the base type that represents a filter. To configure a filter, do not directly instantiate an object of this class. Instead, instantiate
+ /// an object of a derived class such as BoolEqualsFilter, NumberInFilter, StringEqualsFilter etc depending on the type of the key based on
+ /// which you want to filter.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include , , , , , , , , , , , , , , , , , and .
+ ///
+ public abstract partial class Filter
+ {
+ /// Initializes a new instance of Filter.
+ protected Filter()
+ {
+ }
+
+ /// Initializes a new instance of Filter.
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ /// The field/property in the event based on which you want to filter.
+ internal Filter(FilterOperatorType operatorType, string key)
+ {
+ OperatorType = operatorType;
+ Key = key;
+ }
+
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ internal FilterOperatorType OperatorType { get; set; }
+ /// The field/property in the event based on which you want to filter.
+ public string Key { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FilterOperatorType.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FilterOperatorType.cs
new file mode 100644
index 000000000000..a5d515ccd3ca
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FilterOperatorType.cs
@@ -0,0 +1,102 @@
+// 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 operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ internal readonly partial struct FilterOperatorType : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public FilterOperatorType(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string NumberInValue = "NumberIn";
+ private const string NumberNotInValue = "NumberNotIn";
+ private const string NumberLessThanValue = "NumberLessThan";
+ private const string NumberGreaterThanValue = "NumberGreaterThan";
+ private const string NumberLessThanOrEqualsValue = "NumberLessThanOrEquals";
+ private const string NumberGreaterThanOrEqualsValue = "NumberGreaterThanOrEquals";
+ private const string BoolEqualsValue = "BoolEquals";
+ private const string StringInValue = "StringIn";
+ private const string StringNotInValue = "StringNotIn";
+ private const string StringBeginsWithValue = "StringBeginsWith";
+ private const string StringEndsWithValue = "StringEndsWith";
+ private const string StringContainsValue = "StringContains";
+ private const string NumberInRangeValue = "NumberInRange";
+ private const string NumberNotInRangeValue = "NumberNotInRange";
+ private const string StringNotBeginsWithValue = "StringNotBeginsWith";
+ private const string StringNotEndsWithValue = "StringNotEndsWith";
+ private const string StringNotContainsValue = "StringNotContains";
+ private const string IsNullOrUndefinedValue = "IsNullOrUndefined";
+ private const string IsNotNullValue = "IsNotNull";
+
+ /// NumberIn.
+ public static FilterOperatorType NumberIn { get; } = new FilterOperatorType(NumberInValue);
+ /// NumberNotIn.
+ public static FilterOperatorType NumberNotIn { get; } = new FilterOperatorType(NumberNotInValue);
+ /// NumberLessThan.
+ public static FilterOperatorType NumberLessThan { get; } = new FilterOperatorType(NumberLessThanValue);
+ /// NumberGreaterThan.
+ public static FilterOperatorType NumberGreaterThan { get; } = new FilterOperatorType(NumberGreaterThanValue);
+ /// NumberLessThanOrEquals.
+ public static FilterOperatorType NumberLessThanOrEquals { get; } = new FilterOperatorType(NumberLessThanOrEqualsValue);
+ /// NumberGreaterThanOrEquals.
+ public static FilterOperatorType NumberGreaterThanOrEquals { get; } = new FilterOperatorType(NumberGreaterThanOrEqualsValue);
+ /// BoolEquals.
+ public static FilterOperatorType BoolEquals { get; } = new FilterOperatorType(BoolEqualsValue);
+ /// StringIn.
+ public static FilterOperatorType StringIn { get; } = new FilterOperatorType(StringInValue);
+ /// StringNotIn.
+ public static FilterOperatorType StringNotIn { get; } = new FilterOperatorType(StringNotInValue);
+ /// StringBeginsWith.
+ public static FilterOperatorType StringBeginsWith { get; } = new FilterOperatorType(StringBeginsWithValue);
+ /// StringEndsWith.
+ public static FilterOperatorType StringEndsWith { get; } = new FilterOperatorType(StringEndsWithValue);
+ /// StringContains.
+ public static FilterOperatorType StringContains { get; } = new FilterOperatorType(StringContainsValue);
+ /// NumberInRange.
+ public static FilterOperatorType NumberInRange { get; } = new FilterOperatorType(NumberInRangeValue);
+ /// NumberNotInRange.
+ public static FilterOperatorType NumberNotInRange { get; } = new FilterOperatorType(NumberNotInRangeValue);
+ /// StringNotBeginsWith.
+ public static FilterOperatorType StringNotBeginsWith { get; } = new FilterOperatorType(StringNotBeginsWithValue);
+ /// StringNotEndsWith.
+ public static FilterOperatorType StringNotEndsWith { get; } = new FilterOperatorType(StringNotEndsWithValue);
+ /// StringNotContains.
+ public static FilterOperatorType StringNotContains { get; } = new FilterOperatorType(StringNotContainsValue);
+ /// IsNullOrUndefined.
+ public static FilterOperatorType IsNullOrUndefined { get; } = new FilterOperatorType(IsNullOrUndefinedValue);
+ /// IsNotNull.
+ public static FilterOperatorType IsNotNull { get; } = new FilterOperatorType(IsNotNullValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(FilterOperatorType left, FilterOperatorType right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(FilterOperatorType left, FilterOperatorType right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator FilterOperatorType(string value) => new FilterOperatorType(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is FilterOperatorType other && Equals(other);
+ ///
+ public bool Equals(FilterOperatorType 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/FiltersConfiguration.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.Serialization.cs
new file mode 100644
index 000000000000..eedda71fef18
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.Serialization.cs
@@ -0,0 +1,84 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class FiltersConfiguration : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsCollectionDefined(IncludedEventTypes))
+ {
+ writer.WritePropertyName("includedEventTypes"u8);
+ writer.WriteStartArray();
+ foreach (var item in IncludedEventTypes)
+ {
+ writer.WriteStringValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsCollectionDefined(Filters))
+ {
+ writer.WritePropertyName("filters"u8);
+ writer.WriteStartArray();
+ foreach (var item in Filters)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static FiltersConfiguration DeserializeFiltersConfiguration(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional> includedEventTypes = default;
+ Optional> filters = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("includedEventTypes"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(item.GetString());
+ }
+ includedEventTypes = array;
+ continue;
+ }
+ if (property.NameEquals("filters"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(Filter.DeserializeFilter(item));
+ }
+ filters = array;
+ continue;
+ }
+ }
+ return new FiltersConfiguration(Optional.ToList(includedEventTypes), Optional.ToList(filters));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.cs
new file mode 100644
index 000000000000..d366de31127c
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/FiltersConfiguration.cs
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Filters configuration for the Event Subscription.
+ public partial class FiltersConfiguration
+ {
+ /// Initializes a new instance of FiltersConfiguration.
+ public FiltersConfiguration()
+ {
+ IncludedEventTypes = new ChangeTrackingList();
+ Filters = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of FiltersConfiguration.
+ /// A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null.
+ ///
+ /// An array of filters that are used for filtering event subscriptions.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include , , , , , , , , , , , , , , , , , and .
+ ///
+ internal FiltersConfiguration(IList includedEventTypes, IList filters)
+ {
+ IncludedEventTypes = includedEventTypes;
+ Filters = filters;
+ }
+
+ /// A list of applicable event types that need to be part of the event subscription. If it is desired to subscribe to all default event types, set the IncludedEventTypes to null.
+ public IList IncludedEventTypes { get; }
+ ///
+ /// An array of filters that are used for filtering event subscriptions.
+ /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
+ /// The available derived classes include , , , , , , , , , , , , , , , , , and .
+ ///
+ public IList Filters { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.Serialization.cs
new file mode 100644
index 000000000000..db8a93723f15
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.Serialization.cs
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class IsNotNullFilter : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("operatorType"u8);
+ writer.WriteStringValue(OperatorType.ToString());
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static IsNotNullFilter DeserializeIsNotNullFilter(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ FilterOperatorType operatorType = default;
+ Optional key = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("operatorType"u8))
+ {
+ operatorType = new FilterOperatorType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ }
+ return new IsNotNullFilter(operatorType, key.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.cs
new file mode 100644
index 000000000000..12455309802c
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNotNullFilter.cs
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// IsNotNull Filter.
+ public partial class IsNotNullFilter : Filter
+ {
+ /// Initializes a new instance of IsNotNullFilter.
+ public IsNotNullFilter()
+ {
+ OperatorType = FilterOperatorType.IsNotNull;
+ }
+
+ /// Initializes a new instance of IsNotNullFilter.
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ /// The field/property in the event based on which you want to filter.
+ internal IsNotNullFilter(FilterOperatorType operatorType, string key) : base(operatorType, key)
+ {
+ OperatorType = operatorType;
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.Serialization.cs
new file mode 100644
index 000000000000..b1be1c81b225
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.Serialization.cs
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class IsNullOrUndefinedFilter : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("operatorType"u8);
+ writer.WriteStringValue(OperatorType.ToString());
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static IsNullOrUndefinedFilter DeserializeIsNullOrUndefinedFilter(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ FilterOperatorType operatorType = default;
+ Optional key = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("operatorType"u8))
+ {
+ operatorType = new FilterOperatorType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ }
+ return new IsNullOrUndefinedFilter(operatorType, key.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.cs
new file mode 100644
index 000000000000..ee00193260e8
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/IsNullOrUndefinedFilter.cs
@@ -0,0 +1,27 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// IsNullOrUndefined Filter.
+ public partial class IsNullOrUndefinedFilter : Filter
+ {
+ /// Initializes a new instance of IsNullOrUndefinedFilter.
+ public IsNullOrUndefinedFilter()
+ {
+ OperatorType = FilterOperatorType.IsNullOrUndefined;
+ }
+
+ /// Initializes a new instance of IsNullOrUndefinedFilter.
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ /// The field/property in the event based on which you want to filter.
+ internal IsNullOrUndefinedFilter(FilterOperatorType operatorType, string key) : base(operatorType, key)
+ {
+ OperatorType = operatorType;
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceData.Serialization.cs
new file mode 100644
index 000000000000..141d0728ca5f
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceData.Serialization.cs
@@ -0,0 +1,278 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ public partial class NamespaceData : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Sku))
+ {
+ writer.WritePropertyName("sku"u8);
+ writer.WriteObjectValue(Sku);
+ }
+ if (Optional.IsDefined(Identity))
+ {
+ writer.WritePropertyName("identity"u8);
+ JsonSerializer.Serialize(writer, Identity);
+ }
+ if (Optional.IsCollectionDefined(Tags))
+ {
+ writer.WritePropertyName("tags"u8);
+ writer.WriteStartObject();
+ foreach (var item in Tags)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteStringValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ writer.WritePropertyName("location"u8);
+ writer.WriteStringValue(Location);
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (Optional.IsCollectionDefined(PrivateEndpointConnections))
+ {
+ writer.WritePropertyName("privateEndpointConnections"u8);
+ writer.WriteStartArray();
+ foreach (var item in PrivateEndpointConnections)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(TopicsConfiguration))
+ {
+ writer.WritePropertyName("topicsConfiguration"u8);
+ writer.WriteObjectValue(TopicsConfiguration);
+ }
+ if (Optional.IsDefined(TopicSpacesConfiguration))
+ {
+ writer.WritePropertyName("topicSpacesConfiguration"u8);
+ writer.WriteObjectValue(TopicSpacesConfiguration);
+ }
+ if (Optional.IsDefined(IsZoneRedundant))
+ {
+ writer.WritePropertyName("isZoneRedundant"u8);
+ writer.WriteBooleanValue(IsZoneRedundant.Value);
+ }
+ if (Optional.IsDefined(PublicNetworkAccess))
+ {
+ writer.WritePropertyName("publicNetworkAccess"u8);
+ writer.WriteStringValue(PublicNetworkAccess.Value.ToString());
+ }
+ if (Optional.IsCollectionDefined(InboundIPRules))
+ {
+ writer.WritePropertyName("inboundIpRules"u8);
+ writer.WriteStartArray();
+ foreach (var item in InboundIPRules)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(MinimumTlsVersionAllowed))
+ {
+ writer.WritePropertyName("minimumTlsVersionAllowed"u8);
+ writer.WriteStringValue(MinimumTlsVersionAllowed.Value.ToString());
+ }
+ writer.WriteEndObject();
+ writer.WriteEndObject();
+ }
+
+ internal static NamespaceData DeserializeNamespaceData(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional sku = default;
+ Optional identity = default;
+ Optional> tags = default;
+ AzureLocation location = default;
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ Optional systemData = default;
+ Optional> privateEndpointConnections = default;
+ Optional provisioningState = default;
+ Optional topicsConfiguration = default;
+ Optional topicSpacesConfiguration = default;
+ Optional isZoneRedundant = default;
+ Optional publicNetworkAccess = default;
+ Optional> inboundIPRules = default;
+ Optional minimumTlsVersionAllowed = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("sku"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ sku = NamespaceSku.DeserializeNamespaceSku(property.Value);
+ continue;
+ }
+ if (property.NameEquals("identity"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ identity = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (property.NameEquals("tags"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ dictionary.Add(property0.Name, property0.Value.GetString());
+ }
+ tags = dictionary;
+ continue;
+ }
+ if (property.NameEquals("location"u8))
+ {
+ location = new AzureLocation(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("privateEndpointConnections"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property0.Value.EnumerateArray())
+ {
+ array.Add(EventGridPrivateEndpointConnectionData.DeserializeEventGridPrivateEndpointConnectionData(item));
+ }
+ privateEndpointConnections = array;
+ continue;
+ }
+ if (property0.NameEquals("provisioningState"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ provisioningState = new NamespaceProvisioningState(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("topicsConfiguration"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ topicsConfiguration = TopicsConfiguration.DeserializeTopicsConfiguration(property0.Value);
+ continue;
+ }
+ if (property0.NameEquals("topicSpacesConfiguration"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ topicSpacesConfiguration = TopicSpacesConfiguration.DeserializeTopicSpacesConfiguration(property0.Value);
+ continue;
+ }
+ if (property0.NameEquals("isZoneRedundant"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ isZoneRedundant = property0.Value.GetBoolean();
+ continue;
+ }
+ if (property0.NameEquals("publicNetworkAccess"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ publicNetworkAccess = new EventGridPublicNetworkAccess(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("inboundIpRules"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property0.Value.EnumerateArray())
+ {
+ array.Add(EventGridInboundIPRule.DeserializeEventGridInboundIPRule(item));
+ }
+ inboundIPRules = array;
+ continue;
+ }
+ if (property0.NameEquals("minimumTlsVersionAllowed"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ minimumTlsVersionAllowed = new TlsVersion(property0.Value.GetString());
+ continue;
+ }
+ }
+ continue;
+ }
+ }
+ return new NamespaceData(id, name, type, systemData.Value, Optional.ToDictionary(tags), location, sku.Value, identity, Optional.ToList(privateEndpointConnections), Optional.ToNullable(provisioningState), topicsConfiguration.Value, topicSpacesConfiguration.Value, Optional.ToNullable(isZoneRedundant), Optional.ToNullable(publicNetworkAccess), Optional.ToList(inboundIPRules), Optional.ToNullable(minimumTlsVersionAllowed));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacePatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacePatch.Serialization.cs
new file mode 100644
index 000000000000..b38e55746759
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacePatch.Serialization.cs
@@ -0,0 +1,65 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NamespacePatch : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsCollectionDefined(Tags))
+ {
+ writer.WritePropertyName("tags"u8);
+ writer.WriteStartObject();
+ foreach (var item in Tags)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteStringValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ if (Optional.IsDefined(Identity))
+ {
+ writer.WritePropertyName("identity"u8);
+ JsonSerializer.Serialize(writer, Identity);
+ }
+ if (Optional.IsDefined(Sku))
+ {
+ writer.WritePropertyName("sku"u8);
+ writer.WriteObjectValue(Sku);
+ }
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (Optional.IsDefined(TopicSpacesConfiguration))
+ {
+ writer.WritePropertyName("topicSpacesConfiguration"u8);
+ writer.WriteObjectValue(TopicSpacesConfiguration);
+ }
+ if (Optional.IsDefined(PublicNetworkAccess))
+ {
+ writer.WritePropertyName("publicNetworkAccess"u8);
+ writer.WriteStringValue(PublicNetworkAccess.Value.ToString());
+ }
+ if (Optional.IsCollectionDefined(InboundIPRules))
+ {
+ writer.WritePropertyName("inboundIpRules"u8);
+ writer.WriteStartArray();
+ foreach (var item in InboundIPRules)
+ {
+ writer.WriteObjectValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WriteEndObject();
+ writer.WriteEndObject();
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacePatch.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacePatch.cs
new file mode 100644
index 000000000000..e5ef3097d008
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacePatch.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Properties to update namespace.
+ public partial class NamespacePatch
+ {
+ /// Initializes a new instance of NamespacePatch.
+ public NamespacePatch()
+ {
+ Tags = new ChangeTrackingDictionary();
+ InboundIPRules = new ChangeTrackingList();
+ }
+
+ /// Tags of the namespace resource.
+ public IDictionary Tags { get; }
+ /// Namespace resource identity information.
+ public ManagedServiceIdentity Identity { get; set; }
+ /// Represents available Sku pricing tiers.
+ public NamespaceSku Sku { get; set; }
+ /// Topic spaces configuration properties that can be updated.
+ public UpdateTopicSpacesConfigurationInfo TopicSpacesConfiguration { get; set; }
+ ///
+ /// This determines if traffic is allowed over public network. By default it is enabled.
+ /// You can further restrict to specific IPs by configuring <seealso cref="P:Microsoft.Azure.Events.ResourceProvider.Common.Contracts.PubSub.NamespaceUpdateParameterProperties.InboundIpRules" />
+ ///
+ public EventGridPublicNetworkAccess? PublicNetworkAccess { get; set; }
+ /// This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled.
+ public IList InboundIPRules { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceProvisioningState.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceProvisioningState.cs
new file mode 100644
index 000000000000..7eb397a8ee76
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceProvisioningState.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Provisioning state of the namespace resource.
+ public readonly partial struct NamespaceProvisioningState : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public NamespaceProvisioningState(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string CreatingValue = "Creating";
+ private const string UpdatingValue = "Updating";
+ private const string DeletingValue = "Deleting";
+ private const string SucceededValue = "Succeeded";
+ private const string CanceledValue = "Canceled";
+ private const string FailedValue = "Failed";
+ private const string DeletedValue = "Deleted";
+ private const string DeleteFailedValue = "DeleteFailed";
+ private const string CreateFailedValue = "CreateFailed";
+ private const string UpdatedFailedValue = "UpdatedFailed";
+
+ /// Creating.
+ public static NamespaceProvisioningState Creating { get; } = new NamespaceProvisioningState(CreatingValue);
+ /// Updating.
+ public static NamespaceProvisioningState Updating { get; } = new NamespaceProvisioningState(UpdatingValue);
+ /// Deleting.
+ public static NamespaceProvisioningState Deleting { get; } = new NamespaceProvisioningState(DeletingValue);
+ /// Succeeded.
+ public static NamespaceProvisioningState Succeeded { get; } = new NamespaceProvisioningState(SucceededValue);
+ /// Canceled.
+ public static NamespaceProvisioningState Canceled { get; } = new NamespaceProvisioningState(CanceledValue);
+ /// Failed.
+ public static NamespaceProvisioningState Failed { get; } = new NamespaceProvisioningState(FailedValue);
+ /// Deleted.
+ public static NamespaceProvisioningState Deleted { get; } = new NamespaceProvisioningState(DeletedValue);
+ /// DeleteFailed.
+ public static NamespaceProvisioningState DeleteFailed { get; } = new NamespaceProvisioningState(DeleteFailedValue);
+ /// CreateFailed.
+ public static NamespaceProvisioningState CreateFailed { get; } = new NamespaceProvisioningState(CreateFailedValue);
+ /// UpdatedFailed.
+ public static NamespaceProvisioningState UpdatedFailed { get; } = new NamespaceProvisioningState(UpdatedFailedValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(NamespaceProvisioningState left, NamespaceProvisioningState right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(NamespaceProvisioningState left, NamespaceProvisioningState right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator NamespaceProvisioningState(string value) => new NamespaceProvisioningState(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is NamespaceProvisioningState other && Equals(other);
+ ///
+ public bool Equals(NamespaceProvisioningState 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/NamespaceRegenerateKeyContent.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.Serialization.cs
new file mode 100644
index 000000000000..b239566e6e92
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.Serialization.cs
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NamespaceRegenerateKeyContent : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("keyName"u8);
+ writer.WriteStringValue(KeyName);
+ writer.WriteEndObject();
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.cs
new file mode 100644
index 000000000000..49ad732da052
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceRegenerateKeyContent.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Namespace regenerate share access key request.
+ public partial class NamespaceRegenerateKeyContent
+ {
+ /// Initializes a new instance of NamespaceRegenerateKeyContent.
+ /// Key name to regenerate key1 or key2.
+ /// is null.
+ public NamespaceRegenerateKeyContent(string keyName)
+ {
+ Argument.AssertNotNull(keyName, nameof(keyName));
+
+ KeyName = keyName;
+ }
+
+ /// Key name to regenerate key1 or key2.
+ public string KeyName { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.Serialization.cs
new file mode 100644
index 000000000000..af28e290b070
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.Serialization.cs
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NamespaceSharedAccessKeys
+ {
+ internal static NamespaceSharedAccessKeys DeserializeNamespaceSharedAccessKeys(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional key1 = default;
+ Optional key2 = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("key1"u8))
+ {
+ key1 = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("key2"u8))
+ {
+ key2 = property.Value.GetString();
+ continue;
+ }
+ }
+ return new NamespaceSharedAccessKeys(key1.Value, key2.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.cs
new file mode 100644
index 000000000000..b1edf8f70214
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSharedAccessKeys.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Shared access keys of the Namespace.
+ public partial class NamespaceSharedAccessKeys
+ {
+ /// Initializes a new instance of NamespaceSharedAccessKeys.
+ internal NamespaceSharedAccessKeys()
+ {
+ }
+
+ /// Initializes a new instance of NamespaceSharedAccessKeys.
+ /// Shared access key1 for the namespace.
+ /// Shared access key2 for the namespace.
+ internal NamespaceSharedAccessKeys(string key1, string key2)
+ {
+ Key1 = key1;
+ Key2 = key2;
+ }
+
+ /// Shared access key1 for the namespace.
+ public string Key1 { get; }
+ /// Shared access key2 for the namespace.
+ public string Key2 { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.Serialization.cs
new file mode 100644
index 000000000000..5693896e55bf
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.Serialization.cs
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NamespaceSku : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Name))
+ {
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name.Value.ToString());
+ }
+ if (Optional.IsDefined(Capacity))
+ {
+ writer.WritePropertyName("capacity"u8);
+ writer.WriteNumberValue(Capacity.Value);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static NamespaceSku DeserializeNamespaceSku(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional name = default;
+ Optional capacity = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("name"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ name = new EventGridSkuName(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("capacity"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ capacity = property.Value.GetInt32();
+ continue;
+ }
+ }
+ return new NamespaceSku(Optional.ToNullable(name), Optional.ToNullable(capacity));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.cs
new file mode 100644
index 000000000000..e326eca0f2b3
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceSku.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Represents available Sku pricing tiers.
+ public partial class NamespaceSku
+ {
+ /// Initializes a new instance of NamespaceSku.
+ public NamespaceSku()
+ {
+ }
+
+ /// Initializes a new instance of NamespaceSku.
+ /// The name of the SKU.
+ ///
+ /// Specifies the number of Throughput Units that defines the capacity for the namespace. The property default value is
+ /// 1 which signifies 1 Throughput Unit = 1MB/s ingress and 2MB/s egress per namespace. Min capacity is 1 and
+ /// max allowed capacity is 20.
+ ///
+ internal NamespaceSku(EventGridSkuName? name, int? capacity)
+ {
+ Name = name;
+ Capacity = capacity;
+ }
+
+ /// The name of the SKU.
+ public EventGridSkuName? Name { get; set; }
+ ///
+ /// Specifies the number of Throughput Units that defines the capacity for the namespace. The property default value is
+ /// 1 which signifies 1 Throughput Unit = 1MB/s ingress and 2MB/s egress per namespace. Min capacity is 1 and
+ /// max allowed capacity is 20.
+ ///
+ public int? Capacity { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicData.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicData.Serialization.cs
new file mode 100644
index 000000000000..cc12978f077b
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicData.Serialization.cs
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.EventGrid
+{
+ public partial class NamespaceTopicData : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (Optional.IsDefined(PublisherType))
+ {
+ writer.WritePropertyName("publisherType"u8);
+ writer.WriteStringValue(PublisherType.Value.ToString());
+ }
+ if (Optional.IsDefined(InputSchema))
+ {
+ writer.WritePropertyName("inputSchema"u8);
+ writer.WriteStringValue(InputSchema.Value.ToString());
+ }
+ if (Optional.IsDefined(EventRetentionInDays))
+ {
+ writer.WritePropertyName("eventRetentionInDays"u8);
+ writer.WriteNumberValue(EventRetentionInDays.Value);
+ }
+ writer.WriteEndObject();
+ writer.WriteEndObject();
+ }
+
+ internal static NamespaceTopicData DeserializeNamespaceTopicData(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ Optional systemData = default;
+ Optional provisioningState = default;
+ Optional publisherType = default;
+ Optional inputSchema = default;
+ Optional eventRetentionInDays = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("provisioningState"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ provisioningState = new NamespaceTopicProvisioningState(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("publisherType"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ publisherType = new PublisherType(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("inputSchema"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ inputSchema = new EventInputSchema(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("eventRetentionInDays"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ eventRetentionInDays = property0.Value.GetInt32();
+ continue;
+ }
+ }
+ continue;
+ }
+ }
+ return new NamespaceTopicData(id, name, type, systemData.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(publisherType), Optional.ToNullable(inputSchema), Optional.ToNullable(eventRetentionInDays));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.Serialization.cs
new file mode 100644
index 000000000000..f4fbf30e9e38
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.Serialization.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NamespaceTopicPatch : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (Optional.IsDefined(EventRetentionInDays))
+ {
+ writer.WritePropertyName("eventRetentionInDays"u8);
+ writer.WriteNumberValue(EventRetentionInDays.Value);
+ }
+ writer.WriteEndObject();
+ writer.WriteEndObject();
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.cs
new file mode 100644
index 000000000000..7a661c18a47f
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicPatch.cs
@@ -0,0 +1,24 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Properties of the namespace topic update.
+ public partial class NamespaceTopicPatch
+ {
+ /// Initializes a new instance of NamespaceTopicPatch.
+ public NamespaceTopicPatch()
+ {
+ }
+
+ ///
+ /// Event retention for the namespace topic expressed in days. The property default value is 1 day.
+ /// Min event retention duration value is 1 day and max event retention duration value is 1 day.
+ ///
+ public int? EventRetentionInDays { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicProvisioningState.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicProvisioningState.cs
new file mode 100644
index 000000000000..4fa49042f1e9
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicProvisioningState.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Provisioning state of the namespace topic.
+ public readonly partial struct NamespaceTopicProvisioningState : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public NamespaceTopicProvisioningState(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string CreatingValue = "Creating";
+ private const string UpdatingValue = "Updating";
+ private const string DeletingValue = "Deleting";
+ private const string SucceededValue = "Succeeded";
+ private const string CanceledValue = "Canceled";
+ private const string FailedValue = "Failed";
+ private const string DeletedValue = "Deleted";
+ private const string DeleteFailedValue = "DeleteFailed";
+ private const string CreateFailedValue = "CreateFailed";
+ private const string UpdatedFailedValue = "UpdatedFailed";
+
+ /// Creating.
+ public static NamespaceTopicProvisioningState Creating { get; } = new NamespaceTopicProvisioningState(CreatingValue);
+ /// Updating.
+ public static NamespaceTopicProvisioningState Updating { get; } = new NamespaceTopicProvisioningState(UpdatingValue);
+ /// Deleting.
+ public static NamespaceTopicProvisioningState Deleting { get; } = new NamespaceTopicProvisioningState(DeletingValue);
+ /// Succeeded.
+ public static NamespaceTopicProvisioningState Succeeded { get; } = new NamespaceTopicProvisioningState(SucceededValue);
+ /// Canceled.
+ public static NamespaceTopicProvisioningState Canceled { get; } = new NamespaceTopicProvisioningState(CanceledValue);
+ /// Failed.
+ public static NamespaceTopicProvisioningState Failed { get; } = new NamespaceTopicProvisioningState(FailedValue);
+ /// Deleted.
+ public static NamespaceTopicProvisioningState Deleted { get; } = new NamespaceTopicProvisioningState(DeletedValue);
+ /// DeleteFailed.
+ public static NamespaceTopicProvisioningState DeleteFailed { get; } = new NamespaceTopicProvisioningState(DeleteFailedValue);
+ /// CreateFailed.
+ public static NamespaceTopicProvisioningState CreateFailed { get; } = new NamespaceTopicProvisioningState(CreateFailedValue);
+ /// UpdatedFailed.
+ public static NamespaceTopicProvisioningState UpdatedFailed { get; } = new NamespaceTopicProvisioningState(UpdatedFailedValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(NamespaceTopicProvisioningState left, NamespaceTopicProvisioningState right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(NamespaceTopicProvisioningState left, NamespaceTopicProvisioningState right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator NamespaceTopicProvisioningState(string value) => new NamespaceTopicProvisioningState(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is NamespaceTopicProvisioningState other && Equals(other);
+ ///
+ public bool Equals(NamespaceTopicProvisioningState 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/NamespaceTopicsListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.Serialization.cs
new file mode 100644
index 000000000000..8a3acf59581e
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.Serialization.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ internal partial class NamespaceTopicsListResult
+ {
+ internal static NamespaceTopicsListResult DeserializeNamespaceTopicsListResult(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional> value = default;
+ Optional nextLink = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(NamespaceTopicData.DeserializeNamespaceTopicData(item));
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"u8))
+ {
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ }
+ return new NamespaceTopicsListResult(Optional.ToList(value), nextLink.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.cs
new file mode 100644
index 000000000000..07de30dbce70
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespaceTopicsListResult.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Result of the List namespace topics operation.
+ internal partial class NamespaceTopicsListResult
+ {
+ /// Initializes a new instance of NamespaceTopicsListResult.
+ internal NamespaceTopicsListResult()
+ {
+ Value = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of NamespaceTopicsListResult.
+ /// A collection of namespace topics.
+ /// A link for the next page of namespace topics.
+ internal NamespaceTopicsListResult(IReadOnlyList value, string nextLink)
+ {
+ Value = value;
+ NextLink = nextLink;
+ }
+
+ /// A collection of namespace topics.
+ public IReadOnlyList Value { get; }
+ /// A link for the next page of namespace topics.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.Serialization.cs
new file mode 100644
index 000000000000..ea6b5dc53455
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.Serialization.cs
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ internal partial class NamespacesListResult
+ {
+ internal static NamespacesListResult DeserializeNamespacesListResult(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional> value = default;
+ Optional nextLink = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(NamespaceData.DeserializeNamespaceData(item));
+ }
+ value = array;
+ continue;
+ }
+ if (property.NameEquals("nextLink"u8))
+ {
+ nextLink = property.Value.GetString();
+ continue;
+ }
+ }
+ return new NamespacesListResult(Optional.ToList(value), nextLink.Value);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.cs
new file mode 100644
index 000000000000..e87afadc8c7d
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NamespacesListResult.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.EventGrid;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// Result of the List Namespaces operation.
+ internal partial class NamespacesListResult
+ {
+ /// Initializes a new instance of NamespacesListResult.
+ internal NamespacesListResult()
+ {
+ Value = new ChangeTrackingList();
+ }
+
+ /// Initializes a new instance of NamespacesListResult.
+ /// A collection of namespaces.
+ /// A link for the next page of namespaces.
+ internal NamespacesListResult(IReadOnlyList value, string nextLink)
+ {
+ Value = value;
+ NextLink = nextLink;
+ }
+
+ /// A collection of namespaces.
+ public IReadOnlyList Value { get; }
+ /// A link for the next page of namespaces.
+ public string NextLink { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.Serialization.cs
new file mode 100644
index 000000000000..bb8a930e658b
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.Serialization.cs
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NumberGreaterThanFilter : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteNumberValue(Value.Value);
+ }
+ writer.WritePropertyName("operatorType"u8);
+ writer.WriteStringValue(OperatorType.ToString());
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static NumberGreaterThanFilter DeserializeNumberGreaterThanFilter(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional value = default;
+ FilterOperatorType operatorType = default;
+ Optional key = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ value = property.Value.GetDouble();
+ continue;
+ }
+ if (property.NameEquals("operatorType"u8))
+ {
+ operatorType = new FilterOperatorType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ }
+ return new NumberGreaterThanFilter(operatorType, key.Value, Optional.ToNullable(value));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.cs
new file mode 100644
index 000000000000..53596cd07da5
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanFilter.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// NumberGreaterThan Filter.
+ public partial class NumberGreaterThanFilter : Filter
+ {
+ /// Initializes a new instance of NumberGreaterThanFilter.
+ public NumberGreaterThanFilter()
+ {
+ OperatorType = FilterOperatorType.NumberGreaterThan;
+ }
+
+ /// Initializes a new instance of NumberGreaterThanFilter.
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ /// The field/property in the event based on which you want to filter.
+ /// The filter value.
+ internal NumberGreaterThanFilter(FilterOperatorType operatorType, string key, double? value) : base(operatorType, key)
+ {
+ Value = value;
+ OperatorType = operatorType;
+ }
+
+ /// The filter value.
+ public double? Value { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.Serialization.cs
new file mode 100644
index 000000000000..87e69a4151a2
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.Serialization.cs
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NumberGreaterThanOrEqualsFilter : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteNumberValue(Value.Value);
+ }
+ writer.WritePropertyName("operatorType"u8);
+ writer.WriteStringValue(OperatorType.ToString());
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static NumberGreaterThanOrEqualsFilter DeserializeNumberGreaterThanOrEqualsFilter(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional value = default;
+ FilterOperatorType operatorType = default;
+ Optional key = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ value = property.Value.GetDouble();
+ continue;
+ }
+ if (property.NameEquals("operatorType"u8))
+ {
+ operatorType = new FilterOperatorType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ }
+ return new NumberGreaterThanOrEqualsFilter(operatorType, key.Value, Optional.ToNullable(value));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.cs
new file mode 100644
index 000000000000..6f1334f6159a
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberGreaterThanOrEqualsFilter.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// NumberGreaterThanOrEquals Filter.
+ public partial class NumberGreaterThanOrEqualsFilter : Filter
+ {
+ /// Initializes a new instance of NumberGreaterThanOrEqualsFilter.
+ public NumberGreaterThanOrEqualsFilter()
+ {
+ OperatorType = FilterOperatorType.NumberGreaterThanOrEquals;
+ }
+
+ /// Initializes a new instance of NumberGreaterThanOrEqualsFilter.
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ /// The field/property in the event based on which you want to filter.
+ /// The filter value.
+ internal NumberGreaterThanOrEqualsFilter(FilterOperatorType operatorType, string key, double? value) : base(operatorType, key)
+ {
+ Value = value;
+ OperatorType = operatorType;
+ }
+
+ /// The filter value.
+ public double? Value { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.Serialization.cs
new file mode 100644
index 000000000000..caa30099b7dc
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.Serialization.cs
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NumberInFilter : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsCollectionDefined(Values))
+ {
+ writer.WritePropertyName("values"u8);
+ writer.WriteStartArray();
+ foreach (var item in Values)
+ {
+ writer.WriteNumberValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WritePropertyName("operatorType"u8);
+ writer.WriteStringValue(OperatorType.ToString());
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static NumberInFilter DeserializeNumberInFilter(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional> values = default;
+ FilterOperatorType operatorType = default;
+ Optional key = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("values"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(item.GetDouble());
+ }
+ values = array;
+ continue;
+ }
+ if (property.NameEquals("operatorType"u8))
+ {
+ operatorType = new FilterOperatorType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ }
+ return new NumberInFilter(operatorType, key.Value, Optional.ToList(values));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.cs
new file mode 100644
index 000000000000..d353feae4a35
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInFilter.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// NumberIn Filter.
+ public partial class NumberInFilter : Filter
+ {
+ /// Initializes a new instance of NumberInFilter.
+ public NumberInFilter()
+ {
+ Values = new ChangeTrackingList();
+ OperatorType = FilterOperatorType.NumberIn;
+ }
+
+ /// Initializes a new instance of NumberInFilter.
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ /// The field/property in the event based on which you want to filter.
+ /// The set of filter values.
+ internal NumberInFilter(FilterOperatorType operatorType, string key, IList values) : base(operatorType, key)
+ {
+ Values = values;
+ OperatorType = operatorType;
+ }
+
+ /// The set of filter values.
+ public IList Values { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.Serialization.cs
new file mode 100644
index 000000000000..0c87129dc773
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.Serialization.cs
@@ -0,0 +1,100 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NumberInRangeFilter : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsCollectionDefined(Values))
+ {
+ writer.WritePropertyName("values"u8);
+ writer.WriteStartArray();
+ foreach (var item in Values)
+ {
+ if (item == null)
+ {
+ writer.WriteNullValue();
+ continue;
+ }
+ writer.WriteStartArray();
+ foreach (var item0 in item)
+ {
+ writer.WriteNumberValue(item0);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WriteEndArray();
+ }
+ writer.WritePropertyName("operatorType"u8);
+ writer.WriteStringValue(OperatorType.ToString());
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static NumberInRangeFilter DeserializeNumberInRangeFilter(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional>> values = default;
+ FilterOperatorType operatorType = default;
+ Optional key = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("values"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List> array = new List>();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ List array0 = new List();
+ foreach (var item0 in item.EnumerateArray())
+ {
+ array0.Add(item0.GetDouble());
+ }
+ array.Add(array0);
+ }
+ }
+ values = array;
+ continue;
+ }
+ if (property.NameEquals("operatorType"u8))
+ {
+ operatorType = new FilterOperatorType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ }
+ return new NumberInRangeFilter(operatorType, key.Value, Optional.ToList(values));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.cs
new file mode 100644
index 000000000000..a12ed4d478e2
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberInRangeFilter.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// NumberInRange Filter.
+ public partial class NumberInRangeFilter : Filter
+ {
+ /// Initializes a new instance of NumberInRangeFilter.
+ public NumberInRangeFilter()
+ {
+ Values = new ChangeTrackingList>();
+ OperatorType = FilterOperatorType.NumberInRange;
+ }
+
+ /// Initializes a new instance of NumberInRangeFilter.
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ /// The field/property in the event based on which you want to filter.
+ /// The set of filter values.
+ internal NumberInRangeFilter(FilterOperatorType operatorType, string key, IList> values) : base(operatorType, key)
+ {
+ Values = values;
+ OperatorType = operatorType;
+ }
+
+ /// The set of filter values.
+ public IList> Values { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.Serialization.cs
new file mode 100644
index 000000000000..2612d85e2978
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.Serialization.cs
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NumberLessThanFilter : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteNumberValue(Value.Value);
+ }
+ writer.WritePropertyName("operatorType"u8);
+ writer.WriteStringValue(OperatorType.ToString());
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static NumberLessThanFilter DeserializeNumberLessThanFilter(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional value = default;
+ FilterOperatorType operatorType = default;
+ Optional key = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ value = property.Value.GetDouble();
+ continue;
+ }
+ if (property.NameEquals("operatorType"u8))
+ {
+ operatorType = new FilterOperatorType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ }
+ return new NumberLessThanFilter(operatorType, key.Value, Optional.ToNullable(value));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.cs
new file mode 100644
index 000000000000..cf80bf454f30
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanFilter.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// NumberLessThan Filter.
+ public partial class NumberLessThanFilter : Filter
+ {
+ /// Initializes a new instance of NumberLessThanFilter.
+ public NumberLessThanFilter()
+ {
+ OperatorType = FilterOperatorType.NumberLessThan;
+ }
+
+ /// Initializes a new instance of NumberLessThanFilter.
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ /// The field/property in the event based on which you want to filter.
+ /// The filter value.
+ internal NumberLessThanFilter(FilterOperatorType operatorType, string key, double? value) : base(operatorType, key)
+ {
+ Value = value;
+ OperatorType = operatorType;
+ }
+
+ /// The filter value.
+ public double? Value { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.Serialization.cs
new file mode 100644
index 000000000000..22aec45cdc36
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.Serialization.cs
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NumberLessThanOrEqualsFilter : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Value))
+ {
+ writer.WritePropertyName("value"u8);
+ writer.WriteNumberValue(Value.Value);
+ }
+ writer.WritePropertyName("operatorType"u8);
+ writer.WriteStringValue(OperatorType.ToString());
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static NumberLessThanOrEqualsFilter DeserializeNumberLessThanOrEqualsFilter(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional value = default;
+ FilterOperatorType operatorType = default;
+ Optional key = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("value"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ value = property.Value.GetDouble();
+ continue;
+ }
+ if (property.NameEquals("operatorType"u8))
+ {
+ operatorType = new FilterOperatorType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ }
+ return new NumberLessThanOrEqualsFilter(operatorType, key.Value, Optional.ToNullable(value));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.cs
new file mode 100644
index 000000000000..70e05231f709
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberLessThanOrEqualsFilter.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// NumberLessThanOrEquals Filter.
+ public partial class NumberLessThanOrEqualsFilter : Filter
+ {
+ /// Initializes a new instance of NumberLessThanOrEqualsFilter.
+ public NumberLessThanOrEqualsFilter()
+ {
+ OperatorType = FilterOperatorType.NumberLessThanOrEquals;
+ }
+
+ /// Initializes a new instance of NumberLessThanOrEqualsFilter.
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ /// The field/property in the event based on which you want to filter.
+ /// The filter value.
+ internal NumberLessThanOrEqualsFilter(FilterOperatorType operatorType, string key, double? value) : base(operatorType, key)
+ {
+ Value = value;
+ OperatorType = operatorType;
+ }
+
+ /// The filter value.
+ public double? Value { get; set; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.Serialization.cs
new file mode 100644
index 000000000000..bcd8fe859ee1
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.Serialization.cs
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NumberNotInFilter : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsCollectionDefined(Values))
+ {
+ writer.WritePropertyName("values"u8);
+ writer.WriteStartArray();
+ foreach (var item in Values)
+ {
+ writer.WriteNumberValue(item);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WritePropertyName("operatorType"u8);
+ writer.WriteStringValue(OperatorType.ToString());
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static NumberNotInFilter DeserializeNumberNotInFilter(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional> values = default;
+ FilterOperatorType operatorType = default;
+ Optional key = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("values"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ array.Add(item.GetDouble());
+ }
+ values = array;
+ continue;
+ }
+ if (property.NameEquals("operatorType"u8))
+ {
+ operatorType = new FilterOperatorType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ }
+ return new NumberNotInFilter(operatorType, key.Value, Optional.ToList(values));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.cs
new file mode 100644
index 000000000000..9e048d7570de
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInFilter.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// NumberNotIn Filter.
+ public partial class NumberNotInFilter : Filter
+ {
+ /// Initializes a new instance of NumberNotInFilter.
+ public NumberNotInFilter()
+ {
+ Values = new ChangeTrackingList();
+ OperatorType = FilterOperatorType.NumberNotIn;
+ }
+
+ /// Initializes a new instance of NumberNotInFilter.
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ /// The field/property in the event based on which you want to filter.
+ /// The set of filter values.
+ internal NumberNotInFilter(FilterOperatorType operatorType, string key, IList values) : base(operatorType, key)
+ {
+ Values = values;
+ OperatorType = operatorType;
+ }
+
+ /// The set of filter values.
+ public IList Values { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.Serialization.cs
new file mode 100644
index 000000000000..5e2411559173
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.Serialization.cs
@@ -0,0 +1,100 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class NumberNotInRangeFilter : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ if (Optional.IsCollectionDefined(Values))
+ {
+ writer.WritePropertyName("values"u8);
+ writer.WriteStartArray();
+ foreach (var item in Values)
+ {
+ if (item == null)
+ {
+ writer.WriteNullValue();
+ continue;
+ }
+ writer.WriteStartArray();
+ foreach (var item0 in item)
+ {
+ writer.WriteNumberValue(item0);
+ }
+ writer.WriteEndArray();
+ }
+ writer.WriteEndArray();
+ }
+ writer.WritePropertyName("operatorType"u8);
+ writer.WriteStringValue(OperatorType.ToString());
+ if (Optional.IsDefined(Key))
+ {
+ writer.WritePropertyName("key"u8);
+ writer.WriteStringValue(Key);
+ }
+ writer.WriteEndObject();
+ }
+
+ internal static NumberNotInRangeFilter DeserializeNumberNotInRangeFilter(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ Optional>> values = default;
+ FilterOperatorType operatorType = default;
+ Optional key = default;
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("values"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List> array = new List>();
+ foreach (var item in property.Value.EnumerateArray())
+ {
+ if (item.ValueKind == JsonValueKind.Null)
+ {
+ array.Add(null);
+ }
+ else
+ {
+ List array0 = new List();
+ foreach (var item0 in item.EnumerateArray())
+ {
+ array0.Add(item0.GetDouble());
+ }
+ array.Add(array0);
+ }
+ }
+ values = array;
+ continue;
+ }
+ if (property.NameEquals("operatorType"u8))
+ {
+ operatorType = new FilterOperatorType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("key"u8))
+ {
+ key = property.Value.GetString();
+ continue;
+ }
+ }
+ return new NumberNotInRangeFilter(operatorType, key.Value, Optional.ToList(values));
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.cs
new file mode 100644
index 000000000000..ac6357a08d30
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/NumberNotInRangeFilter.cs
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Collections.Generic;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ /// NumberNotInRange Filter.
+ public partial class NumberNotInRangeFilter : Filter
+ {
+ /// Initializes a new instance of NumberNotInRangeFilter.
+ public NumberNotInRangeFilter()
+ {
+ Values = new ChangeTrackingList>();
+ OperatorType = FilterOperatorType.NumberNotInRange;
+ }
+
+ /// Initializes a new instance of NumberNotInRangeFilter.
+ /// The operator type used for filtering, e.g., NumberIn, StringContains, BoolEquals and others.
+ /// The field/property in the event based on which you want to filter.
+ /// The set of filter values.
+ internal NumberNotInRangeFilter(FilterOperatorType operatorType, string key, IList> values) : base(operatorType, key)
+ {
+ Values = values;
+ OperatorType = operatorType;
+ }
+
+ /// The set of filter values.
+ public IList> Values { get; }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs
new file mode 100644
index 000000000000..c83ee0df852b
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.Serialization.cs
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ public partial class PartnerClientAuthentication : IUtf8JsonSerializable
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
+ {
+ writer.WriteStartObject();
+ writer.WritePropertyName("clientAuthenticationType"u8);
+ writer.WriteStringValue(ClientAuthenticationType.ToString());
+ writer.WriteEndObject();
+ }
+
+ internal static PartnerClientAuthentication DeserializePartnerClientAuthentication(JsonElement element)
+ {
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ if (element.TryGetProperty("clientAuthenticationType", out JsonElement discriminator))
+ {
+ switch (discriminator.GetString())
+ {
+ case "AzureAD": return AzureADPartnerClientAuthentication.DeserializeAzureADPartnerClientAuthentication(element);
+ }
+ }
+ return UnknownPartnerClientAuthentication.DeserializeUnknownPartnerClientAuthentication(element);
+ }
+ }
+}
diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs
new file mode 100644
index 000000000000..2dc66dd9bc01
--- /dev/null
+++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs
@@ -0,0 +1,32 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+namespace Azure.ResourceManager.EventGrid.Models
+{
+ ///
+ /// Partner client authentication
+ /// Please note