From cbb59105b967e8fb2e9ad0c529a1c33a2c48cc71 Mon Sep 17 00:00:00 2001 From: adxsdknet <39844661+adxsdknet@users.noreply.github.com> Date: Wed, 27 Mar 2019 12:35:35 -0700 Subject: [PATCH] .NET SDK Resource Provider:'StorageSync' (#5596) REST Spec PR 'https://github.com/Azure/azure-rest-api-specs/pull/5210' REST Spec PR Author 'anpint' REST Spec PR Last commit --- src/SDKs/StorageSync/AzSdk.RP.props | 2 +- .../Generated/Models/CloudEndpoint.cs | 13 +- .../Models/CloudEndpointCreateParameters.cs | 13 +- .../Generated/Models/FilesNotSyncingError.cs | 71 ++++++++ .../Generated/Models/ServerEndpoint.cs | 24 ++- .../Generated/Models/ServerEndpointHealth.cs | 143 ---------------- .../Models/ServerEndpointSyncStatus.cs | 151 +++++++++++++++++ .../Generated/Models/SyncActivityStatus.cs | 93 +++++++++++ .../Generated/Models/SyncProgressStatus.cs | 152 ------------------ .../Generated/Models/SyncSessionStatus.cs | 65 +++++--- .../Generated/SdkInfo_MicrosoftStorageSync.cs | 25 +-- .../Generated/StorageSyncManagementClient.cs | 2 +- 12 files changed, 385 insertions(+), 369 deletions(-) create mode 100644 src/SDKs/StorageSync/Management.StorageSync/Generated/Models/FilesNotSyncingError.cs delete mode 100644 src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointHealth.cs create mode 100644 src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointSyncStatus.cs create mode 100644 src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncActivityStatus.cs delete mode 100644 src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncProgressStatus.cs diff --git a/src/SDKs/StorageSync/AzSdk.RP.props b/src/SDKs/StorageSync/AzSdk.RP.props index de4b06fcbbc54..da09f5ad832f5 100644 --- a/src/SDKs/StorageSync/AzSdk.RP.props +++ b/src/SDKs/StorageSync/AzSdk.RP.props @@ -1,7 +1,7 @@  - StorageSync_2018-10-01; + StorageSync_2019-02-01; $(PackageTags);$(CommonTags);$(AzureApiTag); \ No newline at end of file diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpoint.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpoint.cs index 1a828ac390577..bf58ee11a55a7 100644 --- a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpoint.cs +++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpoint.cs @@ -40,8 +40,7 @@ public CloudEndpoint() /// Microsoft.Storage/storageAccounts. /// Storage Account Resource /// Id - /// Storage Account Share - /// name + /// Azure file share name /// Storage Account Tenant /// Id /// Partnership Id @@ -52,11 +51,11 @@ public CloudEndpoint() /// CloudEndpoint lastWorkflowId /// Resource Last Operation /// Name - public CloudEndpoint(string id = default(string), string name = default(string), string type = default(string), string storageAccountResourceId = default(string), string storageAccountShareName = default(string), string storageAccountTenantId = default(string), string partnershipId = default(string), string friendlyName = default(string), string backupEnabled = default(string), string provisioningState = default(string), string lastWorkflowId = default(string), string lastOperationName = default(string)) + public CloudEndpoint(string id = default(string), string name = default(string), string type = default(string), string storageAccountResourceId = default(string), string azureFileShareName = default(string), string storageAccountTenantId = default(string), string partnershipId = default(string), string friendlyName = default(string), string backupEnabled = default(string), string provisioningState = default(string), string lastWorkflowId = default(string), string lastOperationName = default(string)) : base(id, name, type) { StorageAccountResourceId = storageAccountResourceId; - StorageAccountShareName = storageAccountShareName; + AzureFileShareName = azureFileShareName; StorageAccountTenantId = storageAccountTenantId; PartnershipId = partnershipId; FriendlyName = friendlyName; @@ -79,10 +78,10 @@ public CloudEndpoint() public string StorageAccountResourceId { get; set; } /// - /// Gets or sets storage Account Share name + /// Gets or sets azure file share name /// - [JsonProperty(PropertyName = "properties.storageAccountShareName")] - public string StorageAccountShareName { get; set; } + [JsonProperty(PropertyName = "properties.azureFileShareName")] + public string AzureFileShareName { get; set; } /// /// Gets or sets storage Account Tenant Id diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointCreateParameters.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointCreateParameters.cs index 856098ec20044..f4619d20f4dbf 100644 --- a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointCreateParameters.cs +++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/CloudEndpointCreateParameters.cs @@ -42,15 +42,14 @@ public CloudEndpointCreateParameters() /// Microsoft.Storage/storageAccounts. /// Storage Account Resource /// Id - /// Storage Account Share - /// name + /// Azure file share name /// Storage Account Tenant /// Id - public CloudEndpointCreateParameters(string id = default(string), string name = default(string), string type = default(string), string storageAccountResourceId = default(string), string storageAccountShareName = default(string), string storageAccountTenantId = default(string)) + public CloudEndpointCreateParameters(string id = default(string), string name = default(string), string type = default(string), string storageAccountResourceId = default(string), string azureFileShareName = default(string), string storageAccountTenantId = default(string)) : base(id, name, type) { StorageAccountResourceId = storageAccountResourceId; - StorageAccountShareName = storageAccountShareName; + AzureFileShareName = azureFileShareName; StorageAccountTenantId = storageAccountTenantId; CustomInit(); } @@ -67,10 +66,10 @@ public CloudEndpointCreateParameters() public string StorageAccountResourceId { get; set; } /// - /// Gets or sets storage Account Share name + /// Gets or sets azure file share name /// - [JsonProperty(PropertyName = "properties.storageAccountShareName")] - public string StorageAccountShareName { get; set; } + [JsonProperty(PropertyName = "properties.azureFileShareName")] + public string AzureFileShareName { get; set; } /// /// Gets or sets storage Account Tenant Id diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/FilesNotSyncingError.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/FilesNotSyncingError.cs new file mode 100644 index 0000000000000..239be1058b689 --- /dev/null +++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/FilesNotSyncingError.cs @@ -0,0 +1,71 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.StorageSync.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Files not syncing error object + /// + public partial class FilesNotSyncingError + { + /// + /// Initializes a new instance of the FilesNotSyncingError class. + /// + public FilesNotSyncingError() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the FilesNotSyncingError class. + /// + /// Error code (HResult) + /// Count of persistent files not syncing + /// with the specified error code + /// Count of transient files not syncing + /// with the specified error code + public FilesNotSyncingError(int? errorCode = default(int?), long? persistentCount = default(long?), long? transientCount = default(long?)) + { + ErrorCode = errorCode; + PersistentCount = persistentCount; + TransientCount = transientCount; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets error code (HResult) + /// + [JsonProperty(PropertyName = "errorCode")] + public int? ErrorCode { get; private set; } + + /// + /// Gets count of persistent files not syncing with the specified error + /// code + /// + [JsonProperty(PropertyName = "persistentCount")] + public long? PersistentCount { get; private set; } + + /// + /// Gets count of transient files not syncing with the specified error + /// code + /// + [JsonProperty(PropertyName = "transientCount")] + public long? TransientCount { get; private set; } + + } +} diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpoint.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpoint.cs index 802a9ba528de9..b5a9f91055c3e 100644 --- a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpoint.cs +++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpoint.cs @@ -52,7 +52,7 @@ public ServerEndpoint() /// ServerEndpoint lastWorkflowId /// Resource Last Operation /// Name - /// Server Endpoint properties. + /// Server Endpoint sync status /// Offline data transfer. Possible /// values include: 'on', 'off' /// Offline @@ -61,7 +61,7 @@ public ServerEndpoint() /// data transfer storage account tenant ID /// Offline data transfer /// share name - 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), ServerEndpointHealth syncStatus = default(ServerEndpointHealth), string offlineDataTransfer = default(string), string offlineDataTransferStorageAccountResourceId = default(string), string offlineDataTransferStorageAccountTenantId = default(string), string offlineDataTransferShareName = default(string)) + 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)) : base(id, name, type) { ServerLocalPath = serverLocalPath; @@ -124,28 +124,28 @@ public ServerEndpoint() public string ServerResourceId { get; set; } /// - /// Gets or sets serverEndpoint Provisioning State + /// Gets serverEndpoint Provisioning State /// [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; set; } + public string ProvisioningState { get; private set; } /// - /// Gets or sets serverEndpoint lastWorkflowId + /// Gets serverEndpoint lastWorkflowId /// [JsonProperty(PropertyName = "properties.lastWorkflowId")] - public string LastWorkflowId { get; set; } + public string LastWorkflowId { get; private set; } /// - /// Gets or sets resource Last Operation Name + /// Gets resource Last Operation Name /// [JsonProperty(PropertyName = "properties.lastOperationName")] - public string LastOperationName { get; set; } + public string LastOperationName { get; private set; } /// - /// Gets or sets server Endpoint properties. + /// Gets server Endpoint sync status /// [JsonProperty(PropertyName = "properties.syncStatus")] - public ServerEndpointHealth SyncStatus { get; set; } + public ServerEndpointSyncStatus SyncStatus { get; private set; } /// /// Gets or sets offline data transfer. Possible values include: 'on', @@ -196,10 +196,6 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.InclusiveMinimum, "TierFilesOlderThanDays", 0); } - if (SyncStatus != null) - { - SyncStatus.Validate(); - } } } } diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointHealth.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointHealth.cs deleted file mode 100644 index 4faddf7d219a5..0000000000000 --- a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointHealth.cs +++ /dev/null @@ -1,143 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.StorageSync.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// ServerEndpoint Health object. - /// - public partial class ServerEndpointHealth - { - /// - /// Initializes a new instance of the ServerEndpointHealth class. - /// - public ServerEndpointHealth() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ServerEndpointHealth class. - /// - /// Download Health Status. Possible - /// values include: 'Healthy', 'Error', 'SyncBlockedForRestore', - /// 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' - /// Upload Health Status. Possible values - /// include: 'Healthy', 'Error', 'SyncBlockedForRestore', - /// 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' - /// Combined Health Status. Possible - /// values include: 'Healthy', 'Error', 'SyncBlockedForRestore', - /// 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' - /// Last Updated Timestamp - /// Upload Status - /// Download Status - /// Current progress - /// Offline Data Transfer - /// State. Possible values include: 'InProgress', 'Stopping', - /// 'NotRunning', 'Complete' - public ServerEndpointHealth(string downloadHealth = default(string), string uploadHealth = default(string), string combinedHealth = default(string), System.DateTime? lastUpdatedTimestamp = default(System.DateTime?), SyncSessionStatus uploadStatus = default(SyncSessionStatus), SyncSessionStatus downloadStatus = default(SyncSessionStatus), SyncProgressStatus currentProgress = default(SyncProgressStatus), string offlineDataTransferStatus = default(string)) - { - DownloadHealth = downloadHealth; - UploadHealth = uploadHealth; - CombinedHealth = combinedHealth; - LastUpdatedTimestamp = lastUpdatedTimestamp; - UploadStatus = uploadStatus; - DownloadStatus = downloadStatus; - CurrentProgress = currentProgress; - OfflineDataTransferStatus = offlineDataTransferStatus; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets download Health Status. Possible values include: - /// 'Healthy', 'Error', 'SyncBlockedForRestore', - /// 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' - /// - [JsonProperty(PropertyName = "downloadHealth")] - public string DownloadHealth { get; set; } - - /// - /// Gets or sets upload Health Status. Possible values include: - /// 'Healthy', 'Error', 'SyncBlockedForRestore', - /// 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' - /// - [JsonProperty(PropertyName = "uploadHealth")] - public string UploadHealth { get; set; } - - /// - /// Gets or sets combined Health Status. Possible values include: - /// 'Healthy', 'Error', 'SyncBlockedForRestore', - /// 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' - /// - [JsonProperty(PropertyName = "combinedHealth")] - public string CombinedHealth { get; set; } - - /// - /// Gets or sets last Updated Timestamp - /// - [JsonProperty(PropertyName = "lastUpdatedTimestamp")] - public System.DateTime? LastUpdatedTimestamp { get; set; } - - /// - /// Gets or sets upload Status - /// - [JsonProperty(PropertyName = "uploadStatus")] - public SyncSessionStatus UploadStatus { get; set; } - - /// - /// Gets or sets download Status - /// - [JsonProperty(PropertyName = "downloadStatus")] - public SyncSessionStatus DownloadStatus { get; set; } - - /// - /// Gets or sets current progress - /// - [JsonProperty(PropertyName = "currentProgress")] - public SyncProgressStatus CurrentProgress { get; set; } - - /// - /// Gets or sets offline Data Transfer State. Possible values include: - /// 'InProgress', 'Stopping', 'NotRunning', 'Complete' - /// - [JsonProperty(PropertyName = "offlineDataTransferStatus")] - public string OfflineDataTransferStatus { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (UploadStatus != null) - { - UploadStatus.Validate(); - } - if (DownloadStatus != null) - { - DownloadStatus.Validate(); - } - if (CurrentProgress != null) - { - CurrentProgress.Validate(); - } - } - } -} diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointSyncStatus.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointSyncStatus.cs new file mode 100644 index 0000000000000..b2d57894b5451 --- /dev/null +++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/ServerEndpointSyncStatus.cs @@ -0,0 +1,151 @@ +// +// 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.StorageSync.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Server Endpoint sync status + /// + public partial class ServerEndpointSyncStatus + { + /// + /// Initializes a new instance of the ServerEndpointSyncStatus class. + /// + public ServerEndpointSyncStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ServerEndpointSyncStatus class. + /// + /// Download Health Status. Possible + /// values include: 'Healthy', 'Error', 'SyncBlockedForRestore', + /// 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + /// Upload Health Status. Possible values + /// include: 'Healthy', 'Error', 'SyncBlockedForRestore', + /// 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + /// Combined Health Status. Possible + /// values include: 'Healthy', 'Error', 'SyncBlockedForRestore', + /// 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + /// Sync activity. Possible values include: + /// 'Upload', 'Download', 'UploadAndDownload' + /// Total count of + /// persistent files not syncing (combined upload + download). Reserved + /// for future use. + /// Last Updated Timestamp + /// Upload Status + /// Download Status + /// Upload sync activity + /// Download sync activity + /// Offline Data Transfer + /// State. Possible values include: 'InProgress', 'Stopping', + /// 'NotRunning', 'Complete' + public ServerEndpointSyncStatus(string downloadHealth = default(string), string uploadHealth = default(string), string combinedHealth = default(string), string syncActivity = default(string), long? totalPersistentFilesNotSyncingCount = default(long?), System.DateTime? lastUpdatedTimestamp = default(System.DateTime?), SyncSessionStatus uploadStatus = default(SyncSessionStatus), SyncSessionStatus downloadStatus = default(SyncSessionStatus), SyncActivityStatus uploadActivity = default(SyncActivityStatus), SyncActivityStatus downloadActivity = default(SyncActivityStatus), string offlineDataTransferStatus = default(string)) + { + DownloadHealth = downloadHealth; + UploadHealth = uploadHealth; + CombinedHealth = combinedHealth; + SyncActivity = syncActivity; + TotalPersistentFilesNotSyncingCount = totalPersistentFilesNotSyncingCount; + LastUpdatedTimestamp = lastUpdatedTimestamp; + UploadStatus = uploadStatus; + DownloadStatus = downloadStatus; + UploadActivity = uploadActivity; + DownloadActivity = downloadActivity; + OfflineDataTransferStatus = offlineDataTransferStatus; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets download Health Status. Possible values include: 'Healthy', + /// 'Error', 'SyncBlockedForRestore', + /// 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + /// + [JsonProperty(PropertyName = "downloadHealth")] + public string DownloadHealth { get; private set; } + + /// + /// Gets upload Health Status. Possible values include: 'Healthy', + /// 'Error', 'SyncBlockedForRestore', + /// 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + /// + [JsonProperty(PropertyName = "uploadHealth")] + public string UploadHealth { get; private set; } + + /// + /// Gets combined Health Status. Possible values include: 'Healthy', + /// 'Error', 'SyncBlockedForRestore', + /// 'SyncBlockedForChangeDetectionPostRestore', 'NoActivity' + /// + [JsonProperty(PropertyName = "combinedHealth")] + public string CombinedHealth { get; private set; } + + /// + /// Gets sync activity. Possible values include: 'Upload', 'Download', + /// 'UploadAndDownload' + /// + [JsonProperty(PropertyName = "syncActivity")] + public string SyncActivity { get; private set; } + + /// + /// Gets total count of persistent files not syncing (combined upload + + /// download). Reserved for future use. + /// + [JsonProperty(PropertyName = "totalPersistentFilesNotSyncingCount")] + public long? TotalPersistentFilesNotSyncingCount { get; private set; } + + /// + /// Gets last Updated Timestamp + /// + [JsonProperty(PropertyName = "lastUpdatedTimestamp")] + public System.DateTime? LastUpdatedTimestamp { get; private set; } + + /// + /// Gets upload Status + /// + [JsonProperty(PropertyName = "uploadStatus")] + public SyncSessionStatus UploadStatus { get; private set; } + + /// + /// Gets download Status + /// + [JsonProperty(PropertyName = "downloadStatus")] + public SyncSessionStatus DownloadStatus { get; private set; } + + /// + /// Gets upload sync activity + /// + [JsonProperty(PropertyName = "uploadActivity")] + public SyncActivityStatus UploadActivity { get; private set; } + + /// + /// Gets download sync activity + /// + [JsonProperty(PropertyName = "downloadActivity")] + public SyncActivityStatus DownloadActivity { get; private set; } + + /// + /// Gets offline Data Transfer State. Possible values include: + /// 'InProgress', 'Stopping', 'NotRunning', 'Complete' + /// + [JsonProperty(PropertyName = "offlineDataTransferStatus")] + public string OfflineDataTransferStatus { get; private set; } + + } +} diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncActivityStatus.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncActivityStatus.cs new file mode 100644 index 0000000000000..fcadac40f02cd --- /dev/null +++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncActivityStatus.cs @@ -0,0 +1,93 @@ +// +// 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.StorageSync.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Sync Session status object. + /// + public partial class SyncActivityStatus + { + /// + /// Initializes a new instance of the SyncActivityStatus class. + /// + public SyncActivityStatus() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SyncActivityStatus class. + /// + /// Timestamp when properties were + /// updated + /// Per item error count + /// Applied item count. + /// Total item count (if + /// available) + /// Applied bytes + /// Total bytes (if available) + public SyncActivityStatus(System.DateTime? timestamp = default(System.DateTime?), long? perItemErrorCount = default(long?), long? appliedItemCount = default(long?), long? totalItemCount = default(long?), long? appliedBytes = default(long?), long? totalBytes = default(long?)) + { + Timestamp = timestamp; + PerItemErrorCount = perItemErrorCount; + AppliedItemCount = appliedItemCount; + TotalItemCount = totalItemCount; + AppliedBytes = appliedBytes; + TotalBytes = totalBytes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets timestamp when properties were updated + /// + [JsonProperty(PropertyName = "timestamp")] + public System.DateTime? Timestamp { get; private set; } + + /// + /// Gets per item error count + /// + [JsonProperty(PropertyName = "perItemErrorCount")] + public long? PerItemErrorCount { get; private set; } + + /// + /// Gets applied item count. + /// + [JsonProperty(PropertyName = "appliedItemCount")] + public long? AppliedItemCount { get; private set; } + + /// + /// Gets total item count (if available) + /// + [JsonProperty(PropertyName = "totalItemCount")] + public long? TotalItemCount { get; private set; } + + /// + /// Gets applied bytes + /// + [JsonProperty(PropertyName = "appliedBytes")] + public long? AppliedBytes { get; private set; } + + /// + /// Gets total bytes (if available) + /// + [JsonProperty(PropertyName = "totalBytes")] + public long? TotalBytes { get; private set; } + + } +} diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncProgressStatus.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncProgressStatus.cs deleted file mode 100644 index e514dfeffd50d..0000000000000 --- a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncProgressStatus.cs +++ /dev/null @@ -1,152 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.StorageSync.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Sync Session status object. - /// - public partial class SyncProgressStatus - { - /// - /// Initializes a new instance of the SyncProgressStatus class. - /// - public SyncProgressStatus() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SyncProgressStatus class. - /// - /// Progress timestamp - /// Sync direction. Possible values - /// include: 'none', 'initialize', 'download', 'upload', - /// 'recall' - /// Per item error count - /// Applied item count. - /// Total item count - /// Applied bytes - /// Total bytes - public SyncProgressStatus(System.DateTime? progressTimestamp = default(System.DateTime?), string syncDirection = default(string), int? perItemErrorCount = default(int?), int? appliedItemCount = default(int?), int? totalItemCount = default(int?), int? appliedBytes = default(int?), int? totalBytes = default(int?)) - { - ProgressTimestamp = progressTimestamp; - SyncDirection = syncDirection; - PerItemErrorCount = perItemErrorCount; - AppliedItemCount = appliedItemCount; - TotalItemCount = totalItemCount; - AppliedBytes = appliedBytes; - TotalBytes = totalBytes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets progress timestamp - /// - [JsonProperty(PropertyName = "progressTimestamp")] - public System.DateTime? ProgressTimestamp { get; set; } - - /// - /// Gets or sets sync direction. Possible values include: 'none', - /// 'initialize', 'download', 'upload', 'recall' - /// - [JsonProperty(PropertyName = "syncDirection")] - public string SyncDirection { get; set; } - - /// - /// Gets or sets per item error count - /// - [JsonProperty(PropertyName = "perItemErrorCount")] - public int? PerItemErrorCount { get; set; } - - /// - /// Gets or sets applied item count. - /// - [JsonProperty(PropertyName = "appliedItemCount")] - public int? AppliedItemCount { get; set; } - - /// - /// Gets or sets total item count - /// - [JsonProperty(PropertyName = "totalItemCount")] - public int? TotalItemCount { get; set; } - - /// - /// Gets or sets applied bytes - /// - [JsonProperty(PropertyName = "appliedBytes")] - public int? AppliedBytes { get; set; } - - /// - /// Gets or sets total bytes - /// - [JsonProperty(PropertyName = "totalBytes")] - public int? TotalBytes { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (PerItemErrorCount > 2147483647) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "PerItemErrorCount", 2147483647); - } - if (PerItemErrorCount < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "PerItemErrorCount", 0); - } - if (AppliedItemCount > 2147483647) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "AppliedItemCount", 2147483647); - } - if (AppliedItemCount < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "AppliedItemCount", 0); - } - if (TotalItemCount > 2147483647) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "TotalItemCount", 2147483647); - } - if (TotalItemCount < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "TotalItemCount", 0); - } - if (AppliedBytes > 2147483647) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "AppliedBytes", 2147483647); - } - if (AppliedBytes < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "AppliedBytes", 0); - } - if (TotalBytes > 2147483647) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "TotalBytes", 2147483647); - } - if (TotalBytes < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "TotalBytes", 0); - } - } - } -} diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncSessionStatus.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncSessionStatus.cs index 89240c1f6cf8a..847aac6014d86 100644 --- a/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncSessionStatus.cs +++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/Models/SyncSessionStatus.cs @@ -10,8 +10,9 @@ namespace Microsoft.Azure.Management.StorageSync.Models { - using Microsoft.Rest; using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -30,18 +31,27 @@ public SyncSessionStatus() /// /// Initializes a new instance of the SyncSessionStatus class. /// - /// Last sync status + /// Last sync result (HResult) /// Last sync timestamp /// Last sync success /// timestamp /// Last sync per item error /// count. - public SyncSessionStatus(int? lastSyncResult = default(int?), System.DateTime? lastSyncTimestamp = default(System.DateTime?), System.DateTime? lastSyncSuccessTimestamp = default(System.DateTime?), int? lastSyncPerItemErrorCount = default(int?)) + /// Count of persistent + /// files not syncing. Reserved for future use. + /// Count of transient + /// files not syncing. Reserved for future use. + /// Array of per-item errors coming + /// from the last sync session. Reserved for future use. + public SyncSessionStatus(int? lastSyncResult = default(int?), System.DateTime? lastSyncTimestamp = default(System.DateTime?), System.DateTime? lastSyncSuccessTimestamp = default(System.DateTime?), long? lastSyncPerItemErrorCount = default(long?), long? persistentFilesNotSyncingCount = default(long?), long? transientFilesNotSyncingCount = default(long?), IList filesNotSyncingErrors = default(IList)) { LastSyncResult = lastSyncResult; LastSyncTimestamp = lastSyncTimestamp; LastSyncSuccessTimestamp = lastSyncSuccessTimestamp; LastSyncPerItemErrorCount = lastSyncPerItemErrorCount; + PersistentFilesNotSyncingCount = persistentFilesNotSyncingCount; + TransientFilesNotSyncingCount = transientFilesNotSyncingCount; + FilesNotSyncingErrors = filesNotSyncingErrors; CustomInit(); } @@ -51,45 +61,48 @@ public SyncSessionStatus() partial void CustomInit(); /// - /// Gets or sets last sync status + /// Gets last sync result (HResult) /// [JsonProperty(PropertyName = "lastSyncResult")] - public int? LastSyncResult { get; set; } + public int? LastSyncResult { get; private set; } /// - /// Gets or sets last sync timestamp + /// Gets last sync timestamp /// [JsonProperty(PropertyName = "lastSyncTimestamp")] - public System.DateTime? LastSyncTimestamp { get; set; } + public System.DateTime? LastSyncTimestamp { get; private set; } /// - /// Gets or sets last sync success timestamp + /// Gets last sync success timestamp /// [JsonProperty(PropertyName = "lastSyncSuccessTimestamp")] - public System.DateTime? LastSyncSuccessTimestamp { get; set; } + public System.DateTime? LastSyncSuccessTimestamp { get; private set; } /// - /// Gets or sets last sync per item error count. + /// Gets last sync per item error count. /// [JsonProperty(PropertyName = "lastSyncPerItemErrorCount")] - public int? LastSyncPerItemErrorCount { get; set; } + public long? LastSyncPerItemErrorCount { get; private set; } /// - /// Validate the object. + /// Gets count of persistent files not syncing. Reserved for future + /// use. /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (LastSyncPerItemErrorCount > 2147483647) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "LastSyncPerItemErrorCount", 2147483647); - } - if (LastSyncPerItemErrorCount < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "LastSyncPerItemErrorCount", 0); - } - } + [JsonProperty(PropertyName = "persistentFilesNotSyncingCount")] + public long? PersistentFilesNotSyncingCount { get; private set; } + + /// + /// Gets count of transient files not syncing. Reserved for future use. + /// + [JsonProperty(PropertyName = "transientFilesNotSyncingCount")] + public long? TransientFilesNotSyncingCount { get; private set; } + + /// + /// Gets array of per-item errors coming from the last sync session. + /// Reserved for future use. + /// + [JsonProperty(PropertyName = "filesNotSyncingErrors")] + public IList FilesNotSyncingErrors { get; private set; } + } } diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/SdkInfo_MicrosoftStorageSync.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/SdkInfo_MicrosoftStorageSync.cs index e71b9b0eb7274..c9b5b014d9f91 100644 --- a/src/SDKs/StorageSync/Management.StorageSync/Generated/SdkInfo_MicrosoftStorageSync.cs +++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/SdkInfo_MicrosoftStorageSync.cs @@ -19,26 +19,15 @@ public static IEnumerable> ApiInfo_MicrosoftStorag { return new Tuple[] { - new Tuple("StorageSync", "CloudEndpoints", "2018-10-01"), - new Tuple("StorageSync", "Operations", "2018-10-01"), - new Tuple("StorageSync", "RegisteredServers", "2018-10-01"), - new Tuple("StorageSync", "ServerEndpoints", "2018-10-01"), - new Tuple("StorageSync", "StorageSyncServices", "2018-10-01"), - new Tuple("StorageSync", "SyncGroups", "2018-10-01"), - new Tuple("StorageSync", "Workflows", "2018-10-01"), + new Tuple("StorageSync", "CloudEndpoints", "2019-02-01"), + new Tuple("StorageSync", "Operations", "2019-02-01"), + new Tuple("StorageSync", "RegisteredServers", "2019-02-01"), + new Tuple("StorageSync", "ServerEndpoints", "2019-02-01"), + new Tuple("StorageSync", "StorageSyncServices", "2019-02-01"), + new Tuple("StorageSync", "SyncGroups", "2019-02-01"), + new Tuple("StorageSync", "Workflows", "2019-02-01"), }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "latest"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4283"; - public static readonly String AutoRestCmdExecuted = "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=H:\\csharpsdk\\azure-sdk-for-net\\src\\SDKs"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "445f0517ee92f440685bccb53af97fb1485890bb"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/src/SDKs/StorageSync/Management.StorageSync/Generated/StorageSyncManagementClient.cs b/src/SDKs/StorageSync/Management.StorageSync/Generated/StorageSyncManagementClient.cs index ba2608634fd43..b1f6429b91ffb 100644 --- a/src/SDKs/StorageSync/Management.StorageSync/Generated/StorageSyncManagementClient.cs +++ b/src/SDKs/StorageSync/Management.StorageSync/Generated/StorageSyncManagementClient.cs @@ -358,7 +358,7 @@ private void Initialize() RegisteredServers = new RegisteredServersOperations(this); Workflows = new WorkflowsOperations(this); BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2018-10-01"; + ApiVersion = "2019-02-01"; AcceptLanguage = "en-US"; LongRunningOperationRetryTimeout = 30; GenerateClientRequestId = true;