From 65b5e30fc20fe6b9771af1c65001395375bbd207 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 19 Nov 2020 00:54:55 +0000 Subject: [PATCH] CodeGen from PR 11717 in Azure/azure-rest-api-specs Specifying shipping address required property to autorest. (#11717) * Ensuring autorest generation follow specific order of required properties in shippingAddress * added details sharp yaml --- .../src/Generated/DataBoxManagementClient.cs | 2 +- .../src/Generated/JobsOperations.cs | 90 +++++++++++-------- .../Models/AddressValidationOutput.cs | 1 - .../src/Generated/Models/CopyLogDetails.cs | 2 - ...ubscriptionValidationResponseProperties.cs | 1 - .../Generated/Models/DataAccountDetails.cs | 1 - .../Generated/Models/DataBoxDiskJobSecrets.cs | 1 - .../Models/DataBoxHeavyJobSecrets.cs | 1 - ...sferDetailsValidationResponseProperties.cs | 1 - .../src/Generated/Models/DataboxJobSecrets.cs | 1 - .../src/Generated/Models/DoubleEncryption.cs | 66 ++++++++++++++ .../Generated/Models/EncryptionPreferences.cs | 54 +++++++++++ .../Generated/Models/IdentityProperties.cs | 60 +++++++++++++ .../src/Generated/Models/JobDetails.cs | 1 - .../src/Generated/Models/JobResource.cs | 1 - .../src/Generated/Models/JobSecrets.cs | 2 - .../src/Generated/Models/KeyEncryptionKey.cs | 11 ++- .../src/Generated/Models/Preferences.cs | 11 ++- ...PreferencesValidationResponseProperties.cs | 1 - .../src/Generated/Models/ResourceIdentity.cs | 13 ++- .../Models/ScheduleAvailabilityRequest.cs | 1 - .../Models/ShareCredentialDetails.cs | 5 +- .../Models/ShareDestinationFormatType.cs | 11 ++- ...vailabilityValidationResponseProperties.cs | 1 - ...ToCreateJobValidationResponseProperties.cs | 1 - .../Generated/Models/UserAssignedIdentity.cs | 61 +++++++++++++ .../Models/UserAssignedProperties.cs | 53 +++++++++++ .../src/Generated/Models/ValidateAddress.cs | 1 - .../Models/ValidationInputRequest.cs | 2 - .../Models/ValidationInputResponse.cs | 2 - .../src/Generated/Models/ValidationRequest.cs | 1 - .../src/Generated/Operations.cs | 16 +++- .../SdkInfo_DataBoxManagementClient.cs | 15 +--- .../src/Generated/ServiceOperations.cs | 60 ++++++++----- 34 files changed, 445 insertions(+), 106 deletions(-) create mode 100644 sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DoubleEncryption.cs create mode 100644 sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/EncryptionPreferences.cs create mode 100644 sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/IdentityProperties.cs create mode 100644 sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/UserAssignedIdentity.cs create mode 100644 sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/UserAssignedProperties.cs 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 4f3884b4aeecf..b641c5bd90d2e 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/DataBoxManagementClient.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/DataBoxManagementClient.cs @@ -331,7 +331,7 @@ private void Initialize() Jobs = new JobsOperations(this); Service = new ServiceOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2020-04-01"; + ApiVersion = "2020-11-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true; 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 7da1ec7a95dd1..e376e53af4f45 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/JobsOperations.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/JobsOperations.cs @@ -84,7 +84,10 @@ internal JobsOperations(DataBoxManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-04-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -92,7 +95,6 @@ internal JobsOperations(DataBoxManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); @@ -102,9 +104,9 @@ internal JobsOperations(DataBoxManagementClient client) var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DataBox/jobs").ToString(); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (skipToken != null) { @@ -271,7 +273,10 @@ internal JobsOperations(DataBoxManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2020-04-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -280,7 +285,6 @@ internal JobsOperations(DataBoxManagementClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("skipToken", skipToken); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroup", tracingParameters); @@ -291,9 +295,9 @@ internal JobsOperations(DataBoxManagementClient client) _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (skipToken != null) { @@ -484,7 +488,10 @@ internal JobsOperations(DataBoxManagementClient client) throw new ValidationException(ValidationRules.Pattern, "jobName", "^[-\\w\\.]+$"); } } - string apiVersion = "2020-04-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -494,7 +501,6 @@ internal JobsOperations(DataBoxManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("jobName", jobName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("expand", expand); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); @@ -506,9 +512,9 @@ internal JobsOperations(DataBoxManagementClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (expand != null) { @@ -782,6 +788,10 @@ internal JobsOperations(DataBoxManagementClient client) throw new ValidationException(ValidationRules.Pattern, "jobName", "^[-\\w\\.]+$"); } } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (shipmentPickUpRequest == null) { throw new ValidationException(ValidationRules.CannotBeNull, "shipmentPickUpRequest"); @@ -790,7 +800,6 @@ internal JobsOperations(DataBoxManagementClient client) { shipmentPickUpRequest.Validate(); } - string apiVersion = "2020-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -800,7 +809,6 @@ internal JobsOperations(DataBoxManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("jobName", jobName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("shipmentPickUpRequest", shipmentPickUpRequest); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BookShipmentPickUp", tracingParameters); @@ -812,9 +820,9 @@ internal JobsOperations(DataBoxManagementClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1003,11 +1011,14 @@ internal JobsOperations(DataBoxManagementClient client) throw new ValidationException(ValidationRules.Pattern, "jobName", "^[-\\w\\.]+$"); } } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (reason == null) { throw new ValidationException(ValidationRules.CannotBeNull, "reason"); } - string apiVersion = "2020-04-01"; CancellationReason cancellationReason = new CancellationReason(); if (reason != null) { @@ -1022,7 +1033,6 @@ internal JobsOperations(DataBoxManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("jobName", jobName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationReason", cancellationReason); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Cancel", tracingParameters); @@ -1034,9 +1044,9 @@ internal JobsOperations(DataBoxManagementClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1207,7 +1217,10 @@ internal JobsOperations(DataBoxManagementClient client) throw new ValidationException(ValidationRules.Pattern, "jobName", "^[-\\w\\.]+$"); } } - string apiVersion = "2020-04-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1217,7 +1230,6 @@ internal JobsOperations(DataBoxManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("jobName", jobName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListCredentials", tracingParameters); } @@ -1228,9 +1240,9 @@ internal JobsOperations(DataBoxManagementClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1418,6 +1430,10 @@ internal JobsOperations(DataBoxManagementClient client) throw new ValidationException(ValidationRules.Pattern, "jobName", "^[-\\w\\.]+$"); } } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (jobResource == null) { throw new ValidationException(ValidationRules.CannotBeNull, "jobResource"); @@ -1426,7 +1442,6 @@ internal JobsOperations(DataBoxManagementClient client) { jobResource.Validate(); } - string apiVersion = "2020-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1436,7 +1451,6 @@ internal JobsOperations(DataBoxManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("jobName", jobName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("jobResource", jobResource); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginCreate", tracingParameters); @@ -1448,9 +1462,9 @@ internal JobsOperations(DataBoxManagementClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1636,7 +1650,10 @@ internal JobsOperations(DataBoxManagementClient client) throw new ValidationException(ValidationRules.Pattern, "jobName", "^[-\\w\\.]+$"); } } - string apiVersion = "2020-04-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1646,7 +1663,6 @@ internal JobsOperations(DataBoxManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("jobName", jobName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } @@ -1657,9 +1673,9 @@ internal JobsOperations(DataBoxManagementClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1831,11 +1847,14 @@ internal JobsOperations(DataBoxManagementClient client) throw new ValidationException(ValidationRules.Pattern, "jobName", "^[-\\w\\.]+$"); } } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (jobResourceUpdateParameter == null) { throw new ValidationException(ValidationRules.CannotBeNull, "jobResourceUpdateParameter"); } - string apiVersion = "2020-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1845,7 +1864,6 @@ internal JobsOperations(DataBoxManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("jobName", jobName); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("ifMatch", ifMatch); tracingParameters.Add("jobResourceUpdateParameter", jobResourceUpdateParameter); tracingParameters.Add("cancellationToken", cancellationToken); @@ -1858,9 +1876,9 @@ internal JobsOperations(DataBoxManagementClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{jobName}", System.Uri.EscapeDataString(jobName)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { 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 2d235e55e3351..c90a18b47c7fe 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/CopyLogDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/CopyLogDetails.cs index 35fdb61cfb944..7740e36054838 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 ebf921436c6bd..09a8091a2d1b1 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/DataAccountDetails.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataAccountDetails.cs index 8006c2f5961ca..f9f0018e2cd54 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/DataBoxDiskJobSecrets.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxDiskJobSecrets.cs index 92bf1905382f4..ca9d3b765df23 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/DataBoxHeavyJobSecrets.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataBoxHeavyJobSecrets.cs index a9543c98bf00a..3caa659198a6a 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/DataTransferDetailsValidationResponseProperties.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DataTransferDetailsValidationResponseProperties.cs index 8df7210f1cab4..4850d4c7d4b5b 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 acfc042d67e43..ba237548a61f5 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/DoubleEncryption.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DoubleEncryption.cs new file mode 100644 index 0000000000000..8239ea87b49c0 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/DoubleEncryption.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 Newtonsoft.Json; + using Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for DoubleEncryption. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum DoubleEncryption + { + /// + /// Software-based encryption is enabled. + /// + [EnumMember(Value = "Enabled")] + Enabled, + /// + /// Software-based encryption is disabled. + /// + [EnumMember(Value = "Disabled")] + Disabled + } + internal static class DoubleEncryptionEnumExtension + { + internal static string ToSerializedValue(this DoubleEncryption? value) + { + return value == null ? null : ((DoubleEncryption)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this DoubleEncryption value) + { + switch( value ) + { + case DoubleEncryption.Enabled: + return "Enabled"; + case DoubleEncryption.Disabled: + return "Disabled"; + } + return null; + } + + internal static DoubleEncryption? ParseDoubleEncryption(this string value) + { + switch( value ) + { + case "Enabled": + return DoubleEncryption.Enabled; + case "Disabled": + return DoubleEncryption.Disabled; + } + return null; + } + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/EncryptionPreferences.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/EncryptionPreferences.cs new file mode 100644 index 0000000000000..c1081f73f726a --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/EncryptionPreferences.cs @@ -0,0 +1,54 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataBox.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Preferences related to the Encryption. + /// + public partial class EncryptionPreferences + { + /// + /// Initializes a new instance of the EncryptionPreferences class. + /// + public EncryptionPreferences() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the EncryptionPreferences class. + /// + /// Defines secondary layer of + /// software-based encryption enablement. Possible values include: + /// 'Enabled', 'Disabled' + public EncryptionPreferences(DoubleEncryption? doubleEncryption = default(DoubleEncryption?)) + { + DoubleEncryption = doubleEncryption; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets defines secondary layer of software-based encryption + /// enablement. Possible values include: 'Enabled', 'Disabled' + /// + [JsonProperty(PropertyName = "doubleEncryption")] + public DoubleEncryption? DoubleEncryption { get; set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/IdentityProperties.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/IdentityProperties.cs new file mode 100644 index 0000000000000..22d11decf8325 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/IdentityProperties.cs @@ -0,0 +1,60 @@ +// +// 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; + + /// + /// Managed identity properties. + /// + public partial class IdentityProperties + { + /// + /// Initializes a new instance of the IdentityProperties class. + /// + public IdentityProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the IdentityProperties class. + /// + /// Managed service identity type. + /// User assigned identity + /// properties. + public IdentityProperties(string type = default(string), UserAssignedProperties userAssigned = default(UserAssignedProperties)) + { + Type = type; + UserAssigned = userAssigned; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets managed service identity type. + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets user assigned identity properties. + /// + [JsonProperty(PropertyName = "userAssigned")] + public UserAssignedProperties UserAssigned { get; set; } + + } +} 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 658a78e6bbe4a..94d51d304d461 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 { /// 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 b6028dd1ed05c..91831cad34532 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; 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 eea27aaae7c1d..c8c7e07e698cf 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/KeyEncryptionKey.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/KeyEncryptionKey.cs index d658d54526638..0e4d23d6e43b6 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/KeyEncryptionKey.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/KeyEncryptionKey.cs @@ -32,13 +32,16 @@ public KeyEncryptionKey() /// Type of encryption key used for key /// encryption. Possible values include: 'MicrosoftManaged', /// 'CustomerManaged' + /// Managed identity properties used + /// for key encryption. /// Key encryption key. It is required in case of /// Customer managed KekType. /// Kek vault resource id. It is /// required in case of Customer managed KekType. - public KeyEncryptionKey(KekType kekType, string kekUrl = default(string), string kekVaultResourceID = default(string)) + public KeyEncryptionKey(KekType kekType, IdentityProperties identityProperties = default(IdentityProperties), string kekUrl = default(string), string kekVaultResourceID = default(string)) { KekType = kekType; + IdentityProperties = identityProperties; KekUrl = kekUrl; KekVaultResourceID = kekVaultResourceID; CustomInit(); @@ -56,6 +59,12 @@ public KeyEncryptionKey() [JsonProperty(PropertyName = "kekType")] public KekType KekType { get; set; } + /// + /// Gets or sets managed identity properties used for key encryption. + /// + [JsonProperty(PropertyName = "identityProperties")] + public IdentityProperties IdentityProperties { get; set; } + /// /// Gets or sets key encryption key. It is required in case of Customer /// managed KekType. diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/Preferences.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/Preferences.cs index 58b346a6c1463..f457279cda279 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/Preferences.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/Preferences.cs @@ -35,10 +35,13 @@ public Preferences() /// region. /// Preferences related to the /// shipment logistics of the sku. - public Preferences(IList preferredDataCenterRegion = default(IList), TransportPreferences transportPreferences = default(TransportPreferences)) + /// Preferences related to the + /// Encryption. + public Preferences(IList preferredDataCenterRegion = default(IList), TransportPreferences transportPreferences = default(TransportPreferences), EncryptionPreferences encryptionPreferences = default(EncryptionPreferences)) { PreferredDataCenterRegion = preferredDataCenterRegion; TransportPreferences = transportPreferences; + EncryptionPreferences = encryptionPreferences; CustomInit(); } @@ -60,6 +63,12 @@ public Preferences() [JsonProperty(PropertyName = "transportPreferences")] public TransportPreferences TransportPreferences { get; set; } + /// + /// Gets or sets preferences related to the Encryption. + /// + [JsonProperty(PropertyName = "encryptionPreferences")] + public EncryptionPreferences EncryptionPreferences { get; set; } + /// /// Validate the object. /// 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 f4aa3be4f5e11..1895ebbf99d43 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/ResourceIdentity.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ResourceIdentity.cs index 2cdc1abc7f2f2..066917529b1f2 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ResourceIdentity.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ResourceIdentity.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.DataBox.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -33,11 +35,14 @@ public ResourceIdentity() /// Service Principal Id backing the /// Msi /// Home Tenant Id - public ResourceIdentity(string type = default(string), string principalId = default(string), string tenantId = default(string)) + /// User Assigned + /// Identities + public ResourceIdentity(string type = default(string), string principalId = default(string), string tenantId = default(string), IDictionary userAssignedIdentities = default(IDictionary)) { Type = type; PrincipalId = principalId; TenantId = tenantId; + UserAssignedIdentities = userAssignedIdentities; CustomInit(); } @@ -64,5 +69,11 @@ public ResourceIdentity() [JsonProperty(PropertyName = "tenantId")] public string TenantId { get; private set; } + /// + /// Gets or sets user Assigned Identities + /// + [JsonProperty(PropertyName = "userAssignedIdentities")] + public IDictionary UserAssignedIdentities { get; 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 7741b0d9bfd6a..7b29665bc957c 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 5d971f64157e1..15a09e11318f4 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' + /// 'ManagedDisk', 'AzurePremiumFiles' /// User name for the share. /// Password for the share. /// Access protocols supported @@ -62,7 +62,8 @@ public ShareCredentialDetails() /// /// Gets type of the share. Possible values include: 'UnknownType', - /// 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', 'ManagedDisk' + /// 'HCS', 'BlockBlob', 'PageBlob', 'AzureFile', 'ManagedDisk', + /// 'AzurePremiumFiles' /// [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 398ff925fe92d..17e2d6dfbefc6 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,7 +50,12 @@ public enum ShareDestinationFormatType /// Azure Compute Disk. /// [EnumMember(Value = "ManagedDisk")] - ManagedDisk + ManagedDisk, + /// + /// Azure storage Premium Files format + /// + [EnumMember(Value = "AzurePremiumFiles")] + AzurePremiumFiles } internal static class ShareDestinationFormatTypeEnumExtension { @@ -75,6 +80,8 @@ internal static string ToSerializedValue(this ShareDestinationFormatType value) return "AzureFile"; case ShareDestinationFormatType.ManagedDisk: return "ManagedDisk"; + case ShareDestinationFormatType.AzurePremiumFiles: + return "AzurePremiumFiles"; } return null; } @@ -95,6 +102,8 @@ 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 d5f459cde5538..43f10468deceb 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 17ff3dfe0c890..4bd1b3f6677a5 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/UserAssignedIdentity.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/UserAssignedIdentity.cs new file mode 100644 index 0000000000000..af1abc4267961 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/UserAssignedIdentity.cs @@ -0,0 +1,61 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.DataBox.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Class defining User assigned identity details. + /// + public partial class UserAssignedIdentity + { + /// + /// Initializes a new instance of the UserAssignedIdentity class. + /// + public UserAssignedIdentity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserAssignedIdentity class. + /// + /// The principal id of user assigned + /// identity. + /// The client id of user assigned + /// identity. + public UserAssignedIdentity(string principalId = default(string), string clientId = default(string)) + { + PrincipalId = principalId; + ClientId = clientId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the principal id of user assigned identity. + /// + [JsonProperty(PropertyName = "principalId")] + public string PrincipalId { get; private set; } + + /// + /// Gets the client id of user assigned identity. + /// + [JsonProperty(PropertyName = "clientId")] + public string ClientId { get; private set; } + + } +} diff --git a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/UserAssignedProperties.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/UserAssignedProperties.cs new file mode 100644 index 0000000000000..664a38bffffb3 --- /dev/null +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/UserAssignedProperties.cs @@ -0,0 +1,53 @@ +// +// 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; + + /// + /// User assigned identity properties. + /// + public partial class UserAssignedProperties + { + /// + /// Initializes a new instance of the UserAssignedProperties class. + /// + public UserAssignedProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UserAssignedProperties class. + /// + /// Arm resource id for user assigned identity + /// to be used to fetch MSI token. + public UserAssignedProperties(string resourceId = default(string)) + { + ResourceId = resourceId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets arm resource id for user assigned identity to be used + /// to fetch MSI token. + /// + [JsonProperty(PropertyName = "resourceId")] + public string ResourceId { get; 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 77c0361337444..6af4394416d01 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/ValidationInputRequest.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Models/ValidationInputRequest.cs index 16cd7d432818f..096380231268d 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 ec95819d34deb..b9e61e39f27f4 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 a67857f192ed5..ed8dec97c1dd5 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/Operations.cs b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Operations.cs index 33f2b4b3f03a0..64623033b8053 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Operations.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/Operations.cs @@ -65,12 +65,21 @@ internal Operations(DataBoxManagementClient client) /// /// Thrown when unable to deserialize the response /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// /// /// A response object containing the response body and response headers. /// public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - string apiVersion = "2020-04-01"; + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -78,7 +87,6 @@ internal Operations(DataBoxManagementClient client) { _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } @@ -86,9 +94,9 @@ internal Operations(DataBoxManagementClient client) var _baseUrl = Client.BaseUri.AbsoluteUri; var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.DataBox/operations").ToString(); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { 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 72b5a353c879b..246cab7d06442 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,20 +19,11 @@ 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"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@1.9.1"; - 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=latest --reflect-api-versions --csharp-sdks-folder=D:\\1\\oldProcess\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "e77323387ae041bf21a51ae61bf3a1ce95541a3f"; - 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 dc6a2d4c986fe..2bfcf8490fffc 100644 --- a/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/ServiceOperations.cs +++ b/sdk/databox/Microsoft.Azure.Management.DataBox/src/Generated/ServiceOperations.cs @@ -98,6 +98,10 @@ internal ServiceOperations(DataBoxManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "location"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (availableSkuRequest == null) { throw new ValidationException(ValidationRules.CannotBeNull, "availableSkuRequest"); @@ -106,7 +110,6 @@ internal ServiceOperations(DataBoxManagementClient client) { availableSkuRequest.Validate(); } - string apiVersion = "2020-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -116,7 +119,6 @@ internal ServiceOperations(DataBoxManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("location", location); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("availableSkuRequest", availableSkuRequest); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ListAvailableSkusByResourceGroup", tracingParameters); @@ -128,9 +130,9 @@ internal ServiceOperations(DataBoxManagementClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -301,6 +303,10 @@ internal ServiceOperations(DataBoxManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "location"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (validateAddress == null) { throw new ValidationException(ValidationRules.CannotBeNull, "validateAddress"); @@ -309,7 +315,6 @@ internal ServiceOperations(DataBoxManagementClient client) { validateAddress.Validate(); } - string apiVersion = "2020-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -318,7 +323,6 @@ internal ServiceOperations(DataBoxManagementClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("location", location); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("validateAddress", validateAddress); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ValidateAddressMethod", tracingParameters); @@ -329,9 +333,9 @@ internal ServiceOperations(DataBoxManagementClient client) _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -507,6 +511,10 @@ internal ServiceOperations(DataBoxManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "location"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (validationRequest == null) { throw new ValidationException(ValidationRules.CannotBeNull, "validationRequest"); @@ -515,7 +523,6 @@ internal ServiceOperations(DataBoxManagementClient client) { validationRequest.Validate(); } - string apiVersion = "2020-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -525,7 +532,6 @@ internal ServiceOperations(DataBoxManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("location", location); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("validationRequest", validationRequest); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ValidateInputsByResourceGroup", tracingParameters); @@ -537,9 +543,9 @@ internal ServiceOperations(DataBoxManagementClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -708,6 +714,10 @@ internal ServiceOperations(DataBoxManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "location"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (validationRequest == null) { throw new ValidationException(ValidationRules.CannotBeNull, "validationRequest"); @@ -716,7 +726,6 @@ internal ServiceOperations(DataBoxManagementClient client) { validationRequest.Validate(); } - string apiVersion = "2020-04-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -725,7 +734,6 @@ internal ServiceOperations(DataBoxManagementClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("location", location); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("validationRequest", validationRequest); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "ValidateInputs", tracingParameters); @@ -736,9 +744,9 @@ internal ServiceOperations(DataBoxManagementClient client) _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -910,11 +918,14 @@ internal ServiceOperations(DataBoxManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "location"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (scheduleAvailabilityRequest != null) { scheduleAvailabilityRequest.Validate(); } - string apiVersion = "2020-04-01"; RegionConfigurationRequest regionConfigurationRequest = new RegionConfigurationRequest(); if (scheduleAvailabilityRequest != null || transportAvailabilityRequest != null) { @@ -929,7 +940,6 @@ internal ServiceOperations(DataBoxManagementClient client) _invocationId = ServiceClientTracing.NextInvocationId.ToString(); Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("location", location); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("regionConfigurationRequest", regionConfigurationRequest); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "RegionConfiguration", tracingParameters); @@ -940,9 +950,9 @@ internal ServiceOperations(DataBoxManagementClient client) _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) { @@ -1121,11 +1131,14 @@ internal ServiceOperations(DataBoxManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "location"); } + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } if (scheduleAvailabilityRequest != null) { scheduleAvailabilityRequest.Validate(); } - string apiVersion = "2020-04-01"; RegionConfigurationRequest regionConfigurationRequest = new RegionConfigurationRequest(); if (scheduleAvailabilityRequest != null || transportAvailabilityRequest != null) { @@ -1141,7 +1154,6 @@ internal ServiceOperations(DataBoxManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("location", location); - tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("regionConfigurationRequest", regionConfigurationRequest); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "RegionConfigurationByResourceGroup", tracingParameters); @@ -1153,9 +1165,9 @@ internal ServiceOperations(DataBoxManagementClient client) _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); List _queryParameters = new List(); - if (apiVersion != null) + if (Client.ApiVersion != null) { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); } if (_queryParameters.Count > 0) {