diff --git a/src/SDKs/NotificationHubs/AzSdk.RP.props b/src/SDKs/NotificationHubs/AzSdk.RP.props
index 39645fa6dc05..d7b72e20aa4a 100644
--- a/src/SDKs/NotificationHubs/AzSdk.RP.props
+++ b/src/SDKs/NotificationHubs/AzSdk.RP.props
@@ -1,7 +1,7 @@
-
+ NotificationHubs_2017-04-01;
$(PackageTags);$(CommonTags);$(AzureApiTag);
\ No newline at end of file
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/HubsOperations.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/HubsOperations.cs
deleted file mode 100644
index 912d76505f50..000000000000
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/HubsOperations.cs
+++ /dev/null
@@ -1,264 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.NotificationHubs
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- 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;
-
- ///
- /// HubsOperations operations.
- ///
- internal partial class HubsOperations : IServiceOperations, IHubsOperations
- {
- ///
- /// Initializes a new instance of the HubsOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal HubsOperations(NotificationHubsManagementClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the NotificationHubsManagementClient
- ///
- public NotificationHubsManagementClient Client { get; private set; }
-
- ///
- /// Checks the availability of the given notificationHub in a namespace.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The namespace name.
- ///
- ///
- /// The notificationHub 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> CheckAvailabilityWithHttpMessagesAsync(string resourceGroupName, string namespaceName, CheckNameAvailabilityRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (namespaceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName");
- }
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("namespaceName", namespaceName);
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CheckAvailability", 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.NotificationHubs/namespaces/{namespaceName}/checkHubAvailability").ToString();
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName));
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _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)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/HubsOperationsExtensions.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/HubsOperationsExtensions.cs
deleted file mode 100644
index f59a94fba0b0..000000000000
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/HubsOperationsExtensions.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.NotificationHubs
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for HubsOperations.
- ///
- public static partial class HubsOperationsExtensions
- {
- ///
- /// Checks the availability of the given notificationHub in a namespace.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The namespace name.
- ///
- ///
- /// The notificationHub name.
- ///
- public static CheckNameAvailabilityResponse CheckAvailability(this IHubsOperations operations, string resourceGroupName, string namespaceName, CheckNameAvailabilityRequestParameters parameters)
- {
- return operations.CheckAvailabilityAsync(resourceGroupName, namespaceName, parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Checks the availability of the given notificationHub in a namespace.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The namespace name.
- ///
- ///
- /// The notificationHub name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task CheckAvailabilityAsync(this IHubsOperations operations, string resourceGroupName, string namespaceName, CheckNameAvailabilityRequestParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.CheckAvailabilityWithHttpMessagesAsync(resourceGroupName, namespaceName, parameters, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/IHubsOperations.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/IHubsOperations.cs
deleted file mode 100644
index 0ceaf71a717c..000000000000
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/IHubsOperations.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.NotificationHubs
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// HubsOperations operations.
- ///
- public partial interface IHubsOperations
- {
- ///
- /// Checks the availability of the given notificationHub in a
- /// namespace.
- ///
- ///
- /// The name of the resource group.
- ///
- ///
- /// The namespace name.
- ///
- ///
- /// The notificationHub 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> CheckAvailabilityWithHttpMessagesAsync(string resourceGroupName, string namespaceName, CheckNameAvailabilityRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INameOperations.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INameOperations.cs
deleted file mode 100644
index f2b1ce1d725e..000000000000
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INameOperations.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.NotificationHubs
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// NameOperations operations.
- ///
- public partial interface INameOperations
- {
- ///
- /// Checks the availability of the given service namespace across all
- /// Azure subscriptions. This is useful because the domain name is
- /// created based on the service namespace name.
- ///
- ///
- /// The namespace 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> CheckAvailabilityWithHttpMessagesAsync(CheckNameAvailabilityRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INamespacesOperations.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INamespacesOperations.cs
index 9f08ad17826d..ded99f2b0d7b 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INamespacesOperations.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INamespacesOperations.cs
@@ -1,15 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -334,7 +334,7 @@ public partial interface INamespacesOperations
///
/// Thrown when a required parameter is null
///
- Task> ListKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> ListKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Regenerates the Primary/Secondary Keys to the Namespace
/// Authorization Rule
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INotificationHubsManagementClient.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INotificationHubsManagementClient.cs
index c95b518776af..192bfee7ad41 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INotificationHubsManagementClient.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INotificationHubsManagementClient.cs
@@ -1,15 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -71,24 +71,19 @@ public partial interface INotificationHubsManagementClient : System.IDisposable
///
- /// Gets the INamespacesOperations.
+ /// Gets the IOperations.
///
- INamespacesOperations Namespaces { get; }
+ IOperations Operations { get; }
///
- /// Gets the INameOperations.
+ /// Gets the INamespacesOperations.
///
- INameOperations Name { get; }
+ INamespacesOperations Namespaces { get; }
///
/// Gets the INotificationHubsOperations.
///
INotificationHubsOperations NotificationHubs { get; }
- ///
- /// Gets the IHubsOperations.
- ///
- IHubsOperations Hubs { get; }
-
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INotificationHubsOperations.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INotificationHubsOperations.cs
index 02b735d12adf..e6e7b808df44 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INotificationHubsOperations.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/INotificationHubsOperations.cs
@@ -1,15 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -51,7 +51,7 @@ public partial interface INotificationHubsOperations
///
/// Thrown when a required parameter is null
///
- Task> CheckAvailabilityWithHttpMessagesAsync(string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task> CheckNotificationHubAvailabilityWithHttpMessagesAsync(string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Creates/Update a NotificationHub in a namespace.
///
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/IOperations.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/IOperations.cs
new file mode 100644
index 000000000000..78b88c174b2c
--- /dev/null
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/IOperations.cs
@@ -0,0 +1,68 @@
+//
+// 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.NotificationHubs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Operations operations.
+ ///
+ public partial interface IOperations
+ {
+ ///
+ /// Lists all of the available NotificationHubs REST API operations.
+ ///
+ ///
+ /// 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(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
+ /// Lists all of the available NotificationHubs REST API operations.
+ ///
+ ///
+ /// 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/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/AccessRights.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/AccessRights.cs
index e0d22c1c3cce..db91df736160 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/AccessRights.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/AccessRights.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -29,4 +28,39 @@ public enum AccessRights
[EnumMember(Value = "Listen")]
Listen
}
+ internal static class AccessRightsEnumExtension
+ {
+ internal static string ToSerializedValue(this AccessRights? value)
+ {
+ return value == null ? null : ((AccessRights)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this AccessRights value)
+ {
+ switch( value )
+ {
+ case AccessRights.Manage:
+ return "Manage";
+ case AccessRights.Send:
+ return "Send";
+ case AccessRights.Listen:
+ return "Listen";
+ }
+ return null;
+ }
+
+ internal static AccessRights? ParseAccessRights(this string value)
+ {
+ switch( value )
+ {
+ case "Manage":
+ return AccessRights.Manage;
+ case "Send":
+ return AccessRights.Send;
+ case "Listen":
+ return AccessRights.Listen;
+ }
+ return null;
+ }
+ }
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/AdmCredential.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/AdmCredential.cs
index 5a55e1a10ae4..f1639fe38ce4 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/AdmCredential.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/AdmCredential.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
@@ -27,7 +26,7 @@ public partial class AdmCredential
///
public AdmCredential()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ApnsCredential.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ApnsCredential.cs
index 90e52a713bfc..3855f658dfc2 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ApnsCredential.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ApnsCredential.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
@@ -27,7 +26,7 @@ public partial class ApnsCredential
///
public ApnsCredential()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/BaiduCredential.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/BaiduCredential.cs
index c3ddc9c1f47d..f70b800c906b 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/BaiduCredential.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/BaiduCredential.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
@@ -27,7 +26,7 @@ public partial class BaiduCredential
///
public BaiduCredential()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckAvailabilityParameters.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckAvailabilityParameters.cs
index 3e7c49ba3c65..5cdc59ecafa4 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckAvailabilityParameters.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckAvailabilityParameters.cs
@@ -1,16 +1,16 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -28,7 +28,7 @@ public partial class CheckAvailabilityParameters
///
public CheckAvailabilityParameters()
{
- CustomInit();
+ CustomInit();
}
///
@@ -104,5 +104,26 @@ public CheckAvailabilityParameters()
[JsonProperty(PropertyName = "isAvailiable")]
public bool? IsAvailiable { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Name");
+ }
+ if (Location == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Location");
+ }
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
+ }
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckAvailabilityResult.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckAvailabilityResult.cs
index 820d546f595a..9f7feaef2765 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckAvailabilityResult.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckAvailabilityResult.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -26,23 +25,23 @@ public partial class CheckAvailabilityResult : Resource
///
public CheckAvailabilityResult()
{
- CustomInit();
+ CustomInit();
}
///
/// Initializes a new instance of the CheckAvailabilityResult class.
///
- /// Resource location
/// Resource Id
/// Resource name
/// Resource type
+ /// Resource location
/// Resource tags
/// The sku of the created namespace
/// True if the name is available and can be
/// used to create new Namespace/NotificationHub. Otherwise
/// false.
- public CheckAvailabilityResult(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), bool? isAvailiable = default(bool?))
- : base(location, id, name, type, tags, sku)
+ public CheckAvailabilityResult(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), bool? isAvailiable = default(bool?))
+ : base(id, name, type, location, tags, sku)
{
IsAvailiable = isAvailiable;
CustomInit();
@@ -60,5 +59,15 @@ public CheckAvailabilityResult()
[JsonProperty(PropertyName = "isAvailiable")]
public bool? IsAvailiable { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckNameAvailabilityRequestParameters.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckNameAvailabilityRequestParameters.cs
deleted file mode 100644
index 57c34a6586b9..000000000000
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckNameAvailabilityRequestParameters.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.NotificationHubs.Models
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
- using Newtonsoft.Json;
- using System.Linq;
-
- ///
- /// Parameters supplied to the Check Name Availability for Namespace and
- /// NotificationHubs.
- ///
- public partial class CheckNameAvailabilityRequestParameters
- {
- ///
- /// Initializes a new instance of the
- /// CheckNameAvailabilityRequestParameters class.
- ///
- public CheckNameAvailabilityRequestParameters()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the
- /// CheckNameAvailabilityRequestParameters class.
- ///
- /// Resource name
- /// Resource type
- public CheckNameAvailabilityRequestParameters(string name, string type = default(string))
- {
- Name = name;
- Type = type;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets resource name
- ///
- [JsonProperty(PropertyName = "Name")]
- public string Name { get; set; }
-
- ///
- /// Gets resource type
- ///
- [JsonProperty(PropertyName = "Type")]
- public string Type { get; private set; }
-
- }
-}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckNameAvailabilityResponse.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckNameAvailabilityResponse.cs
deleted file mode 100644
index 780334f0b3aa..000000000000
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/CheckNameAvailabilityResponse.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.NotificationHubs.Models
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
- using Newtonsoft.Json;
- using System.Linq;
-
- public partial class CheckNameAvailabilityResponse
- {
- ///
- /// Initializes a new instance of the CheckNameAvailabilityResponse
- /// class.
- ///
- public CheckNameAvailabilityResponse()
- {
- CustomInit();
- }
-
- ///
- /// Initializes a new instance of the CheckNameAvailabilityResponse
- /// class.
- ///
- /// Checks if the namespace name is
- /// available
- /// States the reason due to which the namespace
- /// name is not available
- /// The messsage returned when checking for
- /// namespace name availability
- public CheckNameAvailabilityResponse(bool? nameAvailable = default(bool?), string reason = default(string), string message = default(string))
- {
- NameAvailable = nameAvailable;
- Reason = reason;
- Message = message;
- CustomInit();
- }
-
- ///
- /// An initialization method that performs custom operations like setting defaults
- ///
- partial void CustomInit();
-
- ///
- /// Gets or sets checks if the namespace name is available
- ///
- [JsonProperty(PropertyName = "NameAvailable")]
- public bool? NameAvailable { get; set; }
-
- ///
- /// Gets or sets states the reason due to which the namespace name is
- /// not available
- ///
- [JsonProperty(PropertyName = "Reason")]
- public string Reason { get; set; }
-
- ///
- /// Gets or sets the messsage returned when checking for namespace name
- /// availability
- ///
- [JsonProperty(PropertyName = "Message")]
- public string Message { get; set; }
-
- }
-}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ErrorResponse.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ErrorResponse.cs
new file mode 100644
index 000000000000..7c410da20574
--- /dev/null
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ErrorResponse.cs
@@ -0,0 +1,61 @@
+//
+// 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.NotificationHubs.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Error reponse indicates NotificationHubs service is not able to process
+ /// the incoming request. The reason is provided in the error message.
+ ///
+ public partial class ErrorResponse
+ {
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ public ErrorResponse()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponse class.
+ ///
+ /// Error code.
+ /// Error message indicating why the operation
+ /// failed.
+ public ErrorResponse(string code = default(string), string message = default(string))
+ {
+ Code = code;
+ Message = message;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets error code.
+ ///
+ [JsonProperty(PropertyName = "code")]
+ public string Code { get; set; }
+
+ ///
+ /// Gets or sets error message indicating why the operation failed.
+ ///
+ [JsonProperty(PropertyName = "message")]
+ public string Message { get; set; }
+
+ }
+}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ErrorResponseException.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ErrorResponseException.cs
new file mode 100644
index 000000000000..6e23fe665dd6
--- /dev/null
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ErrorResponseException.cs
@@ -0,0 +1,62 @@
+//
+// 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.NotificationHubs.Models
+{
+ using Microsoft.Rest;
+
+ ///
+ /// Exception thrown for an invalid response with ErrorResponse
+ /// information.
+ ///
+ public partial class ErrorResponseException : RestException
+ {
+ ///
+ /// Gets information about the associated HTTP request.
+ ///
+ public HttpRequestMessageWrapper Request { get; set; }
+
+ ///
+ /// Gets information about the associated HTTP response.
+ ///
+ public HttpResponseMessageWrapper Response { get; set; }
+
+ ///
+ /// Gets or sets the body object.
+ ///
+ public ErrorResponse Body { get; set; }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ public ErrorResponseException()
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ /// The exception message.
+ public ErrorResponseException(string message)
+ : this(message, null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the ErrorResponseException class.
+ ///
+ /// The exception message.
+ /// Inner exception.
+ public ErrorResponseException(string message, System.Exception innerException)
+ : base(message, innerException)
+ {
+ }
+ }
+}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/GcmCredential.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/GcmCredential.cs
index e8a70d7064f5..f254a3aebbed 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/GcmCredential.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/GcmCredential.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
@@ -27,7 +26,7 @@ public partial class GcmCredential
///
public GcmCredential()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/MpnsCredential.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/MpnsCredential.cs
index a6796afef472..5e686015960e 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/MpnsCredential.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/MpnsCredential.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
@@ -27,7 +26,7 @@ public partial class MpnsCredential
///
public MpnsCredential()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespaceCreateOrUpdateParameters.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespaceCreateOrUpdateParameters.cs
index 59add711896f..7fb988da0457 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespaceCreateOrUpdateParameters.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespaceCreateOrUpdateParameters.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
@@ -30,17 +29,17 @@ public partial class NamespaceCreateOrUpdateParameters : Resource
///
public NamespaceCreateOrUpdateParameters()
{
- CustomInit();
+ CustomInit();
}
///
/// Initializes a new instance of the NamespaceCreateOrUpdateParameters
/// class.
///
- /// Resource location
/// Resource Id
/// Resource name
/// Resource type
+ /// Resource location
/// Resource tags
/// The sku of the created namespace
/// The name of the
@@ -52,10 +51,13 @@ public NamespaceCreateOrUpdateParameters()
/// Australia EastAustralia SoutheastCentral USEast USEast US 2West
/// USNorth Central USSouth Central USEast AsiaSoutheast AsiaBrazil
/// SouthJapan EastJapan WestNorth EuropeWest Europe
+ /// Identifier for Azure Insights
+ /// metrics
/// Status of the namespace. It can be any of
/// these values:1 = Created/Active2 = Creating3 = Suspended4 =
/// Deleting
/// The time the namespace was created.
+ /// The time the namespace was updated.
/// Endpoint you can use to perform
/// NotificationHub operations.
/// The Id of the Azure subscription
@@ -66,21 +68,25 @@ public NamespaceCreateOrUpdateParameters()
/// enabled.
/// Whether or not the namespace is set as
/// Critical.
+ /// Data center for the namespace
/// The namespace type. Possible values
/// include: 'Messaging', 'NotificationHub'
- public NamespaceCreateOrUpdateParameters(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string namespaceCreateOrUpdateParametersName = default(string), string provisioningState = default(string), string region = default(string), string status = default(string), System.DateTime? createdAt = default(System.DateTime?), string serviceBusEndpoint = default(string), string subscriptionId = default(string), string scaleUnit = default(string), bool? enabled = default(bool?), bool? critical = default(bool?), NamespaceType? namespaceType = default(NamespaceType?))
- : base(location, id, name, type, tags, sku)
+ public NamespaceCreateOrUpdateParameters(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string namespaceCreateOrUpdateParametersName = default(string), string provisioningState = default(string), string region = default(string), string metricId = default(string), string status = default(string), System.DateTime? createdAt = default(System.DateTime?), System.DateTime? updatedAt = default(System.DateTime?), string serviceBusEndpoint = default(string), string subscriptionId = default(string), string scaleUnit = default(string), bool? enabled = default(bool?), bool? critical = default(bool?), string dataCenter = default(string), NamespaceType? namespaceType = default(NamespaceType?))
+ : base(id, name, type, location, tags, sku)
{
NamespaceCreateOrUpdateParametersName = namespaceCreateOrUpdateParametersName;
ProvisioningState = provisioningState;
Region = region;
+ MetricId = metricId;
Status = status;
CreatedAt = createdAt;
+ UpdatedAt = updatedAt;
ServiceBusEndpoint = serviceBusEndpoint;
SubscriptionId = subscriptionId;
ScaleUnit = scaleUnit;
Enabled = enabled;
Critical = critical;
+ DataCenter = dataCenter;
NamespaceType = namespaceType;
CustomInit();
}
@@ -112,6 +118,12 @@ public NamespaceCreateOrUpdateParameters()
[JsonProperty(PropertyName = "properties.region")]
public string Region { get; set; }
+ ///
+ /// Gets identifier for Azure Insights metrics
+ ///
+ [JsonProperty(PropertyName = "properties.metricId")]
+ public string MetricId { get; private set; }
+
///
/// Gets or sets status of the namespace. It can be any of these
/// values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting
@@ -125,6 +137,12 @@ public NamespaceCreateOrUpdateParameters()
[JsonProperty(PropertyName = "properties.createdAt")]
public System.DateTime? CreatedAt { get; set; }
+ ///
+ /// Gets or sets the time the namespace was updated.
+ ///
+ [JsonProperty(PropertyName = "properties.updatedAt")]
+ public System.DateTime? UpdatedAt { get; set; }
+
///
/// Gets or sets endpoint you can use to perform NotificationHub
/// operations.
@@ -157,6 +175,12 @@ public NamespaceCreateOrUpdateParameters()
[JsonProperty(PropertyName = "properties.critical")]
public bool? Critical { get; set; }
+ ///
+ /// Gets or sets data center for the namespace
+ ///
+ [JsonProperty(PropertyName = "properties.dataCenter")]
+ public string DataCenter { get; set; }
+
///
/// Gets or sets the namespace type. Possible values include:
/// 'Messaging', 'NotificationHub'
@@ -164,5 +188,15 @@ public NamespaceCreateOrUpdateParameters()
[JsonProperty(PropertyName = "properties.namespaceType")]
public NamespaceType? NamespaceType { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespacePatchParameters.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespacePatchParameters.cs
index ddbea29b2897..706c43c54ab8 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespacePatchParameters.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespacePatchParameters.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -26,7 +25,7 @@ public partial class NamespacePatchParameters
///
public NamespacePatchParameters()
{
- CustomInit();
+ CustomInit();
}
///
@@ -58,5 +57,18 @@ public NamespacePatchParameters()
[JsonProperty(PropertyName = "sku")]
public Sku Sku { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
+ }
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespaceResource.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespaceResource.cs
index 79b6db402e0b..1ef7918a4bcf 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespaceResource.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespaceResource.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
@@ -29,16 +28,16 @@ public partial class NamespaceResource : Resource
///
public NamespaceResource()
{
- CustomInit();
+ CustomInit();
}
///
/// Initializes a new instance of the NamespaceResource class.
///
- /// Resource location
/// Resource Id
/// Resource name
/// Resource type
+ /// Resource location
/// Resource tags
/// The sku of the created namespace
/// The name of the
@@ -50,10 +49,13 @@ public NamespaceResource()
/// Australia EastAustralia SoutheastCentral USEast USEast US 2West
/// USNorth Central USSouth Central USEast AsiaSoutheast AsiaBrazil
/// SouthJapan EastJapan WestNorth EuropeWest Europe
+ /// Identifier for Azure Insights
+ /// metrics
/// Status of the namespace. It can be any of
/// these values:1 = Created/Active2 = Creating3 = Suspended4 =
/// Deleting
/// The time the namespace was created.
+ /// The time the namespace was updated.
/// Endpoint you can use to perform
/// NotificationHub operations.
/// The Id of the Azure subscription
@@ -64,21 +66,25 @@ public NamespaceResource()
/// enabled.
/// Whether or not the namespace is set as
/// Critical.
+ /// Data center for the namespace
/// The namespace type. Possible values
/// include: 'Messaging', 'NotificationHub'
- public NamespaceResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string namespaceResourceName = default(string), string provisioningState = default(string), string region = default(string), string status = default(string), System.DateTime? createdAt = default(System.DateTime?), string serviceBusEndpoint = default(string), string subscriptionId = default(string), string scaleUnit = default(string), bool? enabled = default(bool?), bool? critical = default(bool?), NamespaceType? namespaceType = default(NamespaceType?))
- : base(location, id, name, type, tags, sku)
+ public NamespaceResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string namespaceResourceName = default(string), string provisioningState = default(string), string region = default(string), string metricId = default(string), string status = default(string), System.DateTime? createdAt = default(System.DateTime?), System.DateTime? updatedAt = default(System.DateTime?), string serviceBusEndpoint = default(string), string subscriptionId = default(string), string scaleUnit = default(string), bool? enabled = default(bool?), bool? critical = default(bool?), string dataCenter = default(string), NamespaceType? namespaceType = default(NamespaceType?))
+ : base(id, name, type, location, tags, sku)
{
NamespaceResourceName = namespaceResourceName;
ProvisioningState = provisioningState;
Region = region;
+ MetricId = metricId;
Status = status;
CreatedAt = createdAt;
+ UpdatedAt = updatedAt;
ServiceBusEndpoint = serviceBusEndpoint;
SubscriptionId = subscriptionId;
ScaleUnit = scaleUnit;
Enabled = enabled;
Critical = critical;
+ DataCenter = dataCenter;
NamespaceType = namespaceType;
CustomInit();
}
@@ -110,6 +116,12 @@ public NamespaceResource()
[JsonProperty(PropertyName = "properties.region")]
public string Region { get; set; }
+ ///
+ /// Gets identifier for Azure Insights metrics
+ ///
+ [JsonProperty(PropertyName = "properties.metricId")]
+ public string MetricId { get; private set; }
+
///
/// Gets or sets status of the namespace. It can be any of these
/// values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting
@@ -123,6 +135,12 @@ public NamespaceResource()
[JsonProperty(PropertyName = "properties.createdAt")]
public System.DateTime? CreatedAt { get; set; }
+ ///
+ /// Gets or sets the time the namespace was updated.
+ ///
+ [JsonProperty(PropertyName = "properties.updatedAt")]
+ public System.DateTime? UpdatedAt { get; set; }
+
///
/// Gets or sets endpoint you can use to perform NotificationHub
/// operations.
@@ -155,6 +173,12 @@ public NamespaceResource()
[JsonProperty(PropertyName = "properties.critical")]
public bool? Critical { get; set; }
+ ///
+ /// Gets or sets data center for the namespace
+ ///
+ [JsonProperty(PropertyName = "properties.dataCenter")]
+ public string DataCenter { get; set; }
+
///
/// Gets or sets the namespace type. Possible values include:
/// 'Messaging', 'NotificationHub'
@@ -162,5 +186,15 @@ public NamespaceResource()
[JsonProperty(PropertyName = "properties.namespaceType")]
public NamespaceType? NamespaceType { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespaceType.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespaceType.cs
index ddae66731b40..c8d77e8a5232 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespaceType.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NamespaceType.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Runtime;
@@ -27,4 +26,35 @@ public enum NamespaceType
[EnumMember(Value = "NotificationHub")]
NotificationHub
}
+ internal static class NamespaceTypeEnumExtension
+ {
+ internal static string ToSerializedValue(this NamespaceType? value)
+ {
+ return value == null ? null : ((NamespaceType)value).ToSerializedValue();
+ }
+
+ internal static string ToSerializedValue(this NamespaceType value)
+ {
+ switch( value )
+ {
+ case NamespaceType.Messaging:
+ return "Messaging";
+ case NamespaceType.NotificationHub:
+ return "NotificationHub";
+ }
+ return null;
+ }
+
+ internal static NamespaceType? ParseNamespaceType(this string value)
+ {
+ switch( value )
+ {
+ case "Messaging":
+ return NamespaceType.Messaging;
+ case "NotificationHub":
+ return NamespaceType.NotificationHub;
+ }
+ return null;
+ }
+ }
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NotificationHubCreateOrUpdateParameters.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NotificationHubCreateOrUpdateParameters.cs
index 10030be8cbf3..e609cfc2301f 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NotificationHubCreateOrUpdateParameters.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NotificationHubCreateOrUpdateParameters.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
@@ -30,17 +29,17 @@ public partial class NotificationHubCreateOrUpdateParameters : Resource
///
public NotificationHubCreateOrUpdateParameters()
{
- CustomInit();
+ CustomInit();
}
///
/// Initializes a new instance of the
/// NotificationHubCreateOrUpdateParameters class.
///
- /// Resource location
/// Resource Id
/// Resource name
/// Resource type
+ /// Resource location
/// Resource tags
/// The sku of the created namespace
/// The
@@ -61,8 +60,8 @@ public NotificationHubCreateOrUpdateParameters()
/// NotificationHub
/// The BaiduCredential of the created
/// NotificationHub
- public NotificationHubCreateOrUpdateParameters(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string notificationHubCreateOrUpdateParametersName = default(string), string registrationTtl = default(string), IList authorizationRules = default(IList), ApnsCredential apnsCredential = default(ApnsCredential), WnsCredential wnsCredential = default(WnsCredential), GcmCredential gcmCredential = default(GcmCredential), MpnsCredential mpnsCredential = default(MpnsCredential), AdmCredential admCredential = default(AdmCredential), BaiduCredential baiduCredential = default(BaiduCredential))
- : base(location, id, name, type, tags, sku)
+ public NotificationHubCreateOrUpdateParameters(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string notificationHubCreateOrUpdateParametersName = default(string), string registrationTtl = default(string), IList authorizationRules = default(IList), ApnsCredential apnsCredential = default(ApnsCredential), WnsCredential wnsCredential = default(WnsCredential), GcmCredential gcmCredential = default(GcmCredential), MpnsCredential mpnsCredential = default(MpnsCredential), AdmCredential admCredential = default(AdmCredential), BaiduCredential baiduCredential = default(BaiduCredential))
+ : base(id, name, type, location, tags, sku)
{
NotificationHubCreateOrUpdateParametersName = notificationHubCreateOrUpdateParametersName;
RegistrationTtl = registrationTtl;
@@ -135,5 +134,15 @@ public NotificationHubCreateOrUpdateParameters()
[JsonProperty(PropertyName = "properties.baiduCredential")]
public BaiduCredential BaiduCredential { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NotificationHubResource.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NotificationHubResource.cs
index f7c07b723fdf..5924dfdfce32 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NotificationHubResource.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/NotificationHubResource.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
@@ -29,16 +28,16 @@ public partial class NotificationHubResource : Resource
///
public NotificationHubResource()
{
- CustomInit();
+ CustomInit();
}
///
/// Initializes a new instance of the NotificationHubResource class.
///
- /// Resource location
/// Resource Id
/// Resource name
/// Resource type
+ /// Resource location
/// Resource tags
/// The sku of the created namespace
/// The NotificationHub
@@ -59,8 +58,8 @@ public NotificationHubResource()
/// NotificationHub
/// The BaiduCredential of the created
/// NotificationHub
- public NotificationHubResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string notificationHubResourceName = default(string), string registrationTtl = default(string), IList authorizationRules = default(IList), ApnsCredential apnsCredential = default(ApnsCredential), WnsCredential wnsCredential = default(WnsCredential), GcmCredential gcmCredential = default(GcmCredential), MpnsCredential mpnsCredential = default(MpnsCredential), AdmCredential admCredential = default(AdmCredential), BaiduCredential baiduCredential = default(BaiduCredential))
- : base(location, id, name, type, tags, sku)
+ public NotificationHubResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), string notificationHubResourceName = default(string), string registrationTtl = default(string), IList authorizationRules = default(IList), ApnsCredential apnsCredential = default(ApnsCredential), WnsCredential wnsCredential = default(WnsCredential), GcmCredential gcmCredential = default(GcmCredential), MpnsCredential mpnsCredential = default(MpnsCredential), AdmCredential admCredential = default(AdmCredential), BaiduCredential baiduCredential = default(BaiduCredential))
+ : base(id, name, type, location, tags, sku)
{
NotificationHubResourceName = notificationHubResourceName;
RegistrationTtl = registrationTtl;
@@ -133,5 +132,15 @@ public NotificationHubResource()
[JsonProperty(PropertyName = "properties.baiduCredential")]
public BaiduCredential BaiduCredential { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Operation.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Operation.cs
new file mode 100644
index 000000000000..ea790cda5e17
--- /dev/null
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Operation.cs
@@ -0,0 +1,61 @@
+//
+// 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.NotificationHubs.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// A NotificationHubs REST API operation
+ ///
+ public partial class Operation
+ {
+ ///
+ /// Initializes a new instance of the Operation class.
+ ///
+ public Operation()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the Operation class.
+ ///
+ /// Operation name:
+ /// {provider}/{resource}/{operation}
+ /// The object that represents the
+ /// operation.
+ public Operation(string name = default(string), OperationDisplay display = default(OperationDisplay))
+ {
+ Name = name;
+ Display = display;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets operation name: {provider}/{resource}/{operation}
+ ///
+ [JsonProperty(PropertyName = "name")]
+ public string Name { get; private set; }
+
+ ///
+ /// Gets or sets the object that represents the operation.
+ ///
+ [JsonProperty(PropertyName = "display")]
+ public OperationDisplay Display { get; set; }
+
+ }
+}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/OperationDisplay.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/OperationDisplay.cs
new file mode 100644
index 000000000000..049e3c78e1b3
--- /dev/null
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/OperationDisplay.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.NotificationHubs.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// The object that represents the operation.
+ ///
+ public partial class OperationDisplay
+ {
+ ///
+ /// Initializes a new instance of the OperationDisplay class.
+ ///
+ public OperationDisplay()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the OperationDisplay class.
+ ///
+ /// Service provider:
+ /// Microsoft.NotificationHubs
+ /// Resource on which the operation is
+ /// performed: Invoice, etc.
+ /// Operation type: Read, write, delete,
+ /// etc.
+ public OperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string))
+ {
+ Provider = provider;
+ Resource = resource;
+ Operation = operation;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets service provider: Microsoft.NotificationHubs
+ ///
+ [JsonProperty(PropertyName = "provider")]
+ public string Provider { get; private set; }
+
+ ///
+ /// Gets resource on which the operation is performed: Invoice, etc.
+ ///
+ [JsonProperty(PropertyName = "resource")]
+ public string Resource { get; private set; }
+
+ ///
+ /// Gets operation type: Read, write, delete, etc.
+ ///
+ [JsonProperty(PropertyName = "operation")]
+ public string Operation { get; private set; }
+
+ }
+}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Page.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Page.cs
index ec903d8959d2..6ad795162e18 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Page.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Page.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Newtonsoft.Json;
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/PnsCredentialsResource.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/PnsCredentialsResource.cs
index 3b4330f58997..7883fdfc7502 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/PnsCredentialsResource.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/PnsCredentialsResource.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
@@ -29,16 +28,16 @@ public partial class PnsCredentialsResource : Resource
///
public PnsCredentialsResource()
{
- CustomInit();
+ CustomInit();
}
///
/// Initializes a new instance of the PnsCredentialsResource class.
///
- /// Resource location
/// Resource Id
/// Resource name
/// Resource type
+ /// Resource location
/// Resource tags
/// The sku of the created namespace
/// The ApnsCredential of the created
@@ -53,8 +52,8 @@ public PnsCredentialsResource()
/// NotificationHub
/// The BaiduCredential of the created
/// NotificationHub
- public PnsCredentialsResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), ApnsCredential apnsCredential = default(ApnsCredential), WnsCredential wnsCredential = default(WnsCredential), GcmCredential gcmCredential = default(GcmCredential), MpnsCredential mpnsCredential = default(MpnsCredential), AdmCredential admCredential = default(AdmCredential), BaiduCredential baiduCredential = default(BaiduCredential))
- : base(location, id, name, type, tags, sku)
+ public PnsCredentialsResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), ApnsCredential apnsCredential = default(ApnsCredential), WnsCredential wnsCredential = default(WnsCredential), GcmCredential gcmCredential = default(GcmCredential), MpnsCredential mpnsCredential = default(MpnsCredential), AdmCredential admCredential = default(AdmCredential), BaiduCredential baiduCredential = default(BaiduCredential))
+ : base(id, name, type, location, tags, sku)
{
ApnsCredential = apnsCredential;
WnsCredential = wnsCredential;
@@ -106,5 +105,15 @@ public PnsCredentialsResource()
[JsonProperty(PropertyName = "properties.baiduCredential")]
public BaiduCredential BaiduCredential { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/PolicykeyResource.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/PolicykeyResource.cs
index ce7757e36293..4ca47a8c5fd6 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/PolicykeyResource.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/PolicykeyResource.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Newtonsoft.Json;
using System.Linq;
@@ -24,7 +23,7 @@ public partial class PolicykeyResource
///
public PolicykeyResource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Resource.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Resource.cs
index 7051783c9412..f711fb75fc7d 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Resource.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Resource.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Newtonsoft.Json;
@@ -25,19 +24,19 @@ public partial class Resource : IResource
///
public Resource()
{
- CustomInit();
+ CustomInit();
}
///
/// Initializes a new instance of the Resource class.
///
- /// Resource location
/// Resource Id
/// Resource name
/// Resource type
+ /// Resource location
/// Resource tags
/// The sku of the created namespace
- public Resource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku))
+ public Resource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku))
{
Id = id;
Name = name;
@@ -89,5 +88,18 @@ public Resource()
[JsonProperty(PropertyName = "sku")]
public Sku Sku { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Sku != null)
+ {
+ Sku.Validate();
+ }
+ }
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ResourceListKeys.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ResourceListKeys.cs
index c60c0e2d9b0e..2f5009b6a0f2 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ResourceListKeys.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/ResourceListKeys.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Newtonsoft.Json;
using System.Linq;
@@ -24,7 +23,7 @@ public partial class ResourceListKeys
///
public ResourceListKeys()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleCreateOrUpdateParameters.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleCreateOrUpdateParameters.cs
index e5138f0c9dd0..45ed3ca6b382 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleCreateOrUpdateParameters.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleCreateOrUpdateParameters.cs
@@ -1,25 +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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
+ using Microsoft.Rest;
using Newtonsoft.Json;
- using System.Collections;
- using System.Collections.Generic;
using System.Linq;
///
/// Parameters supplied to the CreateOrUpdate Namespace AuthorizationRules.
///
- public partial class SharedAccessAuthorizationRuleCreateOrUpdateParameters : Resource
+ public partial class SharedAccessAuthorizationRuleCreateOrUpdateParameters
{
///
/// Initializes a new instance of the
@@ -27,23 +25,16 @@ public partial class SharedAccessAuthorizationRuleCreateOrUpdateParameters : Res
///
public SharedAccessAuthorizationRuleCreateOrUpdateParameters()
{
- CustomInit();
+ CustomInit();
}
///
/// Initializes a new instance of the
/// SharedAccessAuthorizationRuleCreateOrUpdateParameters class.
///
- /// Resource location
/// Properties of the Namespace
/// AuthorizationRules.
- /// Resource Id
- /// Resource name
- /// Resource type
- /// Resource tags
- /// The sku of the created namespace
- public SharedAccessAuthorizationRuleCreateOrUpdateParameters(string location, SharedAccessAuthorizationRuleProperties properties, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku))
- : base(location, id, name, type, tags, sku)
+ public SharedAccessAuthorizationRuleCreateOrUpdateParameters(SharedAccessAuthorizationRuleProperties properties)
{
Properties = properties;
CustomInit();
@@ -60,5 +51,18 @@ public SharedAccessAuthorizationRuleCreateOrUpdateParameters()
[JsonProperty(PropertyName = "properties")]
public SharedAccessAuthorizationRuleProperties Properties { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Properties == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Properties");
+ }
+ }
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleListResult.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleListResult.cs
new file mode 100644
index 000000000000..69254307e060
--- /dev/null
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleListResult.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.NotificationHubs.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// The response of the List Namespace operation.
+ ///
+ public partial class SharedAccessAuthorizationRuleListResult
+ {
+ ///
+ /// Initializes a new instance of the
+ /// SharedAccessAuthorizationRuleListResult class.
+ ///
+ public SharedAccessAuthorizationRuleListResult()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the
+ /// SharedAccessAuthorizationRuleListResult class.
+ ///
+ /// Result of the List AuthorizationRules
+ /// operation.
+ /// Link to the next set of results. Not empty
+ /// if Value contains incomplete list of AuthorizationRules
+ public SharedAccessAuthorizationRuleListResult(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 or sets result of the List AuthorizationRules operation.
+ ///
+ [JsonProperty(PropertyName = "value")]
+ public IList Value { get; set; }
+
+ ///
+ /// Gets or sets link to the next set of results. Not empty if Value
+ /// contains incomplete list of AuthorizationRules
+ ///
+ [JsonProperty(PropertyName = "nextLink")]
+ public string NextLink { get; set; }
+
+ }
+}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleProperties.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleProperties.cs
index 162a2bd09a64..ae92a2a28f41 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleProperties.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleProperties.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
@@ -27,7 +26,7 @@ public partial class SharedAccessAuthorizationRuleProperties
///
public SharedAccessAuthorizationRuleProperties()
{
- CustomInit();
+ CustomInit();
}
///
@@ -35,9 +34,31 @@ public SharedAccessAuthorizationRuleProperties()
/// SharedAccessAuthorizationRuleProperties class.
///
/// The rights associated with the rule.
- public SharedAccessAuthorizationRuleProperties(IList rights = default(IList))
+ /// A base64-encoded 256-bit primary key for
+ /// signing and validating the SAS token.
+ /// A base64-encoded 256-bit primary key for
+ /// signing and validating the SAS token.
+ /// A string that describes the authorization
+ /// rule.
+ /// A string that describes the claim
+ /// type
+ /// A string that describes the claim
+ /// value
+ /// The last modified time for this
+ /// rule
+ /// The created time for this rule
+ /// The revision number for the rule
+ public SharedAccessAuthorizationRuleProperties(IList rights = default(IList), string primaryKey = default(string), string secondaryKey = default(string), string keyName = default(string), string claimType = default(string), string claimValue = default(string), string modifiedTime = default(string), string createdTime = default(string), int? revision = default(int?))
{
Rights = rights;
+ PrimaryKey = primaryKey;
+ SecondaryKey = secondaryKey;
+ KeyName = keyName;
+ ClaimType = claimType;
+ ClaimValue = claimValue;
+ ModifiedTime = modifiedTime;
+ CreatedTime = createdTime;
+ Revision = revision;
CustomInit();
}
@@ -52,5 +73,55 @@ public SharedAccessAuthorizationRuleProperties()
[JsonProperty(PropertyName = "rights")]
public IList Rights { get; set; }
+ ///
+ /// Gets a base64-encoded 256-bit primary key for signing and
+ /// validating the SAS token.
+ ///
+ [JsonProperty(PropertyName = "primaryKey")]
+ public string PrimaryKey { get; private set; }
+
+ ///
+ /// Gets a base64-encoded 256-bit primary key for signing and
+ /// validating the SAS token.
+ ///
+ [JsonProperty(PropertyName = "secondaryKey")]
+ public string SecondaryKey { get; private set; }
+
+ ///
+ /// Gets a string that describes the authorization rule.
+ ///
+ [JsonProperty(PropertyName = "keyName")]
+ public string KeyName { get; private set; }
+
+ ///
+ /// Gets a string that describes the claim type
+ ///
+ [JsonProperty(PropertyName = "claimType")]
+ public string ClaimType { get; private set; }
+
+ ///
+ /// Gets a string that describes the claim value
+ ///
+ [JsonProperty(PropertyName = "claimValue")]
+ public string ClaimValue { get; private set; }
+
+ ///
+ /// Gets the last modified time for this rule
+ ///
+ [JsonProperty(PropertyName = "modifiedTime")]
+ public string ModifiedTime { get; private set; }
+
+ ///
+ /// Gets the created time for this rule
+ ///
+ [JsonProperty(PropertyName = "createdTime")]
+ public string CreatedTime { get; private set; }
+
+ ///
+ /// Gets the revision number for the rule
+ ///
+ [JsonProperty(PropertyName = "revision")]
+ public int? Revision { get; private set; }
+
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleResource.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleResource.cs
index 56a0aa8a314a..209b9dbdba4f 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleResource.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SharedAccessAuthorizationRuleResource.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
@@ -30,24 +29,46 @@ public partial class SharedAccessAuthorizationRuleResource : Resource
///
public SharedAccessAuthorizationRuleResource()
{
- CustomInit();
+ CustomInit();
}
///
/// Initializes a new instance of the
/// SharedAccessAuthorizationRuleResource class.
///
- /// Resource location
/// Resource Id
/// Resource name
/// Resource type
+ /// Resource location
/// Resource tags
/// The sku of the created namespace
/// The rights associated with the rule.
- public SharedAccessAuthorizationRuleResource(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), IList rights = default(IList))
- : base(location, id, name, type, tags, sku)
+ /// A base64-encoded 256-bit primary key for
+ /// signing and validating the SAS token.
+ /// A base64-encoded 256-bit primary key for
+ /// signing and validating the SAS token.
+ /// A string that describes the authorization
+ /// rule.
+ /// A string that describes the claim
+ /// type
+ /// A string that describes the claim
+ /// value
+ /// The last modified time for this
+ /// rule
+ /// The created time for this rule
+ /// The revision number for the rule
+ public SharedAccessAuthorizationRuleResource(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), IList rights = default(IList), string primaryKey = default(string), string secondaryKey = default(string), string keyName = default(string), string claimType = default(string), string claimValue = default(string), string modifiedTime = default(string), string createdTime = default(string), int? revision = default(int?))
+ : base(id, name, type, location, tags, sku)
{
Rights = rights;
+ PrimaryKey = primaryKey;
+ SecondaryKey = secondaryKey;
+ KeyName = keyName;
+ ClaimType = claimType;
+ ClaimValue = claimValue;
+ ModifiedTime = modifiedTime;
+ CreatedTime = createdTime;
+ Revision = revision;
CustomInit();
}
@@ -62,5 +83,65 @@ public SharedAccessAuthorizationRuleResource()
[JsonProperty(PropertyName = "properties.rights")]
public IList Rights { get; set; }
+ ///
+ /// Gets a base64-encoded 256-bit primary key for signing and
+ /// validating the SAS token.
+ ///
+ [JsonProperty(PropertyName = "properties.primaryKey")]
+ public string PrimaryKey { get; private set; }
+
+ ///
+ /// Gets a base64-encoded 256-bit primary key for signing and
+ /// validating the SAS token.
+ ///
+ [JsonProperty(PropertyName = "properties.secondaryKey")]
+ public string SecondaryKey { get; private set; }
+
+ ///
+ /// Gets a string that describes the authorization rule.
+ ///
+ [JsonProperty(PropertyName = "properties.keyName")]
+ public string KeyName { get; private set; }
+
+ ///
+ /// Gets a string that describes the claim type
+ ///
+ [JsonProperty(PropertyName = "properties.claimType")]
+ public string ClaimType { get; private set; }
+
+ ///
+ /// Gets a string that describes the claim value
+ ///
+ [JsonProperty(PropertyName = "properties.claimValue")]
+ public string ClaimValue { get; private set; }
+
+ ///
+ /// Gets the last modified time for this rule
+ ///
+ [JsonProperty(PropertyName = "properties.modifiedTime")]
+ public string ModifiedTime { get; private set; }
+
+ ///
+ /// Gets the created time for this rule
+ ///
+ [JsonProperty(PropertyName = "properties.createdTime")]
+ public string CreatedTime { get; private set; }
+
+ ///
+ /// Gets the revision number for the rule
+ ///
+ [JsonProperty(PropertyName = "properties.revision")]
+ public int? Revision { get; private set; }
+
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public override void Validate()
+ {
+ base.Validate();
+ }
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Sku.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Sku.cs
index 391e110a50af..3ac2cb02b639 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Sku.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/Sku.cs
@@ -1,16 +1,16 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
+ using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;
@@ -24,7 +24,7 @@ public partial class Sku
///
public Sku()
{
- CustomInit();
+ CustomInit();
}
///
@@ -82,5 +82,18 @@ public Sku()
[JsonProperty(PropertyName = "capacity")]
public int? Capacity { get; set; }
+ ///
+ /// Validate the object.
+ ///
+ ///
+ /// Thrown if validation fails
+ ///
+ public virtual void Validate()
+ {
+ if (Name == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "Name");
+ }
+ }
}
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SkuName.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SkuName.cs
index edc376e77c7d..7e2870affddc 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SkuName.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SkuName.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
///
/// Defines values for SkuName.
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SubResource.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SubResource.cs
index 484fa5822c0d..8325647cf837 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SubResource.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/SubResource.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Newtonsoft.Json;
@@ -23,7 +22,7 @@ public partial class SubResource : IResource
///
public SubResource()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/WnsCredential.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/WnsCredential.cs
index 602806d87e33..1e775c866ced 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/WnsCredential.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Models/WnsCredential.cs
@@ -1,16 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs.Models
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Azure.Management.NotificationHubs;
using Microsoft.Rest;
using Microsoft.Rest.Serialization;
using Newtonsoft.Json;
@@ -27,7 +26,7 @@ public partial class WnsCredential
///
public WnsCredential()
{
- CustomInit();
+ CustomInit();
}
///
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NameOperations.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NameOperations.cs
deleted file mode 100644
index 5edbf3297828..000000000000
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NameOperations.cs
+++ /dev/null
@@ -1,248 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.NotificationHubs
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- 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;
-
- ///
- /// NameOperations operations.
- ///
- internal partial class NameOperations : IServiceOperations, INameOperations
- {
- ///
- /// Initializes a new instance of the NameOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal NameOperations(NotificationHubsManagementClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the NotificationHubsManagementClient
- ///
- public NotificationHubsManagementClient Client { get; private set; }
-
- ///
- /// Checks the availability of the given service namespace across all Azure
- /// subscriptions. This is useful because the domain name is created based on
- /// the service namespace name.
- ///
- ///
- /// The namespace 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> CheckAvailabilityWithHttpMessagesAsync(CheckNameAvailabilityRequestParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (parameters == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("parameters", parameters);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CheckAvailability", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.NotificationHubs/checkNameAvailability").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- List _queryParameters = new List();
- if (Client.ApiVersion != null)
- {
- _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
- }
- if (_queryParameters.Count > 0)
- {
- _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
- }
- // Create HTTP transport objects
- var _httpRequest = new HttpRequestMessage();
- HttpResponseMessage _httpResponse = null;
- _httpRequest.Method = new HttpMethod("POST");
- _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)
- {
- var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex = new CloudException(_errorBody.Message);
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NameOperationsExtensions.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NameOperationsExtensions.cs
deleted file mode 100644
index 1f2bfcd55141..000000000000
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NameOperationsExtensions.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-
-namespace Microsoft.Azure.Management.NotificationHubs
-{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for NameOperations.
- ///
- public static partial class NameOperationsExtensions
- {
- ///
- /// Checks the availability of the given service namespace across all Azure
- /// subscriptions. This is useful because the domain name is created based on
- /// the service namespace name.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The namespace name.
- ///
- public static CheckNameAvailabilityResponse CheckAvailability(this INameOperations operations, CheckNameAvailabilityRequestParameters parameters)
- {
- return operations.CheckAvailabilityAsync(parameters).GetAwaiter().GetResult();
- }
-
- ///
- /// Checks the availability of the given service namespace across all Azure
- /// subscriptions. This is useful because the domain name is created based on
- /// the service namespace name.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// The namespace name.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task CheckAvailabilityAsync(this INameOperations operations, CheckNameAvailabilityRequestParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.CheckAvailabilityWithHttpMessagesAsync(parameters, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NamespacesOperations.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NamespacesOperations.cs
index 454d1d490fd8..5d22b1c6d602 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NamespacesOperations.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NamespacesOperations.cs
@@ -1,15 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -85,6 +85,10 @@ internal NamespacesOperations(NotificationHubsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -293,6 +297,10 @@ internal NamespacesOperations(NotificationHubsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -389,7 +397,7 @@ internal NamespacesOperations(NotificationHubsManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 201 && (int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 201)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -432,7 +440,7 @@ internal NamespacesOperations(NotificationHubsManagementClient client)
_result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
}
// Deserialize Response
- if ((int)_statusCode == 201)
+ if ((int)_statusCode == 200)
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
@@ -450,7 +458,7 @@ internal NamespacesOperations(NotificationHubsManagementClient client)
}
}
// Deserialize Response
- if ((int)_statusCode == 200)
+ if ((int)_statusCode == 201)
{
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
@@ -958,6 +966,10 @@ internal NamespacesOperations(NotificationHubsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -1258,7 +1270,7 @@ internal NamespacesOperations(NotificationHubsManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 204 && (int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
@@ -2108,7 +2120,7 @@ internal NamespacesOperations(NotificationHubsManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> ListKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> ListKeysWithHttpMessagesAsync(string resourceGroupName, string namespaceName, string authorizationRuleName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -2248,7 +2260,7 @@ internal NamespacesOperations(NotificationHubsManagementClient client)
throw ex;
}
// Create Result
- var _result = new AzureOperationResponse();
+ var _result = new AzureOperationResponse();
_result.Request = _httpRequest;
_result.Response = _httpResponse;
if (_httpResponse.Headers.Contains("x-ms-request-id"))
@@ -2261,7 +2273,7 @@ internal NamespacesOperations(NotificationHubsManagementClient client)
_responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
try
{
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
}
catch (JsonException ex)
{
@@ -2627,7 +2639,7 @@ internal NamespacesOperations(NotificationHubsManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 204 && (int)_statusCode != 200 && (int)_statusCode != 202)
+ if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NamespacesOperationsExtensions.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NamespacesOperationsExtensions.cs
index cba811d18b4e..5057b56e6855 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NamespacesOperationsExtensions.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NamespacesOperationsExtensions.cs
@@ -1,15 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -498,7 +498,7 @@ public static IPage ListAuthorizationRule
///
/// The connection string of the namespace for the specified authorizationRule.
///
- public static ResourceListKeys ListKeys(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName)
+ public static SharedAccessAuthorizationRuleListResult ListKeys(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName)
{
return operations.ListKeysAsync(resourceGroupName, namespaceName, authorizationRuleName).GetAwaiter().GetResult();
}
@@ -521,7 +521,7 @@ public static ResourceListKeys ListKeys(this INamespacesOperations operations, s
///
/// The cancellation token.
///
- public static async Task ListKeysAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ListKeysAsync(this INamespacesOperations operations, string resourceGroupName, string namespaceName, string authorizationRuleName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListKeysWithHttpMessagesAsync(resourceGroupName, namespaceName, authorizationRuleName, null, cancellationToken).ConfigureAwait(false))
{
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NotificationHubsManagementClient.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NotificationHubsManagementClient.cs
index 1b839c4aebc3..ec21cd723b00 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NotificationHubsManagementClient.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NotificationHubsManagementClient.cs
@@ -1,15 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Microsoft.Rest.Serialization;
@@ -76,25 +76,20 @@ public partial class NotificationHubsManagementClient : ServiceClient
- /// Gets the INamespacesOperations.
+ /// Gets the IOperations.
///
- public virtual INamespacesOperations Namespaces { get; private set; }
+ public virtual IOperations Operations { get; private set; }
///
- /// Gets the INameOperations.
+ /// Gets the INamespacesOperations.
///
- public virtual INameOperations Name { get; private set; }
+ public virtual INamespacesOperations Namespaces { get; private set; }
///
/// Gets the INotificationHubsOperations.
///
public virtual INotificationHubsOperations NotificationHubs { get; private set; }
- ///
- /// Gets the IHubsOperations.
- ///
- public virtual IHubsOperations Hubs { get; private set; }
-
///
/// Initializes a new instance of the NotificationHubsManagementClient class.
///
@@ -296,10 +291,9 @@ public NotificationHubsManagementClient(System.Uri baseUri, ServiceClientCredent
///
private void Initialize()
{
+ Operations = new Operations(this);
Namespaces = new NamespacesOperations(this);
- Name = new NameOperations(this);
NotificationHubs = new NotificationHubsOperations(this);
- Hubs = new HubsOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2017-04-01";
AcceptLanguage = "en-US";
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NotificationHubsOperations.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NotificationHubsOperations.cs
index da90ea05f541..933fb37d15ab 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NotificationHubsOperations.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NotificationHubsOperations.cs
@@ -1,15 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -83,7 +83,7 @@ internal NotificationHubsOperations(NotificationHubsManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task> CheckAvailabilityWithHttpMessagesAsync(string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task> CheckNotificationHubAvailabilityWithHttpMessagesAsync(string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -97,6 +97,10 @@ internal NotificationHubsOperations(NotificationHubsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -116,7 +120,7 @@ internal NotificationHubsOperations(NotificationHubsManagementClient client)
tracingParameters.Add("namespaceName", namespaceName);
tracingParameters.Add("parameters", parameters);
tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "CheckAvailability", tracingParameters);
+ ServiceClientTracing.Enter(_invocationId, this, "CheckNotificationHubAvailability", tracingParameters);
}
// Construct URL
var _baseUrl = Client.BaseUri.AbsoluteUri;
@@ -314,6 +318,10 @@ internal NotificationHubsOperations(NotificationHubsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -947,6 +955,10 @@ internal NotificationHubsOperations(NotificationHubsManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "parameters");
}
+ if (parameters != null)
+ {
+ parameters.Validate();
+ }
if (Client.ApiVersion == null)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
@@ -1258,7 +1270,7 @@ internal NotificationHubsOperations(NotificationHubsManagementClient client)
HttpStatusCode _statusCode = _httpResponse.StatusCode;
cancellationToken.ThrowIfCancellationRequested();
string _responseContent = null;
- if ((int)_statusCode != 204 && (int)_statusCode != 200)
+ if ((int)_statusCode != 200 && (int)_statusCode != 204)
{
var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
try
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NotificationHubsOperationsExtensions.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NotificationHubsOperationsExtensions.cs
index 9e5041036983..061809545a1c 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NotificationHubsOperationsExtensions.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/NotificationHubsOperationsExtensions.cs
@@ -1,15 +1,15 @@
+//
// 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 1.0.1.0
+// 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.NotificationHubs
{
- using Microsoft.Azure;
- using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
@@ -36,9 +36,9 @@ public static partial class NotificationHubsOperationsExtensions
///
/// The notificationHub name.
///
- public static CheckAvailabilityResult CheckAvailability(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters)
+ public static CheckAvailabilityResult CheckNotificationHubAvailability(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters)
{
- return operations.CheckAvailabilityAsync(resourceGroupName, namespaceName, parameters).GetAwaiter().GetResult();
+ return operations.CheckNotificationHubAvailabilityAsync(resourceGroupName, namespaceName, parameters).GetAwaiter().GetResult();
}
///
@@ -59,9 +59,9 @@ public static CheckAvailabilityResult CheckAvailability(this INotificationHubsOp
///
/// The cancellation token.
///
- public static async Task CheckAvailabilityAsync(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task CheckNotificationHubAvailabilityAsync(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
{
- using (var _result = await operations.CheckAvailabilityWithHttpMessagesAsync(resourceGroupName, namespaceName, parameters, null, cancellationToken).ConfigureAwait(false))
+ using (var _result = await operations.CheckNotificationHubAvailabilityWithHttpMessagesAsync(resourceGroupName, namespaceName, parameters, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Operations.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Operations.cs
new file mode 100644
index 000000000000..2a1d310d1d1d
--- /dev/null
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/Operations.cs
@@ -0,0 +1,390 @@
+//
+// 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.NotificationHubs
+{
+ 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;
+
+ ///
+ /// Operations operations.
+ ///
+ internal partial class Operations : IServiceOperations, IOperations
+ {
+ ///
+ /// Initializes a new instance of the Operations class.
+ ///
+ ///
+ /// Reference to the service client.
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ internal Operations(NotificationHubsManagementClient client)
+ {
+ if (client == null)
+ {
+ throw new System.ArgumentNullException("client");
+ }
+ Client = client;
+ }
+
+ ///
+ /// Gets a reference to the NotificationHubsManagementClient
+ ///
+ public NotificationHubsManagementClient Client { get; private set; }
+
+ ///
+ /// Lists all of the available NotificationHubs REST API operations.
+ ///
+ ///
+ /// 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(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ 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("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("/") ? "" : "/")), "providers/Microsoft.NotificationHubs/operations").ToString();
+ 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;
+ }
+
+ ///
+ /// Lists all of the available NotificationHubs REST API operations.
+ ///
+ ///
+ /// 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/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/OperationsExtensions.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/OperationsExtensions.cs
new file mode 100644
index 000000000000..32a19c81a197
--- /dev/null
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/OperationsExtensions.cs
@@ -0,0 +1,87 @@
+//
+// 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.NotificationHubs
+{
+ using Microsoft.Rest;
+ using Microsoft.Rest.Azure;
+ using Models;
+ using System.Threading;
+ using System.Threading.Tasks;
+
+ ///
+ /// Extension methods for Operations.
+ ///
+ public static partial class OperationsExtensions
+ {
+ ///
+ /// Lists all of the available NotificationHubs REST API operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ public static IPage List(this IOperations operations)
+ {
+ return operations.ListAsync().GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all of the available NotificationHubs REST API operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task> ListAsync(this IOperations operations, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ ///
+ /// Lists all of the available NotificationHubs REST API operations.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The NextLink from the previous successful call to List operation.
+ ///
+ public static IPage ListNext(this IOperations operations, string nextPageLink)
+ {
+ return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Lists all of the available NotificationHubs REST API operations.
+ ///
+ ///
+ /// 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 IOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
+ }
+}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/SdkInfo_NotificationHubsManagementClient.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/SdkInfo_NotificationHubsManagementClient.cs
new file mode 100644
index 000000000000..79c208ead5e9
--- /dev/null
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Generated/SdkInfo_NotificationHubsManagementClient.cs
@@ -0,0 +1,29 @@
+
+//
+// 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.NotificationHubs
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ internal static partial class SdkInfo
+ {
+ public static IEnumerable> ApiInfo_NotificationHubsManagementClient
+ {
+ get
+ {
+ return new Tuple[]
+ {
+ new Tuple("NotificationHubs", "Namespaces", "2017-04-01"),
+ new Tuple("NotificationHubs", "NotificationHubs", "2017-04-01"),
+ new Tuple("NotificationHubs", "Operations", "2017-04-01"),
+ }.AsEnumerable();
+ }
+ }
+ }
+}
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Microsoft.Azure.Management.NotificationHubs.csproj b/src/SDKs/NotificationHubs/Management.NotificationHubs/Microsoft.Azure.Management.NotificationHubs.csproj
index 3c6ff905cb70..17094248ea6d 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Microsoft.Azure.Management.NotificationHubs.csproj
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Microsoft.Azure.Management.NotificationHubs.csproj
@@ -7,9 +7,16 @@
Microsoft.Azure.Management.NotificationHubs
Provides developers with libraries to create and manager Namespaces of type NotificationHub and NotificationHubs. Manage Authorization Rules at both the resource levels. Note: This client library is for NotificationHubs under Azure Resource Manager.
Microsoft.Azure.Management.NotificationHubs
- 2.3.1-preview
+ 2.4.0
Microsoft Azure NotificationHubs Management;NotificationHubs;NotificationHubs management;
-
+
+
+
net452;netstandard1.4
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/Properties/AssemblyInfo.cs b/src/SDKs/NotificationHubs/Management.NotificationHubs/Properties/AssemblyInfo.cs
index 6f063402931b..a23b387c1eaf 100644
--- a/src/SDKs/NotificationHubs/Management.NotificationHubs/Properties/AssemblyInfo.cs
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@
[assembly: AssemblyDescription("Provides Microsoft Azure NotificationHubs management functions for managing the Microsoft Azure NotificationHubs service.")]
[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.3.1.0")]
+[assembly: AssemblyFileVersion("2.4.0.0")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
diff --git a/src/SDKs/NotificationHubs/Management.NotificationHubs/generated.ps1 b/src/SDKs/NotificationHubs/Management.NotificationHubs/generated.ps1
new file mode 100644
index 000000000000..9fcec3661256
--- /dev/null
+++ b/src/SDKs/NotificationHubs/Management.NotificationHubs/generated.ps1
@@ -0,0 +1 @@
+powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "$(split-path $SCRIPT:MyInvocation.MyCommand.Path -parent)\..\..\..\..\tools\generateTool.ps1" -ResourceProvider "notificationhubs/resource-manager" -PowershellInvoker -AutoRestVersion "latest"
\ No newline at end of file
diff --git a/src/SDKs/NotificationHubs/NotificationHubs.Tests/SessionRecords/NotificationHubs.Tests.ScenarioTests.ScenarioTests/CheckNamespaceNameAvailabilityTest.json b/src/SDKs/NotificationHubs/NotificationHubs.Tests/SessionRecords/NotificationHubs.Tests.ScenarioTests.ScenarioTests/CheckNamespaceNameAvailabilityTest.json
index 7796bc742345..7cc7fb334c2a 100644
--- a/src/SDKs/NotificationHubs/NotificationHubs.Tests/SessionRecords/NotificationHubs.Tests.ScenarioTests.ScenarioTests/CheckNamespaceNameAvailabilityTest.json
+++ b/src/SDKs/NotificationHubs/NotificationHubs.Tests/SessionRecords/NotificationHubs.Tests.ScenarioTests.ScenarioTests/CheckNamespaceNameAvailabilityTest.json
@@ -23,7 +23,7 @@
"Microsoft.Azure.Management.NotificationHubs.NotificationHubsManagementClient/2.2.0.0"
]
},
- "ResponseBody": "{\r\n \"isAvailiable\": true,\r\n \"id\": \"/subscriptions/2cac2a14-ba6b-46a6-bce8-2d9781a41ba2/providers/Microsoft.NotificationHubs/checkNamespaceAvailability\",\r\n \"name\": \"HydraNH-Namespace5839\",\r\n \"type\": \"Microsoft.NotificationHubs/namespaces/checkNamespaceAvailability\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": true\r\n}",
+ "ResponseBody": "{\r\n \"IsAvailiable\": true,\r\n \"id\": \"/subscriptions/2cac2a14-ba6b-46a6-bce8-2d9781a41ba2/providers/Microsoft.NotificationHubs/checkNamespaceAvailability\",\r\n \"name\": \"HydraNH-Namespace5839\",\r\n \"type\": \"Microsoft.NotificationHubs/namespaces/checkNamespaceAvailability\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": true\r\n}",
"ResponseHeaders": {
"Content-Type": [
"application/json; charset=utf-8"
@@ -94,7 +94,7 @@
"Microsoft.Azure.Management.NotificationHubs.NotificationHubsManagementClient/2.2.0.0"
]
},
- "ResponseBody": "{\r\n \"isAvailiable\": false,\r\n \"id\": \"/subscriptions/2cac2a14-ba6b-46a6-bce8-2d9781a41ba2/providers/Microsoft.NotificationHubs/checkNamespaceAvailability\",\r\n \"name\": \"hydraNhNamespace-invalid@!!#%$#\",\r\n \"type\": \"Microsoft.NotificationHubs/namespaces/checkNamespaceAvailability\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": false\r\n}",
+ "ResponseBody": "{\r\n \"IsAvailiable\": false,\r\n \"id\": \"/subscriptions/2cac2a14-ba6b-46a6-bce8-2d9781a41ba2/providers/Microsoft.NotificationHubs/checkNamespaceAvailability\",\r\n \"name\": \"hydraNhNamespace-invalid@!!#%$#\",\r\n \"type\": \"Microsoft.NotificationHubs/namespaces/checkNamespaceAvailability\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": false\r\n}",
"ResponseHeaders": {
"Content-Type": [
"application/json; charset=utf-8"
@@ -165,7 +165,7 @@
"Microsoft.Azure.Management.NotificationHubs.NotificationHubsManagementClient/2.2.0.0"
]
},
- "ResponseBody": "{\r\n \"isAvailiable\": false,\r\n \"id\": \"/subscriptions/2cac2a14-ba6b-46a6-bce8-2d9781a41ba2/providers/Microsoft.NotificationHubs/checkNamespaceAvailability\",\r\n \"name\": \"HydraNH-Namespace5839\",\r\n \"type\": \"Microsoft.NotificationHubs/namespaces/checkNamespaceAvailability\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": false\r\n}",
+ "ResponseBody": "{\r\n \"IsAvailiable\": false,\r\n \"id\": \"/subscriptions/2cac2a14-ba6b-46a6-bce8-2d9781a41ba2/providers/Microsoft.NotificationHubs/checkNamespaceAvailability\",\r\n \"name\": \"HydraNH-Namespace5839\",\r\n \"type\": \"Microsoft.NotificationHubs/namespaces/checkNamespaceAvailability\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": false\r\n}",
"ResponseHeaders": {
"Content-Type": [
"application/json; charset=utf-8"
diff --git a/src/SDKs/NotificationHubs/NotificationHubs.Tests/SessionRecords/NotificationHubs.Tests.ScenarioTests.ScenarioTests/CheckNotificationHubNameAvailability.json b/src/SDKs/NotificationHubs/NotificationHubs.Tests/SessionRecords/NotificationHubs.Tests.ScenarioTests.ScenarioTests/CheckNotificationHubNameAvailability.json
index 784b4c51e455..01176f8ad355 100644
--- a/src/SDKs/NotificationHubs/NotificationHubs.Tests/SessionRecords/NotificationHubs.Tests.ScenarioTests.ScenarioTests/CheckNotificationHubNameAvailability.json
+++ b/src/SDKs/NotificationHubs/NotificationHubs.Tests/SessionRecords/NotificationHubs.Tests.ScenarioTests.ScenarioTests/CheckNotificationHubNameAvailability.json
@@ -23,7 +23,7 @@
"Microsoft.Azure.Management.NotificationHubs.NotificationHubsManagementClient/2.2.0.0"
]
},
- "ResponseBody": "{\r\n \"isAvailiable\": true,\r\n \"id\": \"/subscriptions/2cac2a14-ba6b-46a6-bce8-2d9781a41ba2/providers/Microsoft.NotificationHubs/checkNamespaceAvailability\",\r\n \"name\": \"HydraNH-Namespace8748\",\r\n \"type\": \"Microsoft.NotificationHubs/namespaces/checkNamespaceAvailability\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": true\r\n}",
+ "ResponseBody": "{\r\n \"IsAvailiable\": true,\r\n \"id\": \"/subscriptions/2cac2a14-ba6b-46a6-bce8-2d9781a41ba2/providers/Microsoft.NotificationHubs/checkNamespaceAvailability\",\r\n \"name\": \"HydraNH-Namespace8748\",\r\n \"type\": \"Microsoft.NotificationHubs/namespaces/checkNamespaceAvailability\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": true\r\n}",
"ResponseHeaders": {
"Content-Type": [
"application/json; charset=utf-8"
@@ -281,7 +281,7 @@
"Microsoft.Azure.Management.NotificationHubs.NotificationHubsManagementClient/2.2.0.0"
]
},
- "ResponseBody": "{\r\n \"isAvailiable\": true,\r\n \"id\": \"/subscriptions/2cac2a14-ba6b-46a6-bce8-2d9781a41ba2/resourceGroups/TestRg-NH4804/providers/Microsoft.NotificationHubs/namespaces/HydraNH-Namespace8748/checkNotificationHubAvailability\",\r\n \"name\": \"HydraNH-NotificationHub7090-validazsmnet5409\",\r\n \"type\": \"Microsoft.NotificationHubs/namespaces/notificationHubs/checkNotificationHubAvailability\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": true\r\n}",
+ "ResponseBody": "{\r\n \"IsAvailiable\": true,\r\n \"id\": \"/subscriptions/2cac2a14-ba6b-46a6-bce8-2d9781a41ba2/resourceGroups/TestRg-NH4804/providers/Microsoft.NotificationHubs/namespaces/HydraNH-Namespace8748/checkNotificationHubAvailability\",\r\n \"name\": \"HydraNH-NotificationHub7090-validazsmnet5409\",\r\n \"type\": \"Microsoft.NotificationHubs/namespaces/notificationHubs/checkNotificationHubAvailability\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": true\r\n}",
"ResponseHeaders": {
"Content-Type": [
"application/json; charset=utf-8"
@@ -352,7 +352,7 @@
"Microsoft.Azure.Management.NotificationHubs.NotificationHubsManagementClient/2.2.0.0"
]
},
- "ResponseBody": "{\r\n \"isAvailiable\": false,\r\n \"id\": \"/subscriptions/2cac2a14-ba6b-46a6-bce8-2d9781a41ba2/resourceGroups/TestRg-NH4804/providers/Microsoft.NotificationHubs/namespaces/HydraNH-Namespace8748/checkNotificationHubAvailability\",\r\n \"name\": \"HydraNH-NotificationHub7090-validazsmnet5409\",\r\n \"type\": \"Microsoft.NotificationHubs/namespaces/notificationHubs/checkNotificationHubAvailability\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": false\r\n}",
+ "ResponseBody": "{\r\n \"IsAvailiable\": false,\r\n \"id\": \"/subscriptions/2cac2a14-ba6b-46a6-bce8-2d9781a41ba2/resourceGroups/TestRg-NH4804/providers/Microsoft.NotificationHubs/namespaces/HydraNH-Namespace8748/checkNotificationHubAvailability\",\r\n \"name\": \"HydraNH-NotificationHub7090-validazsmnet5409\",\r\n \"type\": \"Microsoft.NotificationHubs/namespaces/notificationHubs/checkNotificationHubAvailability\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": false\r\n}",
"ResponseHeaders": {
"Content-Type": [
"application/json; charset=utf-8"
diff --git a/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NamespaceTests.CRUDAuthorizationRules.cs b/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NamespaceTests.CRUDAuthorizationRules.cs
index 410c345f42a3..fc42b193c8de 100644
--- a/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NamespaceTests.CRUDAuthorizationRules.cs
+++ b/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NamespaceTests.CRUDAuthorizationRules.cs
@@ -62,7 +62,6 @@ public void NamespaceCreateGetUpdateDeleteAuthorizationRules()
string createPrimaryKey = HttpMockServer.GetVariable("CreatePrimaryKey", NotificationHubsManagementHelper.GenerateRandomKey());
var createAutorizationRuleParameter = new SharedAccessAuthorizationRuleCreateOrUpdateParameters()
{
- Location = location,
Properties = new SharedAccessAuthorizationRuleProperties()
{
Rights = new List() { AccessRights.Listen, AccessRights.Send },
@@ -109,7 +108,6 @@ public void NamespaceCreateGetUpdateDeleteAuthorizationRules()
//Update namespace authorizationRule
var updateNamespaceAuthorizationRuleParameter = new SharedAccessAuthorizationRuleCreateOrUpdateParameters()
{
- Location = location,
Properties = new SharedAccessAuthorizationRuleProperties()
{
Rights = new List() { AccessRights.Listen},
@@ -142,12 +140,6 @@ public void NamespaceCreateGetUpdateDeleteAuthorizationRules()
//Get the connectionString to the namespace for a Authorization rule created
var listKeysResponse = NotificationHubsManagementClient.Namespaces.ListKeys(resourceGroup, namespaceName, authorizationRuleName);
Assert.NotNull(listKeysResponse);
- Assert.Equal(listKeysResponse.KeyName, authorizationRuleName);
- Assert.NotNull(listKeysResponse.PrimaryConnectionString);
- Assert.NotNull(listKeysResponse.SecondaryConnectionString);
- Assert.True(listKeysResponse.PrimaryConnectionString.Contains(listKeysResponse.PrimaryKey));
- Assert.True(listKeysResponse.SecondaryConnectionString.Contains(listKeysResponse.SecondaryKey));
-
var policyKey = new PolicykeyResource()
{
PolicyKey = "primary KEY"
@@ -158,27 +150,10 @@ public void NamespaceCreateGetUpdateDeleteAuthorizationRules()
Assert.Equal(regenerateKeys.KeyName, authorizationRuleName);
Assert.NotNull(regenerateKeys.PrimaryConnectionString);
Assert.NotNull(regenerateKeys.SecondaryConnectionString);
- Assert.True(regenerateKeys.PrimaryConnectionString.Contains(regenerateKeys.PrimaryKey));
- Assert.True(regenerateKeys.SecondaryConnectionString.Contains(regenerateKeys.SecondaryKey));
- Assert.Equal(regenerateKeys.SecondaryConnectionString, listKeysResponse.SecondaryConnectionString);
- Assert.NotEqual(regenerateKeys.PrimaryConnectionString, listKeysResponse.PrimaryConnectionString);
- Assert.Equal(regenerateKeys.SecondaryKey, listKeysResponse.SecondaryKey);
- Assert.NotEqual(regenerateKeys.PrimaryKey, listKeysResponse.PrimaryKey);
//Get the connectionString to the namespace for a Authorization rule after regenerating the primary key
var listKeysAfterRegenerateResponse = NotificationHubsManagementClient.Namespaces.ListKeys(resourceGroup, namespaceName, authorizationRuleName);
Assert.NotNull(listKeysAfterRegenerateResponse);
- Assert.Equal(listKeysAfterRegenerateResponse.KeyName, authorizationRuleName);
- Assert.NotNull(listKeysAfterRegenerateResponse.PrimaryConnectionString);
- Assert.NotNull(listKeysAfterRegenerateResponse.SecondaryConnectionString);
- Assert.True(listKeysAfterRegenerateResponse.PrimaryConnectionString.Contains(listKeysAfterRegenerateResponse.PrimaryKey));
- Assert.True(listKeysAfterRegenerateResponse.SecondaryConnectionString.Contains(listKeysAfterRegenerateResponse.SecondaryKey));
- Assert.Equal(listKeysAfterRegenerateResponse.SecondaryConnectionString, listKeysResponse.SecondaryConnectionString);
- Assert.NotEqual(listKeysAfterRegenerateResponse.PrimaryConnectionString, listKeysResponse.PrimaryConnectionString);
- Assert.Equal(listKeysAfterRegenerateResponse.SecondaryKey, listKeysResponse.SecondaryKey);
- Assert.NotEqual(listKeysAfterRegenerateResponse.PrimaryKey, listKeysResponse.PrimaryKey);
- Assert.Equal(listKeysAfterRegenerateResponse.PrimaryKey, regenerateKeys.PrimaryKey);
- Assert.Equal(listKeysAfterRegenerateResponse.PrimaryConnectionString, regenerateKeys.PrimaryConnectionString);
//Delete namespace authorizationRule
NotificationHubsManagementClient.Namespaces.DeleteAuthorizationRule(resourceGroup, namespaceName, authorizationRuleName);
diff --git a/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NamespaceTests.CheckAvailability.cs b/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NamespaceTests.CheckAvailability.cs
index 196b2e1ebbfd..606cae29df38 100644
--- a/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NamespaceTests.CheckAvailability.cs
+++ b/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NamespaceTests.CheckAvailability.cs
@@ -41,10 +41,9 @@ public void CheckNamespaceNameAvailabilityTest()
this.ResourceManagementClient.TryRegisterResourceGroup(location, resourceGroup);
}
- var createResponse = NotificationHubsManagementClient.Namespaces.CreateOrUpdate(resourceGroup, validNamespaceName,
- new NamespaceCreateOrUpdateParameters(
- location
- ));
+ var createResponse = NotificationHubsManagementClient.Namespaces.CreateOrUpdate(resourceGroup,
+ validNamespaceName,
+ new NamespaceCreateOrUpdateParameters {Location = location});
Assert.NotNull(createResponse);
diff --git a/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NotificationHubTests.CRUDAuthorizationRules.cs b/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NotificationHubTests.CRUDAuthorizationRules.cs
index d33a96febd28..9fcb5e4b105e 100644
--- a/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NotificationHubTests.CRUDAuthorizationRules.cs
+++ b/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NotificationHubTests.CRUDAuthorizationRules.cs
@@ -73,7 +73,6 @@ public void NotificationHubCreateGetUpdateDeleteAuthorizationRules()
string createPrimaryKey = HttpMockServer.GetVariable("CreatePrimaryKey", NotificationHubsManagementHelper.GenerateRandomKey());
var createAutorizationRuleParameter = new SharedAccessAuthorizationRuleCreateOrUpdateParameters()
{
- Location = location,
Properties = new SharedAccessAuthorizationRuleProperties()
{
Rights = new List() { AccessRights.Listen, AccessRights.Send },
@@ -112,7 +111,6 @@ public void NotificationHubCreateGetUpdateDeleteAuthorizationRules()
//Update notificationHub authorizationRule
var updateNotificationHubAuthorizationRuleParameter = new SharedAccessAuthorizationRuleCreateOrUpdateParameters()
{
- Location = location,
Properties = new SharedAccessAuthorizationRuleProperties()
{
Rights = new List() { AccessRights.Listen },
diff --git a/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NotificationHubTests.CheckAvailability.cs b/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NotificationHubTests.CheckAvailability.cs
index db7f9b90f1ec..51893d9aa07d 100644
--- a/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NotificationHubTests.CheckAvailability.cs
+++ b/src/SDKs/NotificationHubs/NotificationHubs.Tests/Tests/ScenarioTests.NotificationHubTests.CheckAvailability.cs
@@ -35,14 +35,14 @@ public void CheckNotificationHubNameAvailability()
}
var createNSResponse = NotificationHubsManagementClient.Namespaces.CreateOrUpdate(resourceGroup, validNamespaceName,
- new NamespaceCreateOrUpdateParameters(location));
+ new NamespaceCreateOrUpdateParameters { Location = location });
Assert.NotNull(createNSResponse);
TestUtilities.Wait(TimeSpan.FromSeconds(30));
var validNotificationHubName = TestUtilities.GenerateName(NotificationHubsManagementHelper.NotificationHubPrefix) + "-valid" + TestUtilities.GenerateName();
- var responseNH = NotificationHubsManagementClient.NotificationHubs.CheckAvailability(resourceGroup, validNamespaceName,
+ var responseNH = NotificationHubsManagementClient.NotificationHubs.CheckNotificationHubAvailability(resourceGroup, validNamespaceName,
new CheckAvailabilityParameters(validNotificationHubName, NotificationHubsManagementHelper.DefaultLocation));
Assert.NotNull(responseNH);
Assert.True(responseNH.IsAvailiable);
@@ -50,11 +50,11 @@ public void CheckNotificationHubNameAvailability()
// create Notificationhub
var createNHResponse = NotificationHubsManagementClient.NotificationHubs.CreateOrUpdate(resourceGroup, validNamespaceName,
validNotificationHubName,
- new NotificationHubCreateOrUpdateParameters(location));
+ new NotificationHubCreateOrUpdateParameters {Location = location});
Assert.NotNull(createNHResponse);
- responseNH = NotificationHubsManagementClient.NotificationHubs.CheckAvailability(resourceGroup, validNamespaceName,
+ responseNH = NotificationHubsManagementClient.NotificationHubs.CheckNotificationHubAvailability(resourceGroup, validNamespaceName,
new CheckAvailabilityParameters(validNotificationHubName, NotificationHubsManagementHelper.DefaultLocation));
Assert.NotNull(responseNH);
Assert.False(responseNH.IsAvailiable);
diff --git a/src/SDKs/_metadata/notificationhubs_resource-manager.txt b/src/SDKs/_metadata/notificationhubs_resource-manager.txt
new file mode 100644
index 000000000000..7a679b74ea2c
--- /dev/null
+++ b/src/SDKs/_metadata/notificationhubs_resource-manager.txt
@@ -0,0 +1,17 @@
+Executing AutoRest command
+cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/notificationhubs/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\azure-sdk-for-net\tools\..\src\SDKs\
+2018-05-14 20:11:05 UTC
+1) azure-rest-api-specs repository information
+GitHub fork: Azure
+Branch: master
+Commit: cc5c0ef579d006a23a32685298e77015408d25ce
+
+2) AutoRest information
+Requested version: latest
+Bootstrapper version: C:\Users\locphan\AppData\Roaming\npm `-- autorest@2.0.4262
+
+
+Latest installed version:
+.\tools\generate.ps1 was invoked by generate.ps1
+
+