diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/AzSdk.RP.props b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/AzSdk.RP.props
index 1a40e37a3d1fa..034bd23c36f41 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/AzSdk.RP.props
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/AzSdk.RP.props
@@ -1,7 +1,7 @@
- EventGrid_2021-10-15-preview;
+ EventGrid_2022-06-15;
$(PackageTags);$(CommonTags);$(AzureApiTag);
\ No newline at end of file
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/CHANGELOG.md b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/CHANGELOG.md
index 99d823972a2ef..02edd487327e8 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/CHANGELOG.md
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/CHANGELOG.md
@@ -1,5 +1,12 @@
# Release History
+## 9.0.0 (2022-06)
+- This release corresponds to api-version 2022-06-15 which includes the following new features:
+ * Partner Events.
+ * Nested Event Subscriptions for Domains, Domain Topics, and Topics.
+ * Data residency for Topics and Domains.
+ * Management group support.
+
## 7.0.0 (2021-12)
- This release corresponds to api-version 2021-12-01 which includes the following new features:
* MSI for delivery to first party destinations.
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/DomainEventSubscriptionsOperations.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/DomainEventSubscriptionsOperations.cs
index 8c685b13c0d60..f1dde5696dae7 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/DomainEventSubscriptionsOperations.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/DomainEventSubscriptionsOperations.cs
@@ -51,21 +51,19 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
public EventGridManagementClient Client { get; private set; }
///
- /// Get an event subscription of a domain.
+ /// Get delivery attributes for an event subscription for domain.
///
///
- /// Get properties of an event subscription of a domain.
+ /// Get all delivery attributes for an event subscription for domain.
///
///
/// The name of the resource group within the user's subscription.
///
///
- /// Name of the partner topic.
+ /// Name of the domain topic.
///
///
- /// Name of the event subscription to be found. Event subscription names must
- /// be between 3 and 100 characters in length and use alphanumeric letters
- /// only.
+ /// Name of the event subscription.
///
///
/// Headers that will be added to request.
@@ -88,7 +86,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetDeliveryAttributesWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -121,11 +119,11 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
tracingParameters.Add("domainName", domainName);
tracingParameters.Add("eventSubscriptionName", eventSubscriptionName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetDeliveryAttributes", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName));
@@ -142,7 +140,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.Method = new HttpMethod("POST");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -228,7 +226,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -241,7 +239,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -261,117 +259,23 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
}
///
- /// Create or update an event subscription to a domain.
- ///
- ///
- /// Asynchronously creates a new event subscription or updates an existing
- /// event subscription.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the domain topic.
- ///
- ///
- /// Name of the event subscription to be created. Event subscription names must
- /// be between 3 and 100 characters in length and use alphanumeric letters
- /// only.
- ///
- ///
- /// Event subscription properties containing the destination and filter
- /// information.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, EventSubscription eventSubscriptionInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send Request
- AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Delete an event subscription for a domain.
+ /// Get an event subscription of a domain.
///
///
- /// Delete an existing event subscription for a domain.
+ /// Get properties of an event subscription of a domain.
///
///
/// The name of the resource group within the user's subscription.
///
///
- /// Name of the domain.
+ /// Name of the partner topic.
///
///
- /// Name of the event subscription to be deleted. Event subscription names must
+ /// Name of the event subscription to be found. Event subscription names must
/// be between 3 and 100 characters in length and use alphanumeric letters
/// only.
///
///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, domainName, eventSubscriptionName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Update an event subscription for a domain.
- ///
- ///
- /// Update an existing event subscription for a topic.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the domain.
- ///
- ///
- /// Name of the event subscription to be updated.
- ///
- ///
- /// Updated event subscription information.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send Request
- AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Get full URL of an event subscription for domain.
- ///
- ///
- /// Get the full endpoint URL for an event subscription for domain.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the domain topic.
- ///
- ///
- /// Name of the event subscription.
- ///
- ///
/// Headers that will be added to request.
///
///
@@ -392,7 +296,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetFullUrlWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -425,11 +329,11 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
tracingParameters.Add("domainName", domainName);
tracingParameters.Add("eventSubscriptionName", eventSubscriptionName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetFullUrl", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName));
@@ -446,7 +350,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -532,7 +436,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -545,7 +449,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -565,10 +469,45 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
}
///
- /// List all event subscriptions for a specific domain.
+ /// Create or update an event subscription to a domain.
///
///
- /// List all event subscriptions that have been created for a specific topic.
+ /// Asynchronously creates a new event subscription or updates an existing
+ /// event subscription.
+ ///
+ ///
+ /// The name of the resource group within the user's subscription.
+ ///
+ ///
+ /// Name of the domain topic.
+ ///
+ ///
+ /// Name of the event subscription to be created. Event subscription names must
+ /// be between 3 and 100 characters in length and use alphanumeric letters
+ /// only.
+ ///
+ ///
+ /// Event subscription properties containing the destination and filter
+ /// information.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, EventSubscription eventSubscriptionInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Delete an event subscription for a domain.
+ ///
+ ///
+ /// Delete an existing event subscription for a domain.
///
///
/// The name of the resource group within the user's subscription.
@@ -576,19 +515,69 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
///
/// Name of the domain.
///
- ///
- /// 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'.
+ ///
+ /// Name of the event subscription to be deleted. Event subscription names must
+ /// be between 3 and 100 characters in length and use alphanumeric letters
+ /// only.
///
- ///
- /// 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 headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, domainName, eventSubscriptionName, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Update an event subscription for a domain.
+ ///
+ ///
+ /// Update an existing event subscription for a topic.
+ ///
+ ///
+ /// The name of the resource group within the user's subscription.
+ ///
+ ///
+ /// Name of the domain.
+ ///
+ ///
+ /// Name of the event subscription to be updated.
+ ///
+ ///
+ /// Updated event subscription information.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, EventSubscriptionUpdateParameters eventSubscriptionUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get full URL of an event subscription for domain.
+ ///
+ ///
+ /// Get the full endpoint URL for an event subscription for domain.
+ ///
+ ///
+ /// The name of the resource group within the user's subscription.
+ ///
+ ///
+ /// Name of the domain topic.
+ ///
+ ///
+ /// Name of the event subscription.
///
///
/// Headers that will be added to request.
@@ -611,7 +600,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string domainName, string filter = default(string), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> GetFullUrlWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -625,6 +614,10 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "domainName");
}
+ if (eventSubscriptionName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "eventSubscriptionName");
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -638,30 +631,22 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("domainName", domainName);
- tracingParameters.Add("filter", filter);
- tracingParameters.Add("top", top);
+ tracingParameters.Add("eventSubscriptionName", eventSubscriptionName);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "GetFullUrl", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName));
+ _url = _url.Replace("{eventSubscriptionName}", System.Uri.EscapeDataString(eventSubscriptionName));
List _queryParameters = new List();
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
- if (filter != null)
- {
- _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter)));
- }
- if (top != null)
- {
- _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"'))));
- }
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
@@ -669,7 +654,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
+ _httpRequest.Method = new HttpMethod("POST");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -755,7 +740,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse>();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -768,7 +753,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -788,19 +773,30 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
}
///
- /// Get delivery attributes for an event subscription for domain.
+ /// List all event subscriptions for a specific domain.
///
///
- /// Get all delivery attributes for an event subscription for domain.
+ /// List all event subscriptions that have been created for a specific topic.
///
///
/// The name of the resource group within the user's subscription.
///
///
- /// Name of the domain topic.
+ /// Name of the domain.
///
- ///
- /// Name of the event subscription.
+ ///
+ /// 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.
///
///
/// Headers that will be added to request.
@@ -823,7 +819,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> GetDeliveryAttributesWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string domainName, string filter = default(string), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (Client.SubscriptionId == null)
{
@@ -837,10 +833,6 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "domainName");
}
- if (eventSubscriptionName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "eventSubscriptionName");
- }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -854,22 +846,30 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
Dictionary tracingParameters = new Dictionary();
tracingParameters.Add("resourceGroupName", resourceGroupName);
tracingParameters.Add("domainName", domainName);
- tracingParameters.Add("eventSubscriptionName", eventSubscriptionName);
+ tracingParameters.Add("filter", filter);
+ tracingParameters.Add("top", top);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "GetDeliveryAttributes", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes").ToString();
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/domains/{domainName}/eventSubscriptions").ToString();
_url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
_url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
_url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName));
- _url = _url.Replace("{eventSubscriptionName}", System.Uri.EscapeDataString(eventSubscriptionName));
List _queryParameters = new List();
if (Client.ApiVersion != null)
{
_queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
}
+ if (filter != null)
+ {
+ _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter)));
+ }
+ if (top != null)
+ {
+ _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"'))));
+ }
if (_queryParameters.Count > 0)
{
_url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
@@ -877,7 +877,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
// Create HTTP transport objects
var _httpRequest = new HttpRequestMessage();
HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.Method = new HttpMethod("GET");
_httpRequest.RequestUri = new System.Uri(_url);
// Set Headers
if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
@@ -963,7 +963,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse>();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -976,7 +976,7 @@ internal DomainEventSubscriptionsOperations(EventGridManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/DomainEventSubscriptionsOperationsExtensions.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/DomainEventSubscriptionsOperationsExtensions.cs
index dba6c92b9363a..338a949e42218 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/DomainEventSubscriptionsOperationsExtensions.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/DomainEventSubscriptionsOperationsExtensions.cs
@@ -21,6 +21,58 @@ namespace Microsoft.Azure.Management.EventGrid
///
public static partial class DomainEventSubscriptionsOperationsExtensions
{
+ ///
+ /// Get delivery attributes for an event subscription for domain.
+ ///
+ ///
+ /// Get all delivery attributes for an event subscription for domain.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group within the user's subscription.
+ ///
+ ///
+ /// Name of the domain topic.
+ ///
+ ///
+ /// Name of the event subscription.
+ ///
+ public static DeliveryAttributeListResult GetDeliveryAttributes(this IDomainEventSubscriptionsOperations operations, string resourceGroupName, string domainName, string eventSubscriptionName)
+ {
+ return operations.GetDeliveryAttributesAsync(resourceGroupName, domainName, eventSubscriptionName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get delivery attributes for an event subscription for domain.
+ ///
+ ///
+ /// Get all delivery attributes for an event subscription for domain.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group within the user's subscription.
+ ///
+ ///
+ /// Name of the domain topic.
+ ///
+ ///
+ /// Name of the event subscription.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetDeliveryAttributesAsync(this IDomainEventSubscriptionsOperations operations, string resourceGroupName, string domainName, string eventSubscriptionName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetDeliveryAttributesWithHttpMessagesAsync(resourceGroupName, domainName, eventSubscriptionName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Get an event subscription of a domain.
///
@@ -380,58 +432,6 @@ public static EventSubscriptionFullUrl GetFullUrl(this IDomainEventSubscriptions
}
}
- ///
- /// Get delivery attributes for an event subscription for domain.
- ///
- ///
- /// Get all delivery attributes for an event subscription for domain.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the domain topic.
- ///
- ///
- /// Name of the event subscription.
- ///
- public static DeliveryAttributeListResult GetDeliveryAttributes(this IDomainEventSubscriptionsOperations operations, string resourceGroupName, string domainName, string eventSubscriptionName)
- {
- return operations.GetDeliveryAttributesAsync(resourceGroupName, domainName, eventSubscriptionName).GetAwaiter().GetResult();
- }
-
- ///
- /// Get delivery attributes for an event subscription for domain.
- ///
- ///
- /// Get all delivery attributes for an event subscription for domain.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the domain topic.
- ///
- ///
- /// Name of the event subscription.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetDeliveryAttributesAsync(this IDomainEventSubscriptionsOperations operations, string resourceGroupName, string domainName, string eventSubscriptionName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetDeliveryAttributesWithHttpMessagesAsync(resourceGroupName, domainName, eventSubscriptionName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
///
/// Create or update an event subscription to a domain.
///
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/EventChannelsOperations.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/EventChannelsOperations.cs
deleted file mode 100644
index 7e3c982312e86..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/EventChannelsOperations.cs
+++ /dev/null
@@ -1,1098 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// EventChannelsOperations operations.
- ///
- internal partial class EventChannelsOperations : IServiceOperations, IEventChannelsOperations
- {
- ///
- /// Initializes a new instance of the EventChannelsOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal EventChannelsOperations(EventGridManagementClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the EventGridManagementClient
- ///
- public EventGridManagementClient Client { get; private set; }
-
- ///
- /// Get an event channel.
- ///
- ///
- /// Get properties of an event channel.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string partnerNamespaceName, string eventChannelName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (partnerNamespaceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "partnerNamespaceName");
- }
- if (eventChannelName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "eventChannelName");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("partnerNamespaceName", partnerNamespaceName);
- tracingParameters.Add("eventChannelName", eventChannelName);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{partnerNamespaceName}", System.Uri.EscapeDataString(partnerNamespaceName));
- _url = _url.Replace("{eventChannelName}", System.Uri.EscapeDataString(eventChannelName));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Create an event channel.
- ///
- ///
- /// Asynchronously creates a new event channel with the specified parameters.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// EventChannel information.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string partnerNamespaceName, string eventChannelName, EventChannel eventChannelInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (partnerNamespaceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "partnerNamespaceName");
- }
- if (eventChannelName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "eventChannelName");
- }
- if (eventChannelInfo == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "eventChannelInfo");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("partnerNamespaceName", partnerNamespaceName);
- tracingParameters.Add("eventChannelName", eventChannelName);
- tracingParameters.Add("eventChannelInfo", eventChannelInfo);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{partnerNamespaceName}", System.Uri.EscapeDataString(partnerNamespaceName));
- _url = _url.Replace("{eventChannelName}", System.Uri.EscapeDataString(eventChannelName));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(eventChannelInfo != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(eventChannelInfo, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Delete an event channel.
- ///
- ///
- /// Delete existing event channel.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string partnerNamespaceName, string eventChannelName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, partnerNamespaceName, eventChannelName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// List event channels.
- ///
- ///
- /// List all the event channels in a partner namespace.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// 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.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListByPartnerNamespaceWithHttpMessagesAsync(string resourceGroupName, string partnerNamespaceName, string filter = default(string), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (partnerNamespaceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "partnerNamespaceName");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("partnerNamespaceName", partnerNamespaceName);
- tracingParameters.Add("filter", filter);
- tracingParameters.Add("top", top);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByPartnerNamespace", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{partnerNamespaceName}", System.Uri.EscapeDataString(partnerNamespaceName));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (filter != null)
- {
- _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter)));
- }
- if (top != null)
- {
- _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"'))));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Delete an event channel.
- ///
- ///
- /// Delete existing event channel.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string partnerNamespaceName, string eventChannelName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (partnerNamespaceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "partnerNamespaceName");
- }
- if (eventChannelName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "eventChannelName");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("partnerNamespaceName", partnerNamespaceName);
- tracingParameters.Add("eventChannelName", eventChannelName);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{partnerNamespaceName}", System.Uri.EscapeDataString(partnerNamespaceName));
- _url = _url.Replace("{eventChannelName}", System.Uri.EscapeDataString(eventChannelName));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("DELETE");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// List event channels.
- ///
- ///
- /// List all the event channels in a partner namespace.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListByPartnerNamespaceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (nextPageLink == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("nextPageLink", nextPageLink);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByPartnerNamespaceNext", tracingParameters);
- }
- // Construct URL
- string _url = "{nextLink}";
- _url = _url.Replace("{nextLink}", nextPageLink);
- List _queryParameters = new List();
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/EventChannelsOperationsExtensions.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/EventChannelsOperationsExtensions.cs
deleted file mode 100644
index 69bb2a0d215ef..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/EventChannelsOperationsExtensions.cs
+++ /dev/null
@@ -1,347 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for EventChannelsOperations.
- ///
- public static partial class EventChannelsOperationsExtensions
- {
- ///
- /// Get an event channel.
- ///
- ///
- /// Get properties of an event channel.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- public static EventChannel Get(this IEventChannelsOperations operations, string resourceGroupName, string partnerNamespaceName, string eventChannelName)
- {
- return operations.GetAsync(resourceGroupName, partnerNamespaceName, eventChannelName).GetAwaiter().GetResult();
- }
-
- ///
- /// Get an event channel.
- ///
- ///
- /// Get properties of an event channel.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task GetAsync(this IEventChannelsOperations operations, string resourceGroupName, string partnerNamespaceName, string eventChannelName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, partnerNamespaceName, eventChannelName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Create an event channel.
- ///
- ///
- /// Asynchronously creates a new event channel with the specified parameters.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// EventChannel information.
- ///
- public static EventChannel CreateOrUpdate(this IEventChannelsOperations operations, string resourceGroupName, string partnerNamespaceName, string eventChannelName, EventChannel eventChannelInfo)
- {
- return operations.CreateOrUpdateAsync(resourceGroupName, partnerNamespaceName, eventChannelName, eventChannelInfo).GetAwaiter().GetResult();
- }
-
- ///
- /// Create an event channel.
- ///
- ///
- /// Asynchronously creates a new event channel with the specified parameters.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// EventChannel information.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task CreateOrUpdateAsync(this IEventChannelsOperations operations, string resourceGroupName, string partnerNamespaceName, string eventChannelName, EventChannel eventChannelInfo, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, partnerNamespaceName, eventChannelName, eventChannelInfo, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Delete an event channel.
- ///
- ///
- /// Delete existing event channel.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- public static void Delete(this IEventChannelsOperations operations, string resourceGroupName, string partnerNamespaceName, string eventChannelName)
- {
- operations.DeleteAsync(resourceGroupName, partnerNamespaceName, eventChannelName).GetAwaiter().GetResult();
- }
-
- ///
- /// Delete an event channel.
- ///
- ///
- /// Delete existing event channel.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task DeleteAsync(this IEventChannelsOperations operations, string resourceGroupName, string partnerNamespaceName, string eventChannelName, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, partnerNamespaceName, eventChannelName, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- ///
- /// List event channels.
- ///
- ///
- /// List all the event channels in a partner namespace.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// 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.
- ///
- public static IPage ListByPartnerNamespace(this IEventChannelsOperations operations, string resourceGroupName, string partnerNamespaceName, string filter = default(string), int? top = default(int?))
- {
- return operations.ListByPartnerNamespaceAsync(resourceGroupName, partnerNamespaceName, filter, top).GetAwaiter().GetResult();
- }
-
- ///
- /// List event channels.
- ///
- ///
- /// List all the event channels in a partner namespace.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// 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.
- ///
- public static async Task> ListByPartnerNamespaceAsync(this IEventChannelsOperations operations, string resourceGroupName, string partnerNamespaceName, string filter = default(string), int? top = default(int?), CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListByPartnerNamespaceWithHttpMessagesAsync(resourceGroupName, partnerNamespaceName, filter, top, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- ///
- /// Delete an event channel.
- ///
- ///
- /// Delete existing event channel.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- public static void BeginDelete(this IEventChannelsOperations operations, string resourceGroupName, string partnerNamespaceName, string eventChannelName)
- {
- operations.BeginDeleteAsync(resourceGroupName, partnerNamespaceName, eventChannelName).GetAwaiter().GetResult();
- }
-
- ///
- /// Delete an event channel.
- ///
- ///
- /// Delete existing event channel.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task BeginDeleteAsync(this IEventChannelsOperations operations, string resourceGroupName, string partnerNamespaceName, string eventChannelName, CancellationToken cancellationToken = default(CancellationToken))
- {
- (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, partnerNamespaceName, eventChannelName, null, cancellationToken).ConfigureAwait(false)).Dispose();
- }
-
- ///
- /// List event channels.
- ///
- ///
- /// List all the event channels in a partner namespace.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- public static IPage ListByPartnerNamespaceNext(this IEventChannelsOperations operations, string nextPageLink)
- {
- return operations.ListByPartnerNamespaceNextAsync(nextPageLink).GetAwaiter().GetResult();
- }
-
- ///
- /// List event channels.
- ///
- ///
- /// List all the event channels in a partner namespace.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task> ListByPartnerNamespaceNextAsync(this IEventChannelsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListByPartnerNamespaceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/EventGridManagementClient.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/EventGridManagementClient.cs
index 2bf858fb20291..f2bfe1f977f4a 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/EventGridManagementClient.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/EventGridManagementClient.cs
@@ -92,9 +92,14 @@ public partial class EventGridManagementClient : ServiceClient
- /// Gets the IEventChannelsOperations.
+ /// Gets the ITopicEventSubscriptionsOperations.
+ ///
+ public virtual ITopicEventSubscriptionsOperations TopicEventSubscriptions { get; private set; }
+
+ ///
+ /// Gets the IDomainEventSubscriptionsOperations.
///
- public virtual IEventChannelsOperations EventChannels { get; private set; }
+ public virtual IDomainEventSubscriptionsOperations DomainEventSubscriptions { get; private set; }
///
/// Gets the IEventSubscriptionsOperations.
@@ -106,16 +111,6 @@ public partial class EventGridManagementClient : ServiceClient
public virtual IDomainTopicEventSubscriptionsOperations DomainTopicEventSubscriptions { get; private set; }
- ///
- /// Gets the ITopicEventSubscriptionsOperations.
- ///
- public virtual ITopicEventSubscriptionsOperations TopicEventSubscriptions { get; private set; }
-
- ///
- /// Gets the IDomainEventSubscriptionsOperations.
- ///
- public virtual IDomainEventSubscriptionsOperations DomainEventSubscriptions { get; private set; }
-
///
/// Gets the ISystemTopicEventSubscriptionsOperations.
///
@@ -132,14 +127,14 @@ public partial class EventGridManagementClient : ServiceClient
- /// Gets the IPartnerConfigurationsOperations.
+ /// Gets the ITopicsOperations.
///
- public virtual IPartnerConfigurationsOperations PartnerConfigurations { get; private set; }
+ public virtual ITopicsOperations Topics { get; private set; }
///
- /// Gets the IPartnerDestinationsOperations.
+ /// Gets the IPartnerConfigurationsOperations.
///
- public virtual IPartnerDestinationsOperations PartnerDestinations { get; private set; }
+ public virtual IPartnerConfigurationsOperations PartnerConfigurations { get; private set; }
///
/// Gets the IPartnerNamespacesOperations.
@@ -171,11 +166,6 @@ public partial class EventGridManagementClient : ServiceClient
public virtual ISystemTopicsOperations SystemTopics { get; private set; }
- ///
- /// Gets the ITopicsOperations.
- ///
- public virtual ITopicsOperations Topics { get; private set; }
-
///
/// Gets the IExtensionTopicsOperations.
///
@@ -435,28 +425,26 @@ private void Initialize()
Channels = new ChannelsOperations(this);
Domains = new DomainsOperations(this);
DomainTopics = new DomainTopicsOperations(this);
- EventChannels = new EventChannelsOperations(this);
- EventSubscriptions = new EventSubscriptionsOperations(this);
- DomainTopicEventSubscriptions = new DomainTopicEventSubscriptionsOperations(this);
TopicEventSubscriptions = new TopicEventSubscriptionsOperations(this);
DomainEventSubscriptions = new DomainEventSubscriptionsOperations(this);
+ EventSubscriptions = new EventSubscriptionsOperations(this);
+ DomainTopicEventSubscriptions = new DomainTopicEventSubscriptionsOperations(this);
SystemTopicEventSubscriptions = new SystemTopicEventSubscriptionsOperations(this);
PartnerTopicEventSubscriptions = new PartnerTopicEventSubscriptionsOperations(this);
Operations = new Operations(this);
+ Topics = new TopicsOperations(this);
PartnerConfigurations = new PartnerConfigurationsOperations(this);
- PartnerDestinations = new PartnerDestinationsOperations(this);
PartnerNamespaces = new PartnerNamespacesOperations(this);
PartnerRegistrations = new PartnerRegistrationsOperations(this);
PartnerTopics = new PartnerTopicsOperations(this);
PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
PrivateLinkResources = new PrivateLinkResourcesOperations(this);
SystemTopics = new SystemTopicsOperations(this);
- Topics = new TopicsOperations(this);
ExtensionTopics = new ExtensionTopicsOperations(this);
TopicTypes = new TopicTypesOperations(this);
VerifiedPartners = new VerifiedPartnersOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2021-10-15-preview";
+ ApiVersion = "2022-06-15";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
@@ -486,18 +474,12 @@ private void Initialize()
new Iso8601TimeSpanConverter()
}
};
- SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("endpointType"));
- DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("endpointType"));
- SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("clientAuthenticationType"));
- DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("clientAuthenticationType"));
- SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("endpointType"));
- DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("endpointType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("inputSchemaMappingType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("inputSchemaMappingType"));
- SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("operatorType"));
- DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("operatorType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("endpointType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("endpointType"));
+ SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("operatorType"));
+ DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("operatorType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("endpointType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("endpointType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("type"));
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IDomainEventSubscriptionsOperations.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IDomainEventSubscriptionsOperations.cs
index 1b85095df655d..55c00e44cb91c 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IDomainEventSubscriptionsOperations.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IDomainEventSubscriptionsOperations.cs
@@ -23,6 +23,37 @@ namespace Microsoft.Azure.Management.EventGrid
///
public partial interface IDomainEventSubscriptionsOperations
{
+ ///
+ /// Get delivery attributes for an event subscription for domain.
+ ///
+ ///
+ /// Get all delivery attributes for an event subscription for domain.
+ ///
+ ///
+ /// The name of the resource group within the user's subscription.
+ ///
+ ///
+ /// Name of the domain topic.
+ ///
+ ///
+ /// Name of the event subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetDeliveryAttributesWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Get an event subscription of a domain.
///
@@ -235,37 +266,6 @@ public partial interface IDomainEventSubscriptionsOperations
///
Task>> ListWithHttpMessagesAsync(string resourceGroupName, string domainName, string filter = default(string), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Get delivery attributes for an event subscription for domain.
- ///
- ///
- /// Get all delivery attributes for an event subscription for domain.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the domain topic.
- ///
- ///
- /// Name of the event subscription.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetDeliveryAttributesWithHttpMessagesAsync(string resourceGroupName, string domainName, string eventSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Create or update an event subscription to a domain.
///
///
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IEventChannelsOperations.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IEventChannelsOperations.cs
deleted file mode 100644
index e15cbd6411c78..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IEventChannelsOperations.cs
+++ /dev/null
@@ -1,218 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// EventChannelsOperations operations.
- ///
- public partial interface IEventChannelsOperations
- {
- ///
- /// Get an event channel.
- ///
- ///
- /// Get properties of an event channel.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string partnerNamespaceName, string eventChannelName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Create an event channel.
- ///
- ///
- /// Asynchronously creates a new event channel with the specified
- /// parameters.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// EventChannel information.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string partnerNamespaceName, string eventChannelName, EventChannel eventChannelInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Delete an event channel.
- ///
- ///
- /// Delete existing event channel.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string partnerNamespaceName, string eventChannelName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// List event channels.
- ///
- ///
- /// List all the event channels in a partner namespace.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// 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 headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task>> ListByPartnerNamespaceWithHttpMessagesAsync(string resourceGroupName, string partnerNamespaceName, string filter = default(string), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Delete an event channel.
- ///
- ///
- /// Delete existing event channel.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner namespace.
- ///
- ///
- /// Name of the event channel.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string partnerNamespaceName, string eventChannelName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// List event channels.
- ///
- ///
- /// List all the event channels in a partner namespace.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task>> ListByPartnerNamespaceNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IEventGridManagementClient.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IEventGridManagementClient.cs
index 1e1d2515530be..9a0ea65e107d2 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IEventGridManagementClient.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IEventGridManagementClient.cs
@@ -87,9 +87,14 @@ public partial interface IEventGridManagementClient : System.IDisposable
IDomainTopicsOperations DomainTopics { get; }
///
- /// Gets the IEventChannelsOperations.
+ /// Gets the ITopicEventSubscriptionsOperations.
///
- IEventChannelsOperations EventChannels { get; }
+ ITopicEventSubscriptionsOperations TopicEventSubscriptions { get; }
+
+ ///
+ /// Gets the IDomainEventSubscriptionsOperations.
+ ///
+ IDomainEventSubscriptionsOperations DomainEventSubscriptions { get; }
///
/// Gets the IEventSubscriptionsOperations.
@@ -101,16 +106,6 @@ public partial interface IEventGridManagementClient : System.IDisposable
///
IDomainTopicEventSubscriptionsOperations DomainTopicEventSubscriptions { get; }
- ///
- /// Gets the ITopicEventSubscriptionsOperations.
- ///
- ITopicEventSubscriptionsOperations TopicEventSubscriptions { get; }
-
- ///
- /// Gets the IDomainEventSubscriptionsOperations.
- ///
- IDomainEventSubscriptionsOperations DomainEventSubscriptions { get; }
-
///
/// Gets the ISystemTopicEventSubscriptionsOperations.
///
@@ -127,14 +122,14 @@ public partial interface IEventGridManagementClient : System.IDisposable
IOperations Operations { get; }
///
- /// Gets the IPartnerConfigurationsOperations.
+ /// Gets the ITopicsOperations.
///
- IPartnerConfigurationsOperations PartnerConfigurations { get; }
+ ITopicsOperations Topics { get; }
///
- /// Gets the IPartnerDestinationsOperations.
+ /// Gets the IPartnerConfigurationsOperations.
///
- IPartnerDestinationsOperations PartnerDestinations { get; }
+ IPartnerConfigurationsOperations PartnerConfigurations { get; }
///
/// Gets the IPartnerNamespacesOperations.
@@ -166,11 +161,6 @@ public partial interface IEventGridManagementClient : System.IDisposable
///
ISystemTopicsOperations SystemTopics { get; }
- ///
- /// Gets the ITopicsOperations.
- ///
- ITopicsOperations Topics { get; }
-
///
/// Gets the IExtensionTopicsOperations.
///
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IPartnerDestinationsOperations.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IPartnerDestinationsOperations.cs
deleted file mode 100644
index 58d599212edd4..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IPartnerDestinationsOperations.cs
+++ /dev/null
@@ -1,326 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// PartnerDestinationsOperations operations.
- ///
- public partial interface IPartnerDestinationsOperations
- {
- ///
- /// Get a partner destination.
- ///
- ///
- /// Get properties of a partner destination.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner destination.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetWithHttpMessagesAsync(string resourceGroupName, string partnerDestinationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Create a partner destination.
- ///
- ///
- /// Asynchronously creates a new partner destination with the specified
- /// parameters.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner destination.
- ///
- ///
- /// Partner destination create information.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string partnerDestinationName, PartnerDestination partnerDestination, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Delete a partner destination.
- ///
- ///
- /// Delete existing partner destination.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner destination.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task DeleteWithHttpMessagesAsync(string resourceGroupName, string partnerDestinationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Update a partner destination.
- ///
- ///
- /// Asynchronously updates a partner destination with the specified
- /// parameters.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner destination.
- ///
- ///
- /// Tags of the Partner Destination resource.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string partnerDestinationName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// List partner destinations under an Azure subscription.
- ///
- ///
- /// List all the partner destinations under an Azure subscription.
- ///
- ///
- /// 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 headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task>> ListBySubscriptionWithHttpMessagesAsync(string filter = default(string), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// List partner destinations under a resource group.
- ///
- ///
- /// List all the partner destinations under a resource group.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// 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 headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string filter = default(string), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Activate a partner destination.
- ///
- ///
- /// Activate a newly created partner destination.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner destination.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> ActivateWithHttpMessagesAsync(string resourceGroupName, string partnerDestinationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Delete a partner destination.
- ///
- ///
- /// Delete existing partner destination.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner destination.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string partnerDestinationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// List partner destinations under an Azure subscription.
- ///
- ///
- /// List all the partner destinations under an Azure subscription.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task>> ListBySubscriptionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// List partner destinations under a resource group.
- ///
- ///
- /// List all the partner destinations under a resource group.
- ///
- ///
- /// The NextLink from the previous successful call to List operation.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IPartnerRegistrationsOperations.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IPartnerRegistrationsOperations.cs
index 109b42d8caa92..cf09ea7309bfc 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IPartnerRegistrationsOperations.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/IPartnerRegistrationsOperations.cs
@@ -119,8 +119,8 @@ public partial interface IPartnerRegistrationsOperations
///
/// Name of the partner registration.
///
- ///
- /// Partner registration update information.
+ ///
+ /// Tags of the partner registration resource.
///
///
/// The headers that will be added to request.
@@ -137,7 +137,7 @@ public partial interface IPartnerRegistrationsOperations
///
/// Thrown when a required parameter is null
///
- Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string partnerRegistrationName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// List partner registrations under an Azure subscription.
///
@@ -285,8 +285,8 @@ public partial interface IPartnerRegistrationsOperations
///
/// Name of the partner registration.
///
- ///
- /// Partner registration update information.
+ ///
+ /// Tags of the partner registration resource.
///
///
/// The headers that will be added to request.
@@ -303,7 +303,7 @@ public partial interface IPartnerRegistrationsOperations
///
/// Thrown when a required parameter is null
///
- Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string partnerRegistrationName, PartnerRegistrationUpdateParameters partnerRegistrationUpdateParameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string partnerRegistrationName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// List partner registrations under an Azure subscription.
///
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/ITopicEventSubscriptionsOperations.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/ITopicEventSubscriptionsOperations.cs
index 4f51743594b19..acc62efe92a74 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/ITopicEventSubscriptionsOperations.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/ITopicEventSubscriptionsOperations.cs
@@ -23,6 +23,37 @@ namespace Microsoft.Azure.Management.EventGrid
///
public partial interface ITopicEventSubscriptionsOperations
{
+ ///
+ /// Get delivery attributes for an event subscription for topic.
+ ///
+ ///
+ /// Get all delivery attributes for an event subscription for topic.
+ ///
+ ///
+ /// The name of the resource group within the user's subscription.
+ ///
+ ///
+ /// Name of the domain topic.
+ ///
+ ///
+ /// Name of the event subscription.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> GetDeliveryAttributesWithHttpMessagesAsync(string resourceGroupName, string topicName, string eventSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Get an event subscription of a topic.
///
@@ -235,37 +266,6 @@ public partial interface ITopicEventSubscriptionsOperations
///
Task>> ListWithHttpMessagesAsync(string resourceGroupName, string topicName, string filter = default(string), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Get delivery attributes for an event subscription for topic.
- ///
- ///
- /// Get all delivery attributes for an event subscription for topic.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the domain topic.
- ///
- ///
- /// Name of the event subscription.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> GetDeliveryAttributesWithHttpMessagesAsync(string resourceGroupName, string topicName, string eventSubscriptionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- ///
/// Create or update an event subscription to a topic.
///
///
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.cs
deleted file mode 100644
index 2855f91bd4fc0..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/AzureADPartnerClientAuthentication.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Azure Active Directory Partner Client Authentication
- ///
- [Newtonsoft.Json.JsonObject("AzureAD")]
- [Rest.Serialization.JsonTransformation]
- public partial class AzureADPartnerClientAuthentication : PartnerClientAuthentication
- {
- ///
- /// Initializes a new instance of the
- /// AzureADPartnerClientAuthentication class.
- ///
- public AzureADPartnerClientAuthentication()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// AzureADPartnerClientAuthentication class.
- ///
- /// 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.
- public AzureADPartnerClientAuthentication(string azureActiveDirectoryTenantId = default(string), string azureActiveDirectoryApplicationIdOrUri = default(string))
- {
- AzureActiveDirectoryTenantId = azureActiveDirectoryTenantId;
- AzureActiveDirectoryApplicationIdOrUri = azureActiveDirectoryApplicationIdOrUri;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the Azure Active Directory Tenant ID to get the access
- /// token that will be included as the bearer token in delivery
- /// requests.
- ///
- [JsonProperty(PropertyName = "properties.azureActiveDirectoryTenantId")]
- public string AzureActiveDirectoryTenantId { get; set; }
-
- ///
- /// Gets or sets the Azure Active Directory Application ID or URI to
- /// get the access token that will be included as the bearer token in
- /// delivery requests.
- ///
- [JsonProperty(PropertyName = "properties.azureActiveDirectoryApplicationIdOrUri")]
- public string AzureActiveDirectoryApplicationIdOrUri { get; set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Channel.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Channel.cs
index 6bc9a37b3a639..fd90d45fe8146 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Channel.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Channel.cs
@@ -37,20 +37,17 @@ public Channel()
/// Name of the resource.
/// Type of the resource.
/// The type of the event channel which
- /// represents the direction flow of events. Possible values include:
- /// 'PartnerTopic', 'PartnerDestination'
+ /// represents the direction flow of events. Possible values include:
+ /// 'PartnerTopic'
/// This property should be populated
/// when channelType is PartnerTopic and represents information about
/// the partner topic resource corresponding to the channel.
- /// This property should be
- /// populated when channelType is PartnerDestination and represents
- /// information about the partner destination resource corresponding to
- /// the channel.
/// Context or helpful message that
/// can be used during the approval process by the subscriber.
/// Provisioning state of the channel.
/// Possible values include: 'Creating', 'Updating', 'Deleting',
- /// 'Succeeded', 'Canceled', 'Failed'
+ /// 'Succeeded', 'Canceled', 'Failed',
+ /// 'IdleDueToMirroredPartnerTopicDeletion'
/// The readiness state of the
/// corresponding partner topic. Possible values include:
/// 'NeverActivated', 'Activated'
@@ -60,12 +57,11 @@ public Channel()
/// the channel and corresponding partner topic are deleted.
/// The system metadata relating to Channel
/// resource.
- public Channel(string id = default(string), string name = default(string), string type = default(string), string channelType = default(string), PartnerTopicInfo partnerTopicInfo = default(PartnerTopicInfo), PartnerDestinationInfo partnerDestinationInfo = default(PartnerDestinationInfo), string messageForActivation = default(string), string provisioningState = default(string), string readinessState = default(string), System.DateTime? expirationTimeIfNotActivatedUtc = default(System.DateTime?), SystemData systemData = default(SystemData))
+ public Channel(string id = default(string), string name = default(string), string type = default(string), string channelType = default(string), PartnerTopicInfo partnerTopicInfo = default(PartnerTopicInfo), string messageForActivation = default(string), string provisioningState = default(string), string readinessState = default(string), System.DateTime? expirationTimeIfNotActivatedUtc = default(System.DateTime?), SystemData systemData = default(SystemData))
: base(id, name, type)
{
ChannelType = channelType;
PartnerTopicInfo = partnerTopicInfo;
- PartnerDestinationInfo = partnerDestinationInfo;
MessageForActivation = messageForActivation;
ProvisioningState = provisioningState;
ReadinessState = readinessState;
@@ -81,8 +77,7 @@ public Channel()
///
/// Gets or sets the type of the event channel which represents the
- /// direction flow of events. Possible values include: 'PartnerTopic',
- /// 'PartnerDestination'
+ /// direction flow of events. Possible values include: 'PartnerTopic'
///
[JsonProperty(PropertyName = "properties.channelType")]
public string ChannelType { get; set; }
@@ -95,14 +90,6 @@ public Channel()
[JsonProperty(PropertyName = "properties.partnerTopicInfo")]
public PartnerTopicInfo PartnerTopicInfo { get; set; }
- ///
- /// Gets or sets this property should be populated when channelType is
- /// PartnerDestination and represents information about the partner
- /// destination resource corresponding to the channel.
- ///
- [JsonProperty(PropertyName = "properties.partnerDestinationInfo")]
- public PartnerDestinationInfo PartnerDestinationInfo { get; set; }
-
///
/// Gets or sets context or helpful message that can be used during the
/// approval process by the subscriber.
@@ -113,7 +100,7 @@ public Channel()
///
/// Gets or sets provisioning state of the channel. Possible values
/// include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
- /// 'Canceled', 'Failed'
+ /// 'Canceled', 'Failed', 'IdleDueToMirroredPartnerTopicDeletion'
///
[JsonProperty(PropertyName = "properties.provisioningState")]
public string ProvisioningState { get; set; }
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ChannelProvisioningState.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ChannelProvisioningState.cs
index d433b0ff2c813..22ff66f1bb82d 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ChannelProvisioningState.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ChannelProvisioningState.cs
@@ -22,5 +22,6 @@ public static class ChannelProvisioningState
public const string Succeeded = "Succeeded";
public const string Canceled = "Canceled";
public const string Failed = "Failed";
+ public const string IdleDueToMirroredPartnerTopicDeletion = "IdleDueToMirroredPartnerTopicDeletion";
}
}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ChannelType.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ChannelType.cs
index f9b74ef385cb0..90dbe0fe34035 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ChannelType.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ChannelType.cs
@@ -17,6 +17,5 @@ namespace Microsoft.Azure.Management.EventGrid.Models
public static class ChannelType
{
public const string PartnerTopic = "PartnerTopic";
- public const string PartnerDestination = "PartnerDestination";
}
}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ChannelUpdateParameters.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ChannelUpdateParameters.cs
index 2a51a25bd34f6..5158bcd31f345 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ChannelUpdateParameters.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ChannelUpdateParameters.cs
@@ -33,19 +33,15 @@ public ChannelUpdateParameters()
/// Initializes a new instance of the ChannelUpdateParameters class.
///
/// Expiration time of
- /// the event channel. If this timer expires while the corresponding
- /// partner topic or partner destination is never activated,
+ /// the channel. If this timer expires while the corresponding partner
+ /// topic or partner destination is never activated,
/// the channel and corresponding partner topic or partner destination
/// are deleted.
- /// Partner destination properties
- /// which can be updated if the channel is of type
- /// PartnerDestination.
/// Partner topic properties which can
/// be updated if the channel is of type PartnerTopic.
- public ChannelUpdateParameters(System.DateTime? expirationTimeIfNotActivatedUtc = default(System.DateTime?), PartnerUpdateDestinationInfo partnerDestinationInfo = default(PartnerUpdateDestinationInfo), PartnerUpdateTopicInfo partnerTopicInfo = default(PartnerUpdateTopicInfo))
+ public ChannelUpdateParameters(System.DateTime? expirationTimeIfNotActivatedUtc = default(System.DateTime?), PartnerUpdateTopicInfo partnerTopicInfo = default(PartnerUpdateTopicInfo))
{
ExpirationTimeIfNotActivatedUtc = expirationTimeIfNotActivatedUtc;
- PartnerDestinationInfo = partnerDestinationInfo;
PartnerTopicInfo = partnerTopicInfo;
CustomInit();
}
@@ -56,22 +52,15 @@ public ChannelUpdateParameters()
partial void CustomInit();
///
- /// Gets or sets expiration time of the event channel. If this timer
- /// expires while the corresponding partner topic or partner
- /// destination is never activated,
+ /// Gets or sets expiration time of the channel. If this timer expires
+ /// while the corresponding partner topic or partner destination is
+ /// never activated,
/// the channel and corresponding partner topic or partner destination
/// are deleted.
///
[JsonProperty(PropertyName = "properties.expirationTimeIfNotActivatedUtc")]
public System.DateTime? ExpirationTimeIfNotActivatedUtc { get; set; }
- ///
- /// Gets or sets partner destination properties which can be updated if
- /// the channel is of type PartnerDestination.
- ///
- [JsonProperty(PropertyName = "properties.partnerDestinationInfo")]
- public PartnerUpdateDestinationInfo PartnerDestinationInfo { get; set; }
-
///
/// Gets or sets partner topic properties which can be updated if the
/// channel is of type PartnerTopic.
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Domain.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Domain.cs
index 10bbb0acc4c1f..a8c1205cf48a0 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Domain.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Domain.cs
@@ -109,13 +109,11 @@ public Domain()
/// Data Residency Boundary of the
/// resource. Possible values include: 'WithinGeopair',
/// 'WithinRegion'
- /// The Sku pricing tier for the Event Grid Domain
- /// resource.
- /// Identity information for the Event Grid
- /// Domain resource.
/// The system metadata relating to the Event
/// Grid Domain resource.
- public Domain(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), IList privateEndpointConnections = default(IList), string provisioningState = default(string), string endpoint = default(string), string inputSchema = default(string), InputSchemaMapping inputSchemaMapping = default(InputSchemaMapping), string metricResourceId = default(string), string publicNetworkAccess = default(string), IList inboundIpRules = default(IList), bool? disableLocalAuth = default(bool?), bool? autoCreateTopicWithFirstSubscription = default(bool?), bool? autoDeleteTopicWithLastSubscription = default(bool?), string dataResidencyBoundary = default(string), ResourceSku sku = default(ResourceSku), IdentityInfo identity = default(IdentityInfo), SystemData systemData = default(SystemData))
+ /// Identity information for the Event Grid
+ /// Domain resource.
+ public Domain(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), IList privateEndpointConnections = default(IList), string provisioningState = default(string), string endpoint = default(string), string inputSchema = default(string), InputSchemaMapping inputSchemaMapping = default(InputSchemaMapping), string metricResourceId = default(string), string publicNetworkAccess = default(string), IList inboundIpRules = default(IList), bool? disableLocalAuth = default(bool?), bool? autoCreateTopicWithFirstSubscription = default(bool?), bool? autoDeleteTopicWithLastSubscription = default(bool?), string dataResidencyBoundary = default(string), SystemData systemData = default(SystemData), IdentityInfo identity = default(IdentityInfo))
: base(location, id, name, type, tags)
{
PrivateEndpointConnections = privateEndpointConnections;
@@ -130,9 +128,8 @@ public Domain()
AutoCreateTopicWithFirstSubscription = autoCreateTopicWithFirstSubscription;
AutoDeleteTopicWithLastSubscription = autoDeleteTopicWithLastSubscription;
DataResidencyBoundary = dataResidencyBoundary;
- Sku = sku;
- Identity = identity;
SystemData = systemData;
+ Identity = identity;
CustomInit();
}
@@ -268,11 +265,11 @@ public Domain()
public string DataResidencyBoundary { get; set; }
///
- /// Gets or sets the Sku pricing tier for the Event Grid Domain
+ /// Gets the system metadata relating to the Event Grid Domain
/// resource.
///
- [JsonProperty(PropertyName = "sku")]
- public ResourceSku Sku { get; set; }
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
///
/// Gets or sets identity information for the Event Grid Domain
@@ -281,13 +278,6 @@ public Domain()
[JsonProperty(PropertyName = "identity")]
public IdentityInfo Identity { get; set; }
- ///
- /// Gets the system metadata relating to the Event Grid Domain
- /// resource.
- ///
- [JsonProperty(PropertyName = "systemData")]
- public SystemData SystemData { get; private set; }
-
///
/// Validate the object.
///
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/DomainUpdateParameters.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/DomainUpdateParameters.cs
index 48519ef576f81..f6186df87e4ff 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/DomainUpdateParameters.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/DomainUpdateParameters.cs
@@ -90,8 +90,7 @@ public DomainUpdateParameters()
/// 'WithinRegion'
/// Identity information for the
/// resource.
- /// The Sku pricing tier for the domain.
- public DomainUpdateParameters(IDictionary tags = default(IDictionary), string publicNetworkAccess = default(string), IList inboundIpRules = default(IList), bool? disableLocalAuth = default(bool?), bool? autoCreateTopicWithFirstSubscription = default(bool?), bool? autoDeleteTopicWithLastSubscription = default(bool?), string dataResidencyBoundary = default(string), IdentityInfo identity = default(IdentityInfo), ResourceSku sku = default(ResourceSku))
+ public DomainUpdateParameters(IDictionary tags = default(IDictionary), string publicNetworkAccess = default(string), IList inboundIpRules = default(IList), bool? disableLocalAuth = default(bool?), bool? autoCreateTopicWithFirstSubscription = default(bool?), bool? autoDeleteTopicWithLastSubscription = default(bool?), string dataResidencyBoundary = default(string), IdentityInfo identity = default(IdentityInfo))
{
Tags = tags;
PublicNetworkAccess = publicNetworkAccess;
@@ -101,7 +100,6 @@ public DomainUpdateParameters()
AutoDeleteTopicWithLastSubscription = autoDeleteTopicWithLastSubscription;
DataResidencyBoundary = dataResidencyBoundary;
Identity = identity;
- Sku = sku;
CustomInit();
}
@@ -205,11 +203,5 @@ public DomainUpdateParameters()
[JsonProperty(PropertyName = "identity")]
public IdentityInfo Identity { get; set; }
- ///
- /// Gets or sets the Sku pricing tier for the domain.
- ///
- [JsonProperty(PropertyName = "sku")]
- public ResourceSku Sku { get; set; }
-
}
}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannel.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannel.cs
deleted file mode 100644
index 4041a86d11655..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannel.cs
+++ /dev/null
@@ -1,143 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Event Channel.
- ///
- [Rest.Serialization.JsonTransformation]
- public partial class EventChannel : Resource
- {
- ///
- /// Initializes a new instance of the EventChannel class.
- ///
- public EventChannel()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the EventChannel class.
- ///
- /// Fully qualified identifier of the
- /// resource.
- /// Name of the resource.
- /// Type of the resource.
- /// Source of the event channel. This represents a
- /// unique resource in the partner's resource model.
- /// Represents the destination of an event
- /// channel.
- /// Provisioning state of the event
- /// channel. Possible values include: 'Creating', 'Updating',
- /// 'Deleting', 'Succeeded', 'Canceled', 'Failed'
- /// The readiness state of the
- /// corresponding partner topic. Possible values include:
- /// 'NotActivatedByUserYet', 'ActivatedByUser', 'DeactivatedByUser',
- /// 'DeletedByUser'
- /// Expiration time of
- /// the event channel. If this timer expires while the corresponding
- /// partner topic is never activated,
- /// the event channel and corresponding partner topic are
- /// deleted.
- /// Information about the filter for the event
- /// channel.
- /// Friendly description
- /// about the topic. This can be set by the publisher/partner to show
- /// custom description for the customer partner topic.
- /// This will be helpful to remove any ambiguity of the origin of
- /// creation of the partner topic for the customer.
- /// The system metadata relating to Event
- /// Channel resource.
- public EventChannel(string id = default(string), string name = default(string), string type = default(string), EventChannelSource source = default(EventChannelSource), EventChannelDestination destination = default(EventChannelDestination), string provisioningState = default(string), string partnerTopicReadinessState = default(string), System.DateTime? expirationTimeIfNotActivatedUtc = default(System.DateTime?), EventChannelFilter filter = default(EventChannelFilter), string partnerTopicFriendlyDescription = default(string), SystemData systemData = default(SystemData))
- : base(id, name, type)
- {
- Source = source;
- Destination = destination;
- ProvisioningState = provisioningState;
- PartnerTopicReadinessState = partnerTopicReadinessState;
- ExpirationTimeIfNotActivatedUtc = expirationTimeIfNotActivatedUtc;
- Filter = filter;
- PartnerTopicFriendlyDescription = partnerTopicFriendlyDescription;
- SystemData = systemData;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets source of the event channel. This represents a unique
- /// resource in the partner's resource model.
- ///
- [JsonProperty(PropertyName = "properties.source")]
- public EventChannelSource Source { get; set; }
-
- ///
- /// Gets or sets represents the destination of an event channel.
- ///
- [JsonProperty(PropertyName = "properties.destination")]
- public EventChannelDestination Destination { get; set; }
-
- ///
- /// Gets provisioning state of the event channel. Possible values
- /// include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
- /// 'Canceled', 'Failed'
- ///
- [JsonProperty(PropertyName = "properties.provisioningState")]
- public string ProvisioningState { get; private set; }
-
- ///
- /// Gets the readiness state of the corresponding partner topic.
- /// Possible values include: 'NotActivatedByUserYet',
- /// 'ActivatedByUser', 'DeactivatedByUser', 'DeletedByUser'
- ///
- [JsonProperty(PropertyName = "properties.partnerTopicReadinessState")]
- public string PartnerTopicReadinessState { get; private set; }
-
- ///
- /// Gets or sets expiration time of the event channel. If this timer
- /// expires while the corresponding partner topic is never activated,
- /// the event channel and corresponding partner topic are deleted.
- ///
- [JsonProperty(PropertyName = "properties.expirationTimeIfNotActivatedUtc")]
- public System.DateTime? ExpirationTimeIfNotActivatedUtc { get; set; }
-
- ///
- /// Gets or sets information about the filter for the event channel.
- ///
- [JsonProperty(PropertyName = "properties.filter")]
- public EventChannelFilter Filter { get; set; }
-
- ///
- /// Gets or sets friendly description about the topic. This can be set
- /// by the publisher/partner to show custom description for the
- /// customer partner topic.
- /// This will be helpful to remove any ambiguity of the origin of
- /// creation of the partner topic for the customer.
- ///
- [JsonProperty(PropertyName = "properties.partnerTopicFriendlyDescription")]
- public string PartnerTopicFriendlyDescription { get; set; }
-
- ///
- /// Gets the system metadata relating to Event Channel resource.
- ///
- [JsonProperty(PropertyName = "systemData")]
- public SystemData SystemData { get; private set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannelDestination.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannelDestination.cs
deleted file mode 100644
index e3b559e9d2008..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannelDestination.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Properties of the destination of an event channel.
- ///
- public partial class EventChannelDestination
- {
- ///
- /// Initializes a new instance of the EventChannelDestination class.
- ///
- public EventChannelDestination()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the EventChannelDestination class.
- ///
- /// Azure subscription ID of the
- /// customer creating the event channel. The partner topic
- /// associated with the event channel will be created under this Azure
- /// subscription.
- /// Azure Resource Group of the customer
- /// creating the event channel. The partner topic
- /// associated with the event channel will be created under this
- /// resource group.
- /// Name of the partner topic associated
- /// with the event channel.
- public EventChannelDestination(string azureSubscriptionId = default(string), string resourceGroup = default(string), string partnerTopicName = default(string))
- {
- AzureSubscriptionId = azureSubscriptionId;
- ResourceGroup = resourceGroup;
- PartnerTopicName = partnerTopicName;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets azure subscription ID of the customer creating the
- /// event channel. The partner topic
- /// associated with the event channel will be created under this Azure
- /// subscription.
- ///
- [JsonProperty(PropertyName = "azureSubscriptionId")]
- public string AzureSubscriptionId { get; set; }
-
- ///
- /// Gets or sets azure Resource Group of the customer creating the
- /// event channel. The partner topic
- /// associated with the event channel will be created under this
- /// resource group.
- ///
- [JsonProperty(PropertyName = "resourceGroup")]
- public string ResourceGroup { get; set; }
-
- ///
- /// Gets or sets name of the partner topic associated with the event
- /// channel.
- ///
- [JsonProperty(PropertyName = "partnerTopicName")]
- public string PartnerTopicName { get; set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannelFilter.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannelFilter.cs
deleted file mode 100644
index 286462dda8146..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannelFilter.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Filter for the Event Channel.
- ///
- public partial class EventChannelFilter
- {
- ///
- /// Initializes a new instance of the EventChannelFilter class.
- ///
- public EventChannelFilter()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the EventChannelFilter class.
- ///
- /// Allows advanced
- /// filters to be evaluated against an array of values instead of
- /// expecting a singular value. The default value is either false or
- /// null.
- /// An array of advanced filters that are
- /// used for filtering event channels.
- public EventChannelFilter(bool? enableAdvancedFilteringOnArrays = default(bool?), IList advancedFilters = default(IList))
- {
- EnableAdvancedFilteringOnArrays = enableAdvancedFilteringOnArrays;
- AdvancedFilters = advancedFilters;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets allows advanced filters to be evaluated against an
- /// array of values instead of expecting a singular value. The default
- /// value is either false or null.
- ///
- [JsonProperty(PropertyName = "enableAdvancedFilteringOnArrays")]
- public bool? EnableAdvancedFilteringOnArrays { get; set; }
-
- ///
- /// Gets or sets an array of advanced filters that are used for
- /// filtering event channels.
- ///
- [JsonProperty(PropertyName = "advancedFilters")]
- public IList AdvancedFilters { get; set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannelProvisioningState.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannelProvisioningState.cs
deleted file mode 100644
index 0583d8001a613..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannelProvisioningState.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
-
- ///
- /// Defines values for EventChannelProvisioningState.
- ///
- public static class EventChannelProvisioningState
- {
- public const string Creating = "Creating";
- public const string Updating = "Updating";
- public const string Deleting = "Deleting";
- public const string Succeeded = "Succeeded";
- public const string Canceled = "Canceled";
- public const string Failed = "Failed";
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannelSource.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannelSource.cs
deleted file mode 100644
index 0d498701f6ff4..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/EventChannelSource.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Properties of the source of an event channel.
- ///
- public partial class EventChannelSource
- {
- ///
- /// Initializes a new instance of the EventChannelSource class.
- ///
- public EventChannelSource()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the EventChannelSource class.
- ///
- /// The identifier of the resource that's the
- /// source of the events.
- /// This represents a unique resource in the partner's resource
- /// model.
- public EventChannelSource(string source = default(string))
- {
- Source = source;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the identifier of the resource that's the source of
- /// the events.
- /// This represents a unique resource in the partner's resource model.
- ///
- [JsonProperty(PropertyName = "source")]
- public string Source { get; set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ExtendedLocation.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ExtendedLocation.cs
deleted file mode 100644
index 91bf327c7a5fd..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ExtendedLocation.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Definition of an Extended Location
- ///
- public partial class ExtendedLocation
- {
- ///
- /// Initializes a new instance of the ExtendedLocation class.
- ///
- public ExtendedLocation()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ExtendedLocation class.
- ///
- /// Fully qualified name of the extended
- /// location.
- /// Type of the extended location.
- public ExtendedLocation(string name = default(string), string type = default(string))
- {
- Name = name;
- Type = type;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets fully qualified name of the extended location.
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- ///
- /// Gets or sets type of the extended location.
- ///
- [JsonProperty(PropertyName = "type")]
- public string Type { get; set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/InlineEventProperties.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/InlineEventProperties.cs
index 5021279bc6272..9581dba20e4b6 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/InlineEventProperties.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/InlineEventProperties.cs
@@ -31,13 +31,16 @@ public InlineEventProperties()
///
/// The description for the inline
/// event.
+ /// The displayName for the inline
+ /// event.
/// The documentationUrl for the inline
/// event.
/// The dataSchemaUrl for the inline
/// event.
- public InlineEventProperties(string description = default(string), string documentationUrl = default(string), string dataSchemaUrl = default(string))
+ public InlineEventProperties(string description = default(string), string displayName = default(string), string documentationUrl = default(string), string dataSchemaUrl = default(string))
{
Description = description;
+ DisplayName = displayName;
DocumentationUrl = documentationUrl;
DataSchemaUrl = dataSchemaUrl;
CustomInit();
@@ -54,6 +57,12 @@ public InlineEventProperties()
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }
+ ///
+ /// Gets or sets the displayName for the inline event.
+ ///
+ [JsonProperty(PropertyName = "displayName")]
+ public string DisplayName { get; set; }
+
///
/// Gets or sets the documentationUrl for the inline event.
///
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs
deleted file mode 100644
index d6634d8e77c10..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerClientAuthentication.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using System.Linq;
-
- ///
- /// Partner client authentication
- ///
- public partial class PartnerClientAuthentication
- {
- ///
- /// Initializes a new instance of the PartnerClientAuthentication
- /// class.
- ///
- public PartnerClientAuthentication()
- {
- CustomInit();
- }
-
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestination.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestination.cs
deleted file mode 100644
index c22832c63dbf0..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestination.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Event Grid Partner Destination.
- ///
- [Rest.Serialization.JsonTransformation]
- public partial class PartnerDestination : TrackedResource
- {
- ///
- /// Initializes a new instance of the PartnerDestination class.
- ///
- public PartnerDestination()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the PartnerDestination class.
- ///
- /// Location of the resource.
- /// Fully qualified identifier of the
- /// resource.
- /// Name of the resource.
- /// Type of the resource.
- /// Tags of the resource.
- /// The immutable Id of
- /// the corresponding partner registration.
- /// Endpoint context associated
- /// with this partner destination.
- /// Expiration time of
- /// the partner destination. If this timer expires and the partner
- /// destination was never activated,
- /// the partner destination and corresponding channel are
- /// deleted.
- /// Provisioning state of the partner
- /// destination. Possible values include: 'Creating', 'Updating',
- /// 'Deleting', 'Succeeded', 'Canceled', 'Failed'
- /// Activation state of the partner
- /// destination. Possible values include: 'NeverActivated',
- /// 'Activated'
- /// Endpoint Base URL of the partner
- /// destination
- /// Context or helpful message that
- /// can be used during the approval process.
- /// The system metadata relating to Partner
- /// Destination resource.
- public PartnerDestination(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), System.Guid? partnerRegistrationImmutableId = default(System.Guid?), string endpointServiceContext = default(string), System.DateTime? expirationTimeIfNotActivatedUtc = default(System.DateTime?), string provisioningState = default(string), string activationState = default(string), string endpointBaseUrl = default(string), string messageForActivation = default(string), SystemData systemData = default(SystemData))
- : base(location, id, name, type, tags)
- {
- PartnerRegistrationImmutableId = partnerRegistrationImmutableId;
- EndpointServiceContext = endpointServiceContext;
- ExpirationTimeIfNotActivatedUtc = expirationTimeIfNotActivatedUtc;
- ProvisioningState = provisioningState;
- ActivationState = activationState;
- EndpointBaseUrl = endpointBaseUrl;
- MessageForActivation = messageForActivation;
- SystemData = systemData;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the immutable Id of the corresponding partner
- /// registration.
- ///
- [JsonProperty(PropertyName = "properties.partnerRegistrationImmutableId")]
- public System.Guid? PartnerRegistrationImmutableId { get; set; }
-
- ///
- /// Gets or sets endpoint context associated with this partner
- /// destination.
- ///
- [JsonProperty(PropertyName = "properties.endpointServiceContext")]
- public string EndpointServiceContext { get; set; }
-
- ///
- /// Gets or sets expiration time of the partner destination. If this
- /// timer expires and the partner destination was never activated,
- /// the partner destination and corresponding channel are deleted.
- ///
- [JsonProperty(PropertyName = "properties.expirationTimeIfNotActivatedUtc")]
- public System.DateTime? ExpirationTimeIfNotActivatedUtc { get; set; }
-
- ///
- /// Gets or sets provisioning state of the partner destination.
- /// Possible values include: 'Creating', 'Updating', 'Deleting',
- /// 'Succeeded', 'Canceled', 'Failed'
- ///
- [JsonProperty(PropertyName = "properties.provisioningState")]
- public string ProvisioningState { get; set; }
-
- ///
- /// Gets or sets activation state of the partner destination. Possible
- /// values include: 'NeverActivated', 'Activated'
- ///
- [JsonProperty(PropertyName = "properties.activationState")]
- public string ActivationState { get; set; }
-
- ///
- /// Gets or sets endpoint Base URL of the partner destination
- ///
- [JsonProperty(PropertyName = "properties.endpointBaseUrl")]
- public string EndpointBaseUrl { get; set; }
-
- ///
- /// Gets or sets context or helpful message that can be used during the
- /// approval process.
- ///
- [JsonProperty(PropertyName = "properties.messageForActivation")]
- public string MessageForActivation { get; set; }
-
- ///
- /// Gets the system metadata relating to Partner Destination resource.
- ///
- [JsonProperty(PropertyName = "systemData")]
- public SystemData SystemData { get; private set; }
-
- ///
- /// Validate the object.
- ///
- ///
- /// Thrown if validation fails
- ///
- public override void Validate()
- {
- base.Validate();
- }
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestinationActivationState.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestinationActivationState.cs
deleted file mode 100644
index f55428b7f8a94..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestinationActivationState.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
-
- ///
- /// Defines values for PartnerDestinationActivationState.
- ///
- public static class PartnerDestinationActivationState
- {
- public const string NeverActivated = "NeverActivated";
- public const string Activated = "Activated";
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestinationInfo.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestinationInfo.cs
deleted file mode 100644
index a99cb6f342445..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestinationInfo.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Properties of the corresponding partner destination of a Channel.
- ///
- public partial class PartnerDestinationInfo
- {
- ///
- /// Initializes a new instance of the PartnerDestinationInfo class.
- ///
- public PartnerDestinationInfo()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the PartnerDestinationInfo class.
- ///
- /// Azure subscription ID of the
- /// subscriber. The partner destination associated with the channel
- /// will be
- /// created under this Azure subscription.
- /// Azure Resource Group of the
- /// subscriber. The partner destination associated with the channel
- /// will be
- /// created under this resource group.
- /// Name of the partner destination associated with
- /// the channel.
- /// Additional context of the
- /// partner destination endpoint.
- /// Change history of the
- /// resource move.
- public PartnerDestinationInfo(string azureSubscriptionId = default(string), string resourceGroupName = default(string), string name = default(string), string endpointServiceContext = default(string), IList resourceMoveChangeHistory = default(IList))
- {
- AzureSubscriptionId = azureSubscriptionId;
- ResourceGroupName = resourceGroupName;
- Name = name;
- EndpointServiceContext = endpointServiceContext;
- ResourceMoveChangeHistory = resourceMoveChangeHistory;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets azure subscription ID of the subscriber. The partner
- /// destination associated with the channel will be
- /// created under this Azure subscription.
- ///
- [JsonProperty(PropertyName = "azureSubscriptionId")]
- public string AzureSubscriptionId { get; set; }
-
- ///
- /// Gets or sets azure Resource Group of the subscriber. The partner
- /// destination associated with the channel will be
- /// created under this resource group.
- ///
- [JsonProperty(PropertyName = "resourceGroupName")]
- public string ResourceGroupName { get; set; }
-
- ///
- /// Gets or sets name of the partner destination associated with the
- /// channel.
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- ///
- /// Gets or sets additional context of the partner destination
- /// endpoint.
- ///
- [JsonProperty(PropertyName = "endpointServiceContext")]
- public string EndpointServiceContext { get; set; }
-
- ///
- /// Gets or sets change history of the resource move.
- ///
- [JsonProperty(PropertyName = "resourceMoveChangeHistory")]
- public IList ResourceMoveChangeHistory { get; set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestinationProvisioningState.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestinationProvisioningState.cs
deleted file mode 100644
index 3d589a0aa3f7e..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestinationProvisioningState.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
-
- ///
- /// Defines values for PartnerDestinationProvisioningState.
- ///
- public static class PartnerDestinationProvisioningState
- {
- public const string Creating = "Creating";
- public const string Updating = "Updating";
- public const string Deleting = "Deleting";
- public const string Succeeded = "Succeeded";
- public const string Canceled = "Canceled";
- public const string Failed = "Failed";
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestinationUpdateParameters.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestinationUpdateParameters.cs
deleted file mode 100644
index fa066cf9c1e4a..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerDestinationUpdateParameters.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Properties of the Partner Destination that can be updated.
- ///
- public partial class PartnerDestinationUpdateParameters
- {
- ///
- /// Initializes a new instance of the
- /// PartnerDestinationUpdateParameters class.
- ///
- public PartnerDestinationUpdateParameters()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// PartnerDestinationUpdateParameters class.
- ///
- /// Tags of the Partner Destination
- /// resource.
- public PartnerDestinationUpdateParameters(IDictionary tags = default(IDictionary))
- {
- Tags = tags;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets tags of the Partner Destination resource.
- ///
- [JsonProperty(PropertyName = "tags")]
- public IDictionary Tags { get; set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.cs
deleted file mode 100644
index bc646f14cf3a6..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerEventSubscriptionDestination.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Linq;
-
- [Newtonsoft.Json.JsonObject("PartnerDestination")]
- [Rest.Serialization.JsonTransformation]
- public partial class PartnerEventSubscriptionDestination : EventSubscriptionDestination
- {
- ///
- /// Initializes a new instance of the
- /// PartnerEventSubscriptionDestination class.
- ///
- public PartnerEventSubscriptionDestination()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// PartnerEventSubscriptionDestination class.
- ///
- /// The Azure Resource Id that represents the
- /// endpoint of a Partner Destination of an event subscription.
- public PartnerEventSubscriptionDestination(string resourceId = default(string))
- {
- ResourceId = resourceId;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the Azure Resource Id that represents the endpoint of
- /// a Partner Destination of an event subscription.
- ///
- [JsonProperty(PropertyName = "properties.resourceId")]
- public string ResourceId { get; set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerRegistration.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerRegistration.cs
index 398841be36601..c9076491d10ad 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerRegistration.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerRegistration.cs
@@ -44,67 +44,16 @@ public PartnerRegistration()
/// registration. Possible values include: 'Creating', 'Updating',
/// 'Deleting', 'Succeeded', 'Canceled', 'Failed'
/// The immutableId of the
- /// corresponding partner registration.
- /// Official name of the partner name. For
- /// example: "Contoso".
- /// Name of the partner resource
- /// type.
- /// Display name of the
- /// partner resource type.
- /// Short description of
- /// the partner resource type. The length of this description should
- /// not exceed 256 characters.
- /// Long description for the custom
- /// scenarios and integration to be displayed in the portal if needed.
- /// Length of this description should not exceed 2048
- /// characters.
- /// The customer service
- /// number of the publisher. The expected phone format should start
- /// with a '+' sign
- /// followed by the country code. The remaining digits are then
- /// followed. Only digits and spaces are allowed and its
- /// length cannot exceed 16 digits including country code. Examples of
- /// valid phone numbers are: +1 515 123 4567 and
- /// +966 7 5115 2471. Examples of invalid phone numbers are: +1 (515)
- /// 123-4567, 1 515 123 4567 and +966 121 5115 24 7 551 1234 43
- /// The extension of the
- /// customer service number of the publisher. Only digits are allowed
- /// and number of digits should not exceed 10.
- /// The extension of the customer
- /// service URI of the publisher.
- /// URI of the partner website that can be used
- /// by Azure customers to setup Event Grid
- /// integration on an event source.
- /// URI of the logo.
- /// Visibility state of the partner
- /// registration. Possible values include: 'Hidden', 'PublicPreview',
- /// 'GenerallyAvailable'
- /// List of Azure
- /// subscription Ids that are authorized to create a partner namespace
- /// associated with this partner registration. This is an optional
- /// property. Creating
- /// partner namespaces is always permitted under the same Azure
- /// subscription as the one used
- /// for creating the partner registration.
+ /// corresponding partner registration.
+ /// Note: This property is marked for deprecation and is not supported
+ /// in any future GA API version
/// The system metadata relating to Partner
/// Registration resource.
- public PartnerRegistration(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), System.Guid? partnerRegistrationImmutableId = default(System.Guid?), string partnerName = default(string), string partnerResourceTypeName = default(string), string partnerResourceTypeDisplayName = default(string), string partnerResourceTypeDescription = default(string), string longDescription = default(string), string partnerCustomerServiceNumber = default(string), string partnerCustomerServiceExtension = default(string), string customerServiceUri = default(string), string setupUri = default(string), string logoUri = default(string), string visibilityState = default(string), IList authorizedAzureSubscriptionIds = default(IList), SystemData systemData = default(SystemData))
+ public PartnerRegistration(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), System.Guid? partnerRegistrationImmutableId = default(System.Guid?), SystemData systemData = default(SystemData))
: base(location, id, name, type, tags)
{
ProvisioningState = provisioningState;
PartnerRegistrationImmutableId = partnerRegistrationImmutableId;
- PartnerName = partnerName;
- PartnerResourceTypeName = partnerResourceTypeName;
- PartnerResourceTypeDisplayName = partnerResourceTypeDisplayName;
- PartnerResourceTypeDescription = partnerResourceTypeDescription;
- LongDescription = longDescription;
- PartnerCustomerServiceNumber = partnerCustomerServiceNumber;
- PartnerCustomerServiceExtension = partnerCustomerServiceExtension;
- CustomerServiceUri = customerServiceUri;
- SetupUri = setupUri;
- LogoUri = logoUri;
- VisibilityState = visibilityState;
- AuthorizedAzureSubscriptionIds = authorizedAzureSubscriptionIds;
SystemData = systemData;
CustomInit();
}
@@ -125,105 +74,12 @@ public PartnerRegistration()
///
/// Gets or sets the immutableId of the corresponding partner
/// registration.
+ /// Note: This property is marked for deprecation and is not supported
+ /// in any future GA API version
///
[JsonProperty(PropertyName = "properties.partnerRegistrationImmutableId")]
public System.Guid? PartnerRegistrationImmutableId { get; set; }
- ///
- /// Gets or sets official name of the partner name. For example:
- /// "Contoso".
- ///
- [JsonProperty(PropertyName = "properties.partnerName")]
- public string PartnerName { get; set; }
-
- ///
- /// Gets or sets name of the partner resource type.
- ///
- [JsonProperty(PropertyName = "properties.partnerResourceTypeName")]
- public string PartnerResourceTypeName { get; set; }
-
- ///
- /// Gets or sets display name of the partner resource type.
- ///
- [JsonProperty(PropertyName = "properties.partnerResourceTypeDisplayName")]
- public string PartnerResourceTypeDisplayName { get; set; }
-
- ///
- /// Gets or sets short description of the partner resource type. The
- /// length of this description should not exceed 256 characters.
- ///
- [JsonProperty(PropertyName = "properties.partnerResourceTypeDescription")]
- public string PartnerResourceTypeDescription { get; set; }
-
- ///
- /// Gets or sets long description for the custom scenarios and
- /// integration to be displayed in the portal if needed.
- /// Length of this description should not exceed 2048 characters.
- ///
- [JsonProperty(PropertyName = "properties.longDescription")]
- public string LongDescription { get; set; }
-
- ///
- /// Gets or sets the customer service number of the publisher. The
- /// expected phone format should start with a '+' sign
- /// followed by the country code. The remaining digits are then
- /// followed. Only digits and spaces are allowed and its
- /// length cannot exceed 16 digits including country code. Examples of
- /// valid phone numbers are: +1 515 123 4567 and
- /// +966 7 5115 2471. Examples of invalid phone numbers are: +1 (515)
- /// 123-4567, 1 515 123 4567 and +966 121 5115 24 7 551 1234 43
- ///
- [JsonProperty(PropertyName = "properties.partnerCustomerServiceNumber")]
- public string PartnerCustomerServiceNumber { get; set; }
-
- ///
- /// Gets or sets the extension of the customer service number of the
- /// publisher. Only digits are allowed and number of digits should not
- /// exceed 10.
- ///
- [JsonProperty(PropertyName = "properties.partnerCustomerServiceExtension")]
- public string PartnerCustomerServiceExtension { get; set; }
-
- ///
- /// Gets or sets the extension of the customer service URI of the
- /// publisher.
- ///
- [JsonProperty(PropertyName = "properties.customerServiceUri")]
- public string CustomerServiceUri { get; set; }
-
- ///
- /// Gets or sets URI of the partner website that can be used by Azure
- /// customers to setup Event Grid
- /// integration on an event source.
- ///
- [JsonProperty(PropertyName = "properties.setupUri")]
- public string SetupUri { get; set; }
-
- ///
- /// Gets or sets URI of the logo.
- ///
- [JsonProperty(PropertyName = "properties.logoUri")]
- public string LogoUri { get; set; }
-
- ///
- /// Gets or sets visibility state of the partner registration. Possible
- /// values include: 'Hidden', 'PublicPreview', 'GenerallyAvailable'
- ///
- [JsonProperty(PropertyName = "properties.visibilityState")]
- public string VisibilityState { get; set; }
-
- ///
- /// Gets or sets list of Azure subscription Ids that are authorized to
- /// create a partner namespace
- /// associated with this partner registration. This is an optional
- /// property. Creating
- /// partner namespaces is always permitted under the same Azure
- /// subscription as the one used
- /// for creating the partner registration.
- ///
- [JsonProperty(PropertyName = "properties.authorizedAzureSubscriptionIds")]
- public IList AuthorizedAzureSubscriptionIds { get; set; }
-
///
/// Gets the system metadata relating to Partner Registration resource.
///
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerRegistrationUpdateParameters.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerRegistrationUpdateParameters.cs
index 5574b3a872f07..b32686498c2c8 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerRegistrationUpdateParameters.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerRegistrationUpdateParameters.cs
@@ -35,32 +35,9 @@ public PartnerRegistrationUpdateParameters()
///
/// Tags of the partner registration
/// resource.
- /// Name of the partner topic
- /// type.
- /// Display name of the
- /// partner topic type.
- /// Description of the
- /// partner topic type.
- /// URI of the partner website that can be used
- /// by Azure customers to setup Event Grid
- /// integration on an event source.
- /// URI of the partner logo.
- /// List of IDs of Azure
- /// AD applications that are authorized to create a partner namespace
- /// associated with this partner registration. This is an optional
- /// property. Creating
- /// partner namespaces is always permitted under the same Azure
- /// subscription as the one used
- /// for creating the partner registration.
- public PartnerRegistrationUpdateParameters(IDictionary tags = default(IDictionary), string partnerTopicTypeName = default(string), string partnerTopicTypeDisplayName = default(string), string partnerTopicTypeDescription = default(string), string setupUri = default(string), string logoUri = default(string), IList authorizedAzureSubscriptionIds = default(IList))
+ public PartnerRegistrationUpdateParameters(IDictionary tags = default(IDictionary))
{
Tags = tags;
- PartnerTopicTypeName = partnerTopicTypeName;
- PartnerTopicTypeDisplayName = partnerTopicTypeDisplayName;
- PartnerTopicTypeDescription = partnerTopicTypeDescription;
- SetupUri = setupUri;
- LogoUri = logoUri;
- AuthorizedAzureSubscriptionIds = authorizedAzureSubscriptionIds;
CustomInit();
}
@@ -75,49 +52,5 @@ public PartnerRegistrationUpdateParameters()
[JsonProperty(PropertyName = "tags")]
public IDictionary Tags { get; set; }
- ///
- /// Gets or sets name of the partner topic type.
- ///
- [JsonProperty(PropertyName = "partnerTopicTypeName")]
- public string PartnerTopicTypeName { get; set; }
-
- ///
- /// Gets or sets display name of the partner topic type.
- ///
- [JsonProperty(PropertyName = "partnerTopicTypeDisplayName")]
- public string PartnerTopicTypeDisplayName { get; set; }
-
- ///
- /// Gets or sets description of the partner topic type.
- ///
- [JsonProperty(PropertyName = "partnerTopicTypeDescription")]
- public string PartnerTopicTypeDescription { get; set; }
-
- ///
- /// Gets or sets URI of the partner website that can be used by Azure
- /// customers to setup Event Grid
- /// integration on an event source.
- ///
- [JsonProperty(PropertyName = "setupUri")]
- public string SetupUri { get; set; }
-
- ///
- /// Gets or sets URI of the partner logo.
- ///
- [JsonProperty(PropertyName = "logoUri")]
- public string LogoUri { get; set; }
-
- ///
- /// Gets or sets list of IDs of Azure AD applications that are
- /// authorized to create a partner namespace
- /// associated with this partner registration. This is an optional
- /// property. Creating
- /// partner namespaces is always permitted under the same Azure
- /// subscription as the one used
- /// for creating the partner registration.
- ///
- [JsonProperty(PropertyName = "authorizedAzureSubscriptionIds")]
- public IList AuthorizedAzureSubscriptionIds { get; set; }
-
}
}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerRegistrationVisibilityState.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerRegistrationVisibilityState.cs
deleted file mode 100644
index 7a4343c5fc7e3..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerRegistrationVisibilityState.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
-
- ///
- /// Defines values for PartnerRegistrationVisibilityState.
- ///
- public static class PartnerRegistrationVisibilityState
- {
- public const string Hidden = "Hidden";
- public const string PublicPreview = "PublicPreview";
- public const string GenerallyAvailable = "GenerallyAvailable";
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerTopic.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerTopic.cs
index c2e8d883052a6..feee0adbb5583 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerTopic.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerTopic.cs
@@ -53,7 +53,8 @@ public PartnerTopic()
/// deleted.
/// Provisioning state of the partner
/// topic. Possible values include: 'Creating', 'Updating', 'Deleting',
- /// 'Succeeded', 'Canceled', 'Failed'
+ /// 'Succeeded', 'Canceled', 'Failed',
+ /// 'IdleDueToMirroredChannelResourceDeletion'
/// Activation state of the partner
/// topic. Possible values include: 'NeverActivated', 'Activated',
/// 'Deactivated'
@@ -121,7 +122,7 @@ public PartnerTopic()
///
/// Gets provisioning state of the partner topic. Possible values
/// include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
- /// 'Canceled', 'Failed'
+ /// 'Canceled', 'Failed', 'IdleDueToMirroredChannelResourceDeletion'
///
[JsonProperty(PropertyName = "properties.provisioningState")]
public string ProvisioningState { get; private set; }
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerTopicProvisioningState.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerTopicProvisioningState.cs
index 9eb90ce309ade..dabe08bc0ffd8 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerTopicProvisioningState.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerTopicProvisioningState.cs
@@ -22,5 +22,6 @@ public static class PartnerTopicProvisioningState
public const string Succeeded = "Succeeded";
public const string Canceled = "Canceled";
public const string Failed = "Failed";
+ public const string IdleDueToMirroredChannelResourceDeletion = "IdleDueToMirroredChannelResourceDeletion";
}
}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerTopicReadinessState.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerTopicReadinessState.cs
deleted file mode 100644
index 2b4a5b43a492d..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerTopicReadinessState.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
-
- ///
- /// Defines values for PartnerTopicReadinessState.
- ///
- public static class PartnerTopicReadinessState
- {
- public const string NotActivatedByUserYet = "NotActivatedByUserYet";
- public const string ActivatedByUser = "ActivatedByUser";
- public const string DeactivatedByUser = "DeactivatedByUser";
- public const string DeletedByUser = "DeletedByUser";
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.cs
deleted file mode 100644
index f29233a43c83f..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PartnerUpdateDestinationInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using System.Linq;
-
- ///
- /// Properties of the corresponding partner destination of a Channel.
- ///
- public partial class PartnerUpdateDestinationInfo
- {
- ///
- /// Initializes a new instance of the PartnerUpdateDestinationInfo
- /// class.
- ///
- public PartnerUpdateDestinationInfo()
- {
- CustomInit();
- }
-
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ParentType.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PrivateEndpointConnectionsParentType.cs
similarity index 83%
rename from sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ParentType.cs
rename to sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PrivateEndpointConnectionsParentType.cs
index 89c0eeb8868f6..9dd7c0c522f7b 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ParentType.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/PrivateEndpointConnectionsParentType.cs
@@ -12,9 +12,9 @@ namespace Microsoft.Azure.Management.EventGrid.Models
{
///
- /// Defines values for ParentType.
+ /// Defines values for PrivateEndpointConnectionsParentType.
///
- public static class ParentType
+ public static class PrivateEndpointConnectionsParentType
{
public const string Topics = "topics";
public const string Domains = "domains";
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Resource.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Resource.cs
index 667f107b78d9c..641e05f45021d 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Resource.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Resource.cs
@@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.EventGrid.Models
using System.Linq;
///
- /// Definition of a Resource
+ /// Definition of a Resource.
///
public partial class Resource : IResource
{
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.cs
deleted file mode 100644
index 9efe49061b6da..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ResourceMoveChangeHistory.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// The change history of the resource move.
- ///
- public partial class ResourceMoveChangeHistory
- {
- ///
- /// Initializes a new instance of the ResourceMoveChangeHistory class.
- ///
- public ResourceMoveChangeHistory()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ResourceMoveChangeHistory class.
- ///
- /// Azure subscription ID of the
- /// resource.
- /// Azure Resource Group of the
- /// resource.
- /// UTC timestamp of when the resource was
- /// changed.
- public ResourceMoveChangeHistory(string azureSubscriptionId = default(string), string resourceGroupName = default(string), System.DateTime? changedTimeUtc = default(System.DateTime?))
- {
- AzureSubscriptionId = azureSubscriptionId;
- ResourceGroupName = resourceGroupName;
- ChangedTimeUtc = changedTimeUtc;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets azure subscription ID of the resource.
- ///
- [JsonProperty(PropertyName = "azureSubscriptionId")]
- public string AzureSubscriptionId { get; set; }
-
- ///
- /// Gets or sets azure Resource Group of the resource.
- ///
- [JsonProperty(PropertyName = "resourceGroupName")]
- public string ResourceGroupName { get; set; }
-
- ///
- /// Gets or sets UTC timestamp of when the resource was changed.
- ///
- [JsonProperty(PropertyName = "changedTimeUtc")]
- public System.DateTime? ChangedTimeUtc { get; set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ResourceSku.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ResourceSku.cs
deleted file mode 100644
index eb5add0788059..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ResourceSku.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Describes an EventGrid Resource Sku.
- ///
- public partial class ResourceSku
- {
- ///
- /// Initializes a new instance of the ResourceSku class.
- ///
- public ResourceSku()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the ResourceSku class.
- ///
- /// The Sku name of the resource. The possible
- /// values are: Basic or Premium. Possible values include: 'Basic',
- /// 'Premium'
- public ResourceSku(string name = default(string))
- {
- Name = name;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the Sku name of the resource. The possible values are:
- /// Basic or Premium. Possible values include: 'Basic', 'Premium'
- ///
- [JsonProperty(PropertyName = "name")]
- public string Name { get; set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Sku.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Sku.cs
deleted file mode 100644
index 7edc817200141..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Sku.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
-
- ///
- /// Defines values for Sku.
- ///
- public static class Sku
- {
- public const string Basic = "Basic";
- public const string Premium = "Premium";
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/SystemTopic.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/SystemTopic.cs
index ac46b43e24ec9..d4212ef0834a6 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/SystemTopic.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/SystemTopic.cs
@@ -47,19 +47,19 @@ public SystemTopic()
/// TopicType for the system topic.
/// Metric resource id for the system
/// topic.
- /// The system metadata relating to System
- /// Topic resource.
/// Identity information for the
/// resource.
- public SystemTopic(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), string source = default(string), string topicType = default(string), string metricResourceId = default(string), SystemData systemData = default(SystemData), IdentityInfo identity = default(IdentityInfo))
+ /// The system metadata relating to System
+ /// Topic resource.
+ public SystemTopic(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), string source = default(string), string topicType = default(string), string metricResourceId = default(string), IdentityInfo identity = default(IdentityInfo), SystemData systemData = default(SystemData))
: base(location, id, name, type, tags)
{
ProvisioningState = provisioningState;
Source = source;
TopicType = topicType;
MetricResourceId = metricResourceId;
- SystemData = systemData;
Identity = identity;
+ SystemData = systemData;
CustomInit();
}
@@ -94,18 +94,18 @@ public SystemTopic()
[JsonProperty(PropertyName = "properties.metricResourceId")]
public string MetricResourceId { get; private set; }
- ///
- /// Gets the system metadata relating to System Topic resource.
- ///
- [JsonProperty(PropertyName = "systemData")]
- public SystemData SystemData { get; private set; }
-
///
/// Gets or sets identity information for the resource.
///
[JsonProperty(PropertyName = "identity")]
public IdentityInfo Identity { get; set; }
+ ///
+ /// Gets the system metadata relating to System Topic resource.
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
///
/// Validate the object.
///
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Topic.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Topic.cs
index 8244bd905db3e..f98be7f59fa3d 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Topic.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/Topic.cs
@@ -69,16 +69,11 @@ public Topic()
/// Data Residency Boundary of the
/// resource. Possible values include: 'WithinGeopair',
/// 'WithinRegion'
- /// The Sku pricing tier for the topic.
/// Identity information for the
/// resource.
- /// Kind of the resource. Possible values include:
- /// 'Azure', 'AzureArc'
- /// Extended location of the
- /// resource.
/// The system metadata relating to Topic
/// resource.
- public Topic(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), IList privateEndpointConnections = default(IList), string provisioningState = default(string), string endpoint = default(string), string inputSchema = default(string), InputSchemaMapping inputSchemaMapping = default(InputSchemaMapping), string metricResourceId = default(string), string publicNetworkAccess = default(string), IList inboundIpRules = default(IList), bool? disableLocalAuth = default(bool?), string dataResidencyBoundary = default(string), ResourceSku sku = default(ResourceSku), IdentityInfo identity = default(IdentityInfo), string kind = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation), SystemData systemData = default(SystemData))
+ public Topic(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), IList privateEndpointConnections = default(IList), string provisioningState = default(string), string endpoint = default(string), string inputSchema = default(string), InputSchemaMapping inputSchemaMapping = default(InputSchemaMapping), string metricResourceId = default(string), string publicNetworkAccess = default(string), IList inboundIpRules = default(IList), bool? disableLocalAuth = default(bool?), string dataResidencyBoundary = default(string), IdentityInfo identity = default(IdentityInfo), SystemData systemData = default(SystemData))
: base(location, id, name, type, tags)
{
PrivateEndpointConnections = privateEndpointConnections;
@@ -91,10 +86,7 @@ public Topic()
InboundIpRules = inboundIpRules;
DisableLocalAuth = disableLocalAuth;
DataResidencyBoundary = dataResidencyBoundary;
- Sku = sku;
Identity = identity;
- Kind = kind;
- ExtendedLocation = extendedLocation;
SystemData = systemData;
CustomInit();
}
@@ -182,31 +174,12 @@ public Topic()
[JsonProperty(PropertyName = "properties.dataResidencyBoundary")]
public string DataResidencyBoundary { get; set; }
- ///
- /// Gets or sets the Sku pricing tier for the topic.
- ///
- [JsonProperty(PropertyName = "sku")]
- public ResourceSku Sku { get; set; }
-
///
/// Gets or sets identity information for the resource.
///
[JsonProperty(PropertyName = "identity")]
public IdentityInfo Identity { get; set; }
- ///
- /// Gets or sets kind of the resource. Possible values include:
- /// 'Azure', 'AzureArc'
- ///
- [JsonProperty(PropertyName = "kind")]
- public string Kind { get; set; }
-
- ///
- /// Gets or sets extended location of the resource.
- ///
- [JsonProperty(PropertyName = "extendedLocation")]
- public ExtendedLocation ExtendedLocation { get; set; }
-
///
/// Gets the system metadata relating to Topic resource.
///
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ResourceKind.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/TopicTypeSourceScope.cs
similarity index 57%
rename from sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ResourceKind.cs
rename to sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/TopicTypeSourceScope.cs
index 9b91794a16f18..04bd500e9bd6d 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/ResourceKind.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/TopicTypeSourceScope.cs
@@ -12,11 +12,13 @@ namespace Microsoft.Azure.Management.EventGrid.Models
{
///
- /// Defines values for ResourceKind.
+ /// Defines values for TopicTypeSourceScope.
///
- public static class ResourceKind
+ public static class TopicTypeSourceScope
{
- public const string Azure = "Azure";
- public const string AzureArc = "AzureArc";
+ public const string Resource = "Resource";
+ public const string ResourceGroup = "ResourceGroup";
+ public const string AzureSubscription = "AzureSubscription";
+ public const string ManagementGroup = "ManagementGroup";
}
}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/TopicUpdateParameters.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/TopicUpdateParameters.cs
index cf0869aa63dae..36529ccb56508 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/TopicUpdateParameters.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/TopicUpdateParameters.cs
@@ -51,8 +51,7 @@ public TopicUpdateParameters()
/// The data residency boundary for
/// the topic. Possible values include: 'WithinGeopair',
/// 'WithinRegion'
- /// The Sku pricing tier for the topic.
- public TopicUpdateParameters(IDictionary tags = default(IDictionary), IdentityInfo identity = default(IdentityInfo), string publicNetworkAccess = default(string), IList inboundIpRules = default(IList), bool? disableLocalAuth = default(bool?), string dataResidencyBoundary = default(string), ResourceSku sku = default(ResourceSku))
+ public TopicUpdateParameters(IDictionary tags = default(IDictionary), IdentityInfo identity = default(IdentityInfo), string publicNetworkAccess = default(string), IList inboundIpRules = default(IList), bool? disableLocalAuth = default(bool?), string dataResidencyBoundary = default(string))
{
Tags = tags;
Identity = identity;
@@ -60,7 +59,6 @@ public TopicUpdateParameters()
InboundIpRules = inboundIpRules;
DisableLocalAuth = disableLocalAuth;
DataResidencyBoundary = dataResidencyBoundary;
- Sku = sku;
CustomInit();
}
@@ -116,11 +114,5 @@ public TopicUpdateParameters()
[JsonProperty(PropertyName = "properties.dataResidencyBoundary")]
public string DataResidencyBoundary { get; set; }
- ///
- /// Gets or sets the Sku pricing tier for the topic.
- ///
- [JsonProperty(PropertyName = "sku")]
- public ResourceSku Sku { get; set; }
-
}
}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/VerifiedPartner.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/VerifiedPartner.cs
index e662e6711c38f..d82aba18bdfaf 100644
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/VerifiedPartner.cs
+++ b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/VerifiedPartner.cs
@@ -44,21 +44,18 @@ public VerifiedPartner()
/// partner.
/// Details of the partner topic
/// scenario.
- /// Details of the partner
- /// destination scenario.
/// Provisioning state of the verified
/// partner. Possible values include: 'Creating', 'Updating',
/// 'Deleting', 'Succeeded', 'Canceled', 'Failed'
/// The system metadata relating to Verified
/// Partner resource.
- public VerifiedPartner(string id = default(string), string name = default(string), string type = default(string), System.Guid? partnerRegistrationImmutableId = default(System.Guid?), string organizationName = default(string), string partnerDisplayName = default(string), PartnerDetails partnerTopicDetails = default(PartnerDetails), PartnerDetails partnerDestinationDetails = default(PartnerDetails), string provisioningState = default(string), SystemData systemData = default(SystemData))
+ public VerifiedPartner(string id = default(string), string name = default(string), string type = default(string), System.Guid? partnerRegistrationImmutableId = default(System.Guid?), string organizationName = default(string), string partnerDisplayName = default(string), PartnerDetails partnerTopicDetails = default(PartnerDetails), string provisioningState = default(string), SystemData systemData = default(SystemData))
: base(id, name, type)
{
PartnerRegistrationImmutableId = partnerRegistrationImmutableId;
OrganizationName = organizationName;
PartnerDisplayName = partnerDisplayName;
PartnerTopicDetails = partnerTopicDetails;
- PartnerDestinationDetails = partnerDestinationDetails;
ProvisioningState = provisioningState;
SystemData = systemData;
CustomInit();
@@ -93,12 +90,6 @@ public VerifiedPartner()
[JsonProperty(PropertyName = "properties.partnerTopicDetails")]
public PartnerDetails PartnerTopicDetails { get; set; }
- ///
- /// Gets or sets details of the partner destination scenario.
- ///
- [JsonProperty(PropertyName = "properties.partnerDestinationDetails")]
- public PartnerDetails PartnerDestinationDetails { get; set; }
-
///
/// Gets or sets provisioning state of the verified partner. Possible
/// values include: 'Creating', 'Updating', 'Deleting', 'Succeeded',
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.cs
deleted file mode 100644
index ec351f7e998f8..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/WebhookPartnerDestinationInfo.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
-
- ///
- /// Information about the WebHook of the partner destination.
- ///
- [Newtonsoft.Json.JsonObject("WebHook")]
- [Rest.Serialization.JsonTransformation]
- public partial class WebhookPartnerDestinationInfo : PartnerDestinationInfo
- {
- ///
- /// Initializes a new instance of the WebhookPartnerDestinationInfo
- /// class.
- ///
- public WebhookPartnerDestinationInfo()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the WebhookPartnerDestinationInfo
- /// class.
- ///
- /// Azure subscription ID of the
- /// subscriber. The partner destination associated with the channel
- /// will be
- /// created under this Azure subscription.
- /// Azure Resource Group of the
- /// subscriber. The partner destination associated with the channel
- /// will be
- /// created under this resource group.
- /// Name of the partner destination associated with
- /// the channel.
- /// Additional context of the
- /// partner destination endpoint.
- /// Change history of the
- /// resource move.
- /// The URL that represents the endpoint of
- /// the partner destination.
- /// The base URL that represents the
- /// endpoint of the partner destination.
- public WebhookPartnerDestinationInfo(string azureSubscriptionId = default(string), string resourceGroupName = default(string), string name = default(string), string endpointServiceContext = default(string), IList resourceMoveChangeHistory = default(IList), string endpointUrl = default(string), string endpointBaseUrl = default(string), PartnerClientAuthentication clientAuthentication = default(PartnerClientAuthentication))
- : base(azureSubscriptionId, resourceGroupName, name, endpointServiceContext, resourceMoveChangeHistory)
- {
- EndpointUrl = endpointUrl;
- EndpointBaseUrl = endpointBaseUrl;
- ClientAuthentication = clientAuthentication;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the URL that represents the endpoint of the partner
- /// destination.
- ///
- [JsonProperty(PropertyName = "properties.endpointUrl")]
- public string EndpointUrl { get; set; }
-
- ///
- /// Gets or sets the base URL that represents the endpoint of the
- /// partner destination.
- ///
- [JsonProperty(PropertyName = "properties.endpointBaseUrl")]
- public string EndpointBaseUrl { get; set; }
-
- ///
- ///
- [JsonProperty(PropertyName = "properties.clientAuthentication")]
- public PartnerClientAuthentication ClientAuthentication { get; set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.cs
deleted file mode 100644
index af4811cd82ff9..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/Models/WebhookUpdatePartnerDestinationInfo.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid.Models
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Serialization;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Information about the update of the WebHook of the partner destination.
- ///
- [Newtonsoft.Json.JsonObject("WebHook")]
- [Rest.Serialization.JsonTransformation]
- public partial class WebhookUpdatePartnerDestinationInfo : PartnerUpdateDestinationInfo
- {
- ///
- /// Initializes a new instance of the
- /// WebhookUpdatePartnerDestinationInfo class.
- ///
- public WebhookUpdatePartnerDestinationInfo()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// WebhookUpdatePartnerDestinationInfo class.
- ///
- /// The URL that represents the endpoint of
- /// the partner destination.
- /// The base URL that represents the
- /// endpoint of the partner destination.
- public WebhookUpdatePartnerDestinationInfo(string endpointUrl = default(string), string endpointBaseUrl = default(string), PartnerClientAuthentication clientAuthentication = default(PartnerClientAuthentication))
- {
- EndpointUrl = endpointUrl;
- EndpointBaseUrl = endpointBaseUrl;
- ClientAuthentication = clientAuthentication;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets the URL that represents the endpoint of the partner
- /// destination.
- ///
- [JsonProperty(PropertyName = "properties.endpointUrl")]
- public string EndpointUrl { get; set; }
-
- ///
- /// Gets or sets the base URL that represents the endpoint of the
- /// partner destination.
- ///
- [JsonProperty(PropertyName = "properties.endpointBaseUrl")]
- public string EndpointBaseUrl { get; set; }
-
- ///
- ///
- [JsonProperty(PropertyName = "properties.clientAuthentication")]
- public PartnerClientAuthentication ClientAuthentication { get; set; }
-
- }
-}
diff --git a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/PartnerDestinationsOperations.cs b/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/PartnerDestinationsOperations.cs
deleted file mode 100644
index ed3e55f4b5b25..0000000000000
--- a/sdk/eventgrid/Microsoft.Azure.Management.EventGrid/src/Generated/PartnerDestinationsOperations.cs
+++ /dev/null
@@ -1,1876 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.EventGrid
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- using System.Net.Http;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// PartnerDestinationsOperations operations.
- ///
- internal partial class PartnerDestinationsOperations : IServiceOperations, IPartnerDestinationsOperations
- {
- ///
- /// Initializes a new instance of the PartnerDestinationsOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal PartnerDestinationsOperations(EventGridManagementClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the EventGridManagementClient
- ///
- public EventGridManagementClient Client { get; private set; }
-
- ///
- /// Get a partner destination.
- ///
- ///
- /// Get properties of a partner destination.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner destination.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string partnerDestinationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (partnerDestinationName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "partnerDestinationName");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("partnerDestinationName", partnerDestinationName);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{partnerDestinationName}", System.Uri.EscapeDataString(partnerDestinationName));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Create a partner destination.
- ///
- ///
- /// Asynchronously creates a new partner destination with the specified
- /// parameters.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner destination.
- ///
- ///
- /// Partner destination create information.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string partnerDestinationName, PartnerDestination partnerDestination, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (partnerDestinationName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "partnerDestinationName");
- }
- if (partnerDestination == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "partnerDestination");
- }
- if (partnerDestination != null)
- {
- partnerDestination.Validate();
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("partnerDestinationName", partnerDestinationName);
- tracingParameters.Add("partnerDestination", partnerDestination);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdate", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{partnerDestinationName}", System.Uri.EscapeDataString(partnerDestinationName));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PUT");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(partnerDestination != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(partnerDestination, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- // Deserialize Response
- if ((int)_statusCode == 201)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// Delete a partner destination.
- ///
- ///
- /// Delete existing partner destination.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner destination.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string partnerDestinationName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- // Send request
- AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, partnerDestinationName, customHeaders, cancellationToken).ConfigureAwait(false);
- return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
- }
-
- ///
- /// Update a partner destination.
- ///
- ///
- /// Asynchronously updates a partner destination with the specified parameters.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// Name of the partner destination.
- ///
- ///
- /// Tags of the Partner Destination resource.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string partnerDestinationName, IDictionary tags = default(IDictionary), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (partnerDestinationName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "partnerDestinationName");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- PartnerDestinationUpdateParameters partnerDestinationUpdateParameters = new PartnerDestinationUpdateParameters();
- if (tags != null)
- {
- partnerDestinationUpdateParameters.Tags = tags;
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("partnerDestinationName", partnerDestinationName);
- tracingParameters.Add("partnerDestinationUpdateParameters", partnerDestinationUpdateParameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "Update", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations/{partnerDestinationName}").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{partnerDestinationName}", System.Uri.EscapeDataString(partnerDestinationName));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("PATCH");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- if(partnerDestinationUpdateParameters != null)
- {
- _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(partnerDestinationUpdateParameters, Client.SerializationSettings);
- _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
- _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
- }
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200 && (int)_statusCode != 201)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 201)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// List partner destinations under an Azure subscription.
- ///
- ///
- /// List all the partner destinations under an Azure subscription.
- ///
- ///
- /// 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.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListBySubscriptionWithHttpMessagesAsync(string filter = default(string), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("filter", filter);
- tracingParameters.Add("top", top);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListBySubscription", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerDestinations").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (filter != null)
- {
- _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter)));
- }
- if (top != null)
- {
- _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"'))));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse>();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- ///
- /// List partner destinations under a resource group.
- ///
- ///
- /// List all the partner destinations under a resource group.
- ///
- ///
- /// The name of the resource group within the user's subscription.
- ///
- ///
- /// 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.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string filter = default(string), int? top = default(int?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("filter", filter);
- tracingParameters.Add("top", top);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerDestinations").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (filter != null)
- {
- _queryParameters.Add(string.Format("$filter={0}", System.Uri.EscapeDataString(filter)));
- }
- if (top != null)
- {
- _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"'))));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("GET");
- _httpRequest.RequestUri = new System.Uri(_url);
- // Set Headers
- if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
- {
- _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
- }
- if (Client.AcceptLanguage != null)
- {
- if (_httpRequest.Headers.Contains("accept-language"))
- {
- _httpRequest.Headers.Remove("accept-language");
- }
- _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
- }
-
-
- if (customHeaders != null)
- {
- foreach(var _header in customHeaders)
- {
- if (_httpRequest.Headers.Contains(_header.Key))
- {
- _httpRequest.Headers.Remove(_header.Key);
- }
- _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
- }
- }
-
- // Serialize Request
- string _requestContent = null;
- // Set Credentials
- if (Client.Credentials != null)
- {
- cancellationToken.ThrowIfCancellationRequested();
- await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- }
- // Send Request
- if (_shouldTrace)
- {
- ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
- }
- cancellationToken.ThrowIfCancellationRequested();
- _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
- if (_shouldTrace)
- {
- ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
- }
- HttpStatusCode _statusCode = _httpResponse.StatusCode;
- cancellationToken.ThrowIfCancellationRequested();
- string _responseContent = null;
- if ((int)_statusCode != 200)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject