diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificateOperations.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificateOperations.cs
index 350b8bee2a8b..eb8ffe1330ec 100644
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificateOperations.cs
+++ b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificateOperations.cs
@@ -503,7 +503,7 @@ internal DpsCertificateOperations(IotDpsClient client)
/// Delete the Provisioning Service Certificate.
///
///
- /// Deletes the specified certificate assosciated with the Provisioning Service
+ /// Deletes the specified certificate associated with the Provisioning Service
///
///
/// Resource group identifier.
@@ -763,6 +763,197 @@ internal DpsCertificateOperations(IotDpsClient client)
return _result;
}
+ ///
+ /// Get all the certificates tied to the provisioning service.
+ ///
+ ///
+ /// Name of resource group.
+ ///
+ ///
+ /// Name of provisioning service to retrieve certificates for.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string provisioningServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (provisioningServiceName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "provisioningServiceName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("provisioningServiceName", provisioningServiceName);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates").ToString();
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{provisioningServiceName}", System.Uri.EscapeDataString(provisioningServiceName));
+ 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 ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorDetails _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;
+ }
+
///
/// Generate verification code for Proof of Possession.
///
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificateOperationsExtensions.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificateOperationsExtensions.cs
index 9f2d1cfa4b8b..9808c4d144a1 100644
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificateOperationsExtensions.cs
+++ b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificateOperationsExtensions.cs
@@ -143,7 +143,7 @@ public static partial class DpsCertificateOperationsExtensions
/// Delete the Provisioning Service Certificate.
///
///
- /// Deletes the specified certificate assosciated with the Provisioning Service
+ /// Deletes the specified certificate associated with the Provisioning Service
///
///
/// The operations group for this extension method.
@@ -195,7 +195,7 @@ public static partial class DpsCertificateOperationsExtensions
/// Delete the Provisioning Service Certificate.
///
///
- /// Deletes the specified certificate assosciated with the Provisioning Service
+ /// Deletes the specified certificate associated with the Provisioning Service
///
///
/// The operations group for this extension method.
@@ -246,6 +246,46 @@ public static partial class DpsCertificateOperationsExtensions
(await operations.DeleteWithHttpMessagesAsync(resourceGroupName, ifMatch, provisioningServiceName, certificateName, certificatename, certificaterawBytes, certificateisVerified, certificatepurpose, certificatecreated, certificatelastUpdated, certificatehasPrivateKey, certificatenonce, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Get all the certificates tied to the provisioning service.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of resource group.
+ ///
+ ///
+ /// Name of provisioning service to retrieve certificates for.
+ ///
+ public static CertificateListDescription List(this IDpsCertificateOperations operations, string resourceGroupName, string provisioningServiceName)
+ {
+ return operations.ListAsync(resourceGroupName, provisioningServiceName).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Get all the certificates tied to the provisioning service.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// Name of resource group.
+ ///
+ ///
+ /// Name of provisioning service to retrieve certificates for.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ListAsync(this IDpsCertificateOperations operations, string resourceGroupName, string provisioningServiceName, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, provisioningServiceName, null, cancellationToken).ConfigureAwait(false))
+ {
+ return _result.Body;
+ }
+ }
+
///
/// Generate verification code for Proof of Possession.
///
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificatesOperations.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificatesOperations.cs
deleted file mode 100644
index f7c906bfd248..000000000000
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificatesOperations.cs
+++ /dev/null
@@ -1,245 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.DeviceProvisioningServices
-{
- 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;
-
- ///
- /// DpsCertificatesOperations operations.
- ///
- internal partial class DpsCertificatesOperations : IServiceOperations, IDpsCertificatesOperations
- {
- ///
- /// Initializes a new instance of the DpsCertificatesOperations class.
- ///
- ///
- /// Reference to the service client.
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- internal DpsCertificatesOperations(IotDpsClient client)
- {
- if (client == null)
- {
- throw new System.ArgumentNullException("client");
- }
- Client = client;
- }
-
- ///
- /// Gets a reference to the IotDpsClient
- ///
- public IotDpsClient Client { get; private set; }
-
- ///
- /// Get all the certificates tied to the provisioning service.
- ///
- ///
- /// Name of resource group.
- ///
- ///
- /// Name of provisioning service to retrieve certificates for.
- ///
- ///
- /// Headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- ///
- /// A response object containing the response body and response headers.
- ///
- public async Task> ListWithHttpMessagesAsync(string resourceGroupName, string provisioningServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (Client.SubscriptionId == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
- }
- if (resourceGroupName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
- }
- if (provisioningServiceName == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "provisioningServiceName");
- }
- if (Client.ApiVersion == null)
- {
- throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
- }
- // Tracing
- bool _shouldTrace = ServiceClientTracing.IsEnabled;
- string _invocationId = null;
- if (_shouldTrace)
- {
- _invocationId = ServiceClientTracing.NextInvocationId.ToString();
- Dictionary tracingParameters = new Dictionary();
- tracingParameters.Add("resourceGroupName", resourceGroupName);
- tracingParameters.Add("provisioningServiceName", provisioningServiceName);
- tracingParameters.Add("cancellationToken", cancellationToken);
- ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters);
- }
- // Construct URL
- var _baseUrl = Client.BaseUri.AbsoluteUri;
- var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates").ToString();
- _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
- _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
- _url = _url.Replace("{provisioningServiceName}", System.Uri.EscapeDataString(provisioningServiceName));
- 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 ErrorDetailsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
- try
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- ErrorDetails _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- if (_errorBody != null)
- {
- ex.Body = _errorBody;
- }
- }
- catch (JsonException)
- {
- // Ignore the exception
- }
- ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
- ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
- if (_shouldTrace)
- {
- ServiceClientTracing.Error(_invocationId, ex);
- }
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw ex;
- }
- // Create Result
- var _result = new AzureOperationResponse();
- _result.Request = _httpRequest;
- _result.Response = _httpResponse;
- if (_httpResponse.Headers.Contains("x-ms-request-id"))
- {
- _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
- }
- // Deserialize Response
- if ((int)_statusCode == 200)
- {
- _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
- try
- {
- _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
- }
- catch (JsonException ex)
- {
- _httpRequest.Dispose();
- if (_httpResponse != null)
- {
- _httpResponse.Dispose();
- }
- throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
- }
- }
- if (_shouldTrace)
- {
- ServiceClientTracing.Exit(_invocationId, _result);
- }
- return _result;
- }
-
- }
-}
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificatesOperationsExtensions.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificatesOperationsExtensions.cs
deleted file mode 100644
index 60f5aaa3abeb..000000000000
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/DpsCertificatesOperationsExtensions.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.DeviceProvisioningServices
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// Extension methods for DpsCertificatesOperations.
- ///
- public static partial class DpsCertificatesOperationsExtensions
- {
- ///
- /// Get all the certificates tied to the provisioning service.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Name of resource group.
- ///
- ///
- /// Name of provisioning service to retrieve certificates for.
- ///
- public static CertificateListDescription List(this IDpsCertificatesOperations operations, string resourceGroupName, string provisioningServiceName)
- {
- return operations.ListAsync(resourceGroupName, provisioningServiceName).GetAwaiter().GetResult();
- }
-
- ///
- /// Get all the certificates tied to the provisioning service.
- ///
- ///
- /// The operations group for this extension method.
- ///
- ///
- /// Name of resource group.
- ///
- ///
- /// Name of provisioning service to retrieve certificates for.
- ///
- ///
- /// The cancellation token.
- ///
- public static async Task ListAsync(this IDpsCertificatesOperations operations, string resourceGroupName, string provisioningServiceName, CancellationToken cancellationToken = default(CancellationToken))
- {
- using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, provisioningServiceName, null, cancellationToken).ConfigureAwait(false))
- {
- return _result.Body;
- }
- }
-
- }
-}
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IDpsCertificateOperations.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IDpsCertificateOperations.cs
index 1fa168aa1853..9a46d3ad6377 100644
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IDpsCertificateOperations.cs
+++ b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IDpsCertificateOperations.cs
@@ -97,7 +97,7 @@ public partial interface IDpsCertificateOperations
/// Delete the Provisioning Service Certificate.
///
///
- /// Deletes the specified certificate assosciated with the Provisioning
+ /// Deletes the specified certificate associated with the Provisioning
/// Service
///
///
@@ -154,6 +154,31 @@ public partial interface IDpsCertificateOperations
///
Task DeleteWithHttpMessagesAsync(string resourceGroupName, string ifMatch, string provisioningServiceName, string certificateName, string certificatename = default(string), byte[] certificaterawBytes = default(byte[]), bool? certificateisVerified = default(bool?), string certificatepurpose = default(string), System.DateTime? certificatecreated = default(System.DateTime?), System.DateTime? certificatelastUpdated = default(System.DateTime?), bool? certificatehasPrivateKey = default(bool?), string certificatenonce = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Get all the certificates tied to the provisioning service.
+ ///
+ ///
+ /// Name of resource group.
+ ///
+ ///
+ /// Name of provisioning service to retrieve certificates for.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when unable to deserialize the response
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task> ListWithHttpMessagesAsync(string resourceGroupName, string provisioningServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Generate verification code for Proof of Possession.
///
///
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IDpsCertificatesOperations.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IDpsCertificatesOperations.cs
deleted file mode 100644
index 4a08b9116496..000000000000
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IDpsCertificatesOperations.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License. See License.txt in the project root for
-// license information.
-//
-// Code generated by Microsoft (R) AutoRest Code Generator.
-// Changes may cause incorrect behavior and will be lost if the code is
-// regenerated.
-//
-
-namespace Microsoft.Azure.Management.DeviceProvisioningServices
-{
- using Microsoft.Rest;
- using Microsoft.Rest.Azure;
- using Models;
- using System.Collections;
- using System.Collections.Generic;
- using System.Threading;
- using System.Threading.Tasks;
-
- ///
- /// DpsCertificatesOperations operations.
- ///
- public partial interface IDpsCertificatesOperations
- {
- ///
- /// Get all the certificates tied to the provisioning service.
- ///
- ///
- /// Name of resource group.
- ///
- ///
- /// Name of provisioning service to retrieve certificates for.
- ///
- ///
- /// The headers that will be added to request.
- ///
- ///
- /// The cancellation token.
- ///
- ///
- /// Thrown when the operation returned an invalid status code
- ///
- ///
- /// Thrown when unable to deserialize the response
- ///
- ///
- /// Thrown when a required parameter is null
- ///
- Task> ListWithHttpMessagesAsync(string resourceGroupName, string provisioningServiceName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
- }
-}
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IIotDpsClient.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IIotDpsClient.cs
index 90bb04df9dd4..c8d8617c8462 100644
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IIotDpsClient.cs
+++ b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IIotDpsClient.cs
@@ -51,19 +51,20 @@ public partial interface IIotDpsClient : System.IDisposable
string ApiVersion { get; }
///
- /// Gets or sets the preferred language for the response.
+ /// The preferred language for the response.
///
string AcceptLanguage { get; set; }
///
- /// Gets or sets the retry timeout in seconds for Long Running
- /// Operations. Default value is 30.
+ /// The retry timeout in seconds for Long Running Operations. Default
+ /// value is 30.
///
int? LongRunningOperationRetryTimeout { get; set; }
///
- /// When set to true a unique x-ms-client-request-id value is generated
- /// and included in each request. Default is true.
+ /// Whether a unique x-ms-client-request-id should be generated. When
+ /// set to true a unique x-ms-client-request-id value is generated and
+ /// included in each request. Default is true.
///
bool? GenerateClientRequestId { get; set; }
@@ -83,10 +84,5 @@ public partial interface IIotDpsClient : System.IDisposable
///
IIotDpsResourceOperations IotDpsResource { get; }
- ///
- /// Gets the IDpsCertificatesOperations.
- ///
- IDpsCertificatesOperations DpsCertificates { get; }
-
}
}
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IotDpsClient.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IotDpsClient.cs
index 1077c59836fa..7befda424879 100644
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IotDpsClient.cs
+++ b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/IotDpsClient.cs
@@ -57,19 +57,20 @@ public partial class IotDpsClient : ServiceClient, IIotDpsClient,
public string ApiVersion { get; private set; }
///
- /// Gets or sets the preferred language for the response.
+ /// The preferred language for the response.
///
public string AcceptLanguage { get; set; }
///
- /// Gets or sets the retry timeout in seconds for Long Running Operations.
- /// Default value is 30.
+ /// The retry timeout in seconds for Long Running Operations. Default value is
+ /// 30.
///
public int? LongRunningOperationRetryTimeout { get; set; }
///
- /// When set to true a unique x-ms-client-request-id value is generated and
- /// included in each request. Default is true.
+ /// Whether a unique x-ms-client-request-id should be generated. When set to
+ /// true a unique x-ms-client-request-id value is generated and included in
+ /// each request. Default is true.
///
public bool? GenerateClientRequestId { get; set; }
@@ -89,9 +90,17 @@ public partial class IotDpsClient : ServiceClient, IIotDpsClient,
public virtual IIotDpsResourceOperations IotDpsResource { get; private set; }
///
- /// Gets the IDpsCertificatesOperations.
+ /// Initializes a new instance of the IotDpsClient class.
///
- public virtual IDpsCertificatesOperations DpsCertificates { get; private set; }
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling IotDpsClient.Dispose(). False: will not dispose provided httpClient
+ protected IotDpsClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient)
+ {
+ Initialize();
+ }
///
/// Initializes a new instance of the IotDpsClient class.
@@ -188,6 +197,33 @@ public IotDpsClient(ServiceClientCredentials credentials, params DelegatingHandl
}
}
+ ///
+ /// Initializes a new instance of the IotDpsClient class.
+ ///
+ ///
+ /// Required. Credentials needed for the client to connect to Azure.
+ ///
+ ///
+ /// HttpClient to be used
+ ///
+ ///
+ /// True: will dispose the provided httpClient on calling IotDpsClient.Dispose(). False: will not dispose provided httpClient
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ public IotDpsClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient)
+ {
+ if (credentials == null)
+ {
+ throw new System.ArgumentNullException("credentials");
+ }
+ Credentials = credentials;
+ if (Credentials != null)
+ {
+ Credentials.InitializeServiceClient(this);
+ }
+ }
+
///
/// Initializes a new instance of the IotDpsClient class.
///
@@ -297,9 +333,8 @@ private void Initialize()
Operations = new Operations(this);
DpsCertificate = new DpsCertificateOperations(this);
IotDpsResource = new IotDpsResourceOperations(this);
- DpsCertificates = new DpsCertificatesOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2017-11-15";
+ ApiVersion = "2018-01-22";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/ErrorDetails.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/ErrorDetails.cs
index 80bf511666df..0568f50d8561 100644
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/ErrorDetails.cs
+++ b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/ErrorDetails.cs
@@ -50,25 +50,25 @@ public ErrorDetails()
///
/// Gets the error code.
///
- [JsonProperty(PropertyName = "Code")]
+ [JsonProperty(PropertyName = "code")]
public string Code { get; private set; }
///
/// Gets the HTTP status code.
///
- [JsonProperty(PropertyName = "HttpStatusCode")]
+ [JsonProperty(PropertyName = "httpStatusCode")]
public string HttpStatusCode { get; private set; }
///
/// Gets the error message.
///
- [JsonProperty(PropertyName = "Message")]
+ [JsonProperty(PropertyName = "message")]
public string Message { get; private set; }
///
/// Gets the error details.
///
- [JsonProperty(PropertyName = "Details")]
+ [JsonProperty(PropertyName = "details")]
public string Details { get; private set; }
}
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/IotDpsPropertiesDescription.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/IotDpsPropertiesDescription.cs
index dee983613f06..3788f433f112 100644
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/IotDpsPropertiesDescription.cs
+++ b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/IotDpsPropertiesDescription.cs
@@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.DeviceProvisioningServices.Models
using System.Linq;
///
- /// the service specific properties of a provisoning service, including
+ /// the service specific properties of a provisioning service, including
/// keys, linked iot hubs, current state, and system generated properties
/// such as hostname and idScope
///
@@ -42,7 +42,7 @@ public IotDpsPropertiesDescription()
/// 'FailoverFailed'
/// The ARM provisioning state of the
/// provisioning service.
- /// List of IoT hubs assosciated with this
+ /// List of IoT hubs associated with this
/// provisioning service.
/// Allocation policy to be used by this
/// provisioning service. Possible values include: 'Hashed',
@@ -91,7 +91,7 @@ public IotDpsPropertiesDescription()
public string ProvisioningState { get; set; }
///
- /// Gets or sets list of IoT hubs assosciated with this provisioning
+ /// Gets or sets list of IoT hubs associated with this provisioning
/// service.
///
[JsonProperty(PropertyName = "iotHubs")]
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/IotDpsSkuDefinition.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/IotDpsSkuDefinition.cs
index 9cd9ba2244d4..299b122eaf11 100644
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/IotDpsSkuDefinition.cs
+++ b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/IotDpsSkuDefinition.cs
@@ -14,7 +14,7 @@ namespace Microsoft.Azure.Management.DeviceProvisioningServices.Models
using System.Linq;
///
- /// Available Sku's of tier and units.
+ /// Available SKUs of tier and units.
///
public partial class IotDpsSkuDefinition
{
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/IotDpsSkuInfo.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/IotDpsSkuInfo.cs
index 6b0738f5cda6..2298cbd19cd5 100644
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/IotDpsSkuInfo.cs
+++ b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/IotDpsSkuInfo.cs
@@ -14,7 +14,7 @@ namespace Microsoft.Azure.Management.DeviceProvisioningServices.Models
using System.Linq;
///
- /// List of possible provisoning service SKUs.
+ /// List of possible provisioning service SKUs.
///
public partial class IotDpsSkuInfo
{
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/NameAvailabilityInfo.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/NameAvailabilityInfo.cs
index 12125656a6c0..51623c28e5b0 100644
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/NameAvailabilityInfo.cs
+++ b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/Models/NameAvailabilityInfo.cs
@@ -33,7 +33,7 @@ public NameAvailabilityInfo()
/// not
/// specifies the reason a name is unavailable.
/// Possible values include: 'Invalid', 'AlreadyExists'
- /// message containing a etailed reason name is
+ /// message containing a detailed reason name is
/// unavailable
public NameAvailabilityInfo(bool? nameAvailable = default(bool?), string reason = default(string), string message = default(string))
{
@@ -62,7 +62,7 @@ public NameAvailabilityInfo()
public string Reason { get; set; }
///
- /// Gets or sets message containing a etailed reason name is
+ /// Gets or sets message containing a detailed reason name is
/// unavailable
///
[JsonProperty(PropertyName = "message")]
diff --git a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/SdkInfo_iotDpsClient.cs b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/SdkInfo_iotDpsClient.cs
index e0e84a89f3de..2d72324a32a3 100644
--- a/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/SdkInfo_iotDpsClient.cs
+++ b/sdk/deviceprovisioningservices/Microsoft.Azure.Management.DeviceProvisioningServices/src/Generated/SdkInfo_iotDpsClient.cs
@@ -1,21 +1,29 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
-internal static partial class SdkInfo
+namespace Microsoft.Azure.Management.DeviceProvisioningServices
{
- public static IEnumerable> ApiInfo_iotDpsClient
- {
- get
- {
- return new Tuple[]
- {
- new Tuple("Devices", "DpsCertificate", "2017-11-15"),
- new Tuple("Devices", "DpsCertificates", "2017-11-15"),
- new Tuple("Devices", "IotDpsResource", "2017-11-15"),
- new Tuple("Devices", "Operations", "2017-11-15"),
- }.AsEnumerable();
- }
- }
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ internal static partial class SdkInfo
+ {
+ public static IEnumerable> ApiInfo_iotDpsClient
+ {
+ get
+ {
+ return new Tuple[]
+ {
+ new Tuple("Devices", "DpsCertificate", "2018-01-22"),
+ new Tuple("Devices", "IotDpsResource", "2018-01-22"),
+ new Tuple("Devices", "Operations", "2018-01-22"),
+ }.AsEnumerable();
+ }
+ }
+ }
}