Skip to content

Commit

Permalink
[Microsoft.StorageSync] Update SDK to use 2019-06-01 API version (#8632)
Browse files Browse the repository at this point in the history
* update to 2019-06-01 API version, and update all test records

* update SDK version, changelog, and props

* Bump major version of SDK
  • Loading branch information
anpint authored and isra-fel committed Nov 7, 2019
1 parent 78de8fb commit 92c2177
Show file tree
Hide file tree
Showing 40 changed files with 7,154 additions and 5,846 deletions.
14 changes: 14 additions & 0 deletions eng/mgmt/mgmtmetadata/storagesync_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/storagesync/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\github\anpint\azure-sdk-for-net\sdk
2019-11-05 18:30:32 UTC
Azure-rest-api-specs repository information
GitHub fork: Azure
Branch: master
Commit: c42f3f3427766255b06a01846e1ec497c4d3c94a
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>StorageSync_2019-03-01;</AzureApiTag>
<AzureApiTag>StorageSync_2019-06-01;</AzureApiTag>
<PackageTags>$(PackageTags);$(CommonTags);$(AzureApiTag);</PackageTags>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Microsoft.Azure.Management.StorageSync release notes

### Changes in 2019-06-01

- Support for cloud tiering health and recall status for server endpoints

### Changes in 2019-03-01

- Support for Invoke Change Detection command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public RestoreFileSpec()
public string Path { get; set; }

/// <summary>
/// Gets restore file spec isdir
/// Gets or sets restore file spec isdir
/// </summary>
[JsonProperty(PropertyName = "isdir")]
public bool? Isdir { get; private set; }
public bool? Isdir { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ public ServerEndpoint()
/// data transfer storage account tenant ID</param>
/// <param name="offlineDataTransferShareName">Offline data transfer
/// share name</param>
public ServerEndpoint(string id = default(string), string name = default(string), string type = default(string), string serverLocalPath = default(string), string cloudTiering = default(string), int? volumeFreeSpacePercent = default(int?), int? tierFilesOlderThanDays = default(int?), string friendlyName = default(string), string serverResourceId = default(string), string provisioningState = default(string), string lastWorkflowId = default(string), string lastOperationName = default(string), ServerEndpointSyncStatus syncStatus = default(ServerEndpointSyncStatus), string offlineDataTransfer = default(string), string offlineDataTransferStorageAccountResourceId = default(string), string offlineDataTransferStorageAccountTenantId = default(string), string offlineDataTransferShareName = default(string))
/// <param name="cloudTieringStatus">Cloud tiering status. Only
/// populated if cloud tiering is enabled.</param>
/// <param name="recallStatus">Recall status. Only populated if cloud
/// tiering is enabled.</param>
public ServerEndpoint(string id = default(string), string name = default(string), string type = default(string), string serverLocalPath = default(string), string cloudTiering = default(string), int? volumeFreeSpacePercent = default(int?), int? tierFilesOlderThanDays = default(int?), string friendlyName = default(string), string serverResourceId = default(string), string provisioningState = default(string), string lastWorkflowId = default(string), string lastOperationName = default(string), ServerEndpointSyncStatus syncStatus = default(ServerEndpointSyncStatus), string offlineDataTransfer = default(string), string offlineDataTransferStorageAccountResourceId = default(string), string offlineDataTransferStorageAccountTenantId = default(string), string offlineDataTransferShareName = default(string), ServerEndpointCloudTieringStatus cloudTieringStatus = default(ServerEndpointCloudTieringStatus), ServerEndpointRecallStatus recallStatus = default(ServerEndpointRecallStatus))
: base(id, name, type)
{
ServerLocalPath = serverLocalPath;
Expand All @@ -78,6 +82,8 @@ public ServerEndpoint()
OfflineDataTransferStorageAccountResourceId = offlineDataTransferStorageAccountResourceId;
OfflineDataTransferStorageAccountTenantId = offlineDataTransferStorageAccountTenantId;
OfflineDataTransferShareName = offlineDataTransferShareName;
CloudTieringStatus = cloudTieringStatus;
RecallStatus = recallStatus;
CustomInit();
}

Expand Down Expand Up @@ -172,6 +178,19 @@ public ServerEndpoint()
[JsonProperty(PropertyName = "properties.offlineDataTransferShareName")]
public string OfflineDataTransferShareName { get; set; }

/// <summary>
/// Gets cloud tiering status. Only populated if cloud tiering is
/// enabled.
/// </summary>
[JsonProperty(PropertyName = "properties.cloudTieringStatus")]
public ServerEndpointCloudTieringStatus CloudTieringStatus { get; private set; }

/// <summary>
/// Gets recall status. Only populated if cloud tiering is enabled.
/// </summary>
[JsonProperty(PropertyName = "properties.recallStatus")]
public ServerEndpointRecallStatus RecallStatus { get; private set; }

/// <summary>
/// Validate the object.
/// </summary>
Expand All @@ -196,6 +215,14 @@ public virtual void Validate()
{
throw new ValidationException(ValidationRules.InclusiveMinimum, "TierFilesOlderThanDays", 0);
}
if (SyncStatus != null)
{
SyncStatus.Validate();
}
if (RecallStatus != null)
{
RecallStatus.Validate();
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// <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.StorageSync.Models
{
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Server endpoint cloud tiering status object.
/// </summary>
public partial class ServerEndpointCloudTieringStatus
{
/// <summary>
/// Initializes a new instance of the ServerEndpointCloudTieringStatus
/// class.
/// </summary>
public ServerEndpointCloudTieringStatus()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ServerEndpointCloudTieringStatus
/// class.
/// </summary>
/// <param name="health">Cloud tiering health state. Possible values
/// include: 'Healthy', 'Error'</param>
/// <param name="lastUpdatedTimestamp">Last updated timestamp</param>
/// <param name="lastCloudTieringResult">Last cloud tiering result
/// (HResult)</param>
/// <param name="lastSuccessTimestamp">Last cloud tiering success
/// timestamp</param>
public ServerEndpointCloudTieringStatus(string health = default(string), System.DateTime? lastUpdatedTimestamp = default(System.DateTime?), int? lastCloudTieringResult = default(int?), System.DateTime? lastSuccessTimestamp = default(System.DateTime?))
{
Health = health;
LastUpdatedTimestamp = lastUpdatedTimestamp;
LastCloudTieringResult = lastCloudTieringResult;
LastSuccessTimestamp = lastSuccessTimestamp;
CustomInit();
}

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

/// <summary>
/// Gets cloud tiering health state. Possible values include:
/// 'Healthy', 'Error'
/// </summary>
[JsonProperty(PropertyName = "health")]
public string Health { get; private set; }

/// <summary>
/// Gets last updated timestamp
/// </summary>
[JsonProperty(PropertyName = "lastUpdatedTimestamp")]
public System.DateTime? LastUpdatedTimestamp { get; private set; }

/// <summary>
/// Gets last cloud tiering result (HResult)
/// </summary>
[JsonProperty(PropertyName = "lastCloudTieringResult")]
public int? LastCloudTieringResult { get; private set; }

/// <summary>
/// Gets last cloud tiering success timestamp
/// </summary>
[JsonProperty(PropertyName = "lastSuccessTimestamp")]
public System.DateTime? LastSuccessTimestamp { get; private set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,34 @@

namespace Microsoft.Azure.Management.StorageSync.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Files not syncing error object
/// </summary>
public partial class FilesNotSyncingError
public partial class ServerEndpointFilesNotSyncingError
{
/// <summary>
/// Initializes a new instance of the FilesNotSyncingError class.
/// Initializes a new instance of the
/// ServerEndpointFilesNotSyncingError class.
/// </summary>
public FilesNotSyncingError()
public ServerEndpointFilesNotSyncingError()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the FilesNotSyncingError class.
/// Initializes a new instance of the
/// ServerEndpointFilesNotSyncingError class.
/// </summary>
/// <param name="errorCode">Error code (HResult)</param>
/// <param name="persistentCount">Count of persistent files not syncing
/// with the specified error code</param>
/// <param name="transientCount">Count of transient files not syncing
/// with the specified error code</param>
public FilesNotSyncingError(int? errorCode = default(int?), long? persistentCount = default(long?), long? transientCount = default(long?))
public ServerEndpointFilesNotSyncingError(int? errorCode = default(int?), long? persistentCount = default(long?), long? transientCount = default(long?))
{
ErrorCode = errorCode;
PersistentCount = persistentCount;
Expand Down Expand Up @@ -67,5 +70,22 @@ public FilesNotSyncingError()
[JsonProperty(PropertyName = "transientCount")]
public long? TransientCount { get; private set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (PersistentCount < 0)
{
throw new ValidationException(ValidationRules.InclusiveMinimum, "PersistentCount", 0);
}
if (TransientCount < 0)
{
throw new ValidationException(ValidationRules.InclusiveMinimum, "TransientCount", 0);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// <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.StorageSync.Models
{
using Microsoft.Rest;
using Newtonsoft.Json;
using System.Linq;

/// <summary>
/// Server endpoint recall error object
/// </summary>
public partial class ServerEndpointRecallError
{
/// <summary>
/// Initializes a new instance of the ServerEndpointRecallError class.
/// </summary>
public ServerEndpointRecallError()
{
CustomInit();
}

/// <summary>
/// Initializes a new instance of the ServerEndpointRecallError class.
/// </summary>
/// <param name="errorCode">Error code (HResult)</param>
/// <param name="count">Count of occurences of the error</param>
public ServerEndpointRecallError(int? errorCode = default(int?), long? count = default(long?))
{
ErrorCode = errorCode;
Count = count;
CustomInit();
}

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

/// <summary>
/// Gets error code (HResult)
/// </summary>
[JsonProperty(PropertyName = "errorCode")]
public int? ErrorCode { get; private set; }

/// <summary>
/// Gets count of occurences of the error
/// </summary>
[JsonProperty(PropertyName = "count")]
public long? Count { get; private set; }

/// <summary>
/// Validate the object.
/// </summary>
/// <exception cref="ValidationException">
/// Thrown if validation fails
/// </exception>
public virtual void Validate()
{
if (Count < 0)
{
throw new ValidationException(ValidationRules.InclusiveMinimum, "Count", 0);
}
}
}
}
Loading

0 comments on commit 92c2177

Please sign in to comment.