Skip to content

Commit

Permalink
[Databox] SDK refresh to support new API version (2019-09-01) (Azure#…
Browse files Browse the repository at this point in the history
…8219)

* SDK refresh to support new API version (#1)

* Refreshing SDK with support for new API version

* Added recorded sessions to fix CI (#2)


* Added recorded tests

* Coder review fix

* SDK refresh to support new API version (#1)

* Refreshing SDK with support for new API version

* Added recorded sessions to fix CI (#2)


* Added recorded tests

* Adding SDK changes

* code review fix to downgrade the version

* reverting assembly version
  • Loading branch information
sashanm authored and isra-fel committed Oct 23, 2019
1 parent 14ec9ed commit 4bee048
Show file tree
Hide file tree
Showing 84 changed files with 6,477 additions and 490 deletions.
14 changes: 14 additions & 0 deletions eng/mgmt/mgmtmetadata/databox_resource-manager.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Installing AutoRest version: latest
AutoRest installed successfully.
Commencing code generation
Generating CSharp code
Executing AutoRest command
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 --tag=package-2019-09 --csharp-sdks-folder=D:\god\azure_sdk_net\azure-sdk-for-net\sdk
2019-10-17 06:34:11 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: 59998f796f05580bc1d43ba39f0170204113fa91
AutoRest information
Requested version: latest
Bootstrapper version: [email protected]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--This file and it's contents are updated at build time moving or editing might result in build failure. Take due deligence while editing this file-->
<PropertyGroup>
<AzureApiTag>DataBox_2018-01-01;</AzureApiTag>
<AzureApiTag>DataBox_2019-09-01;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ private void Initialize()
Jobs = new JobsOperations(this);
Service = new ServiceOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
ApiVersion = "2018-01-01";
ApiVersion = "2019-09-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
Expand Down Expand Up @@ -363,10 +363,20 @@ private void Initialize()
};
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<CopyLogDetails>("copyLogDetailsType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<CopyLogDetails>("copyLogDetailsType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<DestinationAccountDetails>("dataDestinationType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<DestinationAccountDetails>("dataDestinationType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<JobDetails>("jobDetailsType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<JobDetails>("jobDetailsType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<JobSecrets>("jobSecretsType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<JobSecrets>("jobSecretsType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<ScheduleAvailabilityRequest>("skuName"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<ScheduleAvailabilityRequest>("skuName"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<ValidationInputRequest>("validationType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<ValidationInputRequest>("validationType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<ValidationInputResponse>("validationType"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<ValidationInputResponse>("validationType"));
SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter<ValidationRequest>("validationCategory"));
DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter<ValidationRequest>("validationCategory"));
CustomInitialize();
DeserializationSettings.Converters.Add(new TransformationJsonConverter());
DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,74 @@ public partial interface IServiceOperations
/// </exception>
Task<AzureOperationResponse<IPage<SkuInformation>>> ListAvailableSkusWithHttpMessagesAsync(string location, AvailableSkuRequest availableSkuRequest, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// This method validates the customer shipping address and provide
/// This method provides the list of available skus for the given
/// subscription, resource group and location.
/// </summary>
/// <param name='resourceGroupName'>
/// The Resource Group Name
/// </param>
/// <param name='location'>
/// The location of the resource
/// </param>
/// <param name='availableSkuRequest'>
/// Filters for showing the available skus.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<SkuInformation>>> ListAvailableSkusByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string location, AvailableSkuRequest availableSkuRequest, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// [DEPRECATED NOTICE: This operation will soon be removed] This
/// method validates the customer shipping address and provide
/// alternate addresses if any.
/// </summary>
/// <param name='location'>
/// The location of the resource
/// </param>
/// <param name='shippingAddress'>
/// <param name='validateAddress'>
/// Shipping address of the customer.
/// </param>
/// <param name='deviceType'>
/// Device type to be used for the job. Possible values include:
/// 'DataBox', 'DataBoxDisk', 'DataBoxHeavy'
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="ValidationException">
/// Thrown when a required parameter is null
/// </exception>
[System.Obsolete("This operation is deprecated. Please do not use it any longer.")]
Task<AzureOperationResponse<AddressValidationOutput>> ValidateAddressMethodWithHttpMessagesAsync(string location, ValidateAddress validateAddress, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// This method does all necessary pre-job creation validation under
/// resource group.
/// </summary>
/// <param name='resourceGroupName'>
/// The Resource Group Name
/// </param>
/// <param name='location'>
/// The location of the resource
/// </param>
/// <param name='validationRequest'>
/// Inputs of the customer.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
Expand All @@ -78,7 +134,62 @@ public partial interface IServiceOperations
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<AddressValidationOutput>> ValidateAddressMethodWithHttpMessagesAsync(string location, ShippingAddress shippingAddress, SkuName deviceType, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
Task<AzureOperationResponse<ValidationResponse>> ValidateInputsByResourceGroupWithHttpMessagesAsync(string resourceGroupName, string location, ValidationRequest validationRequest, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// This method does all necessary pre-job creation validation under
/// subscription.
/// </summary>
/// <param name='location'>
/// The location of the resource
/// </param>
/// <param name='validationRequest'>
/// Inputs of the customer.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<ValidationResponse>> ValidateInputsWithHttpMessagesAsync(string location, ValidationRequest validationRequest, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// This API provides configuration details specific to given
/// region/location.
/// </summary>
/// <param name='location'>
/// The location of the resource
/// </param>
/// <param name='scheduleAvailabilityRequest'>
/// Request body to get the availability for scheduling orders.
/// </param>
/// <param name='transportAvailabilityRequest'>
/// Request body to get the transport availability for given sku.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<RegionConfigurationResponse>> RegionConfigurationWithHttpMessagesAsync(string location, ScheduleAvailabilityRequest scheduleAvailabilityRequest = default(ScheduleAvailabilityRequest), TransportAvailabilityRequest transportAvailabilityRequest = default(TransportAvailabilityRequest), Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// This method provides the list of available skus for the given
/// subscription and location.
Expand All @@ -102,5 +213,28 @@ public partial interface IServiceOperations
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<SkuInformation>>> ListAvailableSkusNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
/// This method provides the list of available skus for the given
/// subscription, resource group and location.
/// </summary>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
/// <exception cref="Microsoft.Rest.Azure.CloudException">
/// Thrown when the operation returned an invalid status code
/// </exception>
/// <exception cref="Microsoft.Rest.SerializationException">
/// Thrown when unable to deserialize the response
/// </exception>
/// <exception cref="Microsoft.Rest.ValidationException">
/// Thrown when a required parameter is null
/// </exception>
Task<AzureOperationResponse<IPage<SkuInformation>>> ListAvailableSkusByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,17 @@ public AccountCredentialDetails()
/// Initializes a new instance of the AccountCredentialDetails class.
/// </summary>
/// <param name="accountName">Name of the account.</param>
/// <param name="dataDestinationType">Data Destination Type. Possible
/// values include: 'StorageAccount', 'ManagedDisk'</param>
/// <param name="accountConnectionString">Connection string of the
/// account endpoint to use the account as a storage endpoint on the
/// device.</param>
/// <param name="shareCredentialDetails">Per share level unencrypted
/// access credentials.</param>
public AccountCredentialDetails(string accountName = default(string), string accountConnectionString = default(string), IList<ShareCredentialDetails> shareCredentialDetails = default(IList<ShareCredentialDetails>))
public AccountCredentialDetails(string accountName = default(string), DataDestinationType? dataDestinationType = default(DataDestinationType?), string accountConnectionString = default(string), IList<ShareCredentialDetails> shareCredentialDetails = default(IList<ShareCredentialDetails>))
{
AccountName = accountName;
DataDestinationType = dataDestinationType;
AccountConnectionString = accountConnectionString;
ShareCredentialDetails = shareCredentialDetails;
CustomInit();
Expand All @@ -56,6 +59,13 @@ public AccountCredentialDetails()
[JsonProperty(PropertyName = "accountName")]
public string AccountName { get; private set; }

/// <summary>
/// Gets data Destination Type. Possible values include:
/// 'StorageAccount', 'ManagedDisk'
/// </summary>
[JsonProperty(PropertyName = "dataDestinationType")]
public DataDestinationType? DataDestinationType { get; private set; }

/// <summary>
/// Gets connection string of the account endpoint to use the account
/// as a storage endpoint on the device.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ public AddressValidationOutput()
/// <summary>
/// Initializes a new instance of the AddressValidationOutput class.
/// </summary>
/// <param name="error">Error code and message of validation
/// response.</param>
/// <param name="validationStatus">The address validation status.
/// Possible values include: 'Valid', 'Invalid', 'Ambiguous'</param>
/// <param name="alternateAddresses">List of alternate
/// addresses.</param>
public AddressValidationOutput(AddressValidationStatus? validationStatus = default(AddressValidationStatus?), IList<ShippingAddress> alternateAddresses = default(IList<ShippingAddress>))
public AddressValidationOutput(Error error = default(Error), AddressValidationStatus? validationStatus = default(AddressValidationStatus?), IList<ShippingAddress> alternateAddresses = default(IList<ShippingAddress>))
{
Error = error;
ValidationStatus = validationStatus;
AlternateAddresses = alternateAddresses;
CustomInit();
Expand All @@ -50,6 +53,12 @@ public AddressValidationOutput()
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets error code and message of validation response.
/// </summary>
[JsonProperty(PropertyName = "properties.error")]
public Error Error { get; private set; }

/// <summary>
/// Gets the address validation status. Possible values include:
/// 'Valid', 'Invalid', 'Ambiguous'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
// <auto-generated>
// 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.
// </auto-generated>

namespace Microsoft.Azure.Management.DataBox.Models
{
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

/// <summary>
/// The address validation output.
/// </summary>
[Newtonsoft.Json.JsonObject("ValidateAddress")]
public partial class AddressValidationProperties : ValidationInputResponse
{
/// <summary>
/// Initializes a new instance of the AddressValidationProperties
/// class.
/// </summary>
public AddressValidationProperties()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the AddressValidationProperties
/// class.
/// </summary>
/// <param name="error">Error code and message of validation
/// response.</param>
/// <param name="validationStatus">The address validation status.
/// Possible values include: 'Valid', 'Invalid', 'Ambiguous'</param>
/// <param name="alternateAddresses">List of alternate
/// addresses.</param>
public AddressValidationProperties(Error error = default(Error), AddressValidationStatus? validationStatus = default(AddressValidationStatus?), IList<ShippingAddress> alternateAddresses = default(IList<ShippingAddress>))
: base(error)
{
ValidationStatus = validationStatus;
AlternateAddresses = alternateAddresses;
CustomInit();
}

/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();

/// <summary>
/// Gets the address validation status. Possible values include:
/// 'Valid', 'Invalid', 'Ambiguous'
/// </summary>
[JsonProperty(PropertyName = "validationStatus")]
public AddressValidationStatus? ValidationStatus { get; private set; }

/// <summary>
/// Gets list of alternate addresses.
/// </summary>
[JsonProperty(PropertyName = "alternateAddresses")]
public IList<ShippingAddress> AlternateAddresses { get; private set; }

}
}
Loading

0 comments on commit 4bee048

Please sign in to comment.