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..a947a63c86c9 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-03-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; @@ -381,5 +383,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/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/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/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/DataBoxDiskJobDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskJobDetails.cs index 7a8858da1908..32edd0a5512a 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,12 @@ 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. /// 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 +69,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), 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) { 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..cf51d2eb2c30 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,12 @@ 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. /// Copy progress per account. /// Set Device password for unlocking /// Databox Heavy. Should not be passed for @@ -67,8 +70,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), IList copyProgress = default(IList), string devicePassword = default(string)) + : base(contactDetails, jobStages, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, keyEncryptionKey, expectedDataSizeInTeraBytes, actions, lastMitigationActionOnJob) { 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..2369edce4dce 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,12 @@ 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. /// Copy progress per storage /// account. /// Set Device password for unlocking @@ -67,8 +70,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), IList copyProgress = default(IList), string devicePassword = default(string)) + : base(contactDetails, jobStages, shippingAddress, deliveryPackage, returnPackage, dataImportDetails, dataExportDetails, preferences, copyLogDetails, reverseShipmentLabelSasKey, chainOfCustodySasKey, keyEncryptionKey, expectedDataSizeInTeraBytes, actions, lastMitigationActionOnJob) { CopyProgress = copyProgress; DevicePassword = devicePassword; 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/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/JobDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/JobDetails.cs index 22d18eb01584..42538c3eb462 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,13 @@ 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. + 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)) { JobStages = jobStages; ContactDetails = contactDetails; @@ -71,7 +73,9 @@ public JobDetails() ReverseShipmentLabelSasKey = reverseShipmentLabelSasKey; ChainOfCustodySasKey = chainOfCustodySasKey; KeyEncryptionKey = keyEncryptionKey; - ExpectedDataSizeInTerabytes = expectedDataSizeInTerabytes; + ExpectedDataSizeInTeraBytes = expectedDataSizeInTeraBytes; + Actions = actions; + LastMitigationActionOnJob = lastMitigationActionOnJob; CustomInit(); } @@ -156,8 +160,20 @@ 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; } /// /// 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..067e26f24180 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; @@ -76,7 +75,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?), 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), SystemData systemData = default(SystemData)) : base(location, sku, tags, identity) { TransferType = transferType; @@ -95,6 +96,7 @@ public JobResource() Name = name; Id = id; Type = type; + SystemData = systemData; CustomInit(); } @@ -208,6 +210,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/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/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/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/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/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/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/ValidateAddress.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidateAddress.cs index 77c036133744..6af4394416d0 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 { /// 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..2a28c51e73f2 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-03-01"), + new Tuple("DataBox", "Mitigate", "2021-03-01"), + new Tuple("DataBox", "Operations", "2021-03-01"), + new Tuple("DataBox", "Service", "2021-03-01"), }.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 } } -