diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalRCustomCertificatesOperations.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalRCustomCertificatesOperations.cs
new file mode 100644
index 000000000000..cb606c60b3cb
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalRCustomCertificatesOperations.cs
@@ -0,0 +1,197 @@
+//
+// 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.SignalR
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SignalRCustomCertificatesOperations operations.
+ ///
+ public partial interface ISignalRCustomCertificatesOperations
+ {
+ ///
+ /// List all custom certificates.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get a custom certificate.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ /// 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 resourceName, string certificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or update a custom certificate.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ ///
+ ///
+ /// 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 resourceName, string certificateName, CustomCertificate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete a custom certificate.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ /// 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 resourceName, string certificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or update a custom certificate.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ ///
+ ///
+ /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string certificateName, CustomCertificate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List all custom certificates.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalRCustomDomainsOperations.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalRCustomDomainsOperations.cs
new file mode 100644
index 000000000000..7b0710490864
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalRCustomDomainsOperations.cs
@@ -0,0 +1,224 @@
+//
+// 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.SignalR
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// SignalRCustomDomainsOperations operations.
+ ///
+ public partial interface ISignalRCustomDomainsOperations
+ {
+ ///
+ /// List all custom domains.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Get a custom domain.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ /// 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 resourceName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or update a custom domain.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ ///
+ ///
+ /// 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 resourceName, string name, CustomDomain parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete a custom domain.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ /// 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 resourceName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Create or update a custom domain.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ ///
+ ///
+ /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string name, CustomDomain parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Delete a custom domain.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ /// 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 resourceName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// List all custom domains.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalRManagementClient.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalRManagementClient.cs
index 1ad9e814e242..f504a07fb1f8 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalRManagementClient.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalRManagementClient.cs
@@ -86,6 +86,16 @@ public partial interface ISignalRManagementClient : System.IDisposable
///
IUsagesOperations Usages { get; }
+ ///
+ /// Gets the ISignalRCustomCertificatesOperations.
+ ///
+ ISignalRCustomCertificatesOperations SignalRCustomCertificates { get; }
+
+ ///
+ /// Gets the ISignalRCustomDomainsOperations.
+ ///
+ ISignalRCustomDomainsOperations SignalRCustomDomains { get; }
+
///
/// Gets the ISignalRPrivateEndpointConnectionsOperations.
///
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalROperations.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalROperations.cs
index c1969ab03c65..27e212ac0ed3 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalROperations.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/ISignalROperations.cs
@@ -285,6 +285,33 @@ public partial interface ISignalROperations
///
Task RestartWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// List all available skus of the resource.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can
+ /// obtain this value from the Azure Resource Manager API or the
+ /// portal.
+ ///
+ ///
+ /// The name of the 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> ListSkusWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Create or update a resource.
///
///
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/CustomCertificate.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/CustomCertificate.cs
new file mode 100644
index 000000000000..5d16651dc3e7
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/CustomCertificate.cs
@@ -0,0 +1,112 @@
+//
+// 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.SignalR.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A custom certificate.
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class CustomCertificate : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the CustomCertificate class.
+ ///
+ public CustomCertificate()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CustomCertificate class.
+ ///
+ /// Base uri of the KeyVault that stores
+ /// certificate.
+ /// Certificate secret name.
+ /// Fully qualified resource Id for the
+ /// resource.
+ /// The name of the resource.
+ /// The type of the resource - e.g.
+ /// "Microsoft.SignalRService/SignalR"
+ /// Possible values include: 'Unknown',
+ /// 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating',
+ /// 'Updating', 'Deleting', 'Moving'
+ /// Certificate secret
+ /// version.
+ public CustomCertificate(string keyVaultBaseUri, string keyVaultSecretName, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), string keyVaultSecretVersion = default(string))
+ : base(id, name, type)
+ {
+ SystemData = systemData;
+ ProvisioningState = provisioningState;
+ KeyVaultBaseUri = keyVaultBaseUri;
+ KeyVaultSecretName = keyVaultSecretName;
+ KeyVaultSecretVersion = keyVaultSecretVersion;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
+ ///
+ /// Gets possible values include: 'Unknown', 'Succeeded', 'Failed',
+ /// 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Gets or sets base uri of the KeyVault that stores certificate.
+ ///
+ [JsonProperty(PropertyName = "properties.keyVaultBaseUri")]
+ public string KeyVaultBaseUri { get; set; }
+
+ ///
+ /// Gets or sets certificate secret name.
+ ///
+ [JsonProperty(PropertyName = "properties.keyVaultSecretName")]
+ public string KeyVaultSecretName { get; set; }
+
+ ///
+ /// Gets or sets certificate secret version.
+ ///
+ [JsonProperty(PropertyName = "properties.keyVaultSecretVersion")]
+ public string KeyVaultSecretVersion { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (KeyVaultBaseUri == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "KeyVaultBaseUri");
+ }
+ if (KeyVaultSecretName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "KeyVaultSecretName");
+ }
+ }
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/CustomDomain.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/CustomDomain.cs
new file mode 100644
index 000000000000..38bcc95d9d58
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/CustomDomain.cs
@@ -0,0 +1,100 @@
+//
+// 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.SignalR.Models
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Serialization;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A custom domain
+ ///
+ [Rest.Serialization.JsonTransformation]
+ public partial class CustomDomain : ProxyResource
+ {
+ ///
+ /// Initializes a new instance of the CustomDomain class.
+ ///
+ public CustomDomain()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the CustomDomain class.
+ ///
+ /// The custom domain name.
+ /// Fully qualified resource Id for the
+ /// resource.
+ /// The name of the resource.
+ /// The type of the resource - e.g.
+ /// "Microsoft.SignalRService/SignalR"
+ /// Possible values include: 'Unknown',
+ /// 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating',
+ /// 'Updating', 'Deleting', 'Moving'
+ public CustomDomain(string domainName, ResourceReference customCertificate, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string))
+ : base(id, name, type)
+ {
+ SystemData = systemData;
+ ProvisioningState = provisioningState;
+ DomainName = domainName;
+ CustomCertificate = customCertificate;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "systemData")]
+ public SystemData SystemData { get; private set; }
+
+ ///
+ /// Gets possible values include: 'Unknown', 'Succeeded', 'Failed',
+ /// 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving'
+ ///
+ [JsonProperty(PropertyName = "properties.provisioningState")]
+ public string ProvisioningState { get; private set; }
+
+ ///
+ /// Gets or sets the custom domain name.
+ ///
+ [JsonProperty(PropertyName = "properties.domainName")]
+ public string DomainName { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "properties.customCertificate")]
+ public ResourceReference CustomCertificate { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (DomainName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "DomainName");
+ }
+ if (CustomCertificate == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "CustomCertificate");
+ }
+ }
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/KeyType.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/KeyType.cs
index 1203be153036..bb06fafd3b8a 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/KeyType.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/KeyType.cs
@@ -18,5 +18,6 @@ public static class KeyType
{
public const string Primary = "Primary";
public const string Secondary = "Secondary";
+ public const string Salt = "Salt";
}
}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/LiveTraceCategory.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/LiveTraceCategory.cs
new file mode 100644
index 000000000000..dba4a909238b
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/LiveTraceCategory.cs
@@ -0,0 +1,70 @@
+//
+// 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.SignalR.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Live trace category configuration of a Microsoft.SignalRService
+ /// resource.
+ ///
+ public partial class LiveTraceCategory
+ {
+ ///
+ /// Initializes a new instance of the LiveTraceCategory class.
+ ///
+ public LiveTraceCategory()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the LiveTraceCategory class.
+ ///
+ /// Gets or sets the live trace category's name.
+ /// Available values: ConnectivityLogs, MessagingLogs.
+ /// Case insensitive.
+ /// Indicates whether or the live trace category
+ /// is enabled.
+ /// Available values: true, false.
+ /// Case insensitive.
+ public LiveTraceCategory(string name = default(string), string enabled = default(string))
+ {
+ Name = name;
+ Enabled = enabled;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the live trace category's name.
+ /// Available values: ConnectivityLogs, MessagingLogs.
+ /// Case insensitive.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets indicates whether or the live trace category is
+ /// enabled.
+ /// Available values: true, false.
+ /// Case insensitive.
+ ///
+ [JsonProperty(PropertyName = "enabled")]
+ public string Enabled { get; set; }
+
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/LiveTraceConfiguration.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/LiveTraceConfiguration.cs
new file mode 100644
index 000000000000..05d10ecbd2fc
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/LiveTraceConfiguration.cs
@@ -0,0 +1,76 @@
+//
+// 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.SignalR.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Live trace configuration of a Microsoft.SignalRService resource.
+ ///
+ public partial class LiveTraceConfiguration
+ {
+ ///
+ /// Initializes a new instance of the LiveTraceConfiguration class.
+ ///
+ public LiveTraceConfiguration()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the LiveTraceConfiguration class.
+ ///
+ /// Indicates whether or not enable live trace.
+ /// When it's set to true, live trace client can connect to the
+ /// service.
+ /// Otherwise, live trace client can't connect to the service, so that
+ /// you are unable to receive any log, no matter what you configure in
+ /// "categories".
+ /// Available values: true, false.
+ /// Case insensitive.
+ /// Gets or sets the list of category
+ /// configurations.
+ public LiveTraceConfiguration(string enabled = default(string), IList categories = default(IList))
+ {
+ Enabled = enabled;
+ Categories = categories;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets indicates whether or not enable live trace.
+ /// When it's set to true, live trace client can connect to the
+ /// service.
+ /// Otherwise, live trace client can't connect to the service, so that
+ /// you are unable to receive any log, no matter what you configure in
+ /// "categories".
+ /// Available values: true, false.
+ /// Case insensitive.
+ ///
+ [JsonProperty(PropertyName = "enabled")]
+ public string Enabled { get; set; }
+
+ ///
+ /// Gets or sets the list of category configurations.
+ ///
+ [JsonProperty(PropertyName = "categories")]
+ public IList Categories { get; set; }
+
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ManagedIdentity.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ManagedIdentity.cs
index 02844d4e31aa..6f19822d05a0 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ManagedIdentity.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ManagedIdentity.cs
@@ -31,8 +31,7 @@ public ManagedIdentity()
///
/// Initializes a new instance of the ManagedIdentity class.
///
- /// Represent the identity type: systemAssigned,
- /// userAssigned, None. Possible values include: 'None',
+ /// Possible values include: 'None',
/// 'SystemAssigned', 'UserAssigned'
/// Get or set the user assigned
/// identities
@@ -57,9 +56,8 @@ public ManagedIdentity()
partial void CustomInit();
///
- /// Gets or sets represent the identity type: systemAssigned,
- /// userAssigned, None. Possible values include: 'None',
- /// 'SystemAssigned', 'UserAssigned'
+ /// Gets or sets possible values include: 'None', 'SystemAssigned',
+ /// 'UserAssigned'
///
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/Operation.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/Operation.cs
index 14879d39dc49..592c7ca7da94 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/Operation.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/Operation.cs
@@ -33,13 +33,9 @@ public Operation()
/// {provider}/{resource}/{operation}
/// If the operation is a data action. (for
/// data plane rbac)
- /// The object that describes the
- /// operation.
/// Optional. The intended executor of the
/// operation; governs the display of the operation in the RBAC UX and
/// the audit logs UX.
- /// Extra properties for the
- /// operation.
public Operation(string name = default(string), bool? isDataAction = default(bool?), OperationDisplay display = default(OperationDisplay), string origin = default(string), OperationProperties properties = default(OperationProperties))
{
Name = name;
@@ -70,7 +66,6 @@ public Operation()
public bool? IsDataAction { get; set; }
///
- /// Gets or sets the object that describes the operation.
///
[JsonProperty(PropertyName = "display")]
public OperationDisplay Display { get; set; }
@@ -84,7 +79,6 @@ public Operation()
public string Origin { get; set; }
///
- /// Gets or sets extra properties for the operation.
///
[JsonProperty(PropertyName = "properties")]
public OperationProperties Properties { get; set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/OperationProperties.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/OperationProperties.cs
index 6db87d6e74d2..a6c4d05558c9 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/OperationProperties.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/OperationProperties.cs
@@ -29,8 +29,6 @@ public OperationProperties()
///
/// Initializes a new instance of the OperationProperties class.
///
- /// The service
- /// specifications.
public OperationProperties(ServiceSpecification serviceSpecification = default(ServiceSpecification))
{
ServiceSpecification = serviceSpecification;
@@ -43,7 +41,6 @@ public OperationProperties()
partial void CustomInit();
///
- /// Gets or sets the service specifications.
///
[JsonProperty(PropertyName = "serviceSpecification")]
public ServiceSpecification ServiceSpecification { get; set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/PrivateEndpointConnection.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/PrivateEndpointConnection.cs
index 1552686f011f..774c69df8628 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/PrivateEndpointConnection.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/PrivateEndpointConnection.cs
@@ -13,6 +13,8 @@ namespace Microsoft.Azure.Management.SignalR.Models
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
using System.Linq;
///
@@ -37,22 +39,17 @@ public PrivateEndpointConnection()
/// The name of the resource.
/// The type of the resource - e.g.
/// "Microsoft.SignalRService/SignalR"
- /// Metadata pertaining to creation and last
- /// modification of the resource.
- /// Provisioning state of the private
- /// endpoint connection. Possible values include: 'Unknown',
+ /// Possible values include: 'Unknown',
/// 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating',
/// 'Updating', 'Deleting', 'Moving'
- /// Private endpoint associated with the
- /// private endpoint connection
- /// Connection
- /// state
- public PrivateEndpointConnection(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState))
+ /// Group IDs
+ public PrivateEndpointConnection(string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), PrivateEndpoint privateEndpoint = default(PrivateEndpoint), IList groupIds = default(IList), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState))
: base(id, name, type)
{
SystemData = systemData;
ProvisioningState = provisioningState;
PrivateEndpoint = privateEndpoint;
+ GroupIds = groupIds;
PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
CustomInit();
}
@@ -63,29 +60,29 @@ public PrivateEndpointConnection()
partial void CustomInit();
///
- /// Gets metadata pertaining to creation and last modification of the
- /// resource.
///
[JsonProperty(PropertyName = "systemData")]
public SystemData SystemData { get; private set; }
///
- /// Gets provisioning state of the private endpoint connection.
- /// Possible values include: 'Unknown', 'Succeeded', 'Failed',
+ /// Gets possible values include: 'Unknown', 'Succeeded', 'Failed',
/// 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving'
///
[JsonProperty(PropertyName = "properties.provisioningState")]
public string ProvisioningState { get; private set; }
///
- /// Gets or sets private endpoint associated with the private endpoint
- /// connection
///
[JsonProperty(PropertyName = "properties.privateEndpoint")]
public PrivateEndpoint PrivateEndpoint { get; set; }
///
- /// Gets or sets connection state
+ /// Gets group IDs
+ ///
+ [JsonProperty(PropertyName = "properties.groupIds")]
+ public IList GroupIds { get; private set; }
+
+ ///
///
[JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")]
public PrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/PrivateLinkServiceConnectionState.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/PrivateLinkServiceConnectionState.cs
index f9d63f3388dd..8edf64d77479 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/PrivateLinkServiceConnectionState.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/PrivateLinkServiceConnectionState.cs
@@ -31,10 +31,8 @@ public PrivateLinkServiceConnectionState()
/// Initializes a new instance of the PrivateLinkServiceConnectionState
/// class.
///
- /// Indicates whether the connection has been
- /// Approved/Rejected/Removed by the owner of the service. Possible
- /// values include: 'Pending', 'Approved', 'Rejected',
- /// 'Disconnected'
+ /// Possible values include: 'Pending',
+ /// 'Approved', 'Rejected', 'Disconnected'
/// The reason for approval/rejection of the
/// connection.
/// A message indicating if changes on
@@ -53,9 +51,8 @@ public PrivateLinkServiceConnectionState()
partial void CustomInit();
///
- /// Gets or sets indicates whether the connection has been
- /// Approved/Rejected/Removed by the owner of the service. Possible
- /// values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'
+ /// Gets or sets possible values include: 'Pending', 'Approved',
+ /// 'Rejected', 'Disconnected'
///
[JsonProperty(PropertyName = "status")]
public string Status { get; set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/RegenerateKeyParameters.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/RegenerateKeyParameters.cs
index c749dc5627bf..d911fcda1cd1 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/RegenerateKeyParameters.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/RegenerateKeyParameters.cs
@@ -29,9 +29,8 @@ public RegenerateKeyParameters()
///
/// Initializes a new instance of the RegenerateKeyParameters class.
///
- /// The keyType to regenerate. Must be either
- /// 'primary' or 'secondary'(case-insensitive). Possible values
- /// include: 'Primary', 'Secondary'
+ /// Possible values include: 'Primary',
+ /// 'Secondary', 'Salt'
public RegenerateKeyParameters(string keyType = default(string))
{
KeyType = keyType;
@@ -44,9 +43,8 @@ public RegenerateKeyParameters()
partial void CustomInit();
///
- /// Gets or sets the keyType to regenerate. Must be either 'primary' or
- /// 'secondary'(case-insensitive). Possible values include: 'Primary',
- /// 'Secondary'
+ /// Gets or sets possible values include: 'Primary', 'Secondary',
+ /// 'Salt'
///
[JsonProperty(PropertyName = "keyType")]
public string KeyType { get; set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceLogCategory.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceLogCategory.cs
new file mode 100644
index 000000000000..bb724e8d6038
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceLogCategory.cs
@@ -0,0 +1,70 @@
+//
+// 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.SignalR.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Resource log category configuration of a Microsoft.SignalRService
+ /// resource.
+ ///
+ public partial class ResourceLogCategory
+ {
+ ///
+ /// Initializes a new instance of the ResourceLogCategory class.
+ ///
+ public ResourceLogCategory()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ResourceLogCategory class.
+ ///
+ /// Gets or sets the resource log category's name.
+ /// Available values: ConnectivityLogs, MessagingLogs.
+ /// Case insensitive.
+ /// Indicates whether or the resource log
+ /// category is enabled.
+ /// Available values: true, false.
+ /// Case insensitive.
+ public ResourceLogCategory(string name = default(string), string enabled = default(string))
+ {
+ Name = name;
+ Enabled = enabled;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the resource log category's name.
+ /// Available values: ConnectivityLogs, MessagingLogs.
+ /// Case insensitive.
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets indicates whether or the resource log category is
+ /// enabled.
+ /// Available values: true, false.
+ /// Case insensitive.
+ ///
+ [JsonProperty(PropertyName = "enabled")]
+ public string Enabled { get; set; }
+
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceLogConfiguration.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceLogConfiguration.cs
new file mode 100644
index 000000000000..d3909032d1de
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceLogConfiguration.cs
@@ -0,0 +1,54 @@
+//
+// 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.SignalR.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Resource log configuration of a Microsoft.SignalRService resource.
+ ///
+ public partial class ResourceLogConfiguration
+ {
+ ///
+ /// Initializes a new instance of the ResourceLogConfiguration class.
+ ///
+ public ResourceLogConfiguration()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ResourceLogConfiguration class.
+ ///
+ /// Gets or sets the list of category
+ /// configurations.
+ public ResourceLogConfiguration(IList categories = default(IList))
+ {
+ Categories = categories;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the list of category configurations.
+ ///
+ [JsonProperty(PropertyName = "categories")]
+ public IList Categories { get; set; }
+
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceReference.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceReference.cs
new file mode 100644
index 000000000000..67c5d9f0ccf9
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceReference.cs
@@ -0,0 +1,51 @@
+//
+// 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.SignalR.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Reference to a resource.
+ ///
+ public partial class ResourceReference
+ {
+ ///
+ /// Initializes a new instance of the ResourceReference class.
+ ///
+ public ResourceReference()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ResourceReference class.
+ ///
+ /// Resource ID.
+ public ResourceReference(string id = default(string))
+ {
+ Id = id;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource ID.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceSku.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceSku.cs
index 37fa852d94f5..2e8502618a52 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceSku.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ResourceSku.cs
@@ -32,20 +32,18 @@ public ResourceSku()
///
/// The name of the SKU. Required.
///
- /// Allowed values: Standard_S1, Free_F1
- /// Optional tier of this particular SKU. 'Standard'
- /// or 'Free'.
- ///
- /// `Basic` is deprecated, use `Standard` instead. Possible values
- /// include: 'Free', 'Basic', 'Standard', 'Premium'
+ /// Allowed values: Standard_S1, Free_F1, Premium_P1
+ /// Possible values include: 'Free', 'Basic',
+ /// 'Standard', 'Premium'
/// Not used. Retained for future use.
/// Not used. Retained for future use.
/// Optional, integer. The unit count of the
/// resource. 1 by default.
///
/// If present, following values are allowed:
- /// Free: 1
- /// Standard: 1,2,5,10,20,50,100
+ /// Free: 1;
+ /// Standard: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;
+ /// Premium: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;
public ResourceSku(string name, string tier = default(string), string size = default(string), string family = default(string), int? capacity = default(int?))
{
Name = name;
@@ -64,17 +62,14 @@ public ResourceSku()
///
/// Gets or sets the name of the SKU. Required.
///
- /// Allowed values: Standard_S1, Free_F1
+ /// Allowed values: Standard_S1, Free_F1, Premium_P1
///
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
///
- /// Gets or sets optional tier of this particular SKU. 'Standard' or
- /// 'Free'.
- ///
- /// `Basic` is deprecated, use `Standard` instead. Possible values
- /// include: 'Free', 'Basic', 'Standard', 'Premium'
+ /// Gets or sets possible values include: 'Free', 'Basic', 'Standard',
+ /// 'Premium'
///
[JsonProperty(PropertyName = "tier")]
public string Tier { get; set; }
@@ -96,8 +91,9 @@ public ResourceSku()
/// by default.
///
/// If present, following values are allowed:
- /// Free: 1
- /// Standard: 1,2,5,10,20,50,100
+ /// Free: 1;
+ /// Standard: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;
+ /// Premium: 1,2,3,4,5,6,7,8,9,10,20,30,40,50,60,70,80,90,100;
///
[JsonProperty(PropertyName = "capacity")]
public int? Capacity { get; set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ScaleType.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ScaleType.cs
new file mode 100644
index 000000000000..650161418300
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ScaleType.cs
@@ -0,0 +1,23 @@
+//
+// 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.SignalR.Models
+{
+
+ ///
+ /// Defines values for ScaleType.
+ ///
+ public static class ScaleType
+ {
+ public const string None = "None";
+ public const string Manual = "Manual";
+ public const string Automatic = "Automatic";
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ServerlessSettings.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ServerlessSettings.cs
new file mode 100644
index 000000000000..ae5b7a781dfe
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ServerlessSettings.cs
@@ -0,0 +1,94 @@
+//
+// 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.SignalR.Models
+{
+ using Microsoft.Rest;
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Serverless settings.
+ ///
+ public partial class ServerlessSettings
+ {
+ ///
+ /// Initializes a new instance of the ServerlessSettings class.
+ ///
+ public ServerlessSettings()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ServerlessSettings class.
+ ///
+ /// Gets or sets Client
+ /// Connection Timeout. Optional to be set.
+ /// Value in seconds.
+ /// Default value is 30 seconds.
+ /// Customer should set the timeout to a shorter period if messages are
+ /// expected to be sent in shorter intervals,
+ /// and want the client to disconnect more quickly after the last
+ /// message is sent.
+ /// You can set the timeout to a longer period if messages are expected
+ /// to be sent in longer intervals,
+ /// and they want to keep the same client connection alive during this
+ /// session.
+ /// The service considers the client disconnected if it hasn't received
+ /// a message (including keep-alive) in this interval.
+ public ServerlessSettings(int? connectionTimeoutInSeconds = default(int?))
+ {
+ ConnectionTimeoutInSeconds = connectionTimeoutInSeconds;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets Client Connection Timeout. Optional to be set.
+ /// Value in seconds.
+ /// Default value is 30 seconds.
+ /// Customer should set the timeout to a shorter period if messages are
+ /// expected to be sent in shorter intervals,
+ /// and want the client to disconnect more quickly after the last
+ /// message is sent.
+ /// You can set the timeout to a longer period if messages are expected
+ /// to be sent in longer intervals,
+ /// and they want to keep the same client connection alive during this
+ /// session.
+ /// The service considers the client disconnected if it hasn't received
+ /// a message (including keep-alive) in this interval.
+ ///
+ [JsonProperty(PropertyName = "connectionTimeoutInSeconds")]
+ public int? ConnectionTimeoutInSeconds { get; set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (ConnectionTimeoutInSeconds > 120)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMaximum, "ConnectionTimeoutInSeconds", 120);
+ }
+ if (ConnectionTimeoutInSeconds < 1)
+ {
+ throw new ValidationException(ValidationRules.InclusiveMinimum, "ConnectionTimeoutInSeconds", 1);
+ }
+ }
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ShareablePrivateLinkResourceType.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ShareablePrivateLinkResourceType.cs
index 85b442fdde5a..8c5797fcd7d3 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ShareablePrivateLinkResourceType.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/ShareablePrivateLinkResourceType.cs
@@ -34,8 +34,6 @@ public ShareablePrivateLinkResourceType()
///
/// The name of the resource type that has been
/// onboarded to private link service
- /// Describes the properties of a resource
- /// type that has been onboarded to private link service
public ShareablePrivateLinkResourceType(string name = default(string), ShareablePrivateLinkResourceProperties properties = default(ShareablePrivateLinkResourceProperties))
{
Name = name;
@@ -56,8 +54,6 @@ public ShareablePrivateLinkResourceType()
public string Name { get; set; }
///
- /// Gets or sets describes the properties of a resource type that has
- /// been onboarded to private link service
///
[JsonProperty(PropertyName = "properties")]
public ShareablePrivateLinkResourceProperties Properties { get; set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SharedPrivateLinkResource.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SharedPrivateLinkResource.cs
index 53dfac62af26..fae3b9d15ac9 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SharedPrivateLinkResource.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SharedPrivateLinkResource.cs
@@ -41,17 +41,13 @@ public SharedPrivateLinkResource()
/// The name of the resource.
/// The type of the resource - e.g.
/// "Microsoft.SignalRService/SignalR"
- /// Metadata pertaining to creation and last
- /// modification of the resource.
- /// Provisioning state of the shared
- /// private link resource. Possible values include: 'Unknown',
+ /// Possible values include: 'Unknown',
/// 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating',
/// 'Updating', 'Deleting', 'Moving'
/// The request message for requesting
/// approval of the shared private link resource
- /// Status of the shared private link resource.
- /// Possible values include: 'Pending', 'Approved', 'Rejected',
- /// 'Disconnected', 'Timeout'
+ /// Possible values include: 'Pending',
+ /// 'Approved', 'Rejected', 'Disconnected', 'Timeout'
public SharedPrivateLinkResource(string groupId, string privateLinkResourceId, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), string provisioningState = default(string), string requestMessage = default(string), string status = default(string))
: base(id, name, type)
{
@@ -70,8 +66,6 @@ public SharedPrivateLinkResource()
partial void CustomInit();
///
- /// Gets metadata pertaining to creation and last modification of the
- /// resource.
///
[JsonProperty(PropertyName = "systemData")]
public SystemData SystemData { get; private set; }
@@ -91,8 +85,7 @@ public SharedPrivateLinkResource()
public string PrivateLinkResourceId { get; set; }
///
- /// Gets provisioning state of the shared private link resource.
- /// Possible values include: 'Unknown', 'Succeeded', 'Failed',
+ /// Gets possible values include: 'Unknown', 'Succeeded', 'Failed',
/// 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving'
///
[JsonProperty(PropertyName = "properties.provisioningState")]
@@ -106,9 +99,8 @@ public SharedPrivateLinkResource()
public string RequestMessage { get; set; }
///
- /// Gets status of the shared private link resource. Possible values
- /// include: 'Pending', 'Approved', 'Rejected', 'Disconnected',
- /// 'Timeout'
+ /// Gets possible values include: 'Pending', 'Approved', 'Rejected',
+ /// 'Disconnected', 'Timeout'
///
[JsonProperty(PropertyName = "properties.status")]
public string Status { get; private set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRFeature.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRFeature.cs
index 021363757bbc..9494a31c3462 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRFeature.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRFeature.cs
@@ -32,24 +32,7 @@ public SignalRFeature()
///
/// Initializes a new instance of the SignalRFeature class.
///
- /// FeatureFlags is the supported features of Azure
- /// SignalR service.
- /// - ServiceMode: Flag for backend server for SignalR service. Values
- /// allowed: "Default": have your own backend server; "Serverless":
- /// your application doesn't have a backend server; "Classic": for
- /// backward compatibility. Support both Default and Serverless mode
- /// but not recommended; "PredefinedOnly": for future use.
- /// - EnableConnectivityLogs: "true"/"false", to enable/disable the
- /// connectivity log category respectively.
- /// - EnableMessagingLogs: "true"/"false", to enable/disable the
- /// connectivity log category respectively.
- /// - EnableLiveTrace: Live Trace allows you to know what's happening
- /// inside Azure SignalR service, it will give you live traces in real
- /// time, it will be helpful when you developing your own Azure SignalR
- /// based web application or self-troubleshooting some issues. Please
- /// note that live traces are counted as outbound messages that will be
- /// charged. Values allowed: "true"/"false", to enable/disable live
- /// trace feature. Possible values include: 'ServiceMode',
+ /// Possible values include: 'ServiceMode',
/// 'EnableConnectivityLogs', 'EnableMessagingLogs',
/// 'EnableLiveTrace'
/// Value of the feature flag. See Azure SignalR
@@ -71,24 +54,7 @@ public SignalRFeature()
partial void CustomInit();
///
- /// Gets or sets featureFlags is the supported features of Azure
- /// SignalR service.
- /// - ServiceMode: Flag for backend server for SignalR service. Values
- /// allowed: "Default": have your own backend server; "Serverless":
- /// your application doesn't have a backend server; "Classic": for
- /// backward compatibility. Support both Default and Serverless mode
- /// but not recommended; "PredefinedOnly": for future use.
- /// - EnableConnectivityLogs: "true"/"false", to enable/disable the
- /// connectivity log category respectively.
- /// - EnableMessagingLogs: "true"/"false", to enable/disable the
- /// connectivity log category respectively.
- /// - EnableLiveTrace: Live Trace allows you to know what's happening
- /// inside Azure SignalR service, it will give you live traces in real
- /// time, it will be helpful when you developing your own Azure SignalR
- /// based web application or self-troubleshooting some issues. Please
- /// note that live traces are counted as outbound messages that will be
- /// charged. Values allowed: "true"/"false", to enable/disable live
- /// trace feature. Possible values include: 'ServiceMode',
+ /// Gets or sets possible values include: 'ServiceMode',
/// 'EnableConnectivityLogs', 'EnableMessagingLogs', 'EnableLiveTrace'
///
[JsonProperty(PropertyName = "flag")]
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRNetworkACLs.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRNetworkACLs.cs
index b9248490f0e2..b7b8c6461b33 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRNetworkACLs.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRNetworkACLs.cs
@@ -31,10 +31,8 @@ public SignalRNetworkACLs()
///
/// Initializes a new instance of the SignalRNetworkACLs class.
///
- /// Default action when no other rule
- /// matches. Possible values include: 'Allow', 'Deny'
- /// ACL for requests from public
- /// network
+ /// Possible values include: 'Allow',
+ /// 'Deny'
/// ACLs for requests from private
/// endpoints
public SignalRNetworkACLs(string defaultAction = default(string), NetworkACL publicNetwork = default(NetworkACL), IList privateEndpoints = default(IList))
@@ -51,14 +49,12 @@ public SignalRNetworkACLs()
partial void CustomInit();
///
- /// Gets or sets default action when no other rule matches. Possible
- /// values include: 'Allow', 'Deny'
+ /// Gets or sets possible values include: 'Allow', 'Deny'
///
[JsonProperty(PropertyName = "defaultAction")]
public string DefaultAction { get; set; }
///
- /// Gets or sets ACL for requests from public network
///
[JsonProperty(PropertyName = "publicNetwork")]
public NetworkACL PublicNetwork { get; set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRResource.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRResource.cs
index 7caa9f303513..54475c73e689 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRResource.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRResource.cs
@@ -43,12 +43,9 @@ public SignalRResource()
/// US | East US | North Central US | South Central US.
/// Tags of the service which is a list of key value
/// pairs that describe the resource.
- /// The billing information of the resource.(e.g.
- /// Free, Standard)
- /// Provisioning state of the resource.
- /// Possible values include: 'Unknown', 'Succeeded', 'Failed',
- /// 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting',
- /// 'Moving'
+ /// Possible values include: 'Unknown',
+ /// 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating',
+ /// 'Updating', 'Deleting', 'Moving'
/// The publicly accessible IP of the
/// resource.
/// FQDN of the service instance.
@@ -62,7 +59,7 @@ public SignalRResource()
/// connections to the resource.
/// The list of shared private
/// link resources.
- /// TLS settings.
+ /// Deprecated.
/// List of the featureFlags.
///
/// FeatureFlags that are not included in the parameters for the update
@@ -73,11 +70,6 @@ public SignalRResource()
/// value will be used
/// But keep in mind, the default value doesn't mean "false". It varies
/// in terms of different FeatureFlags.
- /// Cross-Origin Resource Sharing (CORS)
- /// settings.
- /// Upstream settings when the service is in
- /// server-less mode.
- /// Network ACLs
/// Enable or disable public network
/// access. Default to "Enabled".
/// When it's Enabled, network ACLs still apply.
@@ -86,16 +78,12 @@ public SignalRResource()
/// DisableLocalAuth
/// Enable or disable local auth with AccessKey
/// When set as true, connection with AccessKey=xxx won't work.
- /// disableAadAuth
+ /// DisableLocalAuth
/// Enable or disable aad auth
/// When set as true, connection with AuthType=aad won't work.
- /// The kind of the service - e.g. "SignalR" for
- /// "Microsoft.SignalRService/SignalR". Possible values include:
- /// 'SignalR', 'RawWebSockets'
- /// The managed identity response
- /// Metadata pertaining to creation and last
- /// modification of the resource.
- public SignalRResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ResourceSku sku = default(ResourceSku), string provisioningState = default(string), string externalIP = default(string), string hostName = default(string), int? publicPort = default(int?), int? serverPort = default(int?), string version = default(string), IList privateEndpointConnections = default(IList), IList sharedPrivateLinkResources = default(IList), SignalRTlsSettings tls = default(SignalRTlsSettings), IList features = default(IList), SignalRCorsSettings cors = default(SignalRCorsSettings), ServerlessUpstreamSettings upstream = default(ServerlessUpstreamSettings), SignalRNetworkACLs networkACLs = default(SignalRNetworkACLs), string publicNetworkAccess = default(string), bool? disableLocalAuth = default(bool?), bool? disableAadAuth = default(bool?), string kind = default(string), ManagedIdentity identity = default(ManagedIdentity), SystemData systemData = default(SystemData))
+ /// Possible values include: 'SignalR',
+ /// 'RawWebSockets'
+ public SignalRResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ResourceSku sku = default(ResourceSku), string provisioningState = default(string), string externalIP = default(string), string hostName = default(string), int? publicPort = default(int?), int? serverPort = default(int?), string version = default(string), IList privateEndpointConnections = default(IList), IList sharedPrivateLinkResources = default(IList), SignalRTlsSettings tls = default(SignalRTlsSettings), string hostNamePrefix = default(string), IList features = default(IList), LiveTraceConfiguration liveTraceConfiguration = default(LiveTraceConfiguration), ResourceLogConfiguration resourceLogConfiguration = default(ResourceLogConfiguration), SignalRCorsSettings cors = default(SignalRCorsSettings), ServerlessSettings serverless = default(ServerlessSettings), ServerlessUpstreamSettings upstream = default(ServerlessUpstreamSettings), SignalRNetworkACLs networkACLs = default(SignalRNetworkACLs), string publicNetworkAccess = default(string), bool? disableLocalAuth = default(bool?), bool? disableAadAuth = default(bool?), string kind = default(string), ManagedIdentity identity = default(ManagedIdentity), SystemData systemData = default(SystemData))
: base(id, name, type, location, tags)
{
Sku = sku;
@@ -108,8 +96,12 @@ public SignalRResource()
PrivateEndpointConnections = privateEndpointConnections;
SharedPrivateLinkResources = sharedPrivateLinkResources;
Tls = tls;
+ HostNamePrefix = hostNamePrefix;
Features = features;
+ LiveTraceConfiguration = liveTraceConfiguration;
+ ResourceLogConfiguration = resourceLogConfiguration;
Cors = cors;
+ Serverless = serverless;
Upstream = upstream;
NetworkACLs = networkACLs;
PublicNetworkAccess = publicNetworkAccess;
@@ -127,16 +119,13 @@ public SignalRResource()
partial void CustomInit();
///
- /// Gets or sets the billing information of the resource.(e.g. Free,
- /// Standard)
///
[JsonProperty(PropertyName = "sku")]
public ResourceSku Sku { get; set; }
///
- /// Gets provisioning state of the resource. Possible values include:
- /// 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running',
- /// 'Creating', 'Updating', 'Deleting', 'Moving'
+ /// Gets possible values include: 'Unknown', 'Succeeded', 'Failed',
+ /// 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving'
///
[JsonProperty(PropertyName = "properties.provisioningState")]
public string ProvisioningState { get; private set; }
@@ -187,11 +176,16 @@ public SignalRResource()
public IList SharedPrivateLinkResources { get; private set; }
///
- /// Gets or sets TLS settings.
///
[JsonProperty(PropertyName = "properties.tls")]
public SignalRTlsSettings Tls { get; set; }
+ ///
+ /// Gets deprecated.
+ ///
+ [JsonProperty(PropertyName = "properties.hostNamePrefix")]
+ public string HostNamePrefix { get; private set; }
+
///
/// Gets or sets list of the featureFlags.
///
@@ -208,20 +202,31 @@ public SignalRResource()
public IList Features { get; set; }
///
- /// Gets or sets cross-Origin Resource Sharing (CORS) settings.
+ ///
+ [JsonProperty(PropertyName = "properties.liveTraceConfiguration")]
+ public LiveTraceConfiguration LiveTraceConfiguration { get; set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "properties.resourceLogConfiguration")]
+ public ResourceLogConfiguration ResourceLogConfiguration { get; set; }
+
+ ///
///
[JsonProperty(PropertyName = "properties.cors")]
public SignalRCorsSettings Cors { get; set; }
///
- /// Gets or sets upstream settings when the service is in server-less
- /// mode.
+ ///
+ [JsonProperty(PropertyName = "properties.serverless")]
+ public ServerlessSettings Serverless { get; set; }
+
+ ///
///
[JsonProperty(PropertyName = "properties.upstream")]
public ServerlessUpstreamSettings Upstream { get; set; }
///
- /// Gets or sets network ACLs
///
[JsonProperty(PropertyName = "properties.networkACLs")]
public SignalRNetworkACLs NetworkACLs { get; set; }
@@ -245,7 +250,7 @@ public SignalRResource()
public bool? DisableLocalAuth { get; set; }
///
- /// Gets or sets disableAadAuth
+ /// Gets or sets disableLocalAuth
/// Enable or disable aad auth
/// When set as true, connection with AuthType=aad won't work.
///
@@ -253,22 +258,17 @@ public SignalRResource()
public bool? DisableAadAuth { get; set; }
///
- /// Gets or sets the kind of the service - e.g. "SignalR" for
- /// "Microsoft.SignalRService/SignalR". Possible values include:
- /// 'SignalR', 'RawWebSockets'
+ /// Gets or sets possible values include: 'SignalR', 'RawWebSockets'
///
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
///
- /// Gets or sets the managed identity response
///
[JsonProperty(PropertyName = "identity")]
public ManagedIdentity Identity { get; set; }
///
- /// Gets metadata pertaining to creation and last modification of the
- /// resource.
///
[JsonProperty(PropertyName = "systemData")]
public SystemData SystemData { get; private set; }
@@ -305,6 +305,10 @@ public virtual void Validate()
}
}
}
+ if (Serverless != null)
+ {
+ Serverless.Validate();
+ }
}
}
}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRUsage.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRUsage.cs
index f3414aaff29a..980446e2f67f 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRUsage.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SignalRUsage.cs
@@ -34,8 +34,6 @@ public SignalRUsage()
/// quota.
/// The maximum permitted value for the usage
/// quota. If there is no limit, this value will be -1.
- /// Localizable String object containing the name
- /// and a localized value.
/// Representing the units of the usage quota.
/// Possible values are: Count, Bytes, Seconds, Percent,
/// CountPerSecond, BytesPerSecond.
@@ -74,8 +72,6 @@ public SignalRUsage()
public long? Limit { get; set; }
///
- /// Gets or sets localizable String object containing the name and a
- /// localized value.
///
[JsonProperty(PropertyName = "name")]
public SignalRUsageName Name { get; set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/Sku.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/Sku.cs
new file mode 100644
index 000000000000..024ba20f5e1d
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/Sku.cs
@@ -0,0 +1,77 @@
+//
+// 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.SignalR.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Describes an available sku."
+ ///
+ public partial class Sku
+ {
+ ///
+ /// Initializes a new instance of the Sku class.
+ ///
+ public Sku()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Sku class.
+ ///
+ /// The resource type that this object
+ /// applies to
+ public Sku(string resourceType = default(string), ResourceSku skuProperty = default(ResourceSku), SkuCapacity capacity = default(SkuCapacity))
+ {
+ ResourceType = resourceType;
+ SkuProperty = skuProperty;
+ Capacity = capacity;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the resource type that this object applies to
+ ///
+ [JsonProperty(PropertyName = "resourceType")]
+ public string ResourceType { get; private set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "sku")]
+ public ResourceSku SkuProperty { get; private set; }
+
+ ///
+ ///
+ [JsonProperty(PropertyName = "capacity")]
+ public SkuCapacity Capacity { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (SkuProperty != null)
+ {
+ SkuProperty.Validate();
+ }
+ }
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SkuCapacity.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SkuCapacity.cs
new file mode 100644
index 000000000000..9bb89cd81cbc
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SkuCapacity.cs
@@ -0,0 +1,88 @@
+//
+// 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.SignalR.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Describes scaling information of a sku.
+ ///
+ public partial class SkuCapacity
+ {
+ ///
+ /// Initializes a new instance of the SkuCapacity class.
+ ///
+ public SkuCapacity()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SkuCapacity class.
+ ///
+ /// The lowest permitted capacity for this
+ /// resource
+ /// The highest permitted capacity for this
+ /// resource
+ /// The default capacity.
+ /// Allows capacity value list.
+ /// Possible values include: 'None', 'Manual',
+ /// 'Automatic'
+ public SkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? defaultProperty = default(int?), IList allowedValues = default(IList), string scaleType = default(string))
+ {
+ Minimum = minimum;
+ Maximum = maximum;
+ DefaultProperty = defaultProperty;
+ AllowedValues = allowedValues;
+ ScaleType = scaleType;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the lowest permitted capacity for this resource
+ ///
+ [JsonProperty(PropertyName = "minimum")]
+ public int? Minimum { get; private set; }
+
+ ///
+ /// Gets the highest permitted capacity for this resource
+ ///
+ [JsonProperty(PropertyName = "maximum")]
+ public int? Maximum { get; private set; }
+
+ ///
+ /// Gets the default capacity.
+ ///
+ [JsonProperty(PropertyName = "default")]
+ public int? DefaultProperty { get; private set; }
+
+ ///
+ /// Gets allows capacity value list.
+ ///
+ [JsonProperty(PropertyName = "allowedValues")]
+ public IList AllowedValues { get; private set; }
+
+ ///
+ /// Gets possible values include: 'None', 'Manual', 'Automatic'
+ ///
+ [JsonProperty(PropertyName = "scaleType")]
+ public string ScaleType { get; private set; }
+
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SkuList.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SkuList.cs
new file mode 100644
index 000000000000..8d8780791aa5
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/SkuList.cs
@@ -0,0 +1,66 @@
+//
+// 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.SignalR.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The list skus operation response
+ ///
+ public partial class SkuList
+ {
+ ///
+ /// Initializes a new instance of the SkuList class.
+ ///
+ public SkuList()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the SkuList class.
+ ///
+ /// The list of skus available for the
+ /// resource.
+ /// The URL the client should use to fetch the
+ /// next page (per server side paging).
+ /// It's null for now, added for future use.
+ public SkuList(IList value = default(IList), string nextLink = default(string))
+ {
+ Value = value;
+ NextLink = nextLink;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets the list of skus available for the resource.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public IList Value { get; private set; }
+
+ ///
+ /// Gets the URL the client should use to fetch the next page (per
+ /// server side paging).
+ /// It's null for now, added for future use.
+ ///
+ [JsonProperty(PropertyName = "nextLink")]
+ public string NextLink { get; private set; }
+
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/UpstreamAuthSettings.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/UpstreamAuthSettings.cs
index 7f73ad9aa294..1e8a5338d7c5 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/UpstreamAuthSettings.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/UpstreamAuthSettings.cs
@@ -14,7 +14,8 @@ namespace Microsoft.Azure.Management.SignalR.Models
using System.Linq;
///
- /// Upstream auth settings.
+ /// Upstream auth settings. If not set, no auth is used for upstream
+ /// messages.
///
public partial class UpstreamAuthSettings
{
@@ -29,12 +30,8 @@ public UpstreamAuthSettings()
///
/// Initializes a new instance of the UpstreamAuthSettings class.
///
- /// Gets or sets the type of auth. None or
- /// ManagedIdentity is supported now. Possible values include: 'None',
+ /// Possible values include: 'None',
/// 'ManagedIdentity'
- /// Gets or sets the managed identity
- /// settings. It's required if the auth type is set to
- /// ManagedIdentity.
public UpstreamAuthSettings(string type = default(string), ManagedIdentitySettings managedIdentity = default(ManagedIdentitySettings))
{
Type = type;
@@ -48,15 +45,12 @@ public UpstreamAuthSettings()
partial void CustomInit();
///
- /// Gets or sets the type of auth. None or ManagedIdentity is supported
- /// now. Possible values include: 'None', 'ManagedIdentity'
+ /// Gets or sets possible values include: 'None', 'ManagedIdentity'
///
[JsonProperty(PropertyName = "type")]
public string Type { get; set; }
///
- /// Gets or sets the managed identity settings. It's required if the
- /// auth type is set to ManagedIdentity.
///
[JsonProperty(PropertyName = "managedIdentity")]
public ManagedIdentitySettings ManagedIdentity { get; set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/UpstreamTemplate.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/UpstreamTemplate.cs
index 8cc1b69d03fc..7e1b3d608785 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/UpstreamTemplate.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/Models/UpstreamTemplate.cs
@@ -44,30 +44,28 @@ public UpstreamTemplate()
/// Gets or sets the matching pattern for hub
/// names. If not set, it matches any hub.
/// There are 3 kind of patterns supported:
- /// 1. "*", it to matches any hub name
+ /// 1. "*", it to matches any hub name.
/// 2. Combine multiple hubs with ",", for example "hub1,hub2", it
- /// matches "hub1" and "hub2"
+ /// matches "hub1" and "hub2".
/// 3. The single hub name, for example, "hub1", it matches
- /// "hub1"
+ /// "hub1".
/// Gets or sets the matching pattern for
/// event names. If not set, it matches any event.
/// There are 3 kind of patterns supported:
- /// 1. "*", it to matches any event name
+ /// 1. "*", it to matches any event name.
/// 2. Combine multiple events with ",", for example
- /// "connect,disconnect", it matches event "connect" and "disconnect"
+ /// "connect,disconnect", it matches event "connect" and "disconnect".
/// 3. The single event name, for example, "connect", it matches
- /// "connect"
+ /// "connect".
/// Gets or sets the matching pattern for
/// category names. If not set, it matches any category.
/// There are 3 kind of patterns supported:
- /// 1. "*", it to matches any category name
+ /// 1. "*", it to matches any category name.
/// 2. Combine multiple categories with ",", for example
/// "connections,messages", it matches category "connections" and
- /// "messages"
+ /// "messages".
/// 3. The single category name, for example, "connections", it matches
- /// the category "connections"
- /// Gets or sets the auth settings for an upstream.
- /// If not set, no auth is used for upstream messages.
+ /// the category "connections".
public UpstreamTemplate(string urlTemplate, string hubPattern = default(string), string eventPattern = default(string), string categoryPattern = default(string), UpstreamAuthSettings auth = default(UpstreamAuthSettings))
{
HubPattern = hubPattern;
@@ -87,10 +85,10 @@ public UpstreamTemplate()
/// Gets or sets the matching pattern for hub names. If not set, it
/// matches any hub.
/// There are 3 kind of patterns supported:
- /// 1. "*", it to matches any hub name
+ /// 1. "*", it to matches any hub name.
/// 2. Combine multiple hubs with ",", for example "hub1,hub2", it
- /// matches "hub1" and "hub2"
- /// 3. The single hub name, for example, "hub1", it matches "hub1"
+ /// matches "hub1" and "hub2".
+ /// 3. The single hub name, for example, "hub1", it matches "hub1".
///
[JsonProperty(PropertyName = "hubPattern")]
public string HubPattern { get; set; }
@@ -99,11 +97,11 @@ public UpstreamTemplate()
/// Gets or sets the matching pattern for event names. If not set, it
/// matches any event.
/// There are 3 kind of patterns supported:
- /// 1. "*", it to matches any event name
+ /// 1. "*", it to matches any event name.
/// 2. Combine multiple events with ",", for example
- /// "connect,disconnect", it matches event "connect" and "disconnect"
+ /// "connect,disconnect", it matches event "connect" and "disconnect".
/// 3. The single event name, for example, "connect", it matches
- /// "connect"
+ /// "connect".
///
[JsonProperty(PropertyName = "eventPattern")]
public string EventPattern { get; set; }
@@ -112,12 +110,12 @@ public UpstreamTemplate()
/// Gets or sets the matching pattern for category names. If not set,
/// it matches any category.
/// There are 3 kind of patterns supported:
- /// 1. "*", it to matches any category name
+ /// 1. "*", it to matches any category name.
/// 2. Combine multiple categories with ",", for example
/// "connections,messages", it matches category "connections" and
- /// "messages"
+ /// "messages".
/// 3. The single category name, for example, "connections", it matches
- /// the category "connections"
+ /// the category "connections".
///
[JsonProperty(PropertyName = "categoryPattern")]
public string CategoryPattern { get; set; }
@@ -136,8 +134,6 @@ public UpstreamTemplate()
public string UrlTemplate { get; set; }
///
- /// Gets or sets the auth settings for an upstream. If not set, no auth
- /// is used for upstream messages.
///
[JsonProperty(PropertyName = "auth")]
public UpstreamAuthSettings Auth { get; set; }
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SdkInfo_SignalRManagementClient.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SdkInfo_SignalRManagementClient.cs
index 9bd24ec5d02a..656fe7e43c00 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SdkInfo_SignalRManagementClient.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SdkInfo_SignalRManagementClient.cs
@@ -19,25 +19,16 @@ public static IEnumerable> ApiInfo_SignalRManageme
{
return new Tuple[]
{
- new Tuple("SignalRService", "Operations", "2021-06-01-preview"),
- new Tuple("SignalRService", "SignalR", "2021-06-01-preview"),
- new Tuple("SignalRService", "SignalRPrivateEndpointConnections", "2021-06-01-preview"),
- new Tuple("SignalRService", "SignalRPrivateLinkResources", "2021-06-01-preview"),
- new Tuple("SignalRService", "SignalRSharedPrivateLinkResources", "2021-06-01-preview"),
- new Tuple("SignalRService", "Usages", "2021-06-01-preview"),
+ new Tuple("SignalRService", "Operations", "2022-08-01-preview"),
+ new Tuple("SignalRService", "SignalR", "2022-08-01-preview"),
+ new Tuple("SignalRService", "SignalRCustomCertificates", "2022-08-01-preview"),
+ new Tuple("SignalRService", "SignalRCustomDomains", "2022-08-01-preview"),
+ new Tuple("SignalRService", "SignalRPrivateEndpointConnections", "2022-08-01-preview"),
+ new Tuple("SignalRService", "SignalRPrivateLinkResources", "2022-08-01-preview"),
+ new Tuple("SignalRService", "SignalRSharedPrivateLinkResources", "2022-08-01-preview"),
+ new Tuple("SignalRService", "Usages", "2022-08-01-preview"),
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "v2";
- public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/signalr/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\Users\\biqian\\source\\repos\\azure-sdk-for-net\\sdk";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "9705c3528da31ea3def2acf3af715ae1f185e318";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRCustomCertificatesOperations.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRCustomCertificatesOperations.cs
new file mode 100644
index 000000000000..b370817d3d18
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRCustomCertificatesOperations.cs
@@ -0,0 +1,1059 @@
+//
+// 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.SignalR
+{
+ 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;
+
+ ///
+ /// SignalRCustomCertificatesOperations operations.
+ ///
+ internal partial class SignalRCustomCertificatesOperations : IServiceOperations, ISignalRCustomCertificatesOperations
+ {
+ ///
+ /// Initializes a new instance of the SignalRCustomCertificatesOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal SignalRCustomCertificatesOperations(SignalRManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the SignalRManagementClient
+ ///
+ public SignalRManagementClient Client { get; private set; }
+
+ ///
+ /// List all custom certificates.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, 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 (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ 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("resourceName", resourceName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ 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.SignalRService/signalR/{resourceName}/customCertificates").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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;
+ }
+
+ ///
+ /// Get a custom certificate.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ /// 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 resourceName, string certificateName, 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 (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ if (certificateName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "certificateName");
+ }
+ 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("resourceName", resourceName);
+ tracingParameters.Add("certificateName", certificateName);
+ 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.SignalRService/signalR/{resourceName}/customCertificates/{certificateName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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 or update a custom certificate.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string certificateName, CustomCertificate parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Delete a custom certificate.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ /// 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 DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string certificateName, 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 (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ if (certificateName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "certificateName");
+ }
+ 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("resourceName", resourceName);
+ tracingParameters.Add("certificateName", certificateName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "Delete", 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.SignalRService/signalR/{resourceName}/customCertificates/{certificateName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName));
+ 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 != 204)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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;
+ }
+
+ ///
+ /// Create or update a custom certificate.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ ///
+ ///
+ /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string certificateName, CustomCertificate parameters, 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 (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ if (certificateName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "certificateName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("resourceName", resourceName);
+ tracingParameters.Add("certificateName", certificateName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", 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.SignalRService/signalR/{resourceName}/customCertificates/{certificateName}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ _url = _url.Replace("{certificateName}", System.Uri.EscapeDataString(certificateName));
+ 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(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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;
+ }
+
+ ///
+ /// List all custom certificates.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(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, "ListNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRCustomCertificatesOperationsExtensions.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRCustomCertificatesOperationsExtensions.cs
new file mode 100644
index 000000000000..821537ce4a16
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRCustomCertificatesOperationsExtensions.cs
@@ -0,0 +1,298 @@
+//
+// 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.SignalR
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for SignalRCustomCertificatesOperations.
+ ///
+ public static partial class SignalRCustomCertificatesOperationsExtensions
+ {
+ ///
+ /// List all custom certificates.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ public static IPage List(this ISignalRCustomCertificatesOperations operations, string resourceGroupName, string resourceName)
+ {
+ return operations.ListAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List all custom certificates.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this ISignalRCustomCertificatesOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Get a custom certificate.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ public static CustomCertificate Get(this ISignalRCustomCertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName)
+ {
+ return operations.GetAsync(resourceGroupName, resourceName, certificateName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get a custom certificate.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this ISignalRCustomCertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create or update a custom certificate.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ ///
+ public static CustomCertificate CreateOrUpdate(this ISignalRCustomCertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CustomCertificate parameters)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or update a custom certificate.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this ISignalRCustomCertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CustomCertificate parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete a custom certificate.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ public static void Delete(this ISignalRCustomCertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName)
+ {
+ operations.DeleteAsync(resourceGroupName, resourceName, certificateName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete a custom certificate.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this ISignalRCustomCertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Create or update a custom certificate.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ ///
+ public static CustomCertificate BeginCreateOrUpdate(this ISignalRCustomCertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CustomCertificate parameters)
+ {
+ return operations.BeginCreateOrUpdateAsync(resourceGroupName, resourceName, certificateName, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or update a custom certificate.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom certificate name
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateOrUpdateAsync(this ISignalRCustomCertificatesOperations operations, string resourceGroupName, string resourceName, string certificateName, CustomCertificate parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, certificateName, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// List all custom certificates.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this ISignalRCustomCertificatesOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List all custom certificates.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this ISignalRCustomCertificatesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRCustomDomainsOperations.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRCustomDomainsOperations.cs
new file mode 100644
index 000000000000..14bcdec8d49c
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRCustomDomainsOperations.cs
@@ -0,0 +1,1067 @@
+//
+// 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.SignalR
+{
+ 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;
+
+ ///
+ /// SignalRCustomDomainsOperations operations.
+ ///
+ internal partial class SignalRCustomDomainsOperations : IServiceOperations, ISignalRCustomDomainsOperations
+ {
+ ///
+ /// Initializes a new instance of the SignalRCustomDomainsOperations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal SignalRCustomDomainsOperations(SignalRManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the SignalRManagementClient
+ ///
+ public SignalRManagementClient Client { get; private set; }
+
+ ///
+ /// List all custom domains.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the 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>> ListWithHttpMessagesAsync(string resourceGroupName, string resourceName, 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 (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ 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("resourceName", resourceName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ 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.SignalRService/signalR/{resourceName}/customDomains").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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;
+ }
+
+ ///
+ /// Get a custom domain.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ /// 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 resourceName, string name, 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 (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ 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("resourceName", resourceName);
+ tracingParameters.Add("name", name);
+ 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.SignalRService/signalR/{resourceName}/customDomains/{name}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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 or update a custom domain.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string name, CustomDomain parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send Request
+ AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, name, parameters, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Delete a custom domain.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string resourceName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, name, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Create or update a custom domain.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ ///
+ ///
+ /// 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> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string resourceName, string name, CustomDomain parameters, 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 (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (parameters == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
+ }
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("resourceName", resourceName);
+ tracingParameters.Add("name", name);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", 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.SignalRService/signalR/{resourceName}/customDomains/{name}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ 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(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, 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 != 201)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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;
+ }
+
+ ///
+ /// Delete a custom domain.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ /// 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 resourceName, string name, 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 (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ if (name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "name");
+ }
+ 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("resourceName", resourceName);
+ tracingParameters.Add("name", name);
+ 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.SignalRService/signalR/{resourceName}/customDomains/{name}").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ _url = _url.Replace("{name}", System.Uri.EscapeDataString(name));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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 all custom domains.
+ ///
+ ///
+ /// 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>> ListNextWithHttpMessagesAsync(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, "ListNext", 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRCustomDomainsOperationsExtensions.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRCustomDomainsOperationsExtensions.cs
new file mode 100644
index 000000000000..b8aff35877ff
--- /dev/null
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRCustomDomainsOperationsExtensions.cs
@@ -0,0 +1,343 @@
+//
+// 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.SignalR
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for SignalRCustomDomainsOperations.
+ ///
+ public static partial class SignalRCustomDomainsOperationsExtensions
+ {
+ ///
+ /// List all custom domains.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ public static IPage List(this ISignalRCustomDomainsOperations operations, string resourceGroupName, string resourceName)
+ {
+ return operations.ListAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List all custom domains.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this ISignalRCustomDomainsOperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Get a custom domain.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ public static CustomDomain Get(this ISignalRCustomDomainsOperations operations, string resourceGroupName, string resourceName, string name)
+ {
+ return operations.GetAsync(resourceGroupName, resourceName, name).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get a custom domain.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task GetAsync(this ISignalRCustomDomainsOperations operations, string resourceGroupName, string resourceName, string name, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, resourceName, name, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Create or update a custom domain.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ ///
+ public static CustomDomain CreateOrUpdate(this ISignalRCustomDomainsOperations operations, string resourceGroupName, string resourceName, string name, CustomDomain parameters)
+ {
+ return operations.CreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or update a custom domain.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task CreateOrUpdateAsync(this ISignalRCustomDomainsOperations operations, string resourceGroupName, string resourceName, string name, CustomDomain parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, name, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete a custom domain.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ public static void Delete(this ISignalRCustomDomainsOperations operations, string resourceGroupName, string resourceName, string name)
+ {
+ operations.DeleteAsync(resourceGroupName, resourceName, name).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete a custom domain.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task DeleteAsync(this ISignalRCustomDomainsOperations operations, string resourceGroupName, string resourceName, string name, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, resourceName, name, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// Create or update a custom domain.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ ///
+ public static CustomDomain BeginCreateOrUpdate(this ISignalRCustomDomainsOperations operations, string resourceGroupName, string resourceName, string name, CustomDomain parameters)
+ {
+ return operations.BeginCreateOrUpdateAsync(resourceGroupName, resourceName, name, parameters).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Create or update a custom domain.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginCreateOrUpdateAsync(this ISignalRCustomDomainsOperations operations, string resourceGroupName, string resourceName, string name, CustomDomain parameters, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, resourceName, name, parameters, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Delete a custom domain.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ public static void BeginDelete(this ISignalRCustomDomainsOperations operations, string resourceGroupName, string resourceName, string name)
+ {
+ operations.BeginDeleteAsync(resourceGroupName, resourceName, name).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Delete a custom domain.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// Custom domain name.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginDeleteAsync(this ISignalRCustomDomainsOperations operations, string resourceGroupName, string resourceName, string name, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, resourceName, name, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
+ ///
+ /// List all custom domains.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this ISignalRCustomDomainsOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List all custom domains.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListNextAsync(this ISignalRCustomDomainsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRManagementClient.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRManagementClient.cs
index 7241c7ee4921..c6924dc642d5 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRManagementClient.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalRManagementClient.cs
@@ -91,6 +91,16 @@ public partial class SignalRManagementClient : ServiceClient
public virtual IUsagesOperations Usages { get; private set; }
+ ///
+ /// Gets the ISignalRCustomCertificatesOperations.
+ ///
+ public virtual ISignalRCustomCertificatesOperations SignalRCustomCertificates { get; private set; }
+
+ ///
+ /// Gets the ISignalRCustomDomainsOperations.
+ ///
+ public virtual ISignalRCustomDomainsOperations SignalRCustomDomains { get; private set; }
+
///
/// Gets the ISignalRPrivateEndpointConnectionsOperations.
///
@@ -350,11 +360,13 @@ private void Initialize()
Operations = new Operations(this);
SignalR = new SignalROperations(this);
Usages = new UsagesOperations(this);
+ SignalRCustomCertificates = new SignalRCustomCertificatesOperations(this);
+ SignalRCustomDomains = new SignalRCustomDomainsOperations(this);
SignalRPrivateEndpointConnections = new SignalRPrivateEndpointConnectionsOperations(this);
SignalRPrivateLinkResources = new SignalRPrivateLinkResourcesOperations(this);
SignalRSharedPrivateLinkResources = new SignalRSharedPrivateLinkResourcesOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2021-06-01-preview";
+ ApiVersion = "2022-08-01-preview";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperations.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperations.cs
index 36cdc8d4fe59..786b88830d6c 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperations.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperations.cs
@@ -1115,6 +1115,198 @@ internal SignalROperations(SignalRManagementClient client)
return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
+ ///
+ /// List all available skus of the resource.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the 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> ListSkusWithHttpMessagesAsync(string resourceGroupName, string resourceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (resourceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceName");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("resourceName", resourceName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "ListSkus", 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.SignalRService/signalR/{resourceName}/skus").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(resourceName));
+ 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 ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ 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 or update a resource.
///
diff --git a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperationsExtensions.cs b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperationsExtensions.cs
index 7a490b7b9d65..345719b66bad 100644
--- a/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperationsExtensions.cs
+++ b/sdk/signalr/Microsoft.Azure.Management.SignalR/src/Generated/SignalROperationsExtensions.cs
@@ -433,6 +433,48 @@ public static void Restart(this ISignalROperations operations, string resourceGr
(await operations.RestartWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// List all available skus of the resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ public static SkuList ListSkus(this ISignalROperations operations, string resourceGroupName, string resourceName)
+ {
+ return operations.ListSkusAsync(resourceGroupName, resourceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// List all available skus of the resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group that contains the resource. You can obtain
+ /// this value from the Azure Resource Manager API or the portal.
+ ///
+ ///
+ /// The name of the resource.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ListSkusAsync(this ISignalROperations operations, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListSkusWithHttpMessagesAsync(resourceGroupName, resourceName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Create or update a resource.
///