diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/DataBoxManagementClient.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/DataBoxManagementClient.cs index b641c5bd90d2..c679891ccf6e 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/DataBoxManagementClient.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/DataBoxManagementClient.cs @@ -20,6 +20,8 @@ namespace Microsoft.Azure.Management.DataBox using System.Linq; using System.Net; using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; public partial class DataBoxManagementClient : ServiceClient, IDataBoxManagementClient, IAzureClient { @@ -331,7 +333,7 @@ private void Initialize() Jobs = new JobsOperations(this); Service = new ServiceOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2020-11-01"; + ApiVersion = "2021-08-01-preview"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; @@ -365,6 +367,8 @@ private void Initialize() DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("copyLogDetailsType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("dataAccountType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("dataAccountType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("datacenterAddressType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("datacenterAddressType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("jobDetailsType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("jobDetailsType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("jobSecretsType")); @@ -381,5 +385,205 @@ private void Initialize() DeserializationSettings.Converters.Add(new TransformationJsonConverter()); DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); } + /// + /// Request to mitigate for a given job + /// + /// + /// The name of the job Resource within the specified resource group. job names + /// must be between 3 and 24 characters in length and use any alphanumeric and + /// underscore only + /// + /// + /// The Resource Group Name + /// + /// + /// Resolution code for the job. Possible values include: 'None', + /// 'MoveToCleanUpDevice', 'Resume' + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task MitigateWithHttpMessagesAsync(string jobName, string resourceGroupName, CustomerResolutionCode customerResolutionCode, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + if (jobName != null) + { + if (jobName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "jobName", 24); + } + if (jobName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "jobName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(jobName, "^[-\\w\\.]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "jobName", "^[-\\w\\.]+$"); + } + } + if (SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); + } + MitigateJobRequest mitigateJobRequest = new MitigateJobRequest(); + mitigateJobRequest.CustomerResolutionCode = customerResolutionCode; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("mitigateJobRequest", mitigateJobRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "Mitigate", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate").ToString(); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(mitigateJobRequest != null) + { + _requestContent = SafeJsonConvert.SerializeObject(mitigateJobRequest, 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 (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 204) + { + var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ApiError _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + } } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/DataBoxManagementClientExtensions.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/DataBoxManagementClientExtensions.cs new file mode 100644 index 000000000000..e442b67422d3 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/DataBoxManagementClientExtensions.cs @@ -0,0 +1,74 @@ +// +// 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.DataBox +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for DataBoxManagementClient. + /// + public static partial class DataBoxManagementClientExtensions + { + /// + /// Request to mitigate for a given job + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the job Resource within the specified resource group. job names + /// must be between 3 and 24 characters in length and use any alphanumeric and + /// underscore only + /// + /// + /// The Resource Group Name + /// + /// + /// Resolution code for the job. Possible values include: 'None', + /// 'MoveToCleanUpDevice', 'Resume' + /// + public static void Mitigate(this IDataBoxManagementClient operations, string jobName, string resourceGroupName, CustomerResolutionCode customerResolutionCode) + { + operations.MitigateAsync(jobName, resourceGroupName, customerResolutionCode).GetAwaiter().GetResult(); + } + + /// + /// Request to mitigate for a given job + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the job Resource within the specified resource group. job names + /// must be between 3 and 24 characters in length and use any alphanumeric and + /// underscore only + /// + /// + /// The Resource Group Name + /// + /// + /// Resolution code for the job. Possible values include: 'None', + /// 'MoveToCleanUpDevice', 'Resume' + /// + /// + /// The cancellation token. + /// + public static async Task MitigateAsync(this IDataBoxManagementClient operations, string jobName, string resourceGroupName, CustomerResolutionCode customerResolutionCode, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.MitigateWithHttpMessagesAsync(jobName, resourceGroupName, customerResolutionCode, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/IDataBoxManagementClient.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/IDataBoxManagementClient.cs index ec30deccb0cf..e6f29f60acc4 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/IDataBoxManagementClient.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/IDataBoxManagementClient.cs @@ -14,6 +14,10 @@ namespace Microsoft.Azure.Management.DataBox using Microsoft.Rest.Azure; using Models; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; /// /// @@ -83,5 +87,28 @@ public partial interface IDataBoxManagementClient : System.IDisposable /// IServiceOperations Service { get; } + /// + /// Request to mitigate for a given job + /// + /// + /// The name of the job Resource within the specified resource group. + /// job names must be between 3 and 24 characters in length and use any + /// alphanumeric and underscore only + /// + /// + /// The Resource Group Name + /// + /// + /// Resolution code for the job. Possible values include: 'None', + /// 'MoveToCleanUpDevice', 'Resume' + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task MitigateWithHttpMessagesAsync(string jobName, string resourceGroupName, CustomerResolutionCode customerResolutionCode, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/IJobsOperations.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/IJobsOperations.cs index 6e1f0f2afd0b..d3419378d8bd 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/IJobsOperations.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/IJobsOperations.cs @@ -47,6 +47,33 @@ public partial interface IJobsOperations /// Task>> ListWithHttpMessagesAsync(string skipToken = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Request to mark devices for a given job as shipped + /// + /// + /// The name of the job Resource within the specified resource group. + /// job names must be between 3 and 24 characters in length and use any + /// alphanumeric and underscore only + /// + /// + /// The Resource Group Name + /// + /// + /// Delivery package details + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + Task MarkDevicesShippedWithHttpMessagesAsync(string jobName, string resourceGroupName, PackageCarrierInfo deliverToDcPackageDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Lists all the jobs available under the given resource group. /// /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/IServiceOperations.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/IServiceOperations.cs index c672ac1f8f3e..ae151f966e20 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/IServiceOperations.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/IServiceOperations.cs @@ -142,11 +142,8 @@ public partial interface IServiceOperations /// /// The location of the resource /// - /// - /// Request body to get the availability for scheduling orders. - /// - /// - /// Request body to get the transport availability for given sku. + /// + /// Request body to get the configuration for the region. /// /// /// The headers that will be added to request. @@ -163,7 +160,7 @@ public partial interface IServiceOperations /// /// Thrown when a required parameter is null /// - Task> RegionConfigurationWithHttpMessagesAsync(string location, ScheduleAvailabilityRequest scheduleAvailabilityRequest = default(ScheduleAvailabilityRequest), TransportAvailabilityRequest transportAvailabilityRequest = default(TransportAvailabilityRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> RegionConfigurationWithHttpMessagesAsync(string location, RegionConfigurationRequest regionConfigurationRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// This API provides configuration details specific to given /// region/location at Resource group level. @@ -174,11 +171,9 @@ public partial interface IServiceOperations /// /// The location of the resource /// - /// - /// Request body to get the availability for scheduling orders. - /// - /// - /// Request body to get the transport availability for given sku. + /// + /// Request body to get the configuration for the region at resource + /// group level. /// /// /// The headers that will be added to request. @@ -195,7 +190,7 @@ public partial interface IServiceOperations /// /// Thrown when a required parameter is null /// - Task> RegionConfigurationByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string location, ScheduleAvailabilityRequest scheduleAvailabilityRequest = default(ScheduleAvailabilityRequest), TransportAvailabilityRequest transportAvailabilityRequest = default(TransportAvailabilityRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> RegionConfigurationByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string location, RegionConfigurationRequest regionConfigurationRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// This method provides the list of available skus for the given /// subscription, resource group and location. diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/JobsOperations.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/JobsOperations.cs index e376e53af4f4..6f47237f81a4 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/JobsOperations.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/JobsOperations.cs @@ -232,6 +232,212 @@ internal JobsOperations(DataBoxManagementClient client) return _result; } + /// + /// Request to mark devices for a given job as shipped + /// + /// + /// The name of the job Resource within the specified resource group. job names + /// must be between 3 and 24 characters in length and use any alphanumeric and + /// underscore only + /// + /// + /// The Resource Group Name + /// + /// + /// Delivery package details + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task MarkDevicesShippedWithHttpMessagesAsync(string jobName, string resourceGroupName, PackageCarrierInfo deliverToDcPackageDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (jobName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "jobName"); + } + if (jobName != null) + { + if (jobName.Length > 24) + { + throw new ValidationException(ValidationRules.MaxLength, "jobName", 24); + } + if (jobName.Length < 3) + { + throw new ValidationException(ValidationRules.MinLength, "jobName", 3); + } + if (!System.Text.RegularExpressions.Regex.IsMatch(jobName, "^[-\\w\\.]+$")) + { + throw new ValidationException(ValidationRules.Pattern, "jobName", "^[-\\w\\.]+$"); + } + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (deliverToDcPackageDetails == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "deliverToDcPackageDetails"); + } + MarkDevicesShippedRequest markDevicesShippedRequest = new MarkDevicesShippedRequest(); + if (deliverToDcPackageDetails != null) + { + markDevicesShippedRequest.DeliverToDcPackageDetails = deliverToDcPackageDetails; + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("jobName", jobName); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("markDevicesShippedRequest", markDevicesShippedRequest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "MarkDevicesShipped", 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.DataBox/jobs/{jobName}/markDevicesShipped").ToString(); + _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_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(markDevicesShippedRequest != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(markDevicesShippedRequest, 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 != 204) + { + var ex = new ApiErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ApiError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Lists all the jobs available under the given resource group. /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/JobsOperationsExtensions.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/JobsOperationsExtensions.cs index 385a198feabc..96ffca1009ab 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/JobsOperationsExtensions.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/JobsOperationsExtensions.cs @@ -59,6 +59,53 @@ public static partial class JobsOperationsExtensions } } + /// + /// Request to mark devices for a given job as shipped + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the job Resource within the specified resource group. job names + /// must be between 3 and 24 characters in length and use any alphanumeric and + /// underscore only + /// + /// + /// The Resource Group Name + /// + /// + /// Delivery package details + /// + public static void MarkDevicesShipped(this IJobsOperations operations, string jobName, string resourceGroupName, PackageCarrierInfo deliverToDcPackageDetails) + { + operations.MarkDevicesShippedAsync(jobName, resourceGroupName, deliverToDcPackageDetails).GetAwaiter().GetResult(); + } + + /// + /// Request to mark devices for a given job as shipped + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the job Resource within the specified resource group. job names + /// must be between 3 and 24 characters in length and use any alphanumeric and + /// underscore only + /// + /// + /// The Resource Group Name + /// + /// + /// Delivery package details + /// + /// + /// The cancellation token. + /// + public static async Task MarkDevicesShippedAsync(this IJobsOperations operations, string jobName, string resourceGroupName, PackageCarrierInfo deliverToDcPackageDetails, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.MarkDevicesShippedWithHttpMessagesAsync(jobName, resourceGroupName, deliverToDcPackageDetails, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + /// /// Lists all the jobs available under the given resource group. /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/AddressValidationOutput.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/AddressValidationOutput.cs index 2d235e55e335..c90a18b47c7f 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/AddressValidationOutput.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/AddressValidationOutput.cs @@ -11,7 +11,6 @@ namespace Microsoft.Azure.Management.DataBox.Models { using Microsoft.Rest; - using Microsoft.Rest.Azure; using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/AddressValidationProperties.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/AddressValidationProperties.cs deleted file mode 100644 index bf8333d8a30d..000000000000 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/AddressValidationProperties.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. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.DataBox.Models -{ - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The address validation output. - /// - [Newtonsoft.Json.JsonObject("ValidateAddress")] - public partial class AddressValidationProperties : ValidationInputResponse - { - /// - /// Initializes a new instance of the AddressValidationProperties - /// class. - /// - public AddressValidationProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AddressValidationProperties - /// class. - /// - /// Error code and message of validation - /// response. - /// The address validation status. - /// Possible values include: 'Valid', 'Invalid', 'Ambiguous' - /// List of alternate - /// addresses. - public AddressValidationProperties(CloudError error = default(CloudError), AddressValidationStatus? validationStatus = default(AddressValidationStatus?), IList alternateAddresses = default(IList)) - : base(error) - { - ValidationStatus = validationStatus; - AlternateAddresses = alternateAddresses; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the address validation status. Possible values include: - /// 'Valid', 'Invalid', 'Ambiguous' - /// - [JsonProperty(PropertyName = "validationStatus")] - public AddressValidationStatus? ValidationStatus { get; private set; } - - /// - /// Gets list of alternate addresses. - /// - [JsonProperty(PropertyName = "alternateAddresses")] - public IList AlternateAddresses { get; private set; } - - } -} \ No newline at end of file diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ClassDiscriminator.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ClassDiscriminator.cs deleted file mode 100644 index d6059f81a2af..000000000000 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ClassDiscriminator.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.DataBox.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ClassDiscriminator. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ClassDiscriminator - { - /// - /// Data Box orders. - /// - [EnumMember(Value = "DataBox")] - DataBox, - /// - /// Data Box Disk orders. - /// - [EnumMember(Value = "DataBoxDisk")] - DataBoxDisk, - /// - /// Data Box Heavy orders. - /// - [EnumMember(Value = "DataBoxHeavy")] - DataBoxHeavy - } - internal static class ClassDiscriminatorEnumExtension - { - internal static string ToSerializedValue(this ClassDiscriminator? value) - { - return value == null ? null : ((ClassDiscriminator)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ClassDiscriminator value) - { - switch( value ) - { - case ClassDiscriminator.DataBox: - return "DataBox"; - case ClassDiscriminator.DataBoxDisk: - return "DataBoxDisk"; - case ClassDiscriminator.DataBoxHeavy: - return "DataBoxHeavy"; - } - return null; - } - - internal static ClassDiscriminator? ParseClassDiscriminator(this string value) - { - switch( value ) - { - case "DataBox": - return ClassDiscriminator.DataBox; - case "DataBoxDisk": - return ClassDiscriminator.DataBoxDisk; - case "DataBoxHeavy": - return ClassDiscriminator.DataBoxHeavy; - } - return null; - } - } -} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CopyLogDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CopyLogDetails.cs index 35fdb61cfb94..7740e3605483 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CopyLogDetails.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CopyLogDetails.cs @@ -10,13 +10,11 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Newtonsoft.Json; using System.Linq; /// /// Details for log generated during copy. /// - [Newtonsoft.Json.JsonObject("CopyLogDetails")] public partial class CopyLogDetails { /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CopyStatus.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CopyStatus.cs index f159af11832b..7e1a927581bd 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CopyStatus.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CopyStatus.cs @@ -10,138 +10,83 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for CopyStatus. /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CopyStatus + public static class CopyStatus { /// /// Data copy hasn't started yet. /// - [EnumMember(Value = "NotStarted")] - NotStarted, + public const string NotStarted = "NotStarted"; /// /// Data copy is in progress. /// - [EnumMember(Value = "InProgress")] - InProgress, + public const string InProgress = "InProgress"; /// /// Data copy completed. /// - [EnumMember(Value = "Completed")] - Completed, + public const string Completed = "Completed"; /// /// Data copy completed with errors. /// - [EnumMember(Value = "CompletedWithErrors")] - CompletedWithErrors, + public const string CompletedWithErrors = "CompletedWithErrors"; /// /// Data copy failed. No data was copied. /// - [EnumMember(Value = "Failed")] - Failed, + public const string Failed = "Failed"; /// /// No copy triggered as device was not returned. /// - [EnumMember(Value = "NotReturned")] - NotReturned, + public const string NotReturned = "NotReturned"; /// /// The Device has hit hardware issues. /// - [EnumMember(Value = "HardwareError")] - HardwareError, + public const string HardwareError = "HardwareError"; /// /// Data copy failed. The Device was formatted by user. /// - [EnumMember(Value = "DeviceFormatted")] - DeviceFormatted, + public const string DeviceFormatted = "DeviceFormatted"; /// /// Data copy failed. Device metadata was modified by user. /// - [EnumMember(Value = "DeviceMetadataModified")] - DeviceMetadataModified, + public const string DeviceMetadataModified = "DeviceMetadataModified"; /// /// Data copy failed. Storage Account was not accessible during copy. /// - [EnumMember(Value = "StorageAccountNotAccessible")] - StorageAccountNotAccessible, + public const string StorageAccountNotAccessible = "StorageAccountNotAccessible"; /// /// Data copy failed. The Device data content is not supported. /// - [EnumMember(Value = "UnsupportedData")] - UnsupportedData - } - internal static class CopyStatusEnumExtension - { - internal static string ToSerializedValue(this CopyStatus? value) - { - return value == null ? null : ((CopyStatus)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this CopyStatus value) - { - switch( value ) - { - case CopyStatus.NotStarted: - return "NotStarted"; - case CopyStatus.InProgress: - return "InProgress"; - case CopyStatus.Completed: - return "Completed"; - case CopyStatus.CompletedWithErrors: - return "CompletedWithErrors"; - case CopyStatus.Failed: - return "Failed"; - case CopyStatus.NotReturned: - return "NotReturned"; - case CopyStatus.HardwareError: - return "HardwareError"; - case CopyStatus.DeviceFormatted: - return "DeviceFormatted"; - case CopyStatus.DeviceMetadataModified: - return "DeviceMetadataModified"; - case CopyStatus.StorageAccountNotAccessible: - return "StorageAccountNotAccessible"; - case CopyStatus.UnsupportedData: - return "UnsupportedData"; - } - return null; - } - - internal static CopyStatus? ParseCopyStatus(this string value) - { - switch( value ) - { - case "NotStarted": - return CopyStatus.NotStarted; - case "InProgress": - return CopyStatus.InProgress; - case "Completed": - return CopyStatus.Completed; - case "CompletedWithErrors": - return CopyStatus.CompletedWithErrors; - case "Failed": - return CopyStatus.Failed; - case "NotReturned": - return CopyStatus.NotReturned; - case "HardwareError": - return CopyStatus.HardwareError; - case "DeviceFormatted": - return CopyStatus.DeviceFormatted; - case "DeviceMetadataModified": - return CopyStatus.DeviceMetadataModified; - case "StorageAccountNotAccessible": - return CopyStatus.StorageAccountNotAccessible; - case "UnsupportedData": - return CopyStatus.UnsupportedData; - } - return null; - } + public const string UnsupportedData = "UnsupportedData"; + /// + /// No copy triggered as device was not received. + /// + public const string DriveNotReceived = "DriveNotReceived"; + /// + /// No copy triggered as device type is not supported. + /// + public const string UnsupportedDrive = "UnsupportedDrive"; + /// + /// Copy failed due to service error. + /// + public const string OtherServiceError = "OtherServiceError"; + /// + /// Copy failed due to user error. + /// + public const string OtherUserError = "OtherUserError"; + /// + /// Copy failed due to disk detection error. + /// + public const string DriveNotDetected = "DriveNotDetected"; + /// + /// Copy failed due to corrupted drive. + /// + public const string DriveCorrupted = "DriveCorrupted"; + /// + /// Copy failed due to modified or removed metadata files. + /// + public const string MetadataFilesModifiedOrRemoved = "MetadataFilesModifiedOrRemoved"; } } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationRequest.cs index 40c45e8828d5..61a80656b83d 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationRequest.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationRequest.cs @@ -33,8 +33,8 @@ public CreateOrderLimitForSubscriptionValidationRequest() /// CreateOrderLimitForSubscriptionValidationRequest class. /// /// Device type to be used for the job. - /// Possible values include: 'DataBox', 'DataBoxDisk', - /// 'DataBoxHeavy' + /// Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', + /// 'DataBoxCustomerDisk' public CreateOrderLimitForSubscriptionValidationRequest(SkuName deviceType) { DeviceType = deviceType; @@ -48,7 +48,8 @@ public CreateOrderLimitForSubscriptionValidationRequest(SkuName deviceType) /// /// Gets or sets device type to be used for the job. Possible values - /// include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + /// include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', + /// 'DataBoxCustomerDisk' /// [JsonProperty(PropertyName = "deviceType")] public SkuName DeviceType { get; set; } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationResponseProperties.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationResponseProperties.cs index ebf921436c6b..09a8091a2d1b 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationResponseProperties.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CreateOrderLimitForSubscriptionValidationResponseProperties.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Linq; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CustomerDiskJobSecrets.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CustomerDiskJobSecrets.cs new file mode 100644 index 000000000000..bd8cba6c1fcd --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CustomerDiskJobSecrets.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.DataBox.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// The secrets related to customer disk job. + /// + [Newtonsoft.Json.JsonObject("DataBoxCustomerDisk")] + public partial class CustomerDiskJobSecrets : JobSecrets + { + /// + /// Initializes a new instance of the CustomerDiskJobSecrets class. + /// + public CustomerDiskJobSecrets() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CustomerDiskJobSecrets class. + /// + /// Dc Access Security Code for + /// Customer Managed Shipping + /// Error while fetching the secrets. + /// Contains the list of secrets object for + /// that device. + /// Carrier Account Number of the + /// customer + public CustomerDiskJobSecrets(DcAccessSecurityCode dcAccessSecurityCode = default(DcAccessSecurityCode), CloudError error = default(CloudError), IList diskSecrets = default(IList), string carrierAccountNumber = default(string)) + : base(dcAccessSecurityCode, error) + { + DiskSecrets = diskSecrets; + CarrierAccountNumber = carrierAccountNumber; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets contains the list of secrets object for that device. + /// + [JsonProperty(PropertyName = "diskSecrets")] + public IList DiskSecrets { get; private set; } + + /// + /// Gets carrier Account Number of the customer + /// + [JsonProperty(PropertyName = "carrierAccountNumber")] + public string CarrierAccountNumber { get; private set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CustomerResolutionCode.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CustomerResolutionCode.cs new file mode 100644 index 000000000000..33fc02948aec --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CustomerResolutionCode.cs @@ -0,0 +1,75 @@ +// +// 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.DataBox.Models +{ + using Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for CustomerResolutionCode. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum CustomerResolutionCode + { + /// + /// No Resolution Yet + /// + [EnumMember(Value = "None")] + None, + /// + /// Clean the device + /// + [EnumMember(Value = "MoveToCleanUpDevice")] + MoveToCleanUpDevice, + /// + /// Resume the job to same stage + /// + [EnumMember(Value = "Resume")] + Resume + } + internal static class CustomerResolutionCodeEnumExtension + { + internal static string ToSerializedValue(this CustomerResolutionCode? value) + { + return value == null ? null : ((CustomerResolutionCode)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this CustomerResolutionCode value) + { + switch( value ) + { + case CustomerResolutionCode.None: + return "None"; + case CustomerResolutionCode.MoveToCleanUpDevice: + return "MoveToCleanUpDevice"; + case CustomerResolutionCode.Resume: + return "Resume"; + } + return null; + } + + internal static CustomerResolutionCode? ParseCustomerResolutionCode(this string value) + { + switch( value ) + { + case "None": + return CustomerResolutionCode.None; + case "MoveToCleanUpDevice": + return CustomerResolutionCode.MoveToCleanUpDevice; + case "Resume": + return CustomerResolutionCode.Resume; + } + return null; + } + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataAccountDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataAccountDetails.cs index 8006c2f5961c..f9f0018e2cd5 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataAccountDetails.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataAccountDetails.cs @@ -16,7 +16,6 @@ namespace Microsoft.Azure.Management.DataBox.Models /// /// Account details of the data to be transferred /// - [Newtonsoft.Json.JsonObject("DataAccountDetails")] public partial class DataAccountDetails { /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxCustomerDiskCopyLogDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxCustomerDiskCopyLogDetails.cs new file mode 100644 index 000000000000..d565e13a3574 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxCustomerDiskCopyLogDetails.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.DataBox.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Copy Log Details for customer disk + /// + [Newtonsoft.Json.JsonObject("DataBoxCustomerDisk")] + public partial class DataBoxCustomerDiskCopyLogDetails : CopyLogDetails + { + /// + /// Initializes a new instance of the DataBoxCustomerDiskCopyLogDetails + /// class. + /// + public DataBoxCustomerDiskCopyLogDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataBoxCustomerDiskCopyLogDetails + /// class. + /// + /// Disk Serial Number. + /// Link for copy error logs. + /// Link for copy verbose logs. + public DataBoxCustomerDiskCopyLogDetails(string serialNumber = default(string), string errorLogLink = default(string), string verboseLogLink = default(string)) + { + SerialNumber = serialNumber; + ErrorLogLink = errorLogLink; + VerboseLogLink = verboseLogLink; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets disk Serial Number. + /// + [JsonProperty(PropertyName = "serialNumber")] + public string SerialNumber { get; private set; } + + /// + /// Gets link for copy error logs. + /// + [JsonProperty(PropertyName = "errorLogLink")] + public string ErrorLogLink { get; private set; } + + /// + /// Gets link for copy verbose logs. + /// + [JsonProperty(PropertyName = "verboseLogLink")] + public string VerboseLogLink { get; private set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxCustomerDiskCopyProgress.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxCustomerDiskCopyProgress.cs new file mode 100644 index 000000000000..880f747d58cf --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxCustomerDiskCopyProgress.cs @@ -0,0 +1,108 @@ +// +// 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.DataBox.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// DataBox CustomerDisk Copy Progress + /// + public partial class DataBoxCustomerDiskCopyProgress : CopyProgress + { + /// + /// Initializes a new instance of the DataBoxCustomerDiskCopyProgress + /// class. + /// + public DataBoxCustomerDiskCopyProgress() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataBoxCustomerDiskCopyProgress + /// class. + /// + /// Name of the storage account. This + /// will be empty for data account types other than storage + /// account. + /// Transfer type of data. Possible values + /// include: 'ImportToAzure', 'ExportFromAzure' + /// Data Account Type. Possible values + /// include: 'StorageAccount', 'ManagedDisk' + /// Id of the account where the data needs to + /// be uploaded. + /// To indicate bytes transferred. + /// Total amount of data to be + /// processed by the job. + /// Number of files processed + /// Total files to process + /// Number of files not adhering to + /// azure naming conventions which were processed by automatic + /// renaming + /// Total amount of data not + /// adhering to azure naming conventions which were processed by + /// automatic renaming + /// Number of folders not adhering + /// to azure naming conventions which were processed by automatic + /// renaming + /// Number of files which could not be + /// copied + /// To indicate directories errored + /// out in the job. + /// To indicate directories + /// renamed + /// To indicate if enumeration of + /// data is in progress. + /// Until this is true, the TotalBytesToProcess may not be + /// valid. + /// Disk Serial Number. + /// The Status of the copy. Possible values + /// include: 'NotStarted', 'InProgress', 'Completed', + /// 'CompletedWithErrors', 'Failed', 'NotReturned', 'HardwareError', + /// 'DeviceFormatted', 'DeviceMetadataModified', + /// 'StorageAccountNotAccessible', 'UnsupportedData', + /// 'DriveNotReceived', 'UnsupportedDrive', 'OtherServiceError', + /// 'OtherUserError', 'DriveNotDetected', 'DriveCorrupted', + /// 'MetadataFilesModifiedOrRemoved' + public DataBoxCustomerDiskCopyProgress(string storageAccountName = default(string), TransferType? transferType = default(TransferType?), DataAccountType? dataAccountType = default(DataAccountType?), string accountId = default(string), long? bytesProcessed = default(long?), long? totalBytesToProcess = default(long?), long? filesProcessed = default(long?), long? totalFilesToProcess = default(long?), long? invalidFilesProcessed = default(long?), long? invalidFileBytesUploaded = default(long?), long? renamedContainerCount = default(long?), long? filesErroredOut = default(long?), long? directoriesErroredOut = default(long?), long? invalidDirectoriesProcessed = default(long?), bool? isEnumerationInProgress = default(bool?), string serialNumber = default(string), string copyStatus = default(string)) + : base(storageAccountName, transferType, dataAccountType, accountId, bytesProcessed, totalBytesToProcess, filesProcessed, totalFilesToProcess, invalidFilesProcessed, invalidFileBytesUploaded, renamedContainerCount, filesErroredOut, directoriesErroredOut, invalidDirectoriesProcessed, isEnumerationInProgress) + { + SerialNumber = serialNumber; + CopyStatus = copyStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets disk Serial Number. + /// + [JsonProperty(PropertyName = "serialNumber")] + public string SerialNumber { get; private set; } + + /// + /// Gets the Status of the copy. Possible values include: 'NotStarted', + /// 'InProgress', 'Completed', 'CompletedWithErrors', 'Failed', + /// 'NotReturned', 'HardwareError', 'DeviceFormatted', + /// 'DeviceMetadataModified', 'StorageAccountNotAccessible', + /// 'UnsupportedData', 'DriveNotReceived', 'UnsupportedDrive', + /// 'OtherServiceError', 'OtherUserError', 'DriveNotDetected', + /// 'DriveCorrupted', 'MetadataFilesModifiedOrRemoved' + /// + [JsonProperty(PropertyName = "copyStatus")] + public string CopyStatus { get; private set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxCustomerDiskJobDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxCustomerDiskJobDetails.cs new file mode 100644 index 000000000000..836fa555983d --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxCustomerDiskJobDetails.cs @@ -0,0 +1,167 @@ +// +// 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.DataBox.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Customer disk job details. + /// + [Newtonsoft.Json.JsonObject("DataBoxCustomerDisk")] + public partial class DataBoxCustomerDiskJobDetails : JobDetails + { + /// + /// Initializes a new instance of the DataBoxCustomerDiskJobDetails + /// class. + /// + public DataBoxCustomerDiskJobDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataBoxCustomerDiskJobDetails + /// class. + /// + /// Contact details for notification and + /// shipping. + /// Return package + /// shipping details. + /// List of stages that run in the job. + /// Shipping address of the + /// customer. + /// Delivery package shipping + /// details. + /// Return package shipping + /// details. + /// Details of the data to be imported + /// into azure. + /// Details of the data to be exported + /// from azure. + /// Preferences for the order. + /// List of copy log details. + /// Shared access key to + /// download the return shipment label + /// Shared access key to download + /// the chain of custody logs + /// Details about which key encryption + /// type is being used. + /// The expected size of the + /// data, which needs to be transferred in this job, in + /// terabytes. + /// Available actions on the job. + /// Last mitigation action + /// performed on the job. + /// Datacenter address to ship to, for + /// the given sku and storage location. + /// DataCenter code. Possible values + /// include: 'Invalid', 'BY2', 'BY1', 'ORK70', 'AM2', 'AMS20', 'BY21', + /// 'BY24', 'MWH01', 'AMS06', 'SSE90', 'SYD03', 'SYD23', 'CBR20', + /// 'YTO20', 'CWL20', 'LON24', 'BOM01', 'BL20', 'BL7', 'SEL20', + /// 'TYO01', 'BN1', 'SN5', 'CYS04', 'TYO22', 'YTO21', 'YQB20', 'FRA22', + /// 'MAA01', 'CPQ02', 'CPQ20', 'SIN20', 'HKG20', 'SG2', 'MEL23', + /// 'SEL21', 'OSA20', 'SHA03', 'BJB', 'JNB22', 'JNB21', 'MNZ21', 'SN8', + /// 'AUH20', 'ZRH20', 'PUS20', 'AdHoc', 'CH1', 'DSM05' + /// Contains the map of disk + /// serial number to the disk details for import jobs. + /// Contains the map of disk + /// serial number to the disk details for export jobs. + /// Copy progress per disk. + /// Delivery package shipping + /// details. + /// Flag to indicate if disk + /// manifest should be backed-up in the Storage Account. + public DataBoxCustomerDiskJobDetails(ContactDetails contactDetails, PackageCarrierDetails returnToCustomerPackageDetails, IList jobStages = default(IList), ShippingAddress shippingAddress = default(ShippingAddress), PackageShippingDetails deliveryPackage = default(PackageShippingDetails), PackageShippingDetails returnPackage = default(PackageShippingDetails), IList dataImportDetails = default(IList), IList dataExportDetails = default(IList), Preferences preferences = default(Preferences), IList copyLogDetails = default(IList), string reverseShipmentLabelSasKey = default(string), string chainOfCustodySasKey = default(string), KeyEncryptionKey keyEncryptionKey = default(KeyEncryptionKey), int? expectedDataSizeInTeraBytes = default(int?), IList actions = default(IList), LastMitigationActionOnJob lastMitigationActionOnJob = default(LastMitigationActionOnJob), DatacenterAddressResponse datacenterAddress = default(DatacenterAddressResponse), string dataCenterCode = default(string), IDictionary importDiskDetailsCollection = default(IDictionary), IDictionary exportDiskDetailsCollection = default(IDictionary), IList copyProgress = default(IList), PackageCarrierInfo deliverToDcPackageDetails = default(PackageCarrierInfo), bool? enableManifestBackup = default(bool?)) + : base(contactDetails, jobStages, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, keyEncryptionKey, expectedDataSizeInTeraBytes, actions, lastMitigationActionOnJob, datacenterAddress, dataCenterCode) + { + ImportDiskDetailsCollection = importDiskDetailsCollection; + ExportDiskDetailsCollection = exportDiskDetailsCollection; + CopyProgress = copyProgress; + DeliverToDcPackageDetails = deliverToDcPackageDetails; + ReturnToCustomerPackageDetails = returnToCustomerPackageDetails; + EnableManifestBackup = enableManifestBackup; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets contains the map of disk serial number to the disk + /// details for import jobs. + /// + [JsonProperty(PropertyName = "importDiskDetailsCollection")] + public IDictionary ImportDiskDetailsCollection { get; set; } + + /// + /// Gets contains the map of disk serial number to the disk details for + /// export jobs. + /// + [JsonProperty(PropertyName = "exportDiskDetailsCollection")] + public IDictionary ExportDiskDetailsCollection { get; private set; } + + /// + /// Gets copy progress per disk. + /// + [JsonProperty(PropertyName = "copyProgress")] + public IList CopyProgress { get; private set; } + + /// + /// Gets delivery package shipping details. + /// + [JsonProperty(PropertyName = "deliverToDcPackageDetails")] + public PackageCarrierInfo DeliverToDcPackageDetails { get; private set; } + + /// + /// Gets or sets return package shipping details. + /// + [JsonProperty(PropertyName = "returnToCustomerPackageDetails")] + public PackageCarrierDetails ReturnToCustomerPackageDetails { get; set; } + + /// + /// Gets or sets flag to indicate if disk manifest should be backed-up + /// in the Storage Account. + /// + [JsonProperty(PropertyName = "enableManifestBackup")] + public bool? EnableManifestBackup { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + if (ReturnToCustomerPackageDetails == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ReturnToCustomerPackageDetails"); + } + if (ImportDiskDetailsCollection != null) + { + foreach (var valueElement in ImportDiskDetailsCollection.Values) + { + if (valueElement != null) + { + valueElement.Validate(); + } + } + } + } + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskCopyProgress.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskCopyProgress.cs index e137c3b7481d..bc264fdf5834 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskCopyProgress.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskCopyProgress.cs @@ -38,8 +38,11 @@ public DataBoxDiskCopyProgress() /// include: 'NotStarted', 'InProgress', 'Completed', /// 'CompletedWithErrors', 'Failed', 'NotReturned', 'HardwareError', /// 'DeviceFormatted', 'DeviceMetadataModified', - /// 'StorageAccountNotAccessible', 'UnsupportedData' - public DataBoxDiskCopyProgress(string serialNumber = default(string), long? bytesCopied = default(long?), int? percentComplete = default(int?), CopyStatus? status = default(CopyStatus?)) + /// 'StorageAccountNotAccessible', 'UnsupportedData', + /// 'DriveNotReceived', 'UnsupportedDrive', 'OtherServiceError', + /// 'OtherUserError', 'DriveNotDetected', 'DriveCorrupted', + /// 'MetadataFilesModifiedOrRemoved' + public DataBoxDiskCopyProgress(string serialNumber = default(string), long? bytesCopied = default(long?), int? percentComplete = default(int?), string status = default(string)) { SerialNumber = serialNumber; BytesCopied = bytesCopied; @@ -76,10 +79,12 @@ public DataBoxDiskCopyProgress() /// 'InProgress', 'Completed', 'CompletedWithErrors', 'Failed', /// 'NotReturned', 'HardwareError', 'DeviceFormatted', /// 'DeviceMetadataModified', 'StorageAccountNotAccessible', - /// 'UnsupportedData' + /// 'UnsupportedData', 'DriveNotReceived', 'UnsupportedDrive', + /// 'OtherServiceError', 'OtherUserError', 'DriveNotDetected', + /// 'DriveCorrupted', 'MetadataFilesModifiedOrRemoved' /// [JsonProperty(PropertyName = "status")] - public CopyStatus? Status { get; private set; } + public string Status { get; private set; } } } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskJobDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskJobDetails.cs index 7a8858da1908..da7e300db9fc 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskJobDetails.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskJobDetails.cs @@ -53,9 +53,22 @@ public DataBoxDiskJobDetails() /// the chain of custody logs /// Details about which key encryption /// type is being used. - /// The expected size of the + /// The expected size of the /// data, which needs to be transferred in this job, in /// terabytes. + /// Available actions on the job. + /// Last mitigation action + /// performed on the job. + /// Datacenter address to ship to, for + /// the given sku and storage location. + /// DataCenter code. Possible values + /// include: 'Invalid', 'BY2', 'BY1', 'ORK70', 'AM2', 'AMS20', 'BY21', + /// 'BY24', 'MWH01', 'AMS06', 'SSE90', 'SYD03', 'SYD23', 'CBR20', + /// 'YTO20', 'CWL20', 'LON24', 'BOM01', 'BL20', 'BL7', 'SEL20', + /// 'TYO01', 'BN1', 'SN5', 'CYS04', 'TYO22', 'YTO21', 'YQB20', 'FRA22', + /// 'MAA01', 'CPQ02', 'CPQ20', 'SIN20', 'HKG20', 'SG2', 'MEL23', + /// 'SEL21', 'OSA20', 'SHA03', 'BJB', 'JNB22', 'JNB21', 'MNZ21', 'SN8', + /// 'AUH20', 'ZRH20', 'PUS20', 'AdHoc', 'CH1', 'DSM05' /// User preference on what size disks are /// needed for the job. The map is from the disk size in TB to the /// count. Eg. {2,5} means 5 disks of 2 TB size. Key is string but will @@ -66,8 +79,8 @@ public DataBoxDiskJobDetails() /// after the disks are shipped to the customer. /// User entered passkey for DataBox Disk /// job. - public DataBoxDiskJobDetails(ContactDetails contactDetails, IList jobStages = default(IList), ShippingAddress shippingAddress = default(ShippingAddress), PackageShippingDetails deliveryPackage = default(PackageShippingDetails), PackageShippingDetails returnPackage = default(PackageShippingDetails), IList dataImportDetails = default(IList), IList dataExportDetails = default(IList), Preferences preferences = default(Preferences), IList copyLogDetails = default(IList), string reverseShipmentLabelSasKey = default(string), string chainOfCustodySasKey = default(string), KeyEncryptionKey keyEncryptionKey = default(KeyEncryptionKey), int? expectedDataSizeInTerabytes = default(int?), IDictionary preferredDisks = default(IDictionary), IList copyProgress = default(IList), IDictionary disksAndSizeDetails = default(IDictionary), string passkey = default(string)) - : base(contactDetails, jobStages, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, keyEncryptionKey, expectedDataSizeInTerabytes) + public DataBoxDiskJobDetails(ContactDetails contactDetails, IList jobStages = default(IList), ShippingAddress shippingAddress = default(ShippingAddress), PackageShippingDetails deliveryPackage = default(PackageShippingDetails), PackageShippingDetails returnPackage = default(PackageShippingDetails), IList dataImportDetails = default(IList), IList dataExportDetails = default(IList), Preferences preferences = default(Preferences), IList copyLogDetails = default(IList), string reverseShipmentLabelSasKey = default(string), string chainOfCustodySasKey = default(string), KeyEncryptionKey keyEncryptionKey = default(KeyEncryptionKey), int? expectedDataSizeInTeraBytes = default(int?), IList actions = default(IList), LastMitigationActionOnJob lastMitigationActionOnJob = default(LastMitigationActionOnJob), DatacenterAddressResponse datacenterAddress = default(DatacenterAddressResponse), string dataCenterCode = default(string), IDictionary preferredDisks = default(IDictionary), IList copyProgress = default(IList), IDictionary disksAndSizeDetails = default(IDictionary), string passkey = default(string)) + : base(contactDetails, jobStages, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, keyEncryptionKey, expectedDataSizeInTeraBytes, actions, lastMitigationActionOnJob, datacenterAddress, dataCenterCode) { PreferredDisks = preferredDisks; CopyProgress = copyProgress; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskJobSecrets.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskJobSecrets.cs index 92bf1905382f..ca9d3b765df2 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskJobSecrets.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskJobSecrets.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxHeavyJobDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxHeavyJobDetails.cs index 96b13fb7350e..b2dcd8d6ca93 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxHeavyJobDetails.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxHeavyJobDetails.cs @@ -53,9 +53,22 @@ public DataBoxHeavyJobDetails() /// the chain of custody logs /// Details about which key encryption /// type is being used. - /// The expected size of the + /// The expected size of the /// data, which needs to be transferred in this job, in /// terabytes. + /// Available actions on the job. + /// Last mitigation action + /// performed on the job. + /// Datacenter address to ship to, for + /// the given sku and storage location. + /// DataCenter code. Possible values + /// include: 'Invalid', 'BY2', 'BY1', 'ORK70', 'AM2', 'AMS20', 'BY21', + /// 'BY24', 'MWH01', 'AMS06', 'SSE90', 'SYD03', 'SYD23', 'CBR20', + /// 'YTO20', 'CWL20', 'LON24', 'BOM01', 'BL20', 'BL7', 'SEL20', + /// 'TYO01', 'BN1', 'SN5', 'CYS04', 'TYO22', 'YTO21', 'YQB20', 'FRA22', + /// 'MAA01', 'CPQ02', 'CPQ20', 'SIN20', 'HKG20', 'SG2', 'MEL23', + /// 'SEL21', 'OSA20', 'SHA03', 'BJB', 'JNB22', 'JNB21', 'MNZ21', 'SN8', + /// 'AUH20', 'ZRH20', 'PUS20', 'AdHoc', 'CH1', 'DSM05' /// Copy progress per account. /// Set Device password for unlocking /// Databox Heavy. Should not be passed for @@ -67,8 +80,8 @@ public DataBoxHeavyJobDetails() /// cannot have the following characters : IilLoO0 Password can have /// only alphabets, numbers and these characters : /// @#\-$%^!+=;:_()]+ - public DataBoxHeavyJobDetails(ContactDetails contactDetails, IList jobStages = default(IList), ShippingAddress shippingAddress = default(ShippingAddress), PackageShippingDetails deliveryPackage = default(PackageShippingDetails), PackageShippingDetails returnPackage = default(PackageShippingDetails), IList dataImportDetails = default(IList), IList dataExportDetails = default(IList), Preferences preferences = default(Preferences), IList copyLogDetails = default(IList), string reverseShipmentLabelSasKey = default(string), string chainOfCustodySasKey = default(string), KeyEncryptionKey keyEncryptionKey = default(KeyEncryptionKey), int? expectedDataSizeInTerabytes = default(int?), IList copyProgress = default(IList), string devicePassword = default(string)) - : base(contactDetails, jobStages, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, keyEncryptionKey, expectedDataSizeInTerabytes) + public DataBoxHeavyJobDetails(ContactDetails contactDetails, IList jobStages = default(IList), ShippingAddress shippingAddress = default(ShippingAddress), PackageShippingDetails deliveryPackage = default(PackageShippingDetails), PackageShippingDetails returnPackage = default(PackageShippingDetails), IList dataImportDetails = default(IList), IList dataExportDetails = default(IList), Preferences preferences = default(Preferences), IList copyLogDetails = default(IList), string reverseShipmentLabelSasKey = default(string), string chainOfCustodySasKey = default(string), KeyEncryptionKey keyEncryptionKey = default(KeyEncryptionKey), int? expectedDataSizeInTeraBytes = default(int?), IList actions = default(IList), LastMitigationActionOnJob lastMitigationActionOnJob = default(LastMitigationActionOnJob), DatacenterAddressResponse datacenterAddress = default(DatacenterAddressResponse), string dataCenterCode = default(string), IList copyProgress = default(IList), string devicePassword = default(string)) + : base(contactDetails, jobStages, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, keyEncryptionKey, expectedDataSizeInTeraBytes, actions, lastMitigationActionOnJob, datacenterAddress, dataCenterCode) { CopyProgress = copyProgress; DevicePassword = devicePassword; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxHeavyJobSecrets.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxHeavyJobSecrets.cs index a9543c98bf00..3caa659198a6 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxHeavyJobSecrets.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxHeavyJobSecrets.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxJobDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxJobDetails.cs index 36af674c04db..4d7dfa7e0807 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxJobDetails.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxJobDetails.cs @@ -53,9 +53,22 @@ public DataBoxJobDetails() /// the chain of custody logs /// Details about which key encryption /// type is being used. - /// The expected size of the + /// The expected size of the /// data, which needs to be transferred in this job, in /// terabytes. + /// Available actions on the job. + /// Last mitigation action + /// performed on the job. + /// Datacenter address to ship to, for + /// the given sku and storage location. + /// DataCenter code. Possible values + /// include: 'Invalid', 'BY2', 'BY1', 'ORK70', 'AM2', 'AMS20', 'BY21', + /// 'BY24', 'MWH01', 'AMS06', 'SSE90', 'SYD03', 'SYD23', 'CBR20', + /// 'YTO20', 'CWL20', 'LON24', 'BOM01', 'BL20', 'BL7', 'SEL20', + /// 'TYO01', 'BN1', 'SN5', 'CYS04', 'TYO22', 'YTO21', 'YQB20', 'FRA22', + /// 'MAA01', 'CPQ02', 'CPQ20', 'SIN20', 'HKG20', 'SG2', 'MEL23', + /// 'SEL21', 'OSA20', 'SHA03', 'BJB', 'JNB22', 'JNB21', 'MNZ21', 'SN8', + /// 'AUH20', 'ZRH20', 'PUS20', 'AdHoc', 'CH1', 'DSM05' /// Copy progress per storage /// account. /// Set Device password for unlocking @@ -67,8 +80,8 @@ public DataBoxJobDetails() /// number and one special character. Password cannot have the /// following characters : IilLoO0 Password can have only alphabets, /// numbers and these characters : @#\-$%^!+=;:_()]+ - public DataBoxJobDetails(ContactDetails contactDetails, IList jobStages = default(IList), ShippingAddress shippingAddress = default(ShippingAddress), PackageShippingDetails deliveryPackage = default(PackageShippingDetails), PackageShippingDetails returnPackage = default(PackageShippingDetails), IList dataImportDetails = default(IList), IList dataExportDetails = default(IList), Preferences preferences = default(Preferences), IList copyLogDetails = default(IList), string reverseShipmentLabelSasKey = default(string), string chainOfCustodySasKey = default(string), KeyEncryptionKey keyEncryptionKey = default(KeyEncryptionKey), int? expectedDataSizeInTerabytes = default(int?), IList copyProgress = default(IList), string devicePassword = default(string)) - : base(contactDetails, jobStages, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, keyEncryptionKey, expectedDataSizeInTerabytes) + public DataBoxJobDetails(ContactDetails contactDetails, IList jobStages = default(IList), ShippingAddress shippingAddress = default(ShippingAddress), PackageShippingDetails deliveryPackage = default(PackageShippingDetails), PackageShippingDetails returnPackage = default(PackageShippingDetails), IList dataImportDetails = default(IList), IList dataExportDetails = default(IList), Preferences preferences = default(Preferences), IList copyLogDetails = default(IList), string reverseShipmentLabelSasKey = default(string), string chainOfCustodySasKey = default(string), KeyEncryptionKey keyEncryptionKey = default(KeyEncryptionKey), int? expectedDataSizeInTeraBytes = default(int?), IList actions = default(IList), LastMitigationActionOnJob lastMitigationActionOnJob = default(LastMitigationActionOnJob), DatacenterAddressResponse datacenterAddress = default(DatacenterAddressResponse), string dataCenterCode = default(string), IList copyProgress = default(IList), string devicePassword = default(string)) + : base(contactDetails, jobStages, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, keyEncryptionKey, expectedDataSizeInTeraBytes, actions, lastMitigationActionOnJob, datacenterAddress, dataCenterCode) { CopyProgress = copyProgress; DevicePassword = devicePassword; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataCenterCode.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataCenterCode.cs new file mode 100644 index 000000000000..3abbc0687cfd --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataCenterCode.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.DataBox.Models +{ + + /// + /// Defines values for DataCenterCode. + /// + public static class DataCenterCode + { + public const string Invalid = "Invalid"; + public const string BY2 = "BY2"; + public const string BY1 = "BY1"; + public const string ORK70 = "ORK70"; + public const string AM2 = "AM2"; + public const string AMS20 = "AMS20"; + public const string BY21 = "BY21"; + public const string BY24 = "BY24"; + public const string MWH01 = "MWH01"; + public const string AMS06 = "AMS06"; + public const string SSE90 = "SSE90"; + public const string SYD03 = "SYD03"; + public const string SYD23 = "SYD23"; + public const string CBR20 = "CBR20"; + public const string YTO20 = "YTO20"; + public const string CWL20 = "CWL20"; + public const string LON24 = "LON24"; + public const string BOM01 = "BOM01"; + public const string BL20 = "BL20"; + public const string BL7 = "BL7"; + public const string SEL20 = "SEL20"; + public const string TYO01 = "TYO01"; + public const string BN1 = "BN1"; + public const string SN5 = "SN5"; + public const string CYS04 = "CYS04"; + public const string TYO22 = "TYO22"; + public const string YTO21 = "YTO21"; + public const string YQB20 = "YQB20"; + public const string FRA22 = "FRA22"; + public const string MAA01 = "MAA01"; + public const string CPQ02 = "CPQ02"; + public const string CPQ20 = "CPQ20"; + public const string SIN20 = "SIN20"; + public const string HKG20 = "HKG20"; + public const string SG2 = "SG2"; + public const string MEL23 = "MEL23"; + public const string SEL21 = "SEL21"; + public const string OSA20 = "OSA20"; + public const string SHA03 = "SHA03"; + public const string BJB = "BJB"; + public const string JNB22 = "JNB22"; + public const string JNB21 = "JNB21"; + public const string MNZ21 = "MNZ21"; + public const string SN8 = "SN8"; + public const string AUH20 = "AUH20"; + public const string ZRH20 = "ZRH20"; + public const string PUS20 = "PUS20"; + public const string AdHoc = "AdHoc"; + public const string CH1 = "CH1"; + public const string DSM05 = "DSM05"; + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataImportDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataImportDetails.cs index d3049bced2b1..0bcfb8a4553d 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataImportDetails.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataImportDetails.cs @@ -32,9 +32,12 @@ public DataImportDetails() /// /// Account details of the data to be /// transferred - public DataImportDetails(DataAccountDetails accountDetails) + /// Level of the logs to be collected. + /// Possible values include: 'Error', 'Verbose' + public DataImportDetails(DataAccountDetails accountDetails, LogCollectionLevel? logCollectionLevel = default(LogCollectionLevel?)) { AccountDetails = accountDetails; + LogCollectionLevel = logCollectionLevel; CustomInit(); } @@ -49,6 +52,13 @@ public DataImportDetails(DataAccountDetails accountDetails) [JsonProperty(PropertyName = "accountDetails")] public DataAccountDetails AccountDetails { get; set; } + /// + /// Gets or sets level of the logs to be collected. Possible values + /// include: 'Error', 'Verbose' + /// + [JsonProperty(PropertyName = "logCollectionLevel")] + public LogCollectionLevel? LogCollectionLevel { get; set; } + /// /// Validate the object. /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataTransferDetailsValidationRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataTransferDetailsValidationRequest.cs index 17b315b68f95..c23b0a2da652 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataTransferDetailsValidationRequest.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataTransferDetailsValidationRequest.cs @@ -35,7 +35,8 @@ public DataTransferDetailsValidationRequest() /// DataTransferDetailsValidationRequest class. /// /// Device type. Possible values include: - /// 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + /// 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', + /// 'DataBoxCustomerDisk' /// Type of the transfer. Possible values /// include: 'ImportToAzure', 'ExportFromAzure' /// List of DataTransfer details to be @@ -72,7 +73,7 @@ public DataTransferDetailsValidationRequest() /// /// Gets or sets device type. Possible values include: 'DataBox', - /// 'DataBoxDisk', 'DataBoxHeavy' + /// 'DataBoxDisk', 'DataBoxHeavy', 'DataBoxCustomerDisk' /// [JsonProperty(PropertyName = "deviceType")] public SkuName DeviceType { get; set; } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataTransferDetailsValidationResponseProperties.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataTransferDetailsValidationResponseProperties.cs index 8df7210f1cab..4850d4c7d4b5 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataTransferDetailsValidationResponseProperties.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataTransferDetailsValidationResponseProperties.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Linq; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataboxJobSecrets.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataboxJobSecrets.cs index acfc042d67e4..ba237548a61f 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataboxJobSecrets.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataboxJobSecrets.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DatacenterAddressInstructionResponse.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DatacenterAddressInstructionResponse.cs new file mode 100644 index 000000000000..09cba1a443d3 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DatacenterAddressInstructionResponse.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.DataBox.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Datacenter instruction for given storage location. + /// + [Newtonsoft.Json.JsonObject("DatacenterAddressInstruction")] + public partial class DatacenterAddressInstructionResponse : DatacenterAddressResponse + { + /// + /// Initializes a new instance of the + /// DatacenterAddressInstructionResponse class. + /// + public DatacenterAddressInstructionResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// DatacenterAddressInstructionResponse class. + /// + /// List of supported + /// carriers for return shipment. + /// Azure Location where the Data + /// Center serves primarily. + /// Data center communication + /// instruction + public DatacenterAddressInstructionResponse(IList supportedCarriersForReturnShipment = default(IList), string dataCenterAzureLocation = default(string), string communicationInstruction = default(string)) + : base(supportedCarriersForReturnShipment, dataCenterAzureLocation) + { + CommunicationInstruction = communicationInstruction; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets data center communication instruction + /// + [JsonProperty(PropertyName = "communicationInstruction")] + public string CommunicationInstruction { get; private set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DatacenterAddressLocationResponse.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DatacenterAddressLocationResponse.cs new file mode 100644 index 000000000000..c1b2e7fdaa6a --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DatacenterAddressLocationResponse.cs @@ -0,0 +1,158 @@ +// +// 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.DataBox.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Datacenter address for given storage location. + /// + [Newtonsoft.Json.JsonObject("DatacenterAddressLocation")] + public partial class DatacenterAddressLocationResponse : DatacenterAddressResponse + { + /// + /// Initializes a new instance of the DatacenterAddressLocationResponse + /// class. + /// + public DatacenterAddressLocationResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatacenterAddressLocationResponse + /// class. + /// + /// List of supported + /// carriers for return shipment. + /// Azure Location where the Data + /// Center serves primarily. + /// Contact person name + /// Company name + /// Street address line 1 + /// Street address line 2 + /// Street address line 3 + /// City name + /// name of the state + /// Zip code + /// name of the country + /// Phone number + /// Phone extension + /// Address type + /// Special instruction for + /// shipping + public DatacenterAddressLocationResponse(IList supportedCarriersForReturnShipment = default(IList), string dataCenterAzureLocation = default(string), string contactPersonName = default(string), string company = default(string), string street1 = default(string), string street2 = default(string), string street3 = default(string), string city = default(string), string state = default(string), string zip = default(string), string country = default(string), string phone = default(string), string phoneExtension = default(string), string addressType = default(string), string additionalShippingInformation = default(string)) + : base(supportedCarriersForReturnShipment, dataCenterAzureLocation) + { + ContactPersonName = contactPersonName; + Company = company; + Street1 = street1; + Street2 = street2; + Street3 = street3; + City = city; + State = state; + Zip = zip; + Country = country; + Phone = phone; + PhoneExtension = phoneExtension; + AddressType = addressType; + AdditionalShippingInformation = additionalShippingInformation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets contact person name + /// + [JsonProperty(PropertyName = "contactPersonName")] + public string ContactPersonName { get; private set; } + + /// + /// Gets company name + /// + [JsonProperty(PropertyName = "company")] + public string Company { get; private set; } + + /// + /// Gets street address line 1 + /// + [JsonProperty(PropertyName = "street1")] + public string Street1 { get; private set; } + + /// + /// Gets street address line 2 + /// + [JsonProperty(PropertyName = "street2")] + public string Street2 { get; private set; } + + /// + /// Gets street address line 3 + /// + [JsonProperty(PropertyName = "street3")] + public string Street3 { get; private set; } + + /// + /// Gets city name + /// + [JsonProperty(PropertyName = "city")] + public string City { get; private set; } + + /// + /// Gets name of the state + /// + [JsonProperty(PropertyName = "state")] + public string State { get; private set; } + + /// + /// Gets zip code + /// + [JsonProperty(PropertyName = "zip")] + public string Zip { get; private set; } + + /// + /// Gets name of the country + /// + [JsonProperty(PropertyName = "country")] + public string Country { get; private set; } + + /// + /// Gets phone number + /// + [JsonProperty(PropertyName = "phone")] + public string Phone { get; private set; } + + /// + /// Gets phone extension + /// + [JsonProperty(PropertyName = "phoneExtension")] + public string PhoneExtension { get; private set; } + + /// + /// Gets address type + /// + [JsonProperty(PropertyName = "addressType")] + public string AddressType { get; private set; } + + /// + /// Gets special instruction for shipping + /// + [JsonProperty(PropertyName = "additionalShippingInformation")] + public string AdditionalShippingInformation { get; private set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DatacenterAddressRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DatacenterAddressRequest.cs new file mode 100644 index 000000000000..e6d5233ef73b --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DatacenterAddressRequest.cs @@ -0,0 +1,80 @@ +// +// 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.DataBox.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Request body to get the datacenter address. + /// + public partial class DatacenterAddressRequest + { + /// + /// Initializes a new instance of the DatacenterAddressRequest class. + /// + public DatacenterAddressRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatacenterAddressRequest class. + /// + /// Storage location. For locations + /// check: + /// https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + /// Sku Name for which the data center address + /// requested. Possible values include: 'DataBox', 'DataBoxDisk', + /// 'DataBoxHeavy', 'DataBoxCustomerDisk' + public DatacenterAddressRequest(string storageLocation, SkuName skuName) + { + StorageLocation = storageLocation; + SkuName = skuName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets storage location. For locations check: + /// https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 + /// + [JsonProperty(PropertyName = "storageLocation")] + public string StorageLocation { get; set; } + + /// + /// Gets or sets sku Name for which the data center address requested. + /// Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', + /// 'DataBoxCustomerDisk' + /// + [JsonProperty(PropertyName = "skuName")] + public SkuName SkuName { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (StorageLocation == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StorageLocation"); + } + } + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DatacenterAddressResponse.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DatacenterAddressResponse.cs new file mode 100644 index 000000000000..0a33cc34e364 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DatacenterAddressResponse.cs @@ -0,0 +1,63 @@ +// +// 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.DataBox.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Datacenter address for given storage location. + /// + public partial class DatacenterAddressResponse + { + /// + /// Initializes a new instance of the DatacenterAddressResponse class. + /// + public DatacenterAddressResponse() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DatacenterAddressResponse class. + /// + /// List of supported + /// carriers for return shipment. + /// Azure Location where the Data + /// Center serves primarily. + public DatacenterAddressResponse(IList supportedCarriersForReturnShipment = default(IList), string dataCenterAzureLocation = default(string)) + { + SupportedCarriersForReturnShipment = supportedCarriersForReturnShipment; + DataCenterAzureLocation = dataCenterAzureLocation; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets list of supported carriers for return shipment. + /// + [JsonProperty(PropertyName = "supportedCarriersForReturnShipment")] + public IList SupportedCarriersForReturnShipment { get; private set; } + + /// + /// Gets azure Location where the Data Center serves primarily. + /// + [JsonProperty(PropertyName = "dataCenterAzureLocation")] + public string DataCenterAzureLocation { get; private set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DcAccessSecurityCode.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DcAccessSecurityCode.cs index f31891cc9386..169aff544df1 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DcAccessSecurityCode.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DcAccessSecurityCode.cs @@ -29,14 +29,14 @@ public DcAccessSecurityCode() /// /// Initializes a new instance of the DcAccessSecurityCode class. /// - /// Reverse Dc access security + /// Reverse Dc access security /// code. - /// Forward Dc access security + /// Forward Dc access security /// code. - public DcAccessSecurityCode(string reverseDcAccessCode = default(string), string forwardDcAccessCode = default(string)) + public DcAccessSecurityCode(string reverseDCAccessCode = default(string), string forwardDCAccessCode = default(string)) { - ReverseDcAccessCode = reverseDcAccessCode; - ForwardDcAccessCode = forwardDcAccessCode; + ReverseDCAccessCode = reverseDCAccessCode; + ForwardDCAccessCode = forwardDCAccessCode; CustomInit(); } @@ -48,14 +48,14 @@ public DcAccessSecurityCode() /// /// Gets or sets reverse Dc access security code. /// - [JsonProperty(PropertyName = "reverseDcAccessCode")] - public string ReverseDcAccessCode { get; set; } + [JsonProperty(PropertyName = "reverseDCAccessCode")] + public string ReverseDCAccessCode { get; set; } /// /// Gets or sets forward Dc access security code. /// - [JsonProperty(PropertyName = "forwardDcAccessCode")] - public string ForwardDcAccessCode { get; set; } + [JsonProperty(PropertyName = "forwardDCAccessCode")] + public string ForwardDCAccessCode { get; set; } } } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DiskScheduleAvailabilityRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DiskScheduleAvailabilityRequest.cs index 3c562c617420..a1dad5ee9149 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DiskScheduleAvailabilityRequest.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DiskScheduleAvailabilityRequest.cs @@ -35,15 +35,15 @@ public DiskScheduleAvailabilityRequest() /// Location for data transfer. For /// locations check: /// https://management.azure.com/subscriptions/SUBSCRIPTIONID/locations?api-version=2018-01-01 - /// The expected size of the + /// The expected size of the /// data, which needs to be transferred in this job, in /// terabytes. /// Country in which storage location should be /// supported. - public DiskScheduleAvailabilityRequest(string storageLocation, int expectedDataSizeInTerabytes, string country = default(string)) + public DiskScheduleAvailabilityRequest(string storageLocation, int expectedDataSizeInTeraBytes, string country = default(string)) : base(storageLocation, country) { - ExpectedDataSizeInTerabytes = expectedDataSizeInTerabytes; + ExpectedDataSizeInTeraBytes = expectedDataSizeInTeraBytes; CustomInit(); } @@ -56,8 +56,8 @@ public DiskScheduleAvailabilityRequest() /// Gets or sets the expected size of the data, which needs to be /// transferred in this job, in terabytes. /// - [JsonProperty(PropertyName = "expectedDataSizeInTerabytes")] - public int ExpectedDataSizeInTerabytes { get; set; } + [JsonProperty(PropertyName = "expectedDataSizeInTeraBytes")] + public int ExpectedDataSizeInTeraBytes { get; set; } /// /// Validate the object. diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ExportDiskDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ExportDiskDetails.cs new file mode 100644 index 000000000000..9c08aa6f5490 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ExportDiskDetails.cs @@ -0,0 +1,71 @@ +// +// 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.DataBox.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Export disk details + /// + public partial class ExportDiskDetails + { + /// + /// Initializes a new instance of the ExportDiskDetails class. + /// + public ExportDiskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExportDiskDetails class. + /// + /// The relative path of the manifest file + /// on the disk. + /// The Base16-encoded MD5 hash of the + /// manifest file on the disk. + /// Path to backed up manifest, + /// only returned if enableManifestBackup is true. + public ExportDiskDetails(string manifestFile = default(string), string manifestHash = default(string), string backupManifestCloudPath = default(string)) + { + ManifestFile = manifestFile; + ManifestHash = manifestHash; + BackupManifestCloudPath = backupManifestCloudPath; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the relative path of the manifest file on the disk. + /// + [JsonProperty(PropertyName = "manifestFile")] + public string ManifestFile { get; private set; } + + /// + /// Gets the Base16-encoded MD5 hash of the manifest file on the disk. + /// + [JsonProperty(PropertyName = "manifestHash")] + public string ManifestHash { get; private set; } + + /// + /// Gets path to backed up manifest, only returned if + /// enableManifestBackup is true. + /// + [JsonProperty(PropertyName = "backupManifestCloudPath")] + public string BackupManifestCloudPath { get; private set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ImportDiskDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ImportDiskDetails.cs new file mode 100644 index 000000000000..9fbd0d42ae6b --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ImportDiskDetails.cs @@ -0,0 +1,103 @@ +// +// 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.DataBox.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Import disk details + /// + public partial class ImportDiskDetails + { + /// + /// Initializes a new instance of the ImportDiskDetails class. + /// + public ImportDiskDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ImportDiskDetails class. + /// + /// The relative path of the manifest file + /// on the disk. + /// The Base16-encoded MD5 hash of the + /// manifest file on the disk. + /// BitLocker key used to encrypt the + /// disk. + /// Path to backed up manifest, + /// only returned if enableManifestBackup is true. + public ImportDiskDetails(string manifestFile, string manifestHash, string bitLockerKey, string backupManifestCloudPath = default(string)) + { + ManifestFile = manifestFile; + ManifestHash = manifestHash; + BitLockerKey = bitLockerKey; + BackupManifestCloudPath = backupManifestCloudPath; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the relative path of the manifest file on the disk. + /// + [JsonProperty(PropertyName = "manifestFile")] + public string ManifestFile { get; set; } + + /// + /// Gets or sets the Base16-encoded MD5 hash of the manifest file on + /// the disk. + /// + [JsonProperty(PropertyName = "manifestHash")] + public string ManifestHash { get; set; } + + /// + /// Gets or sets bitLocker key used to encrypt the disk. + /// + [JsonProperty(PropertyName = "bitLockerKey")] + public string BitLockerKey { get; set; } + + /// + /// Gets path to backed up manifest, only returned if + /// enableManifestBackup is true. + /// + [JsonProperty(PropertyName = "backupManifestCloudPath")] + public string BackupManifestCloudPath { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ManifestFile == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ManifestFile"); + } + if (ManifestHash == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ManifestHash"); + } + if (BitLockerKey == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "BitLockerKey"); + } + } + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobDetails.cs index 22d18eb01584..1dd1283771a3 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobDetails.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobDetails.cs @@ -19,7 +19,6 @@ namespace Microsoft.Azure.Management.DataBox.Models /// /// Job details. /// - [Newtonsoft.Json.JsonObject("JobDetails")] public partial class JobDetails { /// @@ -54,10 +53,23 @@ public JobDetails() /// the chain of custody logs /// Details about which key encryption /// type is being used. - /// The expected size of the + /// The expected size of the /// data, which needs to be transferred in this job, in /// terabytes. - public JobDetails(ContactDetails contactDetails, IList jobStages = default(IList), ShippingAddress shippingAddress = default(ShippingAddress), PackageShippingDetails deliveryPackage = default(PackageShippingDetails), PackageShippingDetails returnPackage = default(PackageShippingDetails), IList dataImportDetails = default(IList), IList dataExportDetails = default(IList), Preferences preferences = default(Preferences), IList copyLogDetails = default(IList), string reverseShipmentLabelSasKey = default(string), string chainOfCustodySasKey = default(string), KeyEncryptionKey keyEncryptionKey = default(KeyEncryptionKey), int? expectedDataSizeInTerabytes = default(int?)) + /// Available actions on the job. + /// Last mitigation action + /// performed on the job. + /// Datacenter address to ship to, for + /// the given sku and storage location. + /// DataCenter code. Possible values + /// include: 'Invalid', 'BY2', 'BY1', 'ORK70', 'AM2', 'AMS20', 'BY21', + /// 'BY24', 'MWH01', 'AMS06', 'SSE90', 'SYD03', 'SYD23', 'CBR20', + /// 'YTO20', 'CWL20', 'LON24', 'BOM01', 'BL20', 'BL7', 'SEL20', + /// 'TYO01', 'BN1', 'SN5', 'CYS04', 'TYO22', 'YTO21', 'YQB20', 'FRA22', + /// 'MAA01', 'CPQ02', 'CPQ20', 'SIN20', 'HKG20', 'SG2', 'MEL23', + /// 'SEL21', 'OSA20', 'SHA03', 'BJB', 'JNB22', 'JNB21', 'MNZ21', 'SN8', + /// 'AUH20', 'ZRH20', 'PUS20', 'AdHoc', 'CH1', 'DSM05' + public JobDetails(ContactDetails contactDetails, IList jobStages = default(IList), ShippingAddress shippingAddress = default(ShippingAddress), PackageShippingDetails deliveryPackage = default(PackageShippingDetails), PackageShippingDetails returnPackage = default(PackageShippingDetails), IList dataImportDetails = default(IList), IList dataExportDetails = default(IList), Preferences preferences = default(Preferences), IList copyLogDetails = default(IList), string reverseShipmentLabelSasKey = default(string), string chainOfCustodySasKey = default(string), KeyEncryptionKey keyEncryptionKey = default(KeyEncryptionKey), int? expectedDataSizeInTeraBytes = default(int?), IList actions = default(IList), LastMitigationActionOnJob lastMitigationActionOnJob = default(LastMitigationActionOnJob), DatacenterAddressResponse datacenterAddress = default(DatacenterAddressResponse), string dataCenterCode = default(string)) { JobStages = jobStages; ContactDetails = contactDetails; @@ -71,7 +83,11 @@ public JobDetails() ReverseShipmentLabelSasKey = reverseShipmentLabelSasKey; ChainOfCustodySasKey = chainOfCustodySasKey; KeyEncryptionKey = keyEncryptionKey; - ExpectedDataSizeInTerabytes = expectedDataSizeInTerabytes; + ExpectedDataSizeInTeraBytes = expectedDataSizeInTeraBytes; + Actions = actions; + LastMitigationActionOnJob = lastMitigationActionOnJob; + DatacenterAddress = datacenterAddress; + DataCenterCode = dataCenterCode; CustomInit(); } @@ -156,8 +172,40 @@ public JobDetails() /// Gets or sets the expected size of the data, which needs to be /// transferred in this job, in terabytes. /// - [JsonProperty(PropertyName = "expectedDataSizeInTerabytes")] - public int? ExpectedDataSizeInTerabytes { get; set; } + [JsonProperty(PropertyName = "expectedDataSizeInTeraBytes")] + public int? ExpectedDataSizeInTeraBytes { get; set; } + + /// + /// Gets available actions on the job. + /// + [JsonProperty(PropertyName = "actions")] + public IList Actions { get; private set; } + + /// + /// Gets last mitigation action performed on the job. + /// + [JsonProperty(PropertyName = "lastMitigationActionOnJob")] + public LastMitigationActionOnJob LastMitigationActionOnJob { get; private set; } + + /// + /// Gets datacenter address to ship to, for the given sku and storage + /// location. + /// + [JsonProperty(PropertyName = "datacenterAddress")] + public DatacenterAddressResponse DatacenterAddress { get; private set; } + + /// + /// Gets dataCenter code. Possible values include: 'Invalid', 'BY2', + /// 'BY1', 'ORK70', 'AM2', 'AMS20', 'BY21', 'BY24', 'MWH01', 'AMS06', + /// 'SSE90', 'SYD03', 'SYD23', 'CBR20', 'YTO20', 'CWL20', 'LON24', + /// 'BOM01', 'BL20', 'BL7', 'SEL20', 'TYO01', 'BN1', 'SN5', 'CYS04', + /// 'TYO22', 'YTO21', 'YQB20', 'FRA22', 'MAA01', 'CPQ02', 'CPQ20', + /// 'SIN20', 'HKG20', 'SG2', 'MEL23', 'SEL21', 'OSA20', 'SHA03', 'BJB', + /// 'JNB22', 'JNB21', 'MNZ21', 'SN8', 'AUH20', 'ZRH20', 'PUS20', + /// 'AdHoc', 'CH1', 'DSM05' + /// + [JsonProperty(PropertyName = "dataCenterCode")] + public string DataCenterCode { get; private set; } /// /// Validate the object. diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobResource.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobResource.cs index b6028dd1ed05..ee72f1a16de1 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobResource.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobResource.cs @@ -11,7 +11,6 @@ namespace Microsoft.Azure.Management.DataBox.Models { using Microsoft.Rest; - using Microsoft.Rest.Azure; using Microsoft.Rest.Serialization; using Newtonsoft.Json; using System.Collections; @@ -61,7 +60,9 @@ public JobResource() /// 'Completed', 'CompletedWithErrors', 'Cancelled', /// 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', /// 'Aborted', 'CompletedWithWarnings', 'ReadyToDispatchFromAzureDC', - /// 'ReadyToReceiveAtAzureDC' + /// 'ReadyToReceiveAtAzureDC', 'Created', 'ShippedToAzureDC', + /// 'AwaitingShipmentDetails', 'PreparingToShipFromAzureDC', + /// 'ShippedToCustomer' /// Time at which the job was started in UTC /// ISO 8601 format. /// Top level error for the job. @@ -76,7 +77,9 @@ public JobResource() /// Name of the object. /// Id of the object. /// Type of the object. - public JobResource(string location, Sku sku, TransferType transferType, IDictionary tags = default(IDictionary), ResourceIdentity identity = default(ResourceIdentity), bool? isCancellable = default(bool?), bool? isDeletable = default(bool?), bool? isShippingAddressEditable = default(bool?), bool? isPrepareToShipEnabled = default(bool?), StageName? status = default(StageName?), System.DateTime? startTime = default(System.DateTime?), CloudError error = default(CloudError), JobDetails details = default(JobDetails), string cancellationReason = default(string), JobDeliveryType? deliveryType = default(JobDeliveryType?), JobDeliveryInfo deliveryInfo = default(JobDeliveryInfo), bool? isCancellableWithoutFee = default(bool?), string name = default(string), string id = default(string), string type = default(string)) + /// Metadata pertaining to creation and last + /// modification of the resource. + public JobResource(string location, Sku sku, TransferType transferType, IDictionary tags = default(IDictionary), ResourceIdentity identity = default(ResourceIdentity), bool? isCancellable = default(bool?), bool? isDeletable = default(bool?), bool? isShippingAddressEditable = default(bool?), bool? isPrepareToShipEnabled = default(bool?), string status = default(string), System.DateTime? startTime = default(System.DateTime?), CloudError error = default(CloudError), JobDetails details = default(JobDetails), string cancellationReason = default(string), JobDeliveryType? deliveryType = default(JobDeliveryType?), JobDeliveryInfo deliveryInfo = default(JobDeliveryInfo), bool? isCancellableWithoutFee = default(bool?), string name = default(string), string id = default(string), string type = default(string), SystemData systemData = default(SystemData)) : base(location, sku, tags, identity) { TransferType = transferType; @@ -95,6 +98,7 @@ public JobResource() Name = name; Id = id; Type = type; + SystemData = systemData; CustomInit(); } @@ -141,10 +145,12 @@ public JobResource() /// 'CompletedWithErrors', 'Cancelled', /// 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', /// 'Aborted', 'CompletedWithWarnings', 'ReadyToDispatchFromAzureDC', - /// 'ReadyToReceiveAtAzureDC' + /// 'ReadyToReceiveAtAzureDC', 'Created', 'ShippedToAzureDC', + /// 'AwaitingShipmentDetails', 'PreparingToShipFromAzureDC', + /// 'ShippedToCustomer' /// [JsonProperty(PropertyName = "properties.status")] - public StageName? Status { get; private set; } + public string Status { get; private set; } /// /// Gets time at which the job was started in UTC ISO 8601 format. @@ -208,6 +214,13 @@ public JobResource() [JsonProperty(PropertyName = "type")] public string Type { get; private set; } + /// + /// Gets metadata pertaining to creation and last modification of the + /// resource. + /// + [JsonProperty(PropertyName = "systemData")] + public SystemData SystemData { get; private set; } + /// /// Validate the object. /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobSecrets.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobSecrets.cs index eea27aaae7c1..c8c7e07e698c 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobSecrets.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobSecrets.cs @@ -10,14 +10,12 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Linq; /// /// The base class for the secrets /// - [Newtonsoft.Json.JsonObject("JobSecrets")] public partial class JobSecrets { /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobStages.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobStages.cs index 133a6f1dc733..63a170d398ea 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobStages.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobStages.cs @@ -35,16 +35,20 @@ public JobStages() /// 'CompletedWithErrors', 'Cancelled', /// 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', /// 'Aborted', 'CompletedWithWarnings', 'ReadyToDispatchFromAzureDC', - /// 'ReadyToReceiveAtAzureDC' + /// 'ReadyToReceiveAtAzureDC', 'Created', 'ShippedToAzureDC', + /// 'AwaitingShipmentDetails', 'PreparingToShipFromAzureDC', + /// 'ShippedToCustomer' /// Display name of the job stage. /// Status of the job stage. Possible values /// include: 'None', 'InProgress', 'Succeeded', 'Failed', 'Cancelled', /// 'Cancelling', 'SucceededWithErrors', 'WaitingForCustomerAction', - /// 'SucceededWithWarnings' + /// 'SucceededWithWarnings', 'WaitingForCustomerActionForKek', + /// 'WaitingForCustomerActionForCleanUp', + /// 'CustomerActionPerformedForCleanUp' /// Time for the job stage in UTC ISO 8601 /// format. /// Job Stage Details - public JobStages(StageName? stageName = default(StageName?), string displayName = default(string), StageStatus? stageStatus = default(StageStatus?), System.DateTime? stageTime = default(System.DateTime?), object jobStageDetails = default(object)) + public JobStages(string stageName = default(string), string displayName = default(string), StageStatus? stageStatus = default(StageStatus?), System.DateTime? stageTime = default(System.DateTime?), object jobStageDetails = default(object)) { StageName = stageName; DisplayName = displayName; @@ -66,10 +70,12 @@ public JobStages() /// 'CompletedWithErrors', 'Cancelled', /// 'Failed_IssueReportedAtCustomer', 'Failed_IssueDetectedAtAzureDC', /// 'Aborted', 'CompletedWithWarnings', 'ReadyToDispatchFromAzureDC', - /// 'ReadyToReceiveAtAzureDC' + /// 'ReadyToReceiveAtAzureDC', 'Created', 'ShippedToAzureDC', + /// 'AwaitingShipmentDetails', 'PreparingToShipFromAzureDC', + /// 'ShippedToCustomer' /// [JsonProperty(PropertyName = "stageName")] - public StageName? StageName { get; private set; } + public string StageName { get; private set; } /// /// Gets display name of the job stage. @@ -81,7 +87,9 @@ public JobStages() /// Gets status of the job stage. Possible values include: 'None', /// 'InProgress', 'Succeeded', 'Failed', 'Cancelled', 'Cancelling', /// 'SucceededWithErrors', 'WaitingForCustomerAction', - /// 'SucceededWithWarnings' + /// 'SucceededWithWarnings', 'WaitingForCustomerActionForKek', + /// 'WaitingForCustomerActionForCleanUp', + /// 'CustomerActionPerformedForCleanUp' /// [JsonProperty(PropertyName = "stageStatus")] public StageStatus? StageStatus { get; private set; } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/LastMitigationActionOnJob.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/LastMitigationActionOnJob.cs new file mode 100644 index 000000000000..bf10c0baa7aa --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/LastMitigationActionOnJob.cs @@ -0,0 +1,75 @@ +// +// 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.DataBox.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Last Mitigation Action Performed On Job + /// + public partial class LastMitigationActionOnJob + { + /// + /// Initializes a new instance of the LastMitigationActionOnJob class. + /// + public LastMitigationActionOnJob() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LastMitigationActionOnJob class. + /// + /// Action performed date + /// time + /// Action performed by customer, + /// possibility is that mitigation might happen by customer or service + /// or by ops + /// Resolution code provided by + /// customer. Possible values include: 'None', 'MoveToCleanUpDevice', + /// 'Resume' + public LastMitigationActionOnJob(System.DateTime? actionDateTimeInUtc = default(System.DateTime?), bool? isPerformedByCustomer = default(bool?), CustomerResolutionCode? customerResolution = default(CustomerResolutionCode?)) + { + ActionDateTimeInUtc = actionDateTimeInUtc; + IsPerformedByCustomer = isPerformedByCustomer; + CustomerResolution = customerResolution; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets action performed date time + /// + [JsonProperty(PropertyName = "actionDateTimeInUtc")] + public System.DateTime? ActionDateTimeInUtc { get; set; } + + /// + /// Gets or sets action performed by customer, + /// possibility is that mitigation might happen by customer or service + /// or by ops + /// + [JsonProperty(PropertyName = "isPerformedByCustomer")] + public bool? IsPerformedByCustomer { get; set; } + + /// + /// Gets or sets resolution code provided by customer. Possible values + /// include: 'None', 'MoveToCleanUpDevice', 'Resume' + /// + [JsonProperty(PropertyName = "customerResolution")] + public CustomerResolutionCode? CustomerResolution { get; set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/MarkDevicesShippedRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/MarkDevicesShippedRequest.cs new file mode 100644 index 000000000000..fe489ea83a0e --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/MarkDevicesShippedRequest.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.DataBox.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// The request body to provide the delivery package details of job + /// + public partial class MarkDevicesShippedRequest + { + /// + /// Initializes a new instance of the MarkDevicesShippedRequest class. + /// + public MarkDevicesShippedRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MarkDevicesShippedRequest class. + /// + /// Delivery package + /// details + public MarkDevicesShippedRequest(PackageCarrierInfo deliverToDcPackageDetails) + { + DeliverToDcPackageDetails = deliverToDcPackageDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets delivery package details + /// + [JsonProperty(PropertyName = "deliverToDcPackageDetails")] + public PackageCarrierInfo DeliverToDcPackageDetails { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (DeliverToDcPackageDetails == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "DeliverToDcPackageDetails"); + } + } + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/MitigateJobRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/MitigateJobRequest.cs new file mode 100644 index 000000000000..8d0dfdf3c554 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/MitigateJobRequest.cs @@ -0,0 +1,63 @@ +// +// 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.DataBox.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// The Mitigate Job captured from request body for Mitigate API + /// + public partial class MitigateJobRequest + { + /// + /// Initializes a new instance of the MitigateJobRequest class. + /// + public MitigateJobRequest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MitigateJobRequest class. + /// + /// Resolution code for the job. + /// Possible values include: 'None', 'MoveToCleanUpDevice', + /// 'Resume' + public MitigateJobRequest(CustomerResolutionCode customerResolutionCode) + { + CustomerResolutionCode = customerResolutionCode; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resolution code for the job. Possible values include: + /// 'None', 'MoveToCleanUpDevice', 'Resume' + /// + [JsonProperty(PropertyName = "customerResolutionCode")] + public CustomerResolutionCode CustomerResolutionCode { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + } + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/NotificationPreference.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/NotificationPreference.cs index f2d977fb65ad..234e5d2555bb 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/NotificationPreference.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/NotificationPreference.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.DataBox.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -31,10 +32,10 @@ public NotificationPreference() /// /// Name of the stage. Possible values include: /// 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', - /// 'AtAzureDC', 'DataCopy' + /// 'AtAzureDC', 'DataCopy', 'Created', 'ShippedToCustomer' /// Notification is required or /// not. - public NotificationPreference(NotificationStageName stageName, bool sendNotification) + public NotificationPreference(string stageName, bool sendNotification) { StageName = stageName; SendNotification = sendNotification; @@ -49,10 +50,10 @@ public NotificationPreference(NotificationStageName stageName, bool sendNotifica /// /// Gets or sets name of the stage. Possible values include: /// 'DevicePrepared', 'Dispatched', 'Delivered', 'PickedUp', - /// 'AtAzureDC', 'DataCopy' + /// 'AtAzureDC', 'DataCopy', 'Created', 'ShippedToCustomer' /// [JsonProperty(PropertyName = "stageName")] - public NotificationStageName StageName { get; set; } + public string StageName { get; set; } /// /// Gets or sets notification is required or not. @@ -63,11 +64,15 @@ public NotificationPreference(NotificationStageName stageName, bool sendNotifica /// /// Validate the object. /// - /// + /// /// Thrown if validation fails /// public virtual void Validate() { + if (StageName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "StageName"); + } } } } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/NotificationStageName.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/NotificationStageName.cs index 057dea35f0ed..c1b6aec42439 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/NotificationStageName.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/NotificationStageName.cs @@ -10,93 +10,43 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for NotificationStageName. /// - [JsonConverter(typeof(StringEnumConverter))] - public enum NotificationStageName + public static class NotificationStageName { /// /// Notification at device prepared stage. /// - [EnumMember(Value = "DevicePrepared")] - DevicePrepared, + public const string DevicePrepared = "DevicePrepared"; /// /// Notification at device dispatched stage. /// - [EnumMember(Value = "Dispatched")] - Dispatched, + public const string Dispatched = "Dispatched"; /// /// Notification at device delivered stage. /// - [EnumMember(Value = "Delivered")] - Delivered, + public const string Delivered = "Delivered"; /// /// Notification at device picked up from user stage. /// - [EnumMember(Value = "PickedUp")] - PickedUp, + public const string PickedUp = "PickedUp"; /// /// Notification at device received at Azure datacenter stage. /// - [EnumMember(Value = "AtAzureDC")] - AtAzureDC, + public const string AtAzureDC = "AtAzureDC"; /// /// Notification at data copy started stage. /// - [EnumMember(Value = "DataCopy")] - DataCopy - } - internal static class NotificationStageNameEnumExtension - { - internal static string ToSerializedValue(this NotificationStageName? value) - { - return value == null ? null : ((NotificationStageName)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this NotificationStageName value) - { - switch( value ) - { - case NotificationStageName.DevicePrepared: - return "DevicePrepared"; - case NotificationStageName.Dispatched: - return "Dispatched"; - case NotificationStageName.Delivered: - return "Delivered"; - case NotificationStageName.PickedUp: - return "PickedUp"; - case NotificationStageName.AtAzureDC: - return "AtAzureDC"; - case NotificationStageName.DataCopy: - return "DataCopy"; - } - return null; - } - - internal static NotificationStageName? ParseNotificationStageName(this string value) - { - switch( value ) - { - case "DevicePrepared": - return NotificationStageName.DevicePrepared; - case "Dispatched": - return NotificationStageName.Dispatched; - case "Delivered": - return NotificationStageName.Delivered; - case "PickedUp": - return NotificationStageName.PickedUp; - case "AtAzureDC": - return NotificationStageName.AtAzureDC; - case "DataCopy": - return NotificationStageName.DataCopy; - } - return null; - } + public const string DataCopy = "DataCopy"; + /// + /// Notification at job created stage. + /// + public const string Created = "Created"; + /// + /// Notification at shipped devices to customer stage. + /// + public const string ShippedToCustomer = "ShippedToCustomer"; } } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PackageCarrierDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PackageCarrierDetails.cs new file mode 100644 index 000000000000..cc5bf37c2099 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PackageCarrierDetails.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.DataBox.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Package carrier details. + /// + public partial class PackageCarrierDetails + { + /// + /// Initializes a new instance of the PackageCarrierDetails class. + /// + public PackageCarrierDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PackageCarrierDetails class. + /// + /// Carrier Account Number of + /// customer for customer disk. + /// Name of the carrier. + /// Tracking Id of shipment. + public PackageCarrierDetails(string carrierAccountNumber = default(string), string carrierName = default(string), string trackingId = default(string)) + { + CarrierAccountNumber = carrierAccountNumber; + CarrierName = carrierName; + TrackingId = trackingId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets carrier Account Number of customer for customer disk. + /// + [JsonProperty(PropertyName = "carrierAccountNumber")] + public string CarrierAccountNumber { get; set; } + + /// + /// Gets or sets name of the carrier. + /// + [JsonProperty(PropertyName = "carrierName")] + public string CarrierName { get; set; } + + /// + /// Gets or sets tracking Id of shipment. + /// + [JsonProperty(PropertyName = "trackingId")] + public string TrackingId { get; set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PackageCarrierInfo.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PackageCarrierInfo.cs new file mode 100644 index 000000000000..bd3b1e5b5a25 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PackageCarrierInfo.cs @@ -0,0 +1,59 @@ +// +// 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.DataBox.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// package carrier info + /// + public partial class PackageCarrierInfo + { + /// + /// Initializes a new instance of the PackageCarrierInfo class. + /// + public PackageCarrierInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PackageCarrierInfo class. + /// + /// Name of the carrier. + /// Tracking Id of shipment. + public PackageCarrierInfo(string carrierName = default(string), string trackingId = default(string)) + { + CarrierName = carrierName; + TrackingId = trackingId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the carrier. + /// + [JsonProperty(PropertyName = "carrierName")] + public string CarrierName { get; set; } + + /// + /// Gets or sets tracking Id of shipment. + /// + [JsonProperty(PropertyName = "trackingId")] + public string TrackingId { get; set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PackageShippingDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PackageShippingDetails.cs index 1bc2cd590bdc..fd848c567b7f 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PackageShippingDetails.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PackageShippingDetails.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.Management.DataBox.Models using System.Linq; /// - /// Shipping details. + /// package shipping details /// public partial class PackageShippingDetails { @@ -29,15 +29,15 @@ public PackageShippingDetails() /// /// Initializes a new instance of the PackageShippingDetails class. /// - /// Name of the carrier. - /// Tracking Id of shipment. /// Url where shipment can be /// tracked. - public PackageShippingDetails(string carrierName = default(string), string trackingId = default(string), string trackingUrl = default(string)) + /// Name of the carrier. + /// Tracking Id of shipment. + public PackageShippingDetails(string trackingUrl = default(string), string carrierName = default(string), string trackingId = default(string)) { + TrackingUrl = trackingUrl; CarrierName = carrierName; TrackingId = trackingId; - TrackingUrl = trackingUrl; CustomInit(); } @@ -46,6 +46,12 @@ public PackageShippingDetails() /// partial void CustomInit(); + /// + /// Gets url where shipment can be tracked. + /// + [JsonProperty(PropertyName = "trackingUrl")] + public string TrackingUrl { get; private set; } + /// /// Gets name of the carrier. /// @@ -58,11 +64,5 @@ public PackageShippingDetails() [JsonProperty(PropertyName = "trackingId")] public string TrackingId { get; private set; } - /// - /// Gets url where shipment can be tracked. - /// - [JsonProperty(PropertyName = "trackingUrl")] - public string TrackingUrl { get; private set; } - } } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PreferencesValidationRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PreferencesValidationRequest.cs index 4f5452104614..9577e3058ae9 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PreferencesValidationRequest.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PreferencesValidationRequest.cs @@ -33,8 +33,8 @@ public PreferencesValidationRequest() /// class. /// /// Device type to be used for the job. - /// Possible values include: 'DataBox', 'DataBoxDisk', - /// 'DataBoxHeavy' + /// Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', + /// 'DataBoxCustomerDisk' /// Preference of transport and data /// center. public PreferencesValidationRequest(SkuName deviceType, Preferences preference = default(Preferences)) @@ -57,7 +57,8 @@ public PreferencesValidationRequest() /// /// Gets or sets device type to be used for the job. Possible values - /// include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + /// include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', + /// 'DataBoxCustomerDisk' /// [JsonProperty(PropertyName = "deviceType")] public SkuName DeviceType { get; set; } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PreferencesValidationResponseProperties.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PreferencesValidationResponseProperties.cs index f4aa3be4f5e1..1895ebbf99d4 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PreferencesValidationResponseProperties.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/PreferencesValidationResponseProperties.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Linq; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/RegionConfigurationRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/RegionConfigurationRequest.cs index 09a05e420a6a..8a8ee980bb53 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/RegionConfigurationRequest.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/RegionConfigurationRequest.cs @@ -33,10 +33,13 @@ public RegionConfigurationRequest() /// availability for scheduling orders. /// Request body to get the /// transport availability for given sku. - public RegionConfigurationRequest(ScheduleAvailabilityRequest scheduleAvailabilityRequest = default(ScheduleAvailabilityRequest), TransportAvailabilityRequest transportAvailabilityRequest = default(TransportAvailabilityRequest)) + /// Request body to get the + /// datacenter address for given sku. + public RegionConfigurationRequest(ScheduleAvailabilityRequest scheduleAvailabilityRequest = default(ScheduleAvailabilityRequest), TransportAvailabilityRequest transportAvailabilityRequest = default(TransportAvailabilityRequest), DatacenterAddressRequest datacenterAddressRequest = default(DatacenterAddressRequest)) { ScheduleAvailabilityRequest = scheduleAvailabilityRequest; TransportAvailabilityRequest = transportAvailabilityRequest; + DatacenterAddressRequest = datacenterAddressRequest; CustomInit(); } @@ -59,6 +62,13 @@ public RegionConfigurationRequest() [JsonProperty(PropertyName = "transportAvailabilityRequest")] public TransportAvailabilityRequest TransportAvailabilityRequest { get; set; } + /// + /// Gets or sets request body to get the datacenter address for given + /// sku. + /// + [JsonProperty(PropertyName = "datacenterAddressRequest")] + public DatacenterAddressRequest DatacenterAddressRequest { get; set; } + /// /// Validate the object. /// @@ -71,6 +81,10 @@ public virtual void Validate() { ScheduleAvailabilityRequest.Validate(); } + if (DatacenterAddressRequest != null) + { + DatacenterAddressRequest.Validate(); + } } } } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/RegionConfigurationResponse.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/RegionConfigurationResponse.cs index 35b27b4081ef..91f715858d24 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/RegionConfigurationResponse.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/RegionConfigurationResponse.cs @@ -35,10 +35,13 @@ public RegionConfigurationResponse() /// for given sku in a region. /// Transport options /// available for given sku in a region. - public RegionConfigurationResponse(ScheduleAvailabilityResponse scheduleAvailabilityResponse = default(ScheduleAvailabilityResponse), TransportAvailabilityResponse transportAvailabilityResponse = default(TransportAvailabilityResponse)) + /// Datacenter address for + /// given sku in a region. + public RegionConfigurationResponse(ScheduleAvailabilityResponse scheduleAvailabilityResponse = default(ScheduleAvailabilityResponse), TransportAvailabilityResponse transportAvailabilityResponse = default(TransportAvailabilityResponse), DatacenterAddressResponse datacenterAddressResponse = default(DatacenterAddressResponse)) { ScheduleAvailabilityResponse = scheduleAvailabilityResponse; TransportAvailabilityResponse = transportAvailabilityResponse; + DatacenterAddressResponse = datacenterAddressResponse; CustomInit(); } @@ -59,5 +62,11 @@ public RegionConfigurationResponse() [JsonProperty(PropertyName = "transportAvailabilityResponse")] public TransportAvailabilityResponse TransportAvailabilityResponse { get; private set; } + /// + /// Gets datacenter address for given sku in a region. + /// + [JsonProperty(PropertyName = "datacenterAddressResponse")] + public DatacenterAddressResponse DatacenterAddressResponse { get; private set; } + } } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ScheduleAvailabilityRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ScheduleAvailabilityRequest.cs index 7741b0d9bfd6..7b29665bc957 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ScheduleAvailabilityRequest.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ScheduleAvailabilityRequest.cs @@ -17,7 +17,6 @@ namespace Microsoft.Azure.Management.DataBox.Models /// /// Request body to get the availability for scheduling orders. /// - [Newtonsoft.Json.JsonObject("ScheduleAvailabilityRequest")] public partial class ScheduleAvailabilityRequest { /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ShareCredentialDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ShareCredentialDetails.cs index 15a09e11318f..5d971f64157e 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ShareCredentialDetails.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ShareCredentialDetails.cs @@ -34,7 +34,7 @@ public ShareCredentialDetails() /// Name of the share. /// Type of the share. Possible values include: /// 'UnknownType', 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', - /// 'ManagedDisk', 'AzurePremiumFiles' + /// 'ManagedDisk' /// User name for the share. /// Password for the share. /// Access protocols supported @@ -62,8 +62,7 @@ public ShareCredentialDetails() /// /// Gets type of the share. Possible values include: 'UnknownType', - /// 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', 'ManagedDisk', - /// 'AzurePremiumFiles' + /// 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', 'ManagedDisk' /// [JsonProperty(PropertyName = "shareType")] public ShareDestinationFormatType? ShareType { get; private set; } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ShareDestinationFormatType.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ShareDestinationFormatType.cs index 17e2d6dfbefc..398ff925fe92 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ShareDestinationFormatType.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ShareDestinationFormatType.cs @@ -50,12 +50,7 @@ public enum ShareDestinationFormatType /// Azure Compute Disk. /// [EnumMember(Value = "ManagedDisk")] - ManagedDisk, - /// - /// Azure storage Premium Files format - /// - [EnumMember(Value = "AzurePremiumFiles")] - AzurePremiumFiles + ManagedDisk } internal static class ShareDestinationFormatTypeEnumExtension { @@ -80,8 +75,6 @@ internal static string ToSerializedValue(this ShareDestinationFormatType value) return "AzureFile"; case ShareDestinationFormatType.ManagedDisk: return "ManagedDisk"; - case ShareDestinationFormatType.AzurePremiumFiles: - return "AzurePremiumFiles"; } return null; } @@ -102,8 +95,6 @@ internal static string ToSerializedValue(this ShareDestinationFormatType value) return ShareDestinationFormatType.AzureFile; case "ManagedDisk": return ShareDestinationFormatType.ManagedDisk; - case "AzurePremiumFiles": - return ShareDestinationFormatType.AzurePremiumFiles; } return null; } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/Sku.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/Sku.cs index 5d3864d3375e..99d26d12c0a3 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/Sku.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/Sku.cs @@ -30,7 +30,8 @@ public Sku() /// Initializes a new instance of the Sku class. /// /// The sku name. Possible values include: - /// 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + /// 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', + /// 'DataBoxCustomerDisk' /// The display name of the sku. /// The sku family. public Sku(SkuName name, string displayName = default(string), string family = default(string)) @@ -48,7 +49,7 @@ public Sku() /// /// Gets or sets the sku name. Possible values include: 'DataBox', - /// 'DataBoxDisk', 'DataBoxHeavy' + /// 'DataBoxDisk', 'DataBoxHeavy', 'DataBoxCustomerDisk' /// [JsonProperty(PropertyName = "name")] public SkuName Name { get; set; } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SkuAvailabilityValidationRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SkuAvailabilityValidationRequest.cs index d31f92282707..609d4357ab2e 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SkuAvailabilityValidationRequest.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SkuAvailabilityValidationRequest.cs @@ -34,8 +34,8 @@ public SkuAvailabilityValidationRequest() /// class. /// /// Device type to be used for the job. - /// Possible values include: 'DataBox', 'DataBoxDisk', - /// 'DataBoxHeavy' + /// Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', + /// 'DataBoxCustomerDisk' /// Type of the transfer. Possible values /// include: 'ImportToAzure', 'ExportFromAzure' /// ISO country code. Country for hardware @@ -60,7 +60,8 @@ public SkuAvailabilityValidationRequest(SkuName deviceType, TransferType transfe /// /// Gets or sets device type to be used for the job. Possible values - /// include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + /// include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', + /// 'DataBoxCustomerDisk' /// [JsonProperty(PropertyName = "deviceType")] public SkuName DeviceType { get; set; } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SkuAvailabilityValidationResponseProperties.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SkuAvailabilityValidationResponseProperties.cs index d5f459cde553..43f10468dece 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SkuAvailabilityValidationResponseProperties.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SkuAvailabilityValidationResponseProperties.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Linq; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SkuName.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SkuName.cs index 915110c14074..c9aeaf1ee9be 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SkuName.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SkuName.cs @@ -35,7 +35,12 @@ public enum SkuName /// Data Box Heavy. /// [EnumMember(Value = "DataBoxHeavy")] - DataBoxHeavy + DataBoxHeavy, + /// + /// Data Box Customer Disk + /// + [EnumMember(Value = "DataBoxCustomerDisk")] + DataBoxCustomerDisk } internal static class SkuNameEnumExtension { @@ -54,6 +59,8 @@ internal static string ToSerializedValue(this SkuName value) return "DataBoxDisk"; case SkuName.DataBoxHeavy: return "DataBoxHeavy"; + case SkuName.DataBoxCustomerDisk: + return "DataBoxCustomerDisk"; } return null; } @@ -68,6 +75,8 @@ internal static string ToSerializedValue(this SkuName value) return SkuName.DataBoxDisk; case "DataBoxHeavy": return SkuName.DataBoxHeavy; + case "DataBoxCustomerDisk": + return SkuName.DataBoxCustomerDisk; } return null; } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/StageName.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/StageName.cs index 42be9a4c4149..6a2a0905ed04 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/StageName.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/StageName.cs @@ -10,184 +10,96 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; /// /// Defines values for StageName. /// - [JsonConverter(typeof(StringEnumConverter))] - public enum StageName + public static class StageName { /// /// An order has been created. /// - [EnumMember(Value = "DeviceOrdered")] - DeviceOrdered, + public const string DeviceOrdered = "DeviceOrdered"; /// /// A device has been prepared for the order. /// - [EnumMember(Value = "DevicePrepared")] - DevicePrepared, + public const string DevicePrepared = "DevicePrepared"; /// /// Device has been dispatched to the user of the order. /// - [EnumMember(Value = "Dispatched")] - Dispatched, + public const string Dispatched = "Dispatched"; /// /// Device has been delivered to the user of the order. /// - [EnumMember(Value = "Delivered")] - Delivered, + public const string Delivered = "Delivered"; /// /// Device has been picked up from user and in transit to Azure /// datacenter. /// - [EnumMember(Value = "PickedUp")] - PickedUp, + public const string PickedUp = "PickedUp"; /// /// Device has been received at Azure datacenter from the user. /// - [EnumMember(Value = "AtAzureDC")] - AtAzureDC, + public const string AtAzureDC = "AtAzureDC"; /// /// Data copy from the device at Azure datacenter. /// - [EnumMember(Value = "DataCopy")] - DataCopy, + public const string DataCopy = "DataCopy"; /// /// Order has completed. /// - [EnumMember(Value = "Completed")] - Completed, + public const string Completed = "Completed"; /// /// Order has completed with errors. /// - [EnumMember(Value = "CompletedWithErrors")] - CompletedWithErrors, + public const string CompletedWithErrors = "CompletedWithErrors"; /// /// Order has been cancelled. /// - [EnumMember(Value = "Cancelled")] - Cancelled, + public const string Cancelled = "Cancelled"; /// /// Order has failed due to issue reported by user. /// - [EnumMember(Value = "Failed_IssueReportedAtCustomer")] - FailedIssueReportedAtCustomer, + public const string FailedIssueReportedAtCustomer = "Failed_IssueReportedAtCustomer"; /// /// Order has failed due to issue detected at Azure datacenter. /// - [EnumMember(Value = "Failed_IssueDetectedAtAzureDC")] - FailedIssueDetectedAtAzureDC, + public const string FailedIssueDetectedAtAzureDC = "Failed_IssueDetectedAtAzureDC"; /// /// Order has been aborted. /// - [EnumMember(Value = "Aborted")] - Aborted, + public const string Aborted = "Aborted"; /// /// Order has completed with warnings. /// - [EnumMember(Value = "CompletedWithWarnings")] - CompletedWithWarnings, + public const string CompletedWithWarnings = "CompletedWithWarnings"; /// /// Device is ready to be handed to customer from Azure DC. /// - [EnumMember(Value = "ReadyToDispatchFromAzureDC")] - ReadyToDispatchFromAzureDC, + public const string ReadyToDispatchFromAzureDC = "ReadyToDispatchFromAzureDC"; /// /// Device can be dropped off at Azure DC. /// - [EnumMember(Value = "ReadyToReceiveAtAzureDC")] - ReadyToReceiveAtAzureDC - } - internal static class StageNameEnumExtension - { - internal static string ToSerializedValue(this StageName? value) - { - return value == null ? null : ((StageName)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this StageName value) - { - switch( value ) - { - case StageName.DeviceOrdered: - return "DeviceOrdered"; - case StageName.DevicePrepared: - return "DevicePrepared"; - case StageName.Dispatched: - return "Dispatched"; - case StageName.Delivered: - return "Delivered"; - case StageName.PickedUp: - return "PickedUp"; - case StageName.AtAzureDC: - return "AtAzureDC"; - case StageName.DataCopy: - return "DataCopy"; - case StageName.Completed: - return "Completed"; - case StageName.CompletedWithErrors: - return "CompletedWithErrors"; - case StageName.Cancelled: - return "Cancelled"; - case StageName.FailedIssueReportedAtCustomer: - return "Failed_IssueReportedAtCustomer"; - case StageName.FailedIssueDetectedAtAzureDC: - return "Failed_IssueDetectedAtAzureDC"; - case StageName.Aborted: - return "Aborted"; - case StageName.CompletedWithWarnings: - return "CompletedWithWarnings"; - case StageName.ReadyToDispatchFromAzureDC: - return "ReadyToDispatchFromAzureDC"; - case StageName.ReadyToReceiveAtAzureDC: - return "ReadyToReceiveAtAzureDC"; - } - return null; - } - - internal static StageName? ParseStageName(this string value) - { - switch( value ) - { - case "DeviceOrdered": - return StageName.DeviceOrdered; - case "DevicePrepared": - return StageName.DevicePrepared; - case "Dispatched": - return StageName.Dispatched; - case "Delivered": - return StageName.Delivered; - case "PickedUp": - return StageName.PickedUp; - case "AtAzureDC": - return StageName.AtAzureDC; - case "DataCopy": - return StageName.DataCopy; - case "Completed": - return StageName.Completed; - case "CompletedWithErrors": - return StageName.CompletedWithErrors; - case "Cancelled": - return StageName.Cancelled; - case "Failed_IssueReportedAtCustomer": - return StageName.FailedIssueReportedAtCustomer; - case "Failed_IssueDetectedAtAzureDC": - return StageName.FailedIssueDetectedAtAzureDC; - case "Aborted": - return StageName.Aborted; - case "CompletedWithWarnings": - return StageName.CompletedWithWarnings; - case "ReadyToDispatchFromAzureDC": - return StageName.ReadyToDispatchFromAzureDC; - case "ReadyToReceiveAtAzureDC": - return StageName.ReadyToReceiveAtAzureDC; - } - return null; - } + public const string ReadyToReceiveAtAzureDC = "ReadyToReceiveAtAzureDC"; + /// + /// Job created by the customer. + /// + public const string Created = "Created"; + /// + /// User shipped the device to AzureDC. + /// + public const string ShippedToAzureDC = "ShippedToAzureDC"; + /// + /// Awaiting shipment details of device from customer. + /// + public const string AwaitingShipmentDetails = "AwaitingShipmentDetails"; + /// + /// Preparing the device to ship to customer. + /// + public const string PreparingToShipFromAzureDC = "PreparingToShipFromAzureDC"; + /// + /// Shipped the device to customer. + /// + public const string ShippedToCustomer = "ShippedToCustomer"; } } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/StageStatus.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/StageStatus.cs index c56f7c83a789..19499d7ed4d2 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/StageStatus.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/StageStatus.cs @@ -65,7 +65,22 @@ public enum StageStatus /// Stage has succeeded with warnings. /// [EnumMember(Value = "SucceededWithWarnings")] - SucceededWithWarnings + SucceededWithWarnings, + /// + /// Stage is waiting for customer action for kek action items. + /// + [EnumMember(Value = "WaitingForCustomerActionForKek")] + WaitingForCustomerActionForKek, + /// + /// Stage is waiting for customer action for clean up. + /// + [EnumMember(Value = "WaitingForCustomerActionForCleanUp")] + WaitingForCustomerActionForCleanUp, + /// + /// Stage has performed customer action for clean up. + /// + [EnumMember(Value = "CustomerActionPerformedForCleanUp")] + CustomerActionPerformedForCleanUp } internal static class StageStatusEnumExtension { @@ -96,6 +111,12 @@ internal static string ToSerializedValue(this StageStatus value) return "WaitingForCustomerAction"; case StageStatus.SucceededWithWarnings: return "SucceededWithWarnings"; + case StageStatus.WaitingForCustomerActionForKek: + return "WaitingForCustomerActionForKek"; + case StageStatus.WaitingForCustomerActionForCleanUp: + return "WaitingForCustomerActionForCleanUp"; + case StageStatus.CustomerActionPerformedForCleanUp: + return "CustomerActionPerformedForCleanUp"; } return null; } @@ -122,6 +143,12 @@ internal static string ToSerializedValue(this StageStatus value) return StageStatus.WaitingForCustomerAction; case "SucceededWithWarnings": return StageStatus.SucceededWithWarnings; + case "WaitingForCustomerActionForKek": + return StageStatus.WaitingForCustomerActionForKek; + case "WaitingForCustomerActionForCleanUp": + return StageStatus.WaitingForCustomerActionForCleanUp; + case "CustomerActionPerformedForCleanUp": + return StageStatus.CustomerActionPerformedForCleanUp; } return null; } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SubscriptionIsAllowedToCreateJobValidationResponseProperties.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SubscriptionIsAllowedToCreateJobValidationResponseProperties.cs index 17ff3dfe0c89..4bd1b3f6677a 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SubscriptionIsAllowedToCreateJobValidationResponseProperties.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SubscriptionIsAllowedToCreateJobValidationResponseProperties.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Linq; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SystemData.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SystemData.cs new file mode 100644 index 000000000000..efd8e58dd2a4 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/SystemData.cs @@ -0,0 +1,100 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataBox.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Provides details about resource creation and update time + /// + public partial class SystemData + { + /// + /// Initializes a new instance of the SystemData class. + /// + public SystemData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SystemData class. + /// + /// A string identifier for the identity that + /// created the resource + /// The type of identity that created the + /// resource: user, application, managedIdentity + /// The timestamp of resource creation + /// (UTC) + /// A string identifier for the identity + /// that last modified the resource + /// The type of identity that last + /// modified the resource: user, application, managedIdentity + /// The timestamp of resource last + /// modification (UTC) + public SystemData(string createdBy = default(string), string createdByType = default(string), System.DateTime? createdAt = default(System.DateTime?), string lastModifiedBy = default(string), string lastModifiedByType = default(string), System.DateTime? lastModifiedAt = default(System.DateTime?)) + { + CreatedBy = createdBy; + CreatedByType = createdByType; + CreatedAt = createdAt; + LastModifiedBy = lastModifiedBy; + LastModifiedByType = lastModifiedByType; + LastModifiedAt = lastModifiedAt; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets a string identifier for the identity that created the resource + /// + [JsonProperty(PropertyName = "createdBy")] + public string CreatedBy { get; private set; } + + /// + /// Gets the type of identity that created the resource: user, + /// application, managedIdentity + /// + [JsonProperty(PropertyName = "createdByType")] + public string CreatedByType { get; private set; } + + /// + /// Gets the timestamp of resource creation (UTC) + /// + [JsonProperty(PropertyName = "createdAt")] + public System.DateTime? CreatedAt { get; private set; } + + /// + /// Gets a string identifier for the identity that last modified the + /// resource + /// + [JsonProperty(PropertyName = "lastModifiedBy")] + public string LastModifiedBy { get; private set; } + + /// + /// Gets the type of identity that last modified the resource: user, + /// application, managedIdentity + /// + [JsonProperty(PropertyName = "lastModifiedByType")] + public string LastModifiedByType { get; private set; } + + /// + /// Gets the timestamp of resource last modification (UTC) + /// + [JsonProperty(PropertyName = "lastModifiedAt")] + public System.DateTime? LastModifiedAt { get; private set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/TransportAvailabilityRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/TransportAvailabilityRequest.cs index d3b4c935374d..06f8ccd81cd9 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/TransportAvailabilityRequest.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/TransportAvailabilityRequest.cs @@ -32,7 +32,8 @@ public TransportAvailabilityRequest() /// class. /// /// Type of the device. Possible values include: - /// 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + /// 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', + /// 'DataBoxCustomerDisk' public TransportAvailabilityRequest(SkuName? skuName = default(SkuName?)) { SkuName = skuName; @@ -46,7 +47,7 @@ public TransportAvailabilityRequest() /// /// Gets or sets type of the device. Possible values include: - /// 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + /// 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', 'DataBoxCustomerDisk' /// [JsonProperty(PropertyName = "skuName")] public SkuName? SkuName { get; set; } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/UpdateJobDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/UpdateJobDetails.cs index 1f6bd4534afc..5da93d699549 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/UpdateJobDetails.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/UpdateJobDetails.cs @@ -35,11 +35,14 @@ public UpdateJobDetails() /// customer. /// Key encryption key for the /// job. - public UpdateJobDetails(ContactDetails contactDetails = default(ContactDetails), ShippingAddress shippingAddress = default(ShippingAddress), KeyEncryptionKey keyEncryptionKey = default(KeyEncryptionKey)) + /// Return package details + /// of job. + public UpdateJobDetails(ContactDetails contactDetails = default(ContactDetails), ShippingAddress shippingAddress = default(ShippingAddress), KeyEncryptionKey keyEncryptionKey = default(KeyEncryptionKey), PackageCarrierDetails returnToCustomerPackageDetails = default(PackageCarrierDetails)) { ContactDetails = contactDetails; ShippingAddress = shippingAddress; KeyEncryptionKey = keyEncryptionKey; + ReturnToCustomerPackageDetails = returnToCustomerPackageDetails; CustomInit(); } @@ -66,6 +69,12 @@ public UpdateJobDetails() [JsonProperty(PropertyName = "keyEncryptionKey")] public KeyEncryptionKey KeyEncryptionKey { get; set; } + /// + /// Gets or sets return package details of job. + /// + [JsonProperty(PropertyName = "returnToCustomerPackageDetails")] + public PackageCarrierDetails ReturnToCustomerPackageDetails { get; set; } + /// /// Validate the object. /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidateAddress.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidateAddress.cs index 77c036133744..6f7acc49792e 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidateAddress.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidateAddress.cs @@ -18,7 +18,6 @@ namespace Microsoft.Azure.Management.DataBox.Models /// The requirements to validate customer address where the device needs to /// be shipped. /// - [Newtonsoft.Json.JsonObject("ValidateAddress")] public partial class ValidateAddress : ValidationInputRequest { /// @@ -35,8 +34,8 @@ public ValidateAddress() /// Shipping address of the /// customer. /// Device type to be used for the job. - /// Possible values include: 'DataBox', 'DataBoxDisk', - /// 'DataBoxHeavy' + /// Possible values include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', + /// 'DataBoxCustomerDisk' /// Preferences related to the /// shipment logistics of the sku. public ValidateAddress(ShippingAddress shippingAddress, SkuName deviceType, TransportPreferences transportPreferences = default(TransportPreferences)) @@ -60,7 +59,8 @@ public ValidateAddress() /// /// Gets or sets device type to be used for the job. Possible values - /// include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy' + /// include: 'DataBox', 'DataBoxDisk', 'DataBoxHeavy', + /// 'DataBoxCustomerDisk' /// [JsonProperty(PropertyName = "deviceType")] public SkuName DeviceType { get; set; } diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationCategory.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationCategory.cs deleted file mode 100644 index ee9b170d9f14..000000000000 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationCategory.cs +++ /dev/null @@ -1,57 +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.DataBox.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ValidationCategory. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ValidationCategory - { - /// - /// Identify request of pre-job creation validations. - /// - [EnumMember(Value = "JobCreationValidation")] - JobCreationValidation - } - internal static class ValidationCategoryEnumExtension - { - internal static string ToSerializedValue(this ValidationCategory? value) - { - return value == null ? null : ((ValidationCategory)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ValidationCategory value) - { - switch( value ) - { - case ValidationCategory.JobCreationValidation: - return "JobCreationValidation"; - } - return null; - } - - internal static ValidationCategory? ParseValidationCategory(this string value) - { - switch( value ) - { - case "JobCreationValidation": - return ValidationCategory.JobCreationValidation; - } - return null; - } - } -} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationInputDiscriminator.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationInputDiscriminator.cs deleted file mode 100644 index c12bc0055eb4..000000000000 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationInputDiscriminator.cs +++ /dev/null @@ -1,105 +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.DataBox.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ValidationInputDiscriminator. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ValidationInputDiscriminator - { - /// - /// Identify request and response of address validation. - /// - [EnumMember(Value = "ValidateAddress")] - ValidateAddress, - /// - /// Identify request and response for validation of subscription - /// permission to create job. - /// - [EnumMember(Value = "ValidateSubscriptionIsAllowedToCreateJob")] - ValidateSubscriptionIsAllowedToCreateJob, - /// - /// Identify request and response of preference validation. - /// - [EnumMember(Value = "ValidatePreferences")] - ValidatePreferences, - /// - /// Identify request and response of create order limit for - /// subscription validation. - /// - [EnumMember(Value = "ValidateCreateOrderLimit")] - ValidateCreateOrderLimit, - /// - /// Identify request and response of active job limit for sku - /// availability. - /// - [EnumMember(Value = "ValidateSkuAvailability")] - ValidateSkuAvailability, - /// - /// Identify request and response of data transfer details validation. - /// - [EnumMember(Value = "ValidateDataTransferDetails")] - ValidateDataTransferDetails - } - internal static class ValidationInputDiscriminatorEnumExtension - { - internal static string ToSerializedValue(this ValidationInputDiscriminator? value) - { - return value == null ? null : ((ValidationInputDiscriminator)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ValidationInputDiscriminator value) - { - switch( value ) - { - case ValidationInputDiscriminator.ValidateAddress: - return "ValidateAddress"; - case ValidationInputDiscriminator.ValidateSubscriptionIsAllowedToCreateJob: - return "ValidateSubscriptionIsAllowedToCreateJob"; - case ValidationInputDiscriminator.ValidatePreferences: - return "ValidatePreferences"; - case ValidationInputDiscriminator.ValidateCreateOrderLimit: - return "ValidateCreateOrderLimit"; - case ValidationInputDiscriminator.ValidateSkuAvailability: - return "ValidateSkuAvailability"; - case ValidationInputDiscriminator.ValidateDataTransferDetails: - return "ValidateDataTransferDetails"; - } - return null; - } - - internal static ValidationInputDiscriminator? ParseValidationInputDiscriminator(this string value) - { - switch( value ) - { - case "ValidateAddress": - return ValidationInputDiscriminator.ValidateAddress; - case "ValidateSubscriptionIsAllowedToCreateJob": - return ValidationInputDiscriminator.ValidateSubscriptionIsAllowedToCreateJob; - case "ValidatePreferences": - return ValidationInputDiscriminator.ValidatePreferences; - case "ValidateCreateOrderLimit": - return ValidationInputDiscriminator.ValidateCreateOrderLimit; - case "ValidateSkuAvailability": - return ValidationInputDiscriminator.ValidateSkuAvailability; - case "ValidateDataTransferDetails": - return ValidationInputDiscriminator.ValidateDataTransferDetails; - } - return null; - } - } -} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationInputRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationInputRequest.cs index 16cd7d432818..096380231268 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationInputRequest.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationInputRequest.cs @@ -10,13 +10,11 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Newtonsoft.Json; using System.Linq; /// /// Minimum fields that must be present in any type of validation request. /// - [Newtonsoft.Json.JsonObject("ValidationInputRequest")] public partial class ValidationInputRequest { /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationInputResponse.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationInputResponse.cs index ec95819d34de..b9e61e39f27f 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationInputResponse.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationInputResponse.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Management.DataBox.Models { - using Microsoft.Rest.Azure; using Newtonsoft.Json; using System.Linq; @@ -18,7 +17,6 @@ namespace Microsoft.Azure.Management.DataBox.Models /// Minimum properties that should be present in each individual validation /// response. /// - [Newtonsoft.Json.JsonObject("ValidationInputResponse")] public partial class ValidationInputResponse { /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationRequest.cs index a67857f192ed..ed8dec97c1dd 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationRequest.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationRequest.cs @@ -19,7 +19,6 @@ namespace Microsoft.Azure.Management.DataBox.Models /// /// Minimum request requirement of any validation category. /// - [Newtonsoft.Json.JsonObject("ValidationRequest")] public partial class ValidationRequest { /// diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/SdkInfo_DataBoxManagementClient.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/SdkInfo_DataBoxManagementClient.cs index 7b905446ee05..0748b1efffeb 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/SdkInfo_DataBoxManagementClient.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/SdkInfo_DataBoxManagementClient.cs @@ -19,22 +19,12 @@ public static IEnumerable> ApiInfo_DataBoxManageme { return new Tuple[] { - new Tuple("DataBox", "Jobs", "2020-11-01"), - new Tuple("DataBox", "Operations", "2020-11-01"), - new Tuple("DataBox", "Service", "2020-11-01"), + new Tuple("DataBox", "Jobs", "2021-08-01-preview"), + new Tuple("DataBox", "Mitigate", "2021-08-01-preview"), + new Tuple("DataBox", "Operations", "2021-08-01-preview"), + new Tuple("DataBox", "Service", "2021-08-01-preview"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/databox/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\Users\\dhja\\Desktop\\UpdatingSDKMissedChanges\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "71aa7928d23596ae43d69a8ece4beac3428da577"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/ServiceOperations.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/ServiceOperations.cs index 2bfcf8490fff..ca8df26172d1 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/ServiceOperations.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/ServiceOperations.cs @@ -881,11 +881,8 @@ internal ServiceOperations(DataBoxManagementClient client) /// /// The location of the resource /// - /// - /// Request body to get the availability for scheduling orders. - /// - /// - /// Request body to get the transport availability for given sku. + /// + /// Request body to get the configuration for the region. /// /// /// Headers that will be added to request. @@ -908,7 +905,7 @@ internal ServiceOperations(DataBoxManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> RegionConfigurationWithHttpMessagesAsync(string location, ScheduleAvailabilityRequest scheduleAvailabilityRequest = default(ScheduleAvailabilityRequest), TransportAvailabilityRequest transportAvailabilityRequest = default(TransportAvailabilityRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> RegionConfigurationWithHttpMessagesAsync(string location, RegionConfigurationRequest regionConfigurationRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -922,15 +919,13 @@ internal ServiceOperations(DataBoxManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (scheduleAvailabilityRequest != null) + if (regionConfigurationRequest == null) { - scheduleAvailabilityRequest.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "regionConfigurationRequest"); } - RegionConfigurationRequest regionConfigurationRequest = new RegionConfigurationRequest(); - if (scheduleAvailabilityRequest != null || transportAvailabilityRequest != null) + if (regionConfigurationRequest != null) { - regionConfigurationRequest.ScheduleAvailabilityRequest = scheduleAvailabilityRequest; - regionConfigurationRequest.TransportAvailabilityRequest = transportAvailabilityRequest; + regionConfigurationRequest.Validate(); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; @@ -1090,11 +1085,9 @@ internal ServiceOperations(DataBoxManagementClient client) /// /// The location of the resource /// - /// - /// Request body to get the availability for scheduling orders. - /// - /// - /// Request body to get the transport availability for given sku. + /// + /// Request body to get the configuration for the region at resource group + /// level. /// /// /// Headers that will be added to request. @@ -1117,7 +1110,7 @@ internal ServiceOperations(DataBoxManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> RegionConfigurationByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string location, ScheduleAvailabilityRequest scheduleAvailabilityRequest = default(ScheduleAvailabilityRequest), TransportAvailabilityRequest transportAvailabilityRequest = default(TransportAvailabilityRequest), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> RegionConfigurationByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string location, RegionConfigurationRequest regionConfigurationRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -1135,15 +1128,13 @@ internal ServiceOperations(DataBoxManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); } - if (scheduleAvailabilityRequest != null) + if (regionConfigurationRequest == null) { - scheduleAvailabilityRequest.Validate(); + throw new ValidationException(ValidationRules.CannotBeNull, "regionConfigurationRequest"); } - RegionConfigurationRequest regionConfigurationRequest = new RegionConfigurationRequest(); - if (scheduleAvailabilityRequest != null || transportAvailabilityRequest != null) + if (regionConfigurationRequest != null) { - regionConfigurationRequest.ScheduleAvailabilityRequest = scheduleAvailabilityRequest; - regionConfigurationRequest.TransportAvailabilityRequest = transportAvailabilityRequest; + regionConfigurationRequest.Validate(); } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/ServiceOperationsExtensions.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/ServiceOperationsExtensions.cs index b4de1688a980..725823e4644e 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/ServiceOperationsExtensions.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/ServiceOperationsExtensions.cs @@ -215,15 +215,12 @@ public static ValidationResponse ValidateInputs(this IServiceOperations operatio /// /// The location of the resource /// - /// - /// Request body to get the availability for scheduling orders. + /// + /// Request body to get the configuration for the region. /// - /// - /// Request body to get the transport availability for given sku. - /// - public static RegionConfigurationResponse RegionConfiguration(this IServiceOperations operations, string location, ScheduleAvailabilityRequest scheduleAvailabilityRequest = default(ScheduleAvailabilityRequest), TransportAvailabilityRequest transportAvailabilityRequest = default(TransportAvailabilityRequest)) + public static RegionConfigurationResponse RegionConfiguration(this IServiceOperations operations, string location, RegionConfigurationRequest regionConfigurationRequest) { - return operations.RegionConfigurationAsync(location, scheduleAvailabilityRequest, transportAvailabilityRequest).GetAwaiter().GetResult(); + return operations.RegionConfigurationAsync(location, regionConfigurationRequest).GetAwaiter().GetResult(); } /// @@ -236,18 +233,15 @@ public static ValidationResponse ValidateInputs(this IServiceOperations operatio /// /// The location of the resource /// - /// - /// Request body to get the availability for scheduling orders. - /// - /// - /// Request body to get the transport availability for given sku. + /// + /// Request body to get the configuration for the region. /// /// /// The cancellation token. /// - public static async Task RegionConfigurationAsync(this IServiceOperations operations, string location, ScheduleAvailabilityRequest scheduleAvailabilityRequest = default(ScheduleAvailabilityRequest), TransportAvailabilityRequest transportAvailabilityRequest = default(TransportAvailabilityRequest), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task RegionConfigurationAsync(this IServiceOperations operations, string location, RegionConfigurationRequest regionConfigurationRequest, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.RegionConfigurationWithHttpMessagesAsync(location, scheduleAvailabilityRequest, transportAvailabilityRequest, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.RegionConfigurationWithHttpMessagesAsync(location, regionConfigurationRequest, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } @@ -266,15 +260,13 @@ public static ValidationResponse ValidateInputs(this IServiceOperations operatio /// /// The location of the resource /// - /// - /// Request body to get the availability for scheduling orders. + /// + /// Request body to get the configuration for the region at resource group + /// level. /// - /// - /// Request body to get the transport availability for given sku. - /// - public static RegionConfigurationResponse RegionConfigurationByResourceGroup(this IServiceOperations operations, string resourceGroupName, string location, ScheduleAvailabilityRequest scheduleAvailabilityRequest = default(ScheduleAvailabilityRequest), TransportAvailabilityRequest transportAvailabilityRequest = default(TransportAvailabilityRequest)) + public static RegionConfigurationResponse RegionConfigurationByResourceGroup(this IServiceOperations operations, string resourceGroupName, string location, RegionConfigurationRequest regionConfigurationRequest) { - return operations.RegionConfigurationByResourceGroupAsync(resourceGroupName, location, scheduleAvailabilityRequest, transportAvailabilityRequest).GetAwaiter().GetResult(); + return operations.RegionConfigurationByResourceGroupAsync(resourceGroupName, location, regionConfigurationRequest).GetAwaiter().GetResult(); } /// @@ -290,18 +282,16 @@ public static ValidationResponse ValidateInputs(this IServiceOperations operatio /// /// The location of the resource /// - /// - /// Request body to get the availability for scheduling orders. - /// - /// - /// Request body to get the transport availability for given sku. + /// + /// Request body to get the configuration for the region at resource group + /// level. /// /// /// The cancellation token. /// - public static async Task RegionConfigurationByResourceGroupAsync(this IServiceOperations operations, string resourceGroupName, string location, ScheduleAvailabilityRequest scheduleAvailabilityRequest = default(ScheduleAvailabilityRequest), TransportAvailabilityRequest transportAvailabilityRequest = default(TransportAvailabilityRequest), CancellationToken cancellationToken = default(CancellationToken)) + public static async Task RegionConfigurationByResourceGroupAsync(this IServiceOperations operations, string resourceGroupName, string location, RegionConfigurationRequest regionConfigurationRequest, CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.RegionConfigurationByResourceGroupWithHttpMessagesAsync(resourceGroupName, location, scheduleAvailabilityRequest, transportAvailabilityRequest, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.RegionConfigurationByResourceGroupWithHttpMessagesAsync(resourceGroupName, location, regionConfigurationRequest, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; }