diff --git a/eng/mgmt/mgmtmetadata/recoveryservicessiterecovery_resource-manager.txt b/eng/mgmt/mgmtmetadata/recoveryservicessiterecovery_resource-manager.txt index ada040580c76..a9d5779a84b5 100644 --- a/eng/mgmt/mgmtmetadata/recoveryservicessiterecovery_resource-manager.txt +++ b/eng/mgmt/mgmtmetadata/recoveryservicessiterecovery_resource-manager.txt @@ -1,14 +1,14 @@ -Installing AutoRest version: latest +Installing AutoRest version: 2.0.4413 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/recoveryservicessiterecovery/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\Repos\AsrOneSdk-2\azure-sdk-for-net\sdk -2020-01-02 07:34:00 UTC +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/recoveryservicessiterecovery/resource-manager/readme.md --csharp --version=2.0.4413 --reflect-api-versions --csharp-sdks-folder=D:\azure-sdkfornet\azure-sdk-for-net\sdk +2020-03-11 17:13:18 UTC Azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: 4676d9187988aa6793ff704aa39c5f495b40f6e0 +Commit: 740a40ba31720ad514a308054ba517a8ea956a3c AutoRest information -Requested version: latest -Bootstrapper version: autorest@2.0.4407 +Requested version: 2.0.4413 +Bootstrapper version: autorest@2.0.4413 diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/IReplicationEligibilityResultsOperations.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/IReplicationEligibilityResultsOperations.cs index b945bb92e00e..897ede37416e 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/IReplicationEligibilityResultsOperations.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/IReplicationEligibilityResultsOperations.cs @@ -77,59 +77,5 @@ public partial interface IReplicationEligibilityResultsOperations /// Thrown when a required parameter is null /// Task> GetWithHttpMessagesAsync(string virtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the validation errors in case the VM is unsuitable for - /// protection. - /// - /// - /// Validates whether a given VM can be protected or not in which case - /// returns list of errors. - /// - /// - /// Virtual Machine name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginListWithHttpMessagesAsync(string virtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the validation errors in case the VM is unsuitable for - /// protection. - /// - /// - /// Validates whether a given VM can be protected or not in which case - /// returns list of errors. - /// - /// - /// Virtual Machine name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginGetWithHttpMessagesAsync(string virtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/IReplicationMigrationItemsOperations.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/IReplicationMigrationItemsOperations.cs index f4378a19f71b..1b15d0a8367a 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/IReplicationMigrationItemsOperations.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/IReplicationMigrationItemsOperations.cs @@ -215,6 +215,41 @@ public partial interface IReplicationMigrationItemsOperations /// Task> MigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, MigrateInput migrateInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Resynchronizes replication. + /// + /// + /// The operation to resynchronize replication of an ASR migration + /// item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// Resync input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> ResyncWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResyncInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Test migrate item. /// /// @@ -442,6 +477,41 @@ public partial interface IReplicationMigrationItemsOperations /// Task> BeginMigrateWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, MigrateInput migrateInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Resynchronizes replication. + /// + /// + /// The operation to resynchronize replication of an ASR migration + /// item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// Resync input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + Task> BeginResyncWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResyncInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Test migrate item. /// /// diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/InMageAzureV2ReplicationDetails.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/InMageAzureV2ReplicationDetails.cs index 22cbd8b14e27..f46d6b9feaf0 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/InMageAzureV2ReplicationDetails.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/InMageAzureV2ReplicationDetails.cs @@ -60,6 +60,7 @@ public InMageAzureV2ReplicationDetails() /// The last heartbeat received from the /// source server. /// The process server Id. + /// The process server name. /// The multi vm group Id. /// The multi vm group name. /// A value indicating whether multi vm @@ -122,7 +123,7 @@ public InMageAzureV2ReplicationDetails() /// item. /// The list of protected managed /// disks. - public InMageAzureV2ReplicationDetails(string infrastructureVmId = default(string), string vCenterInfrastructureId = default(string), string protectionStage = default(string), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), int? resyncProgressPercentage = default(int?), long? rpoInSeconds = default(long?), double? compressedDataRateInMB = default(double?), double? uncompressedDataRateInMB = default(double?), string ipAddress = default(string), string agentVersion = default(string), System.DateTime? agentExpiryDate = default(System.DateTime?), string isAgentUpdateRequired = default(string), string isRebootAfterUpdateRequired = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string processServerId = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), string multiVmSyncStatus = default(string), IList protectedDisks = default(IList), string diskResized = default(string), string masterTargetId = default(string), int? sourceVmCpuCount = default(int?), int? sourceVmRamSizeInMB = default(int?), string osType = default(string), string vhdName = default(string), string osDiskId = default(string), IList azureVMDiskDetails = default(IList), string recoveryAzureVMName = default(string), string recoveryAzureVMSize = default(string), string recoveryAzureStorageAccount = default(string), string recoveryAzureLogStorageAccountId = default(string), IList vmNics = default(IList), string selectedRecoveryAzureNetworkId = default(string), string selectedSourceNicId = default(string), string discoveryType = default(string), string enableRdpOnTargetOption = default(string), IList datastores = default(IList), string targetVmId = default(string), string recoveryAzureResourceGroupId = default(string), string recoveryAvailabilitySetId = default(string), string useManagedDisks = default(string), string licenseType = default(string), IList validationErrors = default(IList), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), System.DateTime? lastUpdateReceivedTime = default(System.DateTime?), string replicaId = default(string), string osVersion = default(string), IList protectedManagedDisks = default(IList)) + public InMageAzureV2ReplicationDetails(string infrastructureVmId = default(string), string vCenterInfrastructureId = default(string), string protectionStage = default(string), string vmId = default(string), string vmProtectionState = default(string), string vmProtectionStateDescription = default(string), int? resyncProgressPercentage = default(int?), long? rpoInSeconds = default(long?), double? compressedDataRateInMB = default(double?), double? uncompressedDataRateInMB = default(double?), string ipAddress = default(string), string agentVersion = default(string), System.DateTime? agentExpiryDate = default(System.DateTime?), string isAgentUpdateRequired = default(string), string isRebootAfterUpdateRequired = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string processServerId = default(string), string processServerName = default(string), string multiVmGroupId = default(string), string multiVmGroupName = default(string), string multiVmSyncStatus = default(string), IList protectedDisks = default(IList), string diskResized = default(string), string masterTargetId = default(string), int? sourceVmCpuCount = default(int?), int? sourceVmRamSizeInMB = default(int?), string osType = default(string), string vhdName = default(string), string osDiskId = default(string), IList azureVMDiskDetails = default(IList), string recoveryAzureVMName = default(string), string recoveryAzureVMSize = default(string), string recoveryAzureStorageAccount = default(string), string recoveryAzureLogStorageAccountId = default(string), IList vmNics = default(IList), string selectedRecoveryAzureNetworkId = default(string), string selectedSourceNicId = default(string), string discoveryType = default(string), string enableRdpOnTargetOption = default(string), IList datastores = default(IList), string targetVmId = default(string), string recoveryAzureResourceGroupId = default(string), string recoveryAvailabilitySetId = default(string), string useManagedDisks = default(string), string licenseType = default(string), IList validationErrors = default(IList), System.DateTime? lastRpoCalculatedTime = default(System.DateTime?), System.DateTime? lastUpdateReceivedTime = default(System.DateTime?), string replicaId = default(string), string osVersion = default(string), IList protectedManagedDisks = default(IList)) { InfrastructureVmId = infrastructureVmId; VCenterInfrastructureId = vCenterInfrastructureId; @@ -141,6 +142,7 @@ public InMageAzureV2ReplicationDetails() IsRebootAfterUpdateRequired = isRebootAfterUpdateRequired; LastHeartbeat = lastHeartbeat; ProcessServerId = processServerId; + ProcessServerName = processServerName; MultiVmGroupId = multiVmGroupId; MultiVmGroupName = multiVmGroupName; MultiVmSyncStatus = multiVmSyncStatus; @@ -286,6 +288,12 @@ public InMageAzureV2ReplicationDetails() [JsonProperty(PropertyName = "processServerId")] public string ProcessServerId { get; set; } + /// + /// Gets the process server name. + /// + [JsonProperty(PropertyName = "processServerName")] + public string ProcessServerName { get; private set; } + /// /// Gets or sets the multi vm group Id. /// diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/MigrationItemOperation.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/MigrationItemOperation.cs index ea3fb9646965..50f5a6391699 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/MigrationItemOperation.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/MigrationItemOperation.cs @@ -20,5 +20,6 @@ public static class MigrationItemOperation public const string TestMigrate = "TestMigrate"; public const string TestMigrateCleanup = "TestMigrateCleanup"; public const string Migrate = "Migrate"; + public const string StartResync = "StartResync"; } } diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/MigrationItemProperties.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/MigrationItemProperties.cs index d8a7b6b98dcc..90ef4cb27749 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/MigrationItemProperties.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/MigrationItemProperties.cs @@ -37,8 +37,6 @@ public MigrationItemProperties() /// item. /// The name of policy governing this /// item. - /// The recovery services - /// provider ARM Id. /// The migration status. Possible values /// include: 'None', 'EnableMigrationInProgress', /// 'EnableMigrationFailed', 'DisableMigrationInProgress', @@ -47,34 +45,43 @@ public MigrationItemProperties() /// 'MigrationSucceeded', 'MigrationFailed' /// The migration state /// description. + /// The last test migration + /// time. + /// The status of the last test + /// migration. /// The test migrate state. Possible /// values include: 'None', 'TestMigrationInProgress', /// 'TestMigrationSucceeded', 'TestMigrationFailed', /// 'TestMigrationCleanupInProgress' /// The test migrate state /// description. - /// The consolidated health. + /// The consolidated health. Possible values + /// include: 'None', 'Normal', 'Warning', 'Critical' /// The list of health errors. /// The allowed operations on the /// migration item, based on the current migration state of the /// item. /// The current job details. + /// The correlation Id for events + /// associated with this migration item. /// The migration provider custom /// settings. - public MigrationItemProperties(string machineName = default(string), string policyId = default(string), string policyFriendlyName = default(string), string recoveryServicesProviderId = default(string), string migrationState = default(string), string migrationStateDescription = default(string), string testMigrateState = default(string), string testMigrateStateDescription = default(string), string health = default(string), IList healthErrors = default(IList), IList allowedOperations = default(IList), CurrentJobDetails currentJob = default(CurrentJobDetails), MigrationProviderSpecificSettings providerSpecificDetails = default(MigrationProviderSpecificSettings)) + public MigrationItemProperties(string machineName = default(string), string policyId = default(string), string policyFriendlyName = default(string), string migrationState = default(string), string migrationStateDescription = default(string), System.DateTime? lastTestMigrationTime = default(System.DateTime?), string lastTestMigrationStatus = default(string), string testMigrateState = default(string), string testMigrateStateDescription = default(string), string health = default(string), IList healthErrors = default(IList), IList allowedOperations = default(IList), CurrentJobDetails currentJob = default(CurrentJobDetails), string eventCorrelationId = default(string), MigrationProviderSpecificSettings providerSpecificDetails = default(MigrationProviderSpecificSettings)) { MachineName = machineName; PolicyId = policyId; PolicyFriendlyName = policyFriendlyName; - RecoveryServicesProviderId = recoveryServicesProviderId; MigrationState = migrationState; MigrationStateDescription = migrationStateDescription; + LastTestMigrationTime = lastTestMigrationTime; + LastTestMigrationStatus = lastTestMigrationStatus; TestMigrateState = testMigrateState; TestMigrateStateDescription = testMigrateStateDescription; Health = health; HealthErrors = healthErrors; AllowedOperations = allowedOperations; CurrentJob = currentJob; + EventCorrelationId = eventCorrelationId; ProviderSpecificDetails = providerSpecificDetails; CustomInit(); } @@ -102,12 +109,6 @@ public MigrationItemProperties() [JsonProperty(PropertyName = "policyFriendlyName")] public string PolicyFriendlyName { get; private set; } - /// - /// Gets the recovery services provider ARM Id. - /// - [JsonProperty(PropertyName = "recoveryServicesProviderId")] - public string RecoveryServicesProviderId { get; private set; } - /// /// Gets the migration status. Possible values include: 'None', /// 'EnableMigrationInProgress', 'EnableMigrationFailed', @@ -124,6 +125,18 @@ public MigrationItemProperties() [JsonProperty(PropertyName = "migrationStateDescription")] public string MigrationStateDescription { get; private set; } + /// + /// Gets the last test migration time. + /// + [JsonProperty(PropertyName = "lastTestMigrationTime")] + public System.DateTime? LastTestMigrationTime { get; private set; } + + /// + /// Gets the status of the last test migration. + /// + [JsonProperty(PropertyName = "lastTestMigrationStatus")] + public string LastTestMigrationStatus { get; private set; } + /// /// Gets the test migrate state. Possible values include: 'None', /// 'TestMigrationInProgress', 'TestMigrationSucceeded', @@ -139,7 +152,8 @@ public MigrationItemProperties() public string TestMigrateStateDescription { get; private set; } /// - /// Gets the consolidated health. + /// Gets the consolidated health. Possible values include: 'None', + /// 'Normal', 'Warning', 'Critical' /// [JsonProperty(PropertyName = "health")] public string Health { get; private set; } @@ -163,6 +177,13 @@ public MigrationItemProperties() [JsonProperty(PropertyName = "currentJob")] public CurrentJobDetails CurrentJob { get; private set; } + /// + /// Gets the correlation Id for events associated with this migration + /// item. + /// + [JsonProperty(PropertyName = "eventCorrelationId")] + public string EventCorrelationId { get; private set; } + /// /// Gets or sets the migration provider custom settings. /// diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ProcessServer.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ProcessServer.cs index 908a6d8eb3ae..70ac3b815d92 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ProcessServer.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ProcessServer.cs @@ -70,7 +70,20 @@ public ProcessServer() /// Agent expiry date. /// The agent version /// details. - public ProcessServer(string friendlyName = default(string), string id = default(string), string ipAddress = default(string), string osType = default(string), string agentVersion = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string versionStatus = default(string), IList mobilityServiceUpdates = default(IList), string hostId = default(string), string machineCount = default(string), string replicationPairCount = default(string), string systemLoad = default(string), string systemLoadStatus = default(string), string cpuLoad = default(string), string cpuLoadStatus = default(string), long? totalMemoryInBytes = default(long?), long? availableMemoryInBytes = default(long?), string memoryUsageStatus = default(string), long? totalSpaceInBytes = default(long?), long? availableSpaceInBytes = default(long?), string spaceUsageStatus = default(string), string psServiceStatus = default(string), System.DateTime? sslCertExpiryDate = default(System.DateTime?), int? sslCertExpiryRemainingDays = default(int?), string osVersion = default(string), IList healthErrors = default(IList), System.DateTime? agentExpiryDate = default(System.DateTime?), VersionDetails agentVersionDetails = default(VersionDetails)) + /// The health of Process Server. Possible values + /// include: 'None', 'Normal', 'Warning', 'Critical' + /// The process server stats refresh + /// time. + /// The uploading + /// pending data in bytes. + /// The throughput in MBps. + /// The throughput in bytes. + /// The throughput status. + /// The MARS communication + /// status. + /// The MARS registration + /// status. + public ProcessServer(string friendlyName = default(string), string id = default(string), string ipAddress = default(string), string osType = default(string), string agentVersion = default(string), System.DateTime? lastHeartbeat = default(System.DateTime?), string versionStatus = default(string), IList mobilityServiceUpdates = default(IList), string hostId = default(string), string machineCount = default(string), string replicationPairCount = default(string), string systemLoad = default(string), string systemLoadStatus = default(string), string cpuLoad = default(string), string cpuLoadStatus = default(string), long? totalMemoryInBytes = default(long?), long? availableMemoryInBytes = default(long?), string memoryUsageStatus = default(string), long? totalSpaceInBytes = default(long?), long? availableSpaceInBytes = default(long?), string spaceUsageStatus = default(string), string psServiceStatus = default(string), System.DateTime? sslCertExpiryDate = default(System.DateTime?), int? sslCertExpiryRemainingDays = default(int?), string osVersion = default(string), IList healthErrors = default(IList), System.DateTime? agentExpiryDate = default(System.DateTime?), VersionDetails agentVersionDetails = default(VersionDetails), string health = default(string), System.DateTime? psStatsRefreshTime = default(System.DateTime?), long? throughputUploadPendingDataInBytes = default(long?), long? throughputInMBps = default(long?), long? throughputInBytes = default(long?), string throughputStatus = default(string), string marsCommunicationStatus = default(string), string marsRegistrationStatus = default(string)) { FriendlyName = friendlyName; Id = id; @@ -100,6 +113,14 @@ public ProcessServer() HealthErrors = healthErrors; AgentExpiryDate = agentExpiryDate; AgentVersionDetails = agentVersionDetails; + Health = health; + PsStatsRefreshTime = psStatsRefreshTime; + ThroughputUploadPendingDataInBytes = throughputUploadPendingDataInBytes; + ThroughputInMBps = throughputInMBps; + ThroughputInBytes = throughputInBytes; + ThroughputStatus = throughputStatus; + MarsCommunicationStatus = marsCommunicationStatus; + MarsRegistrationStatus = marsRegistrationStatus; CustomInit(); } @@ -278,5 +299,54 @@ public ProcessServer() [JsonProperty(PropertyName = "agentVersionDetails")] public VersionDetails AgentVersionDetails { get; set; } + /// + /// Gets the health of Process Server. Possible values include: 'None', + /// 'Normal', 'Warning', 'Critical' + /// + [JsonProperty(PropertyName = "health")] + public string Health { get; private set; } + + /// + /// Gets the process server stats refresh time. + /// + [JsonProperty(PropertyName = "psStatsRefreshTime")] + public System.DateTime? PsStatsRefreshTime { get; private set; } + + /// + /// Gets the uploading pending data in bytes. + /// + [JsonProperty(PropertyName = "throughputUploadPendingDataInBytes")] + public long? ThroughputUploadPendingDataInBytes { get; private set; } + + /// + /// Gets the throughput in MBps. + /// + [JsonProperty(PropertyName = "throughputInMBps")] + public long? ThroughputInMBps { get; private set; } + + /// + /// Gets the throughput in bytes. + /// + [JsonProperty(PropertyName = "throughputInBytes")] + public long? ThroughputInBytes { get; private set; } + + /// + /// Gets the throughput status. + /// + [JsonProperty(PropertyName = "throughputStatus")] + public string ThroughputStatus { get; private set; } + + /// + /// Gets the MARS communication status. + /// + [JsonProperty(PropertyName = "marsCommunicationStatus")] + public string MarsCommunicationStatus { get; private set; } + + /// + /// Gets the MARS registration status. + /// + [JsonProperty(PropertyName = "marsRegistrationStatus")] + public string MarsRegistrationStatus { get; private set; } + } } diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ProtectionHealth.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ProtectionHealth.cs new file mode 100644 index 000000000000..ac28e93b78b5 --- /dev/null +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ProtectionHealth.cs @@ -0,0 +1,24 @@ +// +// 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.RecoveryServices.SiteRecovery.Models +{ + + /// + /// Defines values for ProtectionHealth. + /// + public static class ProtectionHealth + { + public const string None = "None"; + public const string Normal = "Normal"; + public const string Warning = "Warning"; + public const string Critical = "Critical"; + } +} diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ResyncInput.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ResyncInput.cs new file mode 100644 index 000000000000..aa5b3783b804 --- /dev/null +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ResyncInput.cs @@ -0,0 +1,69 @@ +// +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Resync input. + /// + public partial class ResyncInput + { + /// + /// Initializes a new instance of the ResyncInput class. + /// + public ResyncInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResyncInput class. + /// + /// Resync input properties. + public ResyncInput(ResyncInputProperties properties) + { + Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets resync input properties. + /// + [JsonProperty(PropertyName = "properties")] + public ResyncInputProperties Properties { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Properties == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); + } + if (Properties != null) + { + Properties.Validate(); + } + } + } +} diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ResyncInputProperties.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ResyncInputProperties.cs new file mode 100644 index 000000000000..95374ed8452b --- /dev/null +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ResyncInputProperties.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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Resync input properties. + /// + public partial class ResyncInputProperties + { + /// + /// Initializes a new instance of the ResyncInputProperties class. + /// + public ResyncInputProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ResyncInputProperties class. + /// + /// The provider specific + /// details. + public ResyncInputProperties(ResyncProviderSpecificInput providerSpecificDetails) + { + ProviderSpecificDetails = providerSpecificDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the provider specific details. + /// + [JsonProperty(PropertyName = "providerSpecificDetails")] + public ResyncProviderSpecificInput ProviderSpecificDetails { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (ProviderSpecificDetails == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "ProviderSpecificDetails"); + } + } + } +} diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ResyncProviderSpecificInput.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ResyncProviderSpecificInput.cs new file mode 100644 index 000000000000..7e2b0c37fe6b --- /dev/null +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ResyncProviderSpecificInput.cs @@ -0,0 +1,36 @@ +// +// 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.RecoveryServices.SiteRecovery.Models +{ + using System.Linq; + + /// + /// Resync provider specific input. + /// + public partial class ResyncProviderSpecificInput + { + /// + /// Initializes a new instance of the ResyncProviderSpecificInput + /// class. + /// + public ResyncProviderSpecificInput() + { + CustomInit(); + } + + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ResyncState.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ResyncState.cs new file mode 100644 index 000000000000..ef247dfe7d73 --- /dev/null +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/ResyncState.cs @@ -0,0 +1,23 @@ +// +// 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.RecoveryServices.SiteRecovery.Models +{ + + /// + /// Defines values for ResyncState. + /// + public static class ResyncState + { + public const string None = "None"; + public const string PreparedForResynchronization = "PreparedForResynchronization"; + public const string StartedResynchronization = "StartedResynchronization"; + } +} diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/TargetComputeSizeProperties.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/TargetComputeSizeProperties.cs index 60e9087b021e..feb083db72e8 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/TargetComputeSizeProperties.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/TargetComputeSizeProperties.cs @@ -38,6 +38,8 @@ public TargetComputeSizeProperties() /// name. /// The maximum cpu cores count supported /// by target compute size. + /// The Available vCPUs supported by + /// target compute size. /// The maximum memory in GB supported by /// target compute size. /// The maximum data disks count @@ -48,16 +50,20 @@ public TargetComputeSizeProperties() /// applicable for the protected item. /// The value indicating whether the /// target compute size supports high Iops. - public TargetComputeSizeProperties(string name = default(string), string friendlyName = default(string), int? cpuCoresCount = default(int?), double? memoryInGB = default(double?), int? maxDataDiskCount = default(int?), int? maxNicsCount = default(int?), IList errors = default(IList), string highIopsSupported = default(string)) + /// The supported HyperV + /// Generations. + public TargetComputeSizeProperties(string name = default(string), string friendlyName = default(string), int? cpuCoresCount = default(int?), int? vCPUsAvailable = default(int?), double? memoryInGB = default(double?), int? maxDataDiskCount = default(int?), int? maxNicsCount = default(int?), IList errors = default(IList), string highIopsSupported = default(string), IList hyperVGenerations = default(IList)) { Name = name; FriendlyName = friendlyName; CpuCoresCount = cpuCoresCount; + VCPUsAvailable = vCPUsAvailable; MemoryInGB = memoryInGB; MaxDataDiskCount = maxDataDiskCount; MaxNicsCount = maxNicsCount; Errors = errors; HighIopsSupported = highIopsSupported; + HyperVGenerations = hyperVGenerations; CustomInit(); } @@ -85,6 +91,12 @@ public TargetComputeSizeProperties() [JsonProperty(PropertyName = "cpuCoresCount")] public int? CpuCoresCount { get; set; } + /// + /// Gets the Available vCPUs supported by target compute size. + /// + [JsonProperty(PropertyName = "vCPUsAvailable")] + public int? VCPUsAvailable { get; private set; } + /// /// Gets or sets the maximum memory in GB supported by target compute /// size. @@ -120,5 +132,11 @@ public TargetComputeSizeProperties() [JsonProperty(PropertyName = "highIopsSupported")] public string HighIopsSupported { get; set; } + /// + /// Gets the supported HyperV Generations. + /// + [JsonProperty(PropertyName = "hyperVGenerations")] + public IList HyperVGenerations { get; private set; } + } } diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/TestMigrateCleanupInput.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/TestMigrateCleanupInput.cs index 120038f6470a..3574ea3f5940 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/TestMigrateCleanupInput.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/TestMigrateCleanupInput.cs @@ -61,6 +61,10 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); } + if (Properties != null) + { + Properties.Validate(); + } } } } diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/TestMigrateCleanupInputProperties.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/TestMigrateCleanupInputProperties.cs index 4a3575b1d749..32b37896e33c 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/TestMigrateCleanupInputProperties.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/TestMigrateCleanupInputProperties.cs @@ -10,6 +10,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models { + using Microsoft.Rest; using Newtonsoft.Json; using System.Linq; @@ -49,5 +50,21 @@ public TestMigrateCleanupInputProperties() [JsonProperty(PropertyName = "comments")] public string Comments { get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Comments != null) + { + if (Comments.Length > 1024) + { + throw new ValidationException(ValidationRules.MaxLength, "Comments", 1024); + } + } + } } } diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtContainerCreationInput.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtContainerCreationInput.cs index ac3d992f5383..f5e6871eeb04 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtContainerCreationInput.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtContainerCreationInput.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models /// /// VMwareCbt container creation input. /// - [Newtonsoft.Json.JsonObject("6c7da455-506f-43ff-a16a-8eb101aebb70")] + [Newtonsoft.Json.JsonObject("VMwareCbt")] public partial class VMwareCbtContainerCreationInput : ReplicationProviderSpecificContainerCreationInput { /// diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtDiskInput.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtDiskInput.cs index 022d114aa3ee..7a6b05129147 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtDiskInput.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtDiskInput.cs @@ -39,13 +39,16 @@ public VMwareCbtDiskInput() /// name of the log storage account. /// The disk type. Possible values include: /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' - public VMwareCbtDiskInput(string diskId, string isOSDisk, string logStorageAccountId, string logStorageAccountSasSecretName, string diskType = default(string)) + /// The DiskEncryptionSet ARM + /// Id. + public VMwareCbtDiskInput(string diskId, string isOSDisk, string logStorageAccountId, string logStorageAccountSasSecretName, string diskType = default(string), string diskEncryptionSetId = default(string)) { DiskId = diskId; IsOSDisk = isOSDisk; LogStorageAccountId = logStorageAccountId; LogStorageAccountSasSecretName = logStorageAccountSasSecretName; DiskType = diskType; + DiskEncryptionSetId = diskEncryptionSetId; CustomInit(); } @@ -85,6 +88,12 @@ public VMwareCbtDiskInput() [JsonProperty(PropertyName = "diskType")] public string DiskType { get; set; } + /// + /// Gets or sets the DiskEncryptionSet ARM Id. + /// + [JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId { get; set; } + /// /// Validate the object. /// diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtEnableMigrationInput.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtEnableMigrationInput.cs index f56f563a1290..576ca6da2a2c 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtEnableMigrationInput.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtEnableMigrationInput.cs @@ -54,7 +54,9 @@ public VMwareCbtEnableMigrationInput() /// ARM Id. /// The target boot /// diagnostics storage account ARM Id. - public VMwareCbtEnableMigrationInput(string vmwareMachineId, IList disksToInclude, string dataMoverRunAsAccountId, string snapshotRunAsAccountId, string targetResourceGroupId, string targetNetworkId, string licenseType = default(string), string targetVmName = default(string), string targetVmSize = default(string), string targetSubnetName = default(string), string targetAvailabilitySetId = default(string), string targetBootDiagnosticsStorageAccountId = default(string)) + /// A value indicating whether auto + /// resync is to be done. + public VMwareCbtEnableMigrationInput(string vmwareMachineId, IList disksToInclude, string dataMoverRunAsAccountId, string snapshotRunAsAccountId, string targetResourceGroupId, string targetNetworkId, string licenseType = default(string), string targetVmName = default(string), string targetVmSize = default(string), string targetSubnetName = default(string), string targetAvailabilitySetId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), string performAutoResync = default(string)) { VmwareMachineId = vmwareMachineId; DisksToInclude = disksToInclude; @@ -68,6 +70,7 @@ public VMwareCbtEnableMigrationInput() TargetSubnetName = targetSubnetName; TargetAvailabilitySetId = targetAvailabilitySetId; TargetBootDiagnosticsStorageAccountId = targetBootDiagnosticsStorageAccountId; + PerformAutoResync = performAutoResync; CustomInit(); } @@ -149,6 +152,12 @@ public VMwareCbtEnableMigrationInput() [JsonProperty(PropertyName = "targetBootDiagnosticsStorageAccountId")] public string TargetBootDiagnosticsStorageAccountId { get; set; } + /// + /// Gets or sets a value indicating whether auto resync is to be done. + /// + [JsonProperty(PropertyName = "performAutoResync")] + public string PerformAutoResync { get; set; } + /// /// Validate the object. /// diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtEventDetails.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtEventDetails.cs new file mode 100644 index 000000000000..cc8787ca5d2c --- /dev/null +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtEventDetails.cs @@ -0,0 +1,52 @@ +// +// 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.RecoveryServices.SiteRecovery.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Event details for VMwareCbt provider. + /// + [Newtonsoft.Json.JsonObject("VMwareCbt")] + public partial class VMwareCbtEventDetails : EventProviderSpecificDetails + { + /// + /// Initializes a new instance of the VMwareCbtEventDetails class. + /// + public VMwareCbtEventDetails() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VMwareCbtEventDetails class. + /// + /// The migration item name. + public VMwareCbtEventDetails(string migrationItemName = default(string)) + { + MigrationItemName = migrationItemName; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the migration item name. + /// + [JsonProperty(PropertyName = "migrationItemName")] + public string MigrationItemName { get; private set; } + + } +} diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtMigrationDetails.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtMigrationDetails.cs index 61c23edef270..37a27d0fdc3e 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtMigrationDetails.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtMigrationDetails.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models using System.Linq; /// - /// VMwareCbt provider specific settings + /// VMwareCbt provider specific settings. /// [Newtonsoft.Json.JsonObject("VMwareCbt")] public partial class VMwareCbtMigrationDetails : MigrationProviderSpecificSettings @@ -57,7 +57,22 @@ public VMwareCbtMigrationDetails() /// which the VM was migrated. /// The last recovery point /// received time. - public VMwareCbtMigrationDetails(string vmwareMachineId = default(string), string osType = default(string), string licenseType = default(string), string dataMoverRunAsAccountId = default(string), string snapshotRunAsAccountId = default(string), string targetVmName = default(string), string targetVmSize = default(string), string targetLocation = default(string), string targetResourceGroupId = default(string), string targetAvailabilitySetId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), IList protectedDisks = default(IList), string targetNetworkId = default(string), IList vmNics = default(IList), string migrationRecoveryPointId = default(string), System.DateTime? lastRecoveryPointReceived = default(System.DateTime?)) + /// The last recovery point + /// Id. + /// The initial seeding + /// progress percentage. + /// The migration progress + /// percentage. + /// The resync progress + /// percentage. + /// A value indicating whether resync is + /// required. + /// The resync state. Possible values + /// include: 'None', 'PreparedForResynchronization', + /// 'StartedResynchronization' + /// A value indicating whether auto + /// resync is to be done. + public VMwareCbtMigrationDetails(string vmwareMachineId = default(string), string osType = default(string), string licenseType = default(string), string dataMoverRunAsAccountId = default(string), string snapshotRunAsAccountId = default(string), string targetVmName = default(string), string targetVmSize = default(string), string targetLocation = default(string), string targetResourceGroupId = default(string), string targetAvailabilitySetId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), IList protectedDisks = default(IList), string targetNetworkId = default(string), IList vmNics = default(IList), string migrationRecoveryPointId = default(string), System.DateTime? lastRecoveryPointReceived = default(System.DateTime?), string lastRecoveryPointId = default(string), int? initialSeedingProgressPercentage = default(int?), int? migrationProgressPercentage = default(int?), int? resyncProgressPercentage = default(int?), string resyncRequired = default(string), string resyncState = default(string), string performAutoResync = default(string)) { VmwareMachineId = vmwareMachineId; OsType = osType; @@ -75,6 +90,13 @@ public VMwareCbtMigrationDetails() VmNics = vmNics; MigrationRecoveryPointId = migrationRecoveryPointId; LastRecoveryPointReceived = lastRecoveryPointReceived; + LastRecoveryPointId = lastRecoveryPointId; + InitialSeedingProgressPercentage = initialSeedingProgressPercentage; + MigrationProgressPercentage = migrationProgressPercentage; + ResyncProgressPercentage = resyncProgressPercentage; + ResyncRequired = resyncRequired; + ResyncState = resyncState; + PerformAutoResync = performAutoResync; CustomInit(); } @@ -179,5 +201,48 @@ public VMwareCbtMigrationDetails() [JsonProperty(PropertyName = "lastRecoveryPointReceived")] public System.DateTime? LastRecoveryPointReceived { get; private set; } + /// + /// Gets the last recovery point Id. + /// + [JsonProperty(PropertyName = "lastRecoveryPointId")] + public string LastRecoveryPointId { get; private set; } + + /// + /// Gets the initial seeding progress percentage. + /// + [JsonProperty(PropertyName = "initialSeedingProgressPercentage")] + public int? InitialSeedingProgressPercentage { get; private set; } + + /// + /// Gets the migration progress percentage. + /// + [JsonProperty(PropertyName = "migrationProgressPercentage")] + public int? MigrationProgressPercentage { get; private set; } + + /// + /// Gets the resync progress percentage. + /// + [JsonProperty(PropertyName = "resyncProgressPercentage")] + public int? ResyncProgressPercentage { get; private set; } + + /// + /// Gets a value indicating whether resync is required. + /// + [JsonProperty(PropertyName = "resyncRequired")] + public string ResyncRequired { get; private set; } + + /// + /// Gets the resync state. Possible values include: 'None', + /// 'PreparedForResynchronization', 'StartedResynchronization' + /// + [JsonProperty(PropertyName = "resyncState")] + public string ResyncState { get; private set; } + + /// + /// Gets or sets a value indicating whether auto resync is to be done. + /// + [JsonProperty(PropertyName = "performAutoResync")] + public string PerformAutoResync { get; set; } + } } diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtProtectedDiskDetails.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtProtectedDiskDetails.cs index f9478fd9a77c..c84801d0002d 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtProtectedDiskDetails.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtProtectedDiskDetails.cs @@ -41,13 +41,15 @@ public VMwareCbtProtectedDiskDetails() /// Id. /// The key vault secret /// name of the log storage account. + /// The DiskEncryptionSet ARM + /// Id. /// The ARM Id of the seed managed /// disk. /// The ARM Id of the target managed /// disk. /// The disk type. Possible values include: /// 'Standard_LRS', 'Premium_LRS', 'StandardSSD_LRS' - public VMwareCbtProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string diskPath = default(string), string isOSDisk = default(string), long? capacityInBytes = default(long?), string logStorageAccountId = default(string), string logStorageAccountSasSecretName = default(string), string seedManagedDiskId = default(string), string targetManagedDiskId = default(string), string diskType = default(string)) + public VMwareCbtProtectedDiskDetails(string diskId = default(string), string diskName = default(string), string diskPath = default(string), string isOSDisk = default(string), long? capacityInBytes = default(long?), string logStorageAccountId = default(string), string logStorageAccountSasSecretName = default(string), string diskEncryptionSetId = default(string), string seedManagedDiskId = default(string), string targetManagedDiskId = default(string), string diskType = default(string)) { DiskId = diskId; DiskName = diskName; @@ -56,6 +58,7 @@ public VMwareCbtProtectedDiskDetails() CapacityInBytes = capacityInBytes; LogStorageAccountId = logStorageAccountId; LogStorageAccountSasSecretName = logStorageAccountSasSecretName; + DiskEncryptionSetId = diskEncryptionSetId; SeedManagedDiskId = seedManagedDiskId; TargetManagedDiskId = targetManagedDiskId; DiskType = diskType; @@ -109,6 +112,12 @@ public VMwareCbtProtectedDiskDetails() [JsonProperty(PropertyName = "logStorageAccountSasSecretName")] public string LogStorageAccountSasSecretName { get; private set; } + /// + /// Gets the DiskEncryptionSet ARM Id. + /// + [JsonProperty(PropertyName = "diskEncryptionSetId")] + public string DiskEncryptionSetId { get; private set; } + /// /// Gets the ARM Id of the seed managed disk. /// diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtResyncInput.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtResyncInput.cs new file mode 100644 index 000000000000..0fba4b74014a --- /dev/null +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtResyncInput.cs @@ -0,0 +1,67 @@ +// +// 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.RecoveryServices.SiteRecovery.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// VMwareCbt specific resync input. + /// + [Newtonsoft.Json.JsonObject("VMwareCbt")] + public partial class VMwareCbtResyncInput : ResyncProviderSpecificInput + { + /// + /// Initializes a new instance of the VMwareCbtResyncInput class. + /// + public VMwareCbtResyncInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VMwareCbtResyncInput class. + /// + /// A value indicating whether CBT is to be + /// reset. + public VMwareCbtResyncInput(string skipCbtReset) + { + SkipCbtReset = skipCbtReset; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a value indicating whether CBT is to be reset. + /// + [JsonProperty(PropertyName = "skipCbtReset")] + public string SkipCbtReset { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (SkipCbtReset == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "SkipCbtReset"); + } + } + } +} diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtUpdateMigrationItemInput.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtUpdateMigrationItemInput.cs index 16b7dc7af593..128314bad7c9 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtUpdateMigrationItemInput.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/Models/VMwareCbtUpdateMigrationItemInput.cs @@ -46,7 +46,9 @@ public VMwareCbtUpdateMigrationItemInput() /// The list of NIC details. /// The license type. Possible values /// include: 'NotSpecified', 'NoLicenseType', 'WindowsServer' - public VMwareCbtUpdateMigrationItemInput(string targetVmName = default(string), string targetVmSize = default(string), string targetResourceGroupId = default(string), string targetAvailabilitySetId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), string targetNetworkId = default(string), IList vmNics = default(IList), string licenseType = default(string)) + /// A value indicating whether auto + /// resync is to be done. + public VMwareCbtUpdateMigrationItemInput(string targetVmName = default(string), string targetVmSize = default(string), string targetResourceGroupId = default(string), string targetAvailabilitySetId = default(string), string targetBootDiagnosticsStorageAccountId = default(string), string targetNetworkId = default(string), IList vmNics = default(IList), string licenseType = default(string), string performAutoResync = default(string)) { TargetVmName = targetVmName; TargetVmSize = targetVmSize; @@ -56,6 +58,7 @@ public VMwareCbtUpdateMigrationItemInput() TargetNetworkId = targetNetworkId; VmNics = vmNics; LicenseType = licenseType; + PerformAutoResync = performAutoResync; CustomInit(); } @@ -113,5 +116,11 @@ public VMwareCbtUpdateMigrationItemInput() [JsonProperty(PropertyName = "licenseType")] public string LicenseType { get; set; } + /// + /// Gets or sets a value indicating whether auto resync is to be done. + /// + [JsonProperty(PropertyName = "performAutoResync")] + public string PerformAutoResync { get; set; } + } } diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationEligibilityResultsOperations.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationEligibilityResultsOperations.cs index 11307101cf44..ada748e1ef93 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationEligibilityResultsOperations.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationEligibilityResultsOperations.cs @@ -50,400 +50,6 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl /// public SiteRecoveryManagementClient Client { get; private set; } - - - /// - /// Gets the validation errors in case the VM is unsuitable for protection. - /// - /// - /// Validates whether a given VM can be protected or not in which case returns - /// list of errors. - /// - /// - /// Virtual Machine name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// 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> BeginListWithHttpMessagesAsync(string virtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ResourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (virtualMachineName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "virtualMachineName"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("virtualMachineName", virtualMachineName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginList", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{virtualMachineName}", System.Uri.EscapeDataString(virtualMachineName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach (var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets the validation errors in case the VM is unsuitable for protection. - /// - /// - /// Validates whether a given VM can be protected or not in which case returns - /// list of errors. - /// - /// - /// Virtual Machine name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// 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> BeginGetWithHttpMessagesAsync(string virtualMachineName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (Client.ResourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (virtualMachineName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "virtualMachineName"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("virtualMachineName", virtualMachineName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginGet", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}/providers/Microsoft.RecoveryServices/replicationEligibilityResults/default").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{virtualMachineName}", System.Uri.EscapeDataString(virtualMachineName)); - List _queryParameters = new List(); - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach (var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - /// /// Gets the validation errors in case the VM is unsuitable for protection. /// @@ -502,7 +108,7 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("virtualMachineName", virtualMachineName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginList", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -541,7 +147,7 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl if (customHeaders != null) { - foreach (var _header in customHeaders) + foreach(var _header in customHeaders) { if (_httpRequest.Headers.Contains(_header.Key)) { @@ -579,7 +185,7 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex = new CloudException(_errorBody.Message); @@ -698,7 +304,7 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("virtualMachineName", virtualMachineName); tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginGet", tracingParameters); + ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = Client.BaseUri.AbsoluteUri; @@ -737,7 +343,7 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl if (customHeaders != null) { - foreach (var _header in customHeaders) + foreach(var _header in customHeaders) { if (_httpRequest.Headers.Contains(_header.Key)) { @@ -775,7 +381,7 @@ internal ReplicationEligibilityResultsOperations(SiteRecoveryManagementClient cl try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); if (_errorBody != null) { ex = new CloudException(_errorBody.Message); diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationEligibilityResultsOperationsExtensions.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationEligibilityResultsOperationsExtensions.cs index 9726066d8490..5eecf2b118fb 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationEligibilityResultsOperationsExtensions.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationEligibilityResultsOperationsExtensions.cs @@ -105,89 +105,5 @@ public static ReplicationEligibilityResults Get(this IReplicationEligibilityResu } } - /// - /// Gets the validation errors in case the VM is unsuitable for protection. - /// - /// - /// Validates whether a given VM can be protected or not in which case returns - /// list of errors. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Virtual Machine name. - /// - public static ReplicationEligibilityResultsCollection BeginList(this IReplicationEligibilityResultsOperations operations, string virtualMachineName) - { - return operations.BeginListAsync(virtualMachineName).GetAwaiter().GetResult(); - } - - /// - /// Gets the validation errors in case the VM is unsuitable for protection. - /// - /// - /// Validates whether a given VM can be protected or not in which case returns - /// list of errors. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Virtual Machine name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginListAsync(this IReplicationEligibilityResultsOperations operations, string virtualMachineName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginListWithHttpMessagesAsync(virtualMachineName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the validation errors in case the VM is unsuitable for protection. - /// - /// - /// Validates whether a given VM can be protected or not in which case returns - /// list of errors. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Virtual Machine name. - /// - public static ReplicationEligibilityResults BeginGet(this IReplicationEligibilityResultsOperations operations, string virtualMachineName) - { - return operations.BeginGetAsync(virtualMachineName).GetAwaiter().GetResult(); - } - - /// - /// Gets the validation errors in case the VM is unsuitable for protection. - /// - /// - /// Validates whether a given VM can be protected or not in which case returns - /// list of errors. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Virtual Machine name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginGetAsync(this IReplicationEligibilityResultsOperations operations, string virtualMachineName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginGetWithHttpMessagesAsync(virtualMachineName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - } } diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationMigrationItemsOperations.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationMigrationItemsOperations.cs index 7f4952b965d6..71bf9a5b955f 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationMigrationItemsOperations.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationMigrationItemsOperations.cs @@ -599,6 +599,37 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// Resynchronizes replication. + /// + /// + /// The operation to resynchronize replication of an ASR migration item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// Resync input. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> ResyncWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResyncInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginResyncWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, input, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Test migrate item. /// @@ -1778,6 +1809,242 @@ internal ReplicationMigrationItemsOperations(SiteRecoveryManagementClient client return _result; } + /// + /// Resynchronizes replication. + /// + /// + /// The operation to resynchronize replication of an ASR migration item. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// Resync input. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// 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> BeginResyncWithHttpMessagesAsync(string fabricName, string protectionContainerName, string migrationItemName, ResyncInput input, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.ApiVersion == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); + } + if (Client.ResourceName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceName"); + } + if (Client.ResourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (fabricName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "fabricName"); + } + if (protectionContainerName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "protectionContainerName"); + } + if (migrationItemName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "migrationItemName"); + } + if (input == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "input"); + } + if (input != null) + { + input.Validate(); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("fabricName", fabricName); + tracingParameters.Add("protectionContainerName", protectionContainerName); + tracingParameters.Add("migrationItemName", migrationItemName); + tracingParameters.Add("input", input); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginResync", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{resourceName}/replicationFabrics/{fabricName}/replicationProtectionContainers/{protectionContainerName}/replicationMigrationItems/{migrationItemName}/resync").ToString(); + _url = _url.Replace("{resourceName}", System.Uri.EscapeDataString(Client.ResourceName)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(Client.ResourceGroupName)); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{fabricName}", System.Uri.EscapeDataString(fabricName)); + _url = _url.Replace("{protectionContainerName}", System.Uri.EscapeDataString(protectionContainerName)); + _url = _url.Replace("{migrationItemName}", System.Uri.EscapeDataString(migrationItemName)); + List _queryParameters = new List(); + if (Client.ApiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(input != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(input, Client.SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + /// /// Test migrate item. /// diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationMigrationItemsOperationsExtensions.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationMigrationItemsOperationsExtensions.cs index 21bc59b78678..dbe9dc44d459 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationMigrationItemsOperationsExtensions.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/ReplicationMigrationItemsOperationsExtensions.cs @@ -343,6 +343,64 @@ public static MigrationItem Migrate(this IReplicationMigrationItemsOperations op } } + /// + /// Resynchronizes replication. + /// + /// + /// The operation to resynchronize replication of an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// Resync input. + /// + public static MigrationItem Resync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResyncInput input) + { + return operations.ResyncAsync(fabricName, protectionContainerName, migrationItemName, input).GetAwaiter().GetResult(); + } + + /// + /// Resynchronizes replication. + /// + /// + /// The operation to resynchronize replication of an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// Resync input. + /// + /// + /// The cancellation token. + /// + public static async Task ResyncAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResyncInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ResyncWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Test migrate item. /// @@ -728,6 +786,64 @@ public static MigrationItem BeginMigrate(this IReplicationMigrationItemsOperatio } } + /// + /// Resynchronizes replication. + /// + /// + /// The operation to resynchronize replication of an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// Resync input. + /// + public static MigrationItem BeginResync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResyncInput input) + { + return operations.BeginResyncAsync(fabricName, protectionContainerName, migrationItemName, input).GetAwaiter().GetResult(); + } + + /// + /// Resynchronizes replication. + /// + /// + /// The operation to resynchronize replication of an ASR migration item. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Fabric name. + /// + /// + /// Protection container name. + /// + /// + /// Migration item name. + /// + /// + /// Resync input. + /// + /// + /// The cancellation token. + /// + public static async Task BeginResyncAsync(this IReplicationMigrationItemsOperations operations, string fabricName, string protectionContainerName, string migrationItemName, ResyncInput input, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginResyncWithHttpMessagesAsync(fabricName, protectionContainerName, migrationItemName, input, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Test migrate item. /// diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/SiteRecoveryManagementClient.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/SiteRecoveryManagementClient.cs index 5a510b7cbc97..6d5239eb99c0 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/SiteRecoveryManagementClient.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Generated/SiteRecoveryManagementClient.cs @@ -569,6 +569,8 @@ private void Initialize() DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); + SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); + DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); DeserializationSettings.Converters.Add(new PolymorphicDeserializeJsonConverter("instanceType")); SerializationSettings.Converters.Add(new PolymorphicSerializeJsonConverter("instanceType")); diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.csproj b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.csproj index d056aeb229c6..1933c4473338 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.csproj +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.csproj @@ -6,16 +6,14 @@ Microsoft.Azure.Management.RecoveryServices.SiteRecovery Provides developers with libraries for the updated recovery services site recovery feature under Azure Resource manager. - 2.0.5-preview + 2.0.6-preview Microsoft.Azure.Management.RecoveryServices.SiteRecovery Recoveryservices;SiteRecovery; diff --git a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Properties/AssemblyInfo.cs b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Properties/AssemblyInfo.cs index f0ae8e169f5b..aeaecef94a0f 100644 --- a/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Properties/AssemblyInfo.cs +++ b/sdk/recoveryservices-siterecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery/src/Properties/AssemblyInfo.cs @@ -7,8 +7,8 @@ [assembly: AssemblyTitle("Microsoft Azure Recovery Services SiteRecovery Library")] [assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Recovery Services SiteRecovery Resources.")] -[assembly: AssemblyVersion("2.0.0.0")] -[assembly: AssemblyFileVersion("2.0.5.0")] +[assembly: AssemblyVersion("2.0.6.0")] +[assembly: AssemblyFileVersion("2.0.6.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("Microsoft Azure .NET SDK")]