diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IOperationsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IOperationsOperations.cs deleted file mode 100644 index f5435872e1bc..000000000000 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/IOperationsOperations.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery -{ - using System; - using System.Collections.Generic; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - - /// - /// OperationsOperations operations. - /// - public partial interface IOperationsOperations - { - /// - /// Returns the list of available operations. - /// - /// Operation to return the list of available operations. - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns the list of available operations. - /// - /// Operation to return the list of available operations. - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ISiteRecoveryManagementClient.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ISiteRecoveryManagementClient.cs index 96d5e589e8ea..8f1109f3592d 100644 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ISiteRecoveryManagementClient.cs +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/ISiteRecoveryManagementClient.cs @@ -61,19 +61,20 @@ public partial interface ISiteRecoveryManagementClient : System.IDisposable string ApiVersion { get; } /// - /// Gets or sets the preferred language for the response. + /// The preferred language for the response. /// string AcceptLanguage { get; set; } /// - /// Gets or sets the retry timeout in seconds for Long Running - /// Operations. Default value is 30. + /// The retry timeout in seconds for Long Running Operations. Default + /// value is 30. /// int? LongRunningOperationRetryTimeout { get; set; } /// - /// When set to true a unique x-ms-client-request-id value is generated - /// and included in each request. Default is true. + /// Whether a unique x-ms-client-request-id should be generated. When + /// set to true a unique x-ms-client-request-id value is generated and + /// included in each request. Default is true. /// bool? GenerateClientRequestId { get; set; } diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AEnableProtectionInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AEnableProtectionInput.cs index e0130384f79d..5bc1f652c08a 100644 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AEnableProtectionInput.cs +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AEnableProtectionInput.cs @@ -48,7 +48,9 @@ public A2AEnableProtectionInput() /// The multi vm group name. /// The boot diagnostic /// storage account. - public A2AEnableProtectionInput(string fabricObjectId = default(string), string recoveryContainerId = default(string), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), IList vmDisks = default(IList), IList vmManagedDisks = default(IList), string multiVmGroupName = default(string), string recoveryBootDiagStorageAccountId = default(string)) + /// The recovery disk encryption + /// information. + public A2AEnableProtectionInput(string fabricObjectId = default(string), string recoveryContainerId = default(string), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), IList vmDisks = default(IList), IList vmManagedDisks = default(IList), string multiVmGroupName = default(string), string recoveryBootDiagStorageAccountId = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo)) { FabricObjectId = fabricObjectId; RecoveryContainerId = recoveryContainerId; @@ -59,6 +61,7 @@ public A2AEnableProtectionInput() VmManagedDisks = vmManagedDisks; MultiVmGroupName = multiVmGroupName; RecoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; + DiskEncryptionInfo = diskEncryptionInfo; CustomInit(); } @@ -122,5 +125,11 @@ public A2AEnableProtectionInput() [JsonProperty(PropertyName = "recoveryBootDiagStorageAccountId")] public string RecoveryBootDiagStorageAccountId { get; set; } + /// + /// Gets or sets the recovery disk encryption information. + /// + [JsonProperty(PropertyName = "diskEncryptionInfo")] + public DiskEncryptionInfo DiskEncryptionInfo { get; set; } + } } diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AProtectedDiskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AProtectedDiskDetails.cs index 3b3344b90385..655afd249945 100644 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AProtectedDiskDetails.cs +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AProtectedDiskDetails.cs @@ -53,7 +53,18 @@ public A2AProtectedDiskDetails() /// pending for replication in MB at staging account. /// The data pending at /// source virtual machine in MB. - public A2AProtectedDiskDetails(string diskUri = default(string), string recoveryAzureStorageAccountId = default(string), string primaryDiskAzureStorageAccountId = default(string), string recoveryDiskUri = default(string), string diskName = default(string), long? diskCapacityInBytes = default(long?), string primaryStagingAzureStorageAccountId = default(string), string diskType = default(string), bool? resyncRequired = default(bool?), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), double? dataPendingInStagingStorageAccountInMB = default(double?), double? dataPendingAtSourceAgentInMB = default(double?)) + /// A value indicating whether vm has + /// encrypted os disk or not. + /// The secret URL / identifier + /// (BEK). + /// The KeyVault resource id for secret + /// (BEK). + /// A value indicating whether disk + /// key got encrypted or not. + /// The key URL / identifier (KEK). + /// The KeyVault resource id for key + /// (KEK). + public A2AProtectedDiskDetails(string diskUri = default(string), string recoveryAzureStorageAccountId = default(string), string primaryDiskAzureStorageAccountId = default(string), string recoveryDiskUri = default(string), string diskName = default(string), long? diskCapacityInBytes = default(long?), string primaryStagingAzureStorageAccountId = default(string), string diskType = default(string), bool? resyncRequired = default(bool?), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), double? dataPendingInStagingStorageAccountInMB = default(double?), double? dataPendingAtSourceAgentInMB = default(double?), bool? isDiskEncrypted = default(bool?), string secretIdentifier = default(string), string dekKeyVaultArmId = default(string), bool? isDiskKeyEncrypted = default(bool?), string keyIdentifier = default(string), string kekKeyVaultArmId = default(string)) { DiskUri = diskUri; RecoveryAzureStorageAccountId = recoveryAzureStorageAccountId; @@ -68,6 +79,12 @@ public A2AProtectedDiskDetails() MonitoringJobType = monitoringJobType; DataPendingInStagingStorageAccountInMB = dataPendingInStagingStorageAccountInMB; DataPendingAtSourceAgentInMB = dataPendingAtSourceAgentInMB; + IsDiskEncrypted = isDiskEncrypted; + SecretIdentifier = secretIdentifier; + DekKeyVaultArmId = dekKeyVaultArmId; + IsDiskKeyEncrypted = isDiskKeyEncrypted; + KeyIdentifier = keyIdentifier; + KekKeyVaultArmId = kekKeyVaultArmId; CustomInit(); } @@ -158,5 +175,43 @@ public A2AProtectedDiskDetails() [JsonProperty(PropertyName = "dataPendingAtSourceAgentInMB")] public double? DataPendingAtSourceAgentInMB { get; set; } + /// + /// Gets or sets a value indicating whether vm has encrypted os disk or + /// not. + /// + [JsonProperty(PropertyName = "isDiskEncrypted")] + public bool? IsDiskEncrypted { get; set; } + + /// + /// Gets or sets the secret URL / identifier (BEK). + /// + [JsonProperty(PropertyName = "secretIdentifier")] + public string SecretIdentifier { get; set; } + + /// + /// Gets or sets the KeyVault resource id for secret (BEK). + /// + [JsonProperty(PropertyName = "dekKeyVaultArmId")] + public string DekKeyVaultArmId { get; set; } + + /// + /// Gets or sets a value indicating whether disk key got encrypted or + /// not. + /// + [JsonProperty(PropertyName = "isDiskKeyEncrypted")] + public bool? IsDiskKeyEncrypted { get; set; } + + /// + /// Gets or sets the key URL / identifier (KEK). + /// + [JsonProperty(PropertyName = "keyIdentifier")] + public string KeyIdentifier { get; set; } + + /// + /// Gets or sets the KeyVault resource id for key (KEK). + /// + [JsonProperty(PropertyName = "kekKeyVaultArmId")] + public string KekKeyVaultArmId { get; set; } + } } diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AProtectedManagedDiskDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AProtectedManagedDiskDetails.cs index 5348a286e204..49fa606f0f1c 100644 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AProtectedManagedDiskDetails.cs +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AProtectedManagedDiskDetails.cs @@ -62,7 +62,18 @@ public A2AProtectedManagedDiskDetails() /// pending for replication in MB at staging account. /// The data pending at /// source virtual machine in MB. - public A2AProtectedManagedDiskDetails(string diskId = default(string), string recoveryResourceGroupId = default(string), string recoveryTargetDiskId = default(string), string recoveryReplicaDiskId = default(string), string recoveryReplicaDiskAccountType = default(string), string recoveryTargetDiskAccountType = default(string), string diskName = default(string), long? diskCapacityInBytes = default(long?), string primaryStagingAzureStorageAccountId = default(string), string diskType = default(string), bool? resyncRequired = default(bool?), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), double? dataPendingInStagingStorageAccountInMB = default(double?), double? dataPendingAtSourceAgentInMB = default(double?)) + /// A value indicating whether vm has + /// encrypted os disk or not. + /// The secret URL / identifier + /// (BEK). + /// The KeyVault resource id for secret + /// (BEK). + /// A value indicating whether disk + /// key got encrypted or not. + /// The key URL / identifier (KEK). + /// The KeyVault resource id for key + /// (KEK). + public A2AProtectedManagedDiskDetails(string diskId = default(string), string recoveryResourceGroupId = default(string), string recoveryTargetDiskId = default(string), string recoveryReplicaDiskId = default(string), string recoveryReplicaDiskAccountType = default(string), string recoveryTargetDiskAccountType = default(string), string diskName = default(string), long? diskCapacityInBytes = default(long?), string primaryStagingAzureStorageAccountId = default(string), string diskType = default(string), bool? resyncRequired = default(bool?), int? monitoringPercentageCompletion = default(int?), string monitoringJobType = default(string), double? dataPendingInStagingStorageAccountInMB = default(double?), double? dataPendingAtSourceAgentInMB = default(double?), bool? isDiskEncrypted = default(bool?), string secretIdentifier = default(string), string dekKeyVaultArmId = default(string), bool? isDiskKeyEncrypted = default(bool?), string keyIdentifier = default(string), string kekKeyVaultArmId = default(string)) { DiskId = diskId; RecoveryResourceGroupId = recoveryResourceGroupId; @@ -79,6 +90,12 @@ public A2AProtectedManagedDiskDetails() MonitoringJobType = monitoringJobType; DataPendingInStagingStorageAccountInMB = dataPendingInStagingStorageAccountInMB; DataPendingAtSourceAgentInMB = dataPendingAtSourceAgentInMB; + IsDiskEncrypted = isDiskEncrypted; + SecretIdentifier = secretIdentifier; + DekKeyVaultArmId = dekKeyVaultArmId; + IsDiskKeyEncrypted = isDiskKeyEncrypted; + KeyIdentifier = keyIdentifier; + KekKeyVaultArmId = kekKeyVaultArmId; CustomInit(); } @@ -183,5 +200,43 @@ public A2AProtectedManagedDiskDetails() [JsonProperty(PropertyName = "dataPendingAtSourceAgentInMB")] public double? DataPendingAtSourceAgentInMB { get; set; } + /// + /// Gets or sets a value indicating whether vm has encrypted os disk or + /// not. + /// + [JsonProperty(PropertyName = "isDiskEncrypted")] + public bool? IsDiskEncrypted { get; set; } + + /// + /// Gets or sets the secret URL / identifier (BEK). + /// + [JsonProperty(PropertyName = "secretIdentifier")] + public string SecretIdentifier { get; set; } + + /// + /// Gets or sets the KeyVault resource id for secret (BEK). + /// + [JsonProperty(PropertyName = "dekKeyVaultArmId")] + public string DekKeyVaultArmId { get; set; } + + /// + /// Gets or sets a value indicating whether disk key got encrypted or + /// not. + /// + [JsonProperty(PropertyName = "isDiskKeyEncrypted")] + public bool? IsDiskKeyEncrypted { get; set; } + + /// + /// Gets or sets the key URL / identifier (KEK). + /// + [JsonProperty(PropertyName = "keyIdentifier")] + public string KeyIdentifier { get; set; } + + /// + /// Gets or sets the KeyVault resource id for key (KEK). + /// + [JsonProperty(PropertyName = "kekKeyVaultArmId")] + public string KekKeyVaultArmId { get; set; } + } } diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2ASwitchProtectionInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2ASwitchProtectionInput.cs index 19d0ae3bd7ad..f1f38a262a85 100644 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2ASwitchProtectionInput.cs +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2ASwitchProtectionInput.cs @@ -46,7 +46,9 @@ public A2ASwitchProtectionInput() /// The Policy Id. /// The boot diagnostic /// storage account. - public A2ASwitchProtectionInput(string recoveryContainerId = default(string), IList vmDisks = default(IList), IList vmManagedDisks = default(IList), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), string policyId = default(string), string recoveryBootDiagStorageAccountId = default(string)) + /// The recovery disk encryption + /// information. + public A2ASwitchProtectionInput(string recoveryContainerId = default(string), IList vmDisks = default(IList), IList vmManagedDisks = default(IList), string recoveryResourceGroupId = default(string), string recoveryCloudServiceId = default(string), string recoveryAvailabilitySetId = default(string), string policyId = default(string), string recoveryBootDiagStorageAccountId = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo)) { RecoveryContainerId = recoveryContainerId; VmDisks = vmDisks; @@ -56,6 +58,7 @@ public A2ASwitchProtectionInput() RecoveryAvailabilitySetId = recoveryAvailabilitySetId; PolicyId = policyId; RecoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; + DiskEncryptionInfo = diskEncryptionInfo; CustomInit(); } @@ -113,5 +116,11 @@ public A2ASwitchProtectionInput() [JsonProperty(PropertyName = "recoveryBootDiagStorageAccountId")] public string RecoveryBootDiagStorageAccountId { get; set; } + /// + /// Gets or sets the recovery disk encryption information. + /// + [JsonProperty(PropertyName = "diskEncryptionInfo")] + public DiskEncryptionInfo DiskEncryptionInfo { get; set; } + } } diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AUpdateReplicationProtectedItemInput.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AUpdateReplicationProtectedItemInput.cs index 112182afd73b..ce85ff36d587 100644 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AUpdateReplicationProtectedItemInput.cs +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/A2AUpdateReplicationProtectedItemInput.cs @@ -42,12 +42,15 @@ public A2AUpdateReplicationProtectedItemInput() /// details. /// The boot diagnostic /// storage account. - public A2AUpdateReplicationProtectedItemInput(string recoveryCloudServiceId = default(string), string recoveryResourceGroupId = default(string), IList managedDiskUpdateDetails = default(IList), string recoveryBootDiagStorageAccountId = default(string)) + /// The recovery os disk encryption + /// information. + public A2AUpdateReplicationProtectedItemInput(string recoveryCloudServiceId = default(string), string recoveryResourceGroupId = default(string), IList managedDiskUpdateDetails = default(IList), string recoveryBootDiagStorageAccountId = default(string), DiskEncryptionInfo diskEncryptionInfo = default(DiskEncryptionInfo)) { RecoveryCloudServiceId = recoveryCloudServiceId; RecoveryResourceGroupId = recoveryResourceGroupId; ManagedDiskUpdateDetails = managedDiskUpdateDetails; RecoveryBootDiagStorageAccountId = recoveryBootDiagStorageAccountId; + DiskEncryptionInfo = diskEncryptionInfo; CustomInit(); } @@ -80,5 +83,11 @@ public A2AUpdateReplicationProtectedItemInput() [JsonProperty(PropertyName = "recoveryBootDiagStorageAccountId")] public string RecoveryBootDiagStorageAccountId { get; set; } + /// + /// Gets or sets the recovery os disk encryption information. + /// + [JsonProperty(PropertyName = "diskEncryptionInfo")] + public DiskEncryptionInfo DiskEncryptionInfo { get; set; } + } } diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMException.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMException.cs deleted file mode 100644 index b4d656647ece..000000000000 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMException.cs +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// ARM inner exception class. - /// - public partial class ARMException - { - /// - /// Initializes a new instance of the ARMException class. - /// - public ARMException() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ARMException class. - /// - /// Gets HTTP status code for the error. - /// Gets exception message. - /// Gets exception target. - /// Gets service based error details. - /// Gets private data for service - /// debugging. - public ARMException(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), ARMInnerError innererror = default(ARMInnerError)) - { - Code = code; - Message = message; - Target = target; - Details = details; - Innererror = innererror; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets HTTP status code for the error. - /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } - - /// - /// Gets exception message. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - - /// - /// Gets exception target. - /// - [JsonProperty(PropertyName = "target")] - public string Target { get; set; } - - /// - /// Gets service based error details. - /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; set; } - - /// - /// Gets private data for service debugging. - /// - [JsonProperty(PropertyName = "innererror")] - public ARMInnerError Innererror { get; set; } - - } -} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMExceptionDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMExceptionDetails.cs deleted file mode 100644 index 24ff47ac560d..000000000000 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMExceptionDetails.cs +++ /dev/null @@ -1,102 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Service based exception details. - /// - public partial class ARMExceptionDetails - { - /// - /// Initializes a new instance of the ARMExceptionDetails class. - /// - public ARMExceptionDetails() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ARMExceptionDetails class. - /// - /// Gets service error code. - /// Gets error message. - /// Gets possible cause for error. - /// Gets recommended action for the - /// error. - /// Gets the client request Id for the - /// session. - /// Gets the activity Id for the - /// session. - /// Gets exception target. - public ARMExceptionDetails(string code = default(string), string message = default(string), string possibleCauses = default(string), string recommendedAction = default(string), string clientRequestId = default(string), string activityId = default(string), string target = default(string)) - { - Code = code; - Message = message; - PossibleCauses = possibleCauses; - RecommendedAction = recommendedAction; - ClientRequestId = clientRequestId; - ActivityId = activityId; - Target = target; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets service error code. - /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } - - /// - /// Gets error message. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - - /// - /// Gets possible cause for error. - /// - [JsonProperty(PropertyName = "possibleCauses")] - public string PossibleCauses { get; set; } - - /// - /// Gets recommended action for the error. - /// - [JsonProperty(PropertyName = "recommendedAction")] - public string RecommendedAction { get; set; } - - /// - /// Gets the client request Id for the session. - /// - [JsonProperty(PropertyName = "clientRequestId")] - public string ClientRequestId { get; set; } - - /// - /// Gets the activity Id for the session. - /// - [JsonProperty(PropertyName = "activityId")] - public string ActivityId { get; set; } - - /// - /// Gets exception target. - /// - [JsonProperty(PropertyName = "target")] - public string Target { get; set; } - - } -} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMInnerError.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMInnerError.cs deleted file mode 100644 index 09c7fa490733..000000000000 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/ARMInnerError.cs +++ /dev/null @@ -1,166 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// ARM internal error class for providing additional debug data. - /// - public partial class ARMInnerError - { - /// - /// Initializes a new instance of the ARMInnerError class. - /// - public ARMInnerError() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ARMInnerError class. - /// - /// Gets complete stack trace of the - /// exception. - /// Gets exception source. - /// Gets data related to method which threw - /// the exception. - /// Gets cloud Id in exception. - /// Gets hyperV host ID. - /// Gets hyperV cluster Id. - /// Gets network Id. - /// Gets Vm Id. - /// Gets Fabric Id. - /// Gets Live Id of the caller. - /// Gets container Id of the caller. - /// Gets resource id used in the call. - /// Gets caller resource name. - /// Gets subscription Id. - /// Gets serialized SRS log - /// context. - public ARMInnerError(string trace = default(string), string source = default(string), MethodCallStatus methodStatus = default(MethodCallStatus), string cloudId = default(string), string hVHostId = default(string), string hVClusterId = default(string), string networkId = default(string), string vmId = default(string), string fabricId = default(string), string liveId = default(string), string containerId = default(string), string resourceId = default(string), string resourceName = default(string), string subscriptionId = default(string), string serializedSRSLogContext = default(string)) - { - Trace = trace; - Source = source; - MethodStatus = methodStatus; - CloudId = cloudId; - HVHostId = hVHostId; - HVClusterId = hVClusterId; - NetworkId = networkId; - VmId = vmId; - FabricId = fabricId; - LiveId = liveId; - ContainerId = containerId; - ResourceId = resourceId; - ResourceName = resourceName; - SubscriptionId = subscriptionId; - SerializedSRSLogContext = serializedSRSLogContext; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets complete stack trace of the exception. - /// - [JsonProperty(PropertyName = "trace")] - public string Trace { get; set; } - - /// - /// Gets exception source. - /// - [JsonProperty(PropertyName = "source")] - public string Source { get; set; } - - /// - /// Gets data related to method which threw the exception. - /// - [JsonProperty(PropertyName = "methodStatus")] - public MethodCallStatus MethodStatus { get; set; } - - /// - /// Gets cloud Id in exception. - /// - [JsonProperty(PropertyName = "cloudId")] - public string CloudId { get; set; } - - /// - /// Gets hyperV host ID. - /// - [JsonProperty(PropertyName = "hVHostId")] - public string HVHostId { get; set; } - - /// - /// Gets hyperV cluster Id. - /// - [JsonProperty(PropertyName = "hVClusterId")] - public string HVClusterId { get; set; } - - /// - /// Gets network Id. - /// - [JsonProperty(PropertyName = "networkId")] - public string NetworkId { get; set; } - - /// - /// Gets Vm Id. - /// - [JsonProperty(PropertyName = "vmId")] - public string VmId { get; set; } - - /// - /// Gets Fabric Id. - /// - [JsonProperty(PropertyName = "fabricId")] - public string FabricId { get; set; } - - /// - /// Gets Live Id of the caller. - /// - [JsonProperty(PropertyName = "liveId")] - public string LiveId { get; set; } - - /// - /// Gets container Id of the caller. - /// - [JsonProperty(PropertyName = "containerId")] - public string ContainerId { get; set; } - - /// - /// Gets resource id used in the call. - /// - [JsonProperty(PropertyName = "resourceId")] - public string ResourceId { get; set; } - - /// - /// Gets caller resource name. - /// - [JsonProperty(PropertyName = "resourceName")] - public string ResourceName { get; set; } - - /// - /// Gets subscription Id. - /// - [JsonProperty(PropertyName = "subscriptionId")] - public string SubscriptionId { get; set; } - - /// - /// Gets serialized SRS log context. - /// - [JsonProperty(PropertyName = "serializedSRSLogContext")] - public string SerializedSRSLogContext { get; set; } - - } -} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiskEncryptionInfo.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiskEncryptionInfo.cs new file mode 100644 index 000000000000..b974a7123db1 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiskEncryptionInfo.cs @@ -0,0 +1,61 @@ +// +// 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; + + /// + /// Recovery disk encryption info (BEK and KEK). + /// + public partial class DiskEncryptionInfo + { + /// + /// Initializes a new instance of the DiskEncryptionInfo class. + /// + public DiskEncryptionInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DiskEncryptionInfo class. + /// + /// The recovery KeyVault reference + /// for secret. + /// The recovery KeyVault reference + /// for key. + public DiskEncryptionInfo(DiskEncryptionKeyInfo diskEncryptionKeyInfo = default(DiskEncryptionKeyInfo), KeyEncryptionKeyInfo keyEncryptionKeyInfo = default(KeyEncryptionKeyInfo)) + { + DiskEncryptionKeyInfo = diskEncryptionKeyInfo; + KeyEncryptionKeyInfo = keyEncryptionKeyInfo; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the recovery KeyVault reference for secret. + /// + [JsonProperty(PropertyName = "diskEncryptionKeyInfo")] + public DiskEncryptionKeyInfo DiskEncryptionKeyInfo { get; set; } + + /// + /// Gets or sets the recovery KeyVault reference for key. + /// + [JsonProperty(PropertyName = "keyEncryptionKeyInfo")] + public KeyEncryptionKeyInfo KeyEncryptionKeyInfo { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiskEncryptionKeyInfo.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiskEncryptionKeyInfo.cs new file mode 100644 index 000000000000..9125876971ce --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/DiskEncryptionKeyInfo.cs @@ -0,0 +1,61 @@ +// +// 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; + + /// + /// Disk Encryption Key Information (BitLocker Encryption Key (BEK) on + /// Windows). + /// + public partial class DiskEncryptionKeyInfo + { + /// + /// Initializes a new instance of the DiskEncryptionKeyInfo class. + /// + public DiskEncryptionKeyInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DiskEncryptionKeyInfo class. + /// + /// The secret url / identifier. + /// The KeyVault resource ARM id + /// for secret. + public DiskEncryptionKeyInfo(string secretIdentifier = default(string), string keyVaultResourceArmId = default(string)) + { + SecretIdentifier = secretIdentifier; + KeyVaultResourceArmId = keyVaultResourceArmId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the secret url / identifier. + /// + [JsonProperty(PropertyName = "secretIdentifier")] + public string SecretIdentifier { get; set; } + + /// + /// Gets or sets the KeyVault resource ARM id for secret. + /// + [JsonProperty(PropertyName = "keyVaultResourceArmId")] + public string KeyVaultResourceArmId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/KeyEncryptionKeyInfo.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/KeyEncryptionKeyInfo.cs new file mode 100644 index 000000000000..339178ddce16 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/KeyEncryptionKeyInfo.cs @@ -0,0 +1,60 @@ +// +// 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; + + /// + /// Key Encryption Key (KEK) information. + /// + public partial class KeyEncryptionKeyInfo + { + /// + /// Initializes a new instance of the KeyEncryptionKeyInfo class. + /// + public KeyEncryptionKeyInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the KeyEncryptionKeyInfo class. + /// + /// The key url / identifier. + /// The KeyVault resource ARM id + /// for key. + public KeyEncryptionKeyInfo(string keyIdentifier = default(string), string keyVaultResourceArmId = default(string)) + { + KeyIdentifier = keyIdentifier; + KeyVaultResourceArmId = keyVaultResourceArmId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the key url / identifier. + /// + [JsonProperty(PropertyName = "keyIdentifier")] + public string KeyIdentifier { get; set; } + + /// + /// Gets or sets the KeyVault resource ARM id for key. + /// + [JsonProperty(PropertyName = "keyVaultResourceArmId")] + public string KeyVaultResourceArmId { get; set; } + + } +} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/MethodCallStatus.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/MethodCallStatus.cs deleted file mode 100644 index ebf3c2c14dc3..000000000000 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/MethodCallStatus.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Reports method status where exception was raised. - /// - public partial class MethodCallStatus - { - /// - /// Initializes a new instance of the MethodCallStatus class. - /// - public MethodCallStatus() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MethodCallStatus class. - /// - /// Gets a value indicating whether called - /// method was virtual - /// Gets parameter list passed to - /// method. - /// Gets a value indicating - /// whether method container generic params. - public MethodCallStatus(string isVirtual = default(string), IList parameters = default(IList), string containsGenericParameters = default(string)) - { - IsVirtual = isVirtual; - Parameters = parameters; - ContainsGenericParameters = containsGenericParameters; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets a value indicating whether called method was virtual - /// - [JsonProperty(PropertyName = "isVirtual")] - public string IsVirtual { get; set; } - - /// - /// Gets parameter list passed to method. - /// - [JsonProperty(PropertyName = "parameters")] - public IList Parameters { get; set; } - - /// - /// Gets a value indicating whether method container generic params. - /// - [JsonProperty(PropertyName = "containsGenericParameters")] - public string ContainsGenericParameters { get; set; } - - } -} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverReplicationProtectedItemDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverReplicationProtectedItemDetails.cs deleted file mode 100644 index e151603cdf46..000000000000 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/TestFailoverReplicationProtectedItemDetails.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery.Models -{ - using Microsoft.Azure; - using Microsoft.Azure.Management; - using Microsoft.Azure.Management.RecoveryServices; - using Microsoft.Azure.Management.RecoveryServices.SiteRecovery; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Test failover details for a replication protected item. - /// - public partial class TestFailoverReplicationProtectedItemDetails - { - /// - /// Initializes a new instance of the - /// TestFailoverReplicationProtectedItemDetails class. - /// - public TestFailoverReplicationProtectedItemDetails() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// TestFailoverReplicationProtectedItemDetails class. - /// - /// The name. - /// The friendly name. - /// The test Vm name. - /// The test Vm friendly name. - /// The network connection - /// status. - /// The network friendly - /// name. - /// The network subnet. - public TestFailoverReplicationProtectedItemDetails(string name = default(string), string friendlyName = default(string), string testVmName = default(string), string testVmFriendlyName = default(string), string networkConnectionStatus = default(string), string networkFriendlyName = default(string), string subnet = default(string)) - { - Name = name; - FriendlyName = friendlyName; - TestVmName = testVmName; - TestVmFriendlyName = testVmFriendlyName; - NetworkConnectionStatus = networkConnectionStatus; - NetworkFriendlyName = networkFriendlyName; - Subnet = subnet; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets the friendly name. - /// - [JsonProperty(PropertyName = "friendlyName")] - public string FriendlyName { get; set; } - - /// - /// Gets or sets the test Vm name. - /// - [JsonProperty(PropertyName = "testVmName")] - public string TestVmName { get; set; } - - /// - /// Gets or sets the test Vm friendly name. - /// - [JsonProperty(PropertyName = "testVmFriendlyName")] - public string TestVmFriendlyName { get; set; } - - /// - /// Gets or sets the network connection status. - /// - [JsonProperty(PropertyName = "networkConnectionStatus")] - public string NetworkConnectionStatus { get; set; } - - /// - /// Gets or sets the network friendly name. - /// - [JsonProperty(PropertyName = "networkFriendlyName")] - public string NetworkFriendlyName { get; set; } - - /// - /// Gets or sets the network subnet. - /// - [JsonProperty(PropertyName = "subnet")] - public string Subnet { get; set; } - - } -} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicDetails.cs index ceb58e41c07c..aaecc4ec2e13 100644 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicDetails.cs +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicDetails.cs @@ -44,7 +44,10 @@ public VMNicDetails() /// Selection type for failover. /// IP allocation type for /// recovery VM. - public VMNicDetails(string nicId = default(string), string replicaNicId = default(string), string sourceNicArmId = default(string), string vMSubnetName = default(string), string vMNetworkName = default(string), string recoveryVMNetworkId = default(string), string recoveryVMSubnetName = default(string), string ipAddressType = default(string), string primaryNicStaticIPAddress = default(string), string replicaNicStaticIPAddress = default(string), string selectionType = default(string), string recoveryNicIpAddressType = default(string)) + /// A value + /// indicating whether the NIC has accerated networking + /// enabled. + public VMNicDetails(string nicId = default(string), string replicaNicId = default(string), string sourceNicArmId = default(string), string vMSubnetName = default(string), string vMNetworkName = default(string), string recoveryVMNetworkId = default(string), string recoveryVMSubnetName = default(string), string ipAddressType = default(string), string primaryNicStaticIPAddress = default(string), string replicaNicStaticIPAddress = default(string), string selectionType = default(string), string recoveryNicIpAddressType = default(string), bool? enableAcceleratedNetworkingOnRecovery = default(bool?)) { NicId = nicId; ReplicaNicId = replicaNicId; @@ -58,6 +61,7 @@ public VMNicDetails() ReplicaNicStaticIPAddress = replicaNicStaticIPAddress; SelectionType = selectionType; RecoveryNicIpAddressType = recoveryNicIpAddressType; + EnableAcceleratedNetworkingOnRecovery = enableAcceleratedNetworkingOnRecovery; CustomInit(); } @@ -138,5 +142,12 @@ public VMNicDetails() [JsonProperty(PropertyName = "recoveryNicIpAddressType")] public string RecoveryNicIpAddressType { get; set; } + /// + /// Gets or sets a value indicating whether the NIC has accerated + /// networking enabled. + /// + [JsonProperty(PropertyName = "enableAcceleratedNetworkingOnRecovery")] + public bool? EnableAcceleratedNetworkingOnRecovery { get; set; } + } } diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicInputDetails.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicInputDetails.cs index c892e8d72f9a..5051ec983b83 100644 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicInputDetails.cs +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/Models/VMNicInputDetails.cs @@ -34,12 +34,15 @@ public VMNicInputDetails() /// Replica nic static IP /// address. /// Selection type for failover. - public VMNicInputDetails(string nicId = default(string), string recoveryVMSubnetName = default(string), string replicaNicStaticIPAddress = default(string), string selectionType = default(string)) + /// Whether the NIC + /// has accerated networking enabled. + public VMNicInputDetails(string nicId = default(string), string recoveryVMSubnetName = default(string), string replicaNicStaticIPAddress = default(string), string selectionType = default(string), bool? enableAcceleratedNetworkingOnRecovery = default(bool?)) { NicId = nicId; RecoveryVMSubnetName = recoveryVMSubnetName; ReplicaNicStaticIPAddress = replicaNicStaticIPAddress; SelectionType = selectionType; + EnableAcceleratedNetworkingOnRecovery = enableAcceleratedNetworkingOnRecovery; CustomInit(); } @@ -72,5 +75,11 @@ public VMNicInputDetails() [JsonProperty(PropertyName = "selectionType")] public string SelectionType { get; set; } + /// + /// Gets or sets whether the NIC has accerated networking enabled. + /// + [JsonProperty(PropertyName = "enableAcceleratedNetworkingOnRecovery")] + public bool? EnableAcceleratedNetworkingOnRecovery { get; set; } + } } diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsOperations.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsOperations.cs deleted file mode 100644 index 10ae98dde8b2..000000000000 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsOperations.cs +++ /dev/null @@ -1,383 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery -{ - using System; - using System.Linq; - using System.Collections.Generic; - using System.Net; - using System.Net.Http; - using System.Net.Http.Headers; - using System.Text; - using System.Text.RegularExpressions; - using System.Threading; - using System.Threading.Tasks; - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using Microsoft.Rest.Azure; - using Models; - - /// - /// OperationsOperations operations. - /// - internal partial class OperationsOperations : IServiceOperations, IOperationsOperations - { - /// - /// Initializes a new instance of the OperationsOperations class. - /// - /// - /// Reference to the service client. - /// - internal OperationsOperations(SiteRecoveryManagementClient client) - { - if (client == null) - { - throw new ArgumentNullException("client"); - } - this.Client = client; - } - - /// - /// Gets a reference to the SiteRecoveryManagementClient - /// - public SiteRecoveryManagementClient Client { get; private set; } - - /// - /// Returns the list of available operations. - /// - /// Operation to return the list of available operations. - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (this.Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (this.Client.ResourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ResourceGroupName"); - } - if (this.Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new Uri(new Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/operations").ToString(); - _url = _url.Replace("{resourceGroupName}", Uri.EscapeDataString(this.Client.ResourceGroupName)); - _url = _url.Replace("{subscriptionId}", Uri.EscapeDataString(this.Client.SubscriptionId)); - List _queryParameters = new List(); - if (this.Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", Uri.EscapeDataString(this.Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += "?" + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); - // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); - } - if (this.Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.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 = SafeJsonConvert.DeserializeObject(_responseContent, this.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 = SafeJsonConvert.DeserializeObject>(_responseContent, this.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; - } - - /// - /// Returns the list of available operations. - /// - /// Operation to return the list of available operations. - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += "?" + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - HttpRequestMessage _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new Uri(_url); - // Set Headers - if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", Guid.NewGuid().ToString()); - } - if (this.Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await this.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 = SafeJsonConvert.DeserializeObject(_responseContent, this.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 = SafeJsonConvert.DeserializeObject>(_responseContent, this.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; - } - - } -} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsOperationsExtensions.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsOperationsExtensions.cs deleted file mode 100644 index ffc1f437f4c1..000000000000 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/OperationsOperationsExtensions.cs +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. - -namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - - /// - /// Extension methods for OperationsOperations. - /// - public static partial class OperationsOperationsExtensions - { - /// - /// Returns the list of available operations. - /// - /// Operation to return the list of available operations. - /// - /// The operations group for this extension method. - /// - public static IPage List(this IOperationsOperations operations) - { - return Task.Factory.StartNew(s => ((IOperationsOperations)s).ListAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); - } - - /// - /// Returns the list of available operations. - /// - /// Operation to return the list of available operations. - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IOperationsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns the list of available operations. - /// - /// Operation to return the list of available operations. - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IOperationsOperations operations, string nextPageLink) - { - return Task.Factory.StartNew(s => ((IOperationsOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); - } - - /// - /// Returns the list of available operations. - /// - /// Operation to return the list of available operations. - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IOperationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/SdkInfo_SiteRecoveryManagementClient.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/SdkInfo_SiteRecoveryManagementClient.cs index ad92a8e7f7dc..03a3f4a1eef3 100644 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/SdkInfo_SiteRecoveryManagementClient.cs +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/SdkInfo_SiteRecoveryManagementClient.cs @@ -1,16 +1,24 @@ -using System; -using System.Collections.Generic; -using System.Linq; +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// -internal static partial class SdkInfo +namespace Microsoft.Azure.Management.RecoveryServices.SiteRecovery { - public static IEnumerable> ApiInfo_SiteRecoveryManagementClient - { - get - { - return new Tuple[] - { + using System; + using System.Collections.Generic; + using System.Linq; + + internal static partial class SdkInfo + { + public static IEnumerable> ApiInfo_SiteRecoveryManagementClient + { + get + { + return new Tuple[] + { new Tuple("RecoveryServices", "Operations", "2018-01-10"), new Tuple("RecoveryServices", "RecoveryPoints", "2018-01-10"), new Tuple("RecoveryServices", "ReplicationAlertSettings", "2018-01-10"), @@ -32,7 +40,8 @@ public static IEnumerable> ApiInfo_SiteRecoveryMan new Tuple("RecoveryServices", "ReplicationVaultHealth", "2018-01-10"), new Tuple("RecoveryServices", "ReplicationvCenters", "2018-01-10"), new Tuple("RecoveryServices", "TargetComputeSizes", "2018-01-10"), - }.AsEnumerable(); - } - } + }.AsEnumerable(); + } + } + } } diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/SiteRecoveryManagementClient.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/SiteRecoveryManagementClient.cs index 3bf2828ec4db..0cbd8d1828a9 100644 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/SiteRecoveryManagementClient.cs +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Generated/SiteRecoveryManagementClient.cs @@ -65,19 +65,20 @@ public partial class SiteRecoveryManagementClient : ServiceClient - /// Gets or sets the preferred language for the response. + /// The preferred language for the response. /// public string AcceptLanguage { get; set; } /// - /// Gets or sets the retry timeout in seconds for Long Running Operations. - /// Default value is 30. + /// The retry timeout in seconds for Long Running Operations. Default value is + /// 30. /// public int? LongRunningOperationRetryTimeout { get; set; } /// - /// When set to true a unique x-ms-client-request-id value is generated and - /// included in each request. Default is true. + /// Whether a unique x-ms-client-request-id should be generated. When set to + /// true a unique x-ms-client-request-id value is generated and included in + /// each request. Default is true. /// public bool? GenerateClientRequestId { get; set; } diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.csproj b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.csproj index b0c87d40c5f0..c1aef5332283 100644 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.csproj +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Microsoft.Azure.Management.RecoveryServices.SiteRecovery.csproj @@ -6,7 +6,7 @@ Microsoft.Azure.Management.RecoveryServices.SiteRecovery Provides developers with libraries for the updated recovery services site recovery feature under Azure Resource manager. - 1.2.0-preview + 1.2.1-preview Microsoft.Azure.Management.RecoveryServices.SiteRecovery Recoveryservices;SiteRecovery; diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Properties/AssemblyInfo.cs b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Properties/AssemblyInfo.cs index bbf329b495f5..fd0569c3011d 100644 --- a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Properties/AssemblyInfo.cs +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/Properties/AssemblyInfo.cs @@ -8,7 +8,7 @@ [assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Recovery Services SiteRecovery Resources.")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.2.0.0")] +[assembly: AssemblyFileVersion("1.2.1.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("Microsoft Azure .NET SDK")] diff --git a/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/generate.ps1 b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/generate.ps1 new file mode 100644 index 000000000000..4d62acee3029 --- /dev/null +++ b/src/SDKs/RecoveryServices.SiteRecovery/Management.RecoveryServices.SiteRecovery/generate.ps1 @@ -0,0 +1 @@ +Start-AutoRestCodeGeneration -ResourceProvider "recoveryservicessiterecovery/resource-manager" -AutoRestVersion "latest" \ No newline at end of file diff --git a/src/SDKs/_metadata/recoveryservicessiterecovery_resource-manager.txt b/src/SDKs/_metadata/recoveryservicessiterecovery_resource-manager.txt index 54b56e44edff..064c860836c9 100644 --- a/src/SDKs/_metadata/recoveryservicessiterecovery_resource-manager.txt +++ b/src/SDKs/_metadata/recoveryservicessiterecovery_resource-manager.txt @@ -1,17 +1,20 @@ -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:\Github\azure-sdk-for-net\tools\..\src\SDKs\ -2018-05-08 13:44:39 UTC +Installing AutoRest version: latest +AutoRest installed successfully. +Commencing code generation +Generating CSharp code +Executing AutoRest command +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/recoveryservicessiterecovery/resource-manager/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\azure-sdk-for-net\src\SDKs +2018-08-10 17:02:22 UTC 1) azure-rest-api-specs repository information GitHub fork: Azure Branch: master -Commit: f0face31d69f4a7191f9db6143c0a1a01f398d89 +Commit: e7707057ae4caec3cfa6c3592f02a52fdd9f64ec 2) AutoRest information Requested version: latest -Bootstrapper version: C:\Users\avrai\AppData\Roaming\npm `-- autorest@2.0.4262 +Bootstrapper version: autorest@2.0.4283 Latest installed version: -.\tools\generate.ps1 was invoked by generate.ps1