From 94912cb3a1f69c272f8a00b05ce08698e050f4f6 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 26 Nov 2018 19:48:23 +0000 Subject: [PATCH 1/2] Generated from 8e878960e05f8348dea54461b7323838bf5d1259 Update storagesync.json --- .../storagesync/mgmt/storagesync/models.go | 55 +++++++ .../mgmt/2018-10-01/storagesync/models.go | 140 +++++++++++++++++- 2 files changed, 191 insertions(+), 4 deletions(-) diff --git a/profiles/preview/preview/storagesync/mgmt/storagesync/models.go b/profiles/preview/preview/storagesync/mgmt/storagesync/models.go index 717481aa7162..9f70bb0788d1 100644 --- a/profiles/preview/preview/storagesync/mgmt/storagesync/models.go +++ b/profiles/preview/preview/storagesync/mgmt/storagesync/models.go @@ -52,6 +52,26 @@ const ( CloudTiering2On CloudTiering2 = original.CloudTiering2On ) +type CombinedHealth = original.CombinedHealth + +const ( + CombinedHealthError CombinedHealth = original.CombinedHealthError + CombinedHealthHealthy CombinedHealth = original.CombinedHealthHealthy + CombinedHealthNoActivity CombinedHealth = original.CombinedHealthNoActivity + CombinedHealthSyncBlockedForChangeDetectionPostRestore CombinedHealth = original.CombinedHealthSyncBlockedForChangeDetectionPostRestore + CombinedHealthSyncBlockedForRestore CombinedHealth = original.CombinedHealthSyncBlockedForRestore +) + +type DownloadHealth = original.DownloadHealth + +const ( + DownloadHealthError DownloadHealth = original.DownloadHealthError + DownloadHealthHealthy DownloadHealth = original.DownloadHealthHealthy + DownloadHealthNoActivity DownloadHealth = original.DownloadHealthNoActivity + DownloadHealthSyncBlockedForChangeDetectionPostRestore DownloadHealth = original.DownloadHealthSyncBlockedForChangeDetectionPostRestore + DownloadHealthSyncBlockedForRestore DownloadHealth = original.DownloadHealthSyncBlockedForRestore +) + type NameAvailabilityReason = original.NameAvailabilityReason const ( @@ -108,6 +128,26 @@ const ( Succeeded Status = original.Succeeded ) +type SyncDirection = original.SyncDirection + +const ( + Download SyncDirection = original.Download + Initialize SyncDirection = original.Initialize + None SyncDirection = original.None + Recall SyncDirection = original.Recall + Upload SyncDirection = original.Upload +) + +type UploadHealth = original.UploadHealth + +const ( + UploadHealthError UploadHealth = original.UploadHealthError + UploadHealthHealthy UploadHealth = original.UploadHealthHealthy + UploadHealthNoActivity UploadHealth = original.UploadHealthNoActivity + UploadHealthSyncBlockedForChangeDetectionPostRestore UploadHealth = original.UploadHealthSyncBlockedForChangeDetectionPostRestore + UploadHealthSyncBlockedForRestore UploadHealth = original.UploadHealthSyncBlockedForRestore +) + type APIError = original.APIError type AzureEntityResource = original.AzureEntityResource type BackupRequest = original.BackupRequest @@ -153,6 +193,7 @@ type ServerEndpoint = original.ServerEndpoint type ServerEndpointArray = original.ServerEndpointArray type ServerEndpointCreateParameters = original.ServerEndpointCreateParameters type ServerEndpointCreateParametersProperties = original.ServerEndpointCreateParametersProperties +type ServerEndpointHealth = original.ServerEndpointHealth type ServerEndpointProperties = original.ServerEndpointProperties type ServerEndpointsCreateFuture = original.ServerEndpointsCreateFuture type ServerEndpointsDeleteFuture = original.ServerEndpointsDeleteFuture @@ -170,6 +211,8 @@ type SyncGroup = original.SyncGroup type SyncGroupArray = original.SyncGroupArray type SyncGroupCreateParameters = original.SyncGroupCreateParameters type SyncGroupProperties = original.SyncGroupProperties +type SyncProgressStatus = original.SyncProgressStatus +type SyncSessionStatus = original.SyncSessionStatus type TrackedResource = original.TrackedResource type TriggerRolloverRequest = original.TriggerRolloverRequest type Workflow = original.Workflow @@ -203,6 +246,12 @@ func PossibleCloudTiering1Values() []CloudTiering1 { func PossibleCloudTiering2Values() []CloudTiering2 { return original.PossibleCloudTiering2Values() } +func PossibleCombinedHealthValues() []CombinedHealth { + return original.PossibleCombinedHealthValues() +} +func PossibleDownloadHealthValues() []DownloadHealth { + return original.PossibleDownloadHealthValues() +} func PossibleNameAvailabilityReasonValues() []NameAvailabilityReason { return original.PossibleNameAvailabilityReasonValues() } @@ -224,6 +273,12 @@ func PossibleReasonValues() []Reason { func PossibleStatusValues() []Status { return original.PossibleStatusValues() } +func PossibleSyncDirectionValues() []SyncDirection { + return original.PossibleSyncDirectionValues() +} +func PossibleUploadHealthValues() []UploadHealth { + return original.PossibleUploadHealthValues() +} func NewOperationEntityListResultIterator(page OperationEntityListResultPage) OperationEntityListResultIterator { return original.NewOperationEntityListResultIterator(page) } diff --git a/services/preview/storagesync/mgmt/2018-10-01/storagesync/models.go b/services/preview/storagesync/mgmt/2018-10-01/storagesync/models.go index f77243e05026..e7f481aad7e9 100644 --- a/services/preview/storagesync/mgmt/2018-10-01/storagesync/models.go +++ b/services/preview/storagesync/mgmt/2018-10-01/storagesync/models.go @@ -75,6 +75,48 @@ func PossibleCloudTiering2Values() []CloudTiering2 { return []CloudTiering2{CloudTiering2Off, CloudTiering2On} } +// CombinedHealth enumerates the values for combined health. +type CombinedHealth string + +const ( + // CombinedHealthError ... + CombinedHealthError CombinedHealth = "Error" + // CombinedHealthHealthy ... + CombinedHealthHealthy CombinedHealth = "Healthy" + // CombinedHealthNoActivity ... + CombinedHealthNoActivity CombinedHealth = "NoActivity" + // CombinedHealthSyncBlockedForChangeDetectionPostRestore ... + CombinedHealthSyncBlockedForChangeDetectionPostRestore CombinedHealth = "SyncBlockedForChangeDetectionPostRestore" + // CombinedHealthSyncBlockedForRestore ... + CombinedHealthSyncBlockedForRestore CombinedHealth = "SyncBlockedForRestore" +) + +// PossibleCombinedHealthValues returns an array of possible values for the CombinedHealth const type. +func PossibleCombinedHealthValues() []CombinedHealth { + return []CombinedHealth{CombinedHealthError, CombinedHealthHealthy, CombinedHealthNoActivity, CombinedHealthSyncBlockedForChangeDetectionPostRestore, CombinedHealthSyncBlockedForRestore} +} + +// DownloadHealth enumerates the values for download health. +type DownloadHealth string + +const ( + // DownloadHealthError ... + DownloadHealthError DownloadHealth = "Error" + // DownloadHealthHealthy ... + DownloadHealthHealthy DownloadHealth = "Healthy" + // DownloadHealthNoActivity ... + DownloadHealthNoActivity DownloadHealth = "NoActivity" + // DownloadHealthSyncBlockedForChangeDetectionPostRestore ... + DownloadHealthSyncBlockedForChangeDetectionPostRestore DownloadHealth = "SyncBlockedForChangeDetectionPostRestore" + // DownloadHealthSyncBlockedForRestore ... + DownloadHealthSyncBlockedForRestore DownloadHealth = "SyncBlockedForRestore" +) + +// PossibleDownloadHealthValues returns an array of possible values for the DownloadHealth const type. +func PossibleDownloadHealthValues() []DownloadHealth { + return []DownloadHealth{DownloadHealthError, DownloadHealthHealthy, DownloadHealthNoActivity, DownloadHealthSyncBlockedForChangeDetectionPostRestore, DownloadHealthSyncBlockedForRestore} +} + // NameAvailabilityReason enumerates the values for name availability reason. type NameAvailabilityReason string @@ -194,6 +236,48 @@ func PossibleStatusValues() []Status { return []Status{Aborted, Active, Expired, Failed, Succeeded} } +// SyncDirection enumerates the values for sync direction. +type SyncDirection string + +const ( + // Download ... + Download SyncDirection = "download" + // Initialize ... + Initialize SyncDirection = "initialize" + // None ... + None SyncDirection = "none" + // Recall ... + Recall SyncDirection = "recall" + // Upload ... + Upload SyncDirection = "upload" +) + +// PossibleSyncDirectionValues returns an array of possible values for the SyncDirection const type. +func PossibleSyncDirectionValues() []SyncDirection { + return []SyncDirection{Download, Initialize, None, Recall, Upload} +} + +// UploadHealth enumerates the values for upload health. +type UploadHealth string + +const ( + // UploadHealthError ... + UploadHealthError UploadHealth = "Error" + // UploadHealthHealthy ... + UploadHealthHealthy UploadHealth = "Healthy" + // UploadHealthNoActivity ... + UploadHealthNoActivity UploadHealth = "NoActivity" + // UploadHealthSyncBlockedForChangeDetectionPostRestore ... + UploadHealthSyncBlockedForChangeDetectionPostRestore UploadHealth = "SyncBlockedForChangeDetectionPostRestore" + // UploadHealthSyncBlockedForRestore ... + UploadHealthSyncBlockedForRestore UploadHealth = "SyncBlockedForRestore" +) + +// PossibleUploadHealthValues returns an array of possible values for the UploadHealth const type. +func PossibleUploadHealthValues() []UploadHealth { + return []UploadHealth{UploadHealthError, UploadHealthHealthy, UploadHealthNoActivity, UploadHealthSyncBlockedForChangeDetectionPostRestore, UploadHealthSyncBlockedForRestore} +} + // APIError error type type APIError struct { // Code - Error code of the given entry. @@ -1100,8 +1184,8 @@ type RegisteredServerProperties struct { AgentVersion *string `json:"agentVersion,omitempty"` // ServerOSVersion - Registered Server OS Version ServerOSVersion *string `json:"serverOSVersion,omitempty"` - // ServerManagementtErrorCode - Registered Server Management Error Code - ServerManagementtErrorCode *int32 `json:"serverManagementtErrorCode,omitempty"` + // ServerManagementErrorCode - Registered Server Management Error Code + ServerManagementErrorCode *int32 `json:"serverManagementErrorCode,omitempty"` // LastHeartBeat - Registered Server last heart beat LastHeartBeat *string `json:"lastHeartBeat,omitempty"` // ProvisioningState - Registered Server Provisioning State @@ -1425,6 +1509,24 @@ type ServerEndpointCreateParametersProperties struct { OfflineDataTransferShareName *string `json:"offlineDataTransferShareName,omitempty"` } +// ServerEndpointHealth serverEndpoint Health object. +type ServerEndpointHealth struct { + // DownloadHealth - Download Health Status. Possible values include: 'DownloadHealthHealthy', 'DownloadHealthError', 'DownloadHealthSyncBlockedForRestore', 'DownloadHealthSyncBlockedForChangeDetectionPostRestore', 'DownloadHealthNoActivity' + DownloadHealth DownloadHealth `json:"downloadHealth,omitempty"` + // UploadHealth - Upload Health Status. Possible values include: 'UploadHealthHealthy', 'UploadHealthError', 'UploadHealthSyncBlockedForRestore', 'UploadHealthSyncBlockedForChangeDetectionPostRestore', 'UploadHealthNoActivity' + UploadHealth UploadHealth `json:"uploadHealth,omitempty"` + // CombinedHealth - Combined Health Status. Possible values include: 'CombinedHealthHealthy', 'CombinedHealthError', 'CombinedHealthSyncBlockedForRestore', 'CombinedHealthSyncBlockedForChangeDetectionPostRestore', 'CombinedHealthNoActivity' + CombinedHealth CombinedHealth `json:"combinedHealth,omitempty"` + // LastUpdatedTimestamp - Last Updated Timestamp + LastUpdatedTimestamp *string `json:"lastUpdatedTimestamp,omitempty"` + // UploadStatus - Upload Status + UploadStatus *SyncSessionStatus `json:"uploadStatus,omitempty"` + // DownloadStatus - Download Status + DownloadStatus *SyncSessionStatus `json:"downloadStatus,omitempty"` + // CurrentProgress - Current progress + CurrentProgress *SyncProgressStatus `json:"currentProgress,omitempty"` +} + // ServerEndpointProperties serverEndpoint Properties object. type ServerEndpointProperties struct { // ServerLocalPath - Server Local path. @@ -1445,8 +1547,8 @@ type ServerEndpointProperties struct { LastWorkflowID *string `json:"lastWorkflowId,omitempty"` // LastOperationName - Resource Last Operation Name LastOperationName *string `json:"lastOperationName,omitempty"` - // SyncStatus - Sync Health Status - SyncStatus interface{} `json:"syncStatus,omitempty"` + // SyncStatus - Server Endpoint properties. + SyncStatus *ServerEndpointHealth `json:"syncStatus,omitempty"` // OfflineDataTransfer - Offline data transfer. Possible values include: 'OfflineDataTransfer2On', 'OfflineDataTransfer2Off' OfflineDataTransfer OfflineDataTransfer2 `json:"offlineDataTransfer,omitempty"` // OfflineDataTransferStorageAccountResourceID - Offline data transfer storage account resource ID @@ -1902,6 +2004,36 @@ type SyncGroupProperties struct { SyncGroupStatus *string `json:"syncGroupStatus,omitempty"` } +// SyncProgressStatus sync Session status object. +type SyncProgressStatus struct { + // ProgressTimestamp - Progress timestamp + ProgressTimestamp *string `json:"progressTimestamp,omitempty"` + // SyncDirection - Sync direction. Possible values include: 'None', 'Initialize', 'Download', 'Upload', 'Recall' + SyncDirection SyncDirection `json:"syncDirection,omitempty"` + // PerItemErrorCount - Per item error count + PerItemErrorCount *int32 `json:"perItemErrorCount,omitempty"` + // AppliedItemCount - Applied item count. + AppliedItemCount *int32 `json:"appliedItemCount,omitempty"` + // TotalItemCount - Total item count + TotalItemCount *int32 `json:"totalItemCount,omitempty"` + // AppliedBytes - Applied bytes + AppliedBytes *int32 `json:"appliedBytes,omitempty"` + // TotalBytes - Total bytes + TotalBytes *int32 `json:"totalBytes,omitempty"` +} + +// SyncSessionStatus sync Session status object. +type SyncSessionStatus struct { + // LastSyncResult - Last sync status + LastSyncResult *int32 `json:"lastSyncResult,omitempty"` + // LastSyncTimestamp - Last sync timestamp + LastSyncTimestamp *string `json:"lastSyncTimestamp,omitempty"` + // LastSyncSuccessTimestamp - Last sync success timestamp + LastSyncSuccessTimestamp *string `json:"lastSyncSuccessTimestamp,omitempty"` + // LastSyncPerItemErrorCount - Last sync per item error count. + LastSyncPerItemErrorCount *int32 `json:"lastSyncPerItemErrorCount,omitempty"` +} + // TrackedResource the resource model definition for a ARM tracked top level resource type TrackedResource struct { // Tags - Resource tags. From 70b76ae8630784b3c7d8b45699fcf199c2f8f381 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 26 Nov 2018 20:21:50 +0000 Subject: [PATCH 2/2] Generated from c4046bd85c639ba3a144863c554ed7d44c60748d Fix Examples --- .../storagesync/mgmt/2018-10-01/storagesync/models.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/services/preview/storagesync/mgmt/2018-10-01/storagesync/models.go b/services/preview/storagesync/mgmt/2018-10-01/storagesync/models.go index e7f481aad7e9..d76661ff1e3f 100644 --- a/services/preview/storagesync/mgmt/2018-10-01/storagesync/models.go +++ b/services/preview/storagesync/mgmt/2018-10-01/storagesync/models.go @@ -22,6 +22,7 @@ import ( "encoding/json" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" + "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/tracing" "net/http" @@ -1518,7 +1519,7 @@ type ServerEndpointHealth struct { // CombinedHealth - Combined Health Status. Possible values include: 'CombinedHealthHealthy', 'CombinedHealthError', 'CombinedHealthSyncBlockedForRestore', 'CombinedHealthSyncBlockedForChangeDetectionPostRestore', 'CombinedHealthNoActivity' CombinedHealth CombinedHealth `json:"combinedHealth,omitempty"` // LastUpdatedTimestamp - Last Updated Timestamp - LastUpdatedTimestamp *string `json:"lastUpdatedTimestamp,omitempty"` + LastUpdatedTimestamp *date.Time `json:"lastUpdatedTimestamp,omitempty"` // UploadStatus - Upload Status UploadStatus *SyncSessionStatus `json:"uploadStatus,omitempty"` // DownloadStatus - Download Status @@ -2007,7 +2008,7 @@ type SyncGroupProperties struct { // SyncProgressStatus sync Session status object. type SyncProgressStatus struct { // ProgressTimestamp - Progress timestamp - ProgressTimestamp *string `json:"progressTimestamp,omitempty"` + ProgressTimestamp *date.Time `json:"progressTimestamp,omitempty"` // SyncDirection - Sync direction. Possible values include: 'None', 'Initialize', 'Download', 'Upload', 'Recall' SyncDirection SyncDirection `json:"syncDirection,omitempty"` // PerItemErrorCount - Per item error count @@ -2027,9 +2028,9 @@ type SyncSessionStatus struct { // LastSyncResult - Last sync status LastSyncResult *int32 `json:"lastSyncResult,omitempty"` // LastSyncTimestamp - Last sync timestamp - LastSyncTimestamp *string `json:"lastSyncTimestamp,omitempty"` + LastSyncTimestamp *date.Time `json:"lastSyncTimestamp,omitempty"` // LastSyncSuccessTimestamp - Last sync success timestamp - LastSyncSuccessTimestamp *string `json:"lastSyncSuccessTimestamp,omitempty"` + LastSyncSuccessTimestamp *date.Time `json:"lastSyncSuccessTimestamp,omitempty"` // LastSyncPerItemErrorCount - Last sync per item error count. LastSyncPerItemErrorCount *int32 `json:"lastSyncPerItemErrorCount,omitempty"` }