From 22383855deacadec8b8c37c2889595301cde80f6 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 5 Apr 2022 10:41:05 +0000 Subject: [PATCH] CodeGen from PR 18326 in Azure/azure-rest-api-specs Merge ff986ead7339022240371082f011413614ab097d into 66ce6ad1dae00197d8befa1199da7578f73c0cd5 --- .../AzureIaaSVMProtectedItemExtendedInfo.cs | 37 +++++++- .../Models/AzureIaaSVMProtectionPolicy.cs | 18 +++- ...zureVmWorkloadProtectedItemExtendedInfo.cs | 37 +++++++- .../Generated/Models/IaaSVMContainer.cs | 1 + .../Generated/Models/SubProtectionPolicy.cs | 20 +++- .../Generated/Models/TieringMode.cs | 24 +++++ .../Generated/Models/TieringPolicy.cs | 93 +++++++++++++++++++ .../SdkInfo_RecoveryServicesBackupClient.cs | 11 --- 8 files changed, 222 insertions(+), 19 deletions(-) create mode 100644 sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/TieringMode.cs create mode 100644 sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/TieringPolicy.cs diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/AzureIaaSVMProtectedItemExtendedInfo.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/AzureIaaSVMProtectedItemExtendedInfo.cs index eaabe79173b00..5b84a47ed1fea 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/AzureIaaSVMProtectedItemExtendedInfo.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/AzureIaaSVMProtectedItemExtendedInfo.cs @@ -32,14 +32,23 @@ public AzureIaaSVMProtectedItemExtendedInfo() /// AzureIaaSVMProtectedItemExtendedInfo class. /// /// The oldest backup copy available - /// for this backup item. + /// for this backup item across all tiers. + /// The oldest backup copy + /// available for this backup item in vault tier + /// The oldest backup copy + /// available for this backup item in archive tier + /// The latest backup copy + /// available for this backup item in archive tier /// Number of backup copies available /// for this backup item. /// Specifies if backup policy /// associated with the backup item is inconsistent. - public AzureIaaSVMProtectedItemExtendedInfo(System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?), bool? policyInconsistent = default(bool?)) + public AzureIaaSVMProtectedItemExtendedInfo(System.DateTime? oldestRecoveryPoint = default(System.DateTime?), System.DateTime? oldestRecoveryPointInVault = default(System.DateTime?), System.DateTime? oldestRecoveryPointInArchive = default(System.DateTime?), System.DateTime? newestRecoveryPointInArchive = default(System.DateTime?), int? recoveryPointCount = default(int?), bool? policyInconsistent = default(bool?)) { OldestRecoveryPoint = oldestRecoveryPoint; + OldestRecoveryPointInVault = oldestRecoveryPointInVault; + OldestRecoveryPointInArchive = oldestRecoveryPointInArchive; + NewestRecoveryPointInArchive = newestRecoveryPointInArchive; RecoveryPointCount = recoveryPointCount; PolicyInconsistent = policyInconsistent; CustomInit(); @@ -51,11 +60,33 @@ public AzureIaaSVMProtectedItemExtendedInfo() partial void CustomInit(); /// - /// Gets or sets the oldest backup copy available for this backup item. + /// Gets or sets the oldest backup copy available for this backup item + /// across all tiers. /// [JsonProperty(PropertyName = "oldestRecoveryPoint")] public System.DateTime? OldestRecoveryPoint { get; set; } + /// + /// Gets or sets the oldest backup copy available for this backup item + /// in vault tier + /// + [JsonProperty(PropertyName = "oldestRecoveryPointInVault")] + public System.DateTime? OldestRecoveryPointInVault { get; set; } + + /// + /// Gets or sets the oldest backup copy available for this backup item + /// in archive tier + /// + [JsonProperty(PropertyName = "oldestRecoveryPointInArchive")] + public System.DateTime? OldestRecoveryPointInArchive { get; set; } + + /// + /// Gets or sets the latest backup copy available for this backup item + /// in archive tier + /// + [JsonProperty(PropertyName = "newestRecoveryPointInArchive")] + public System.DateTime? NewestRecoveryPointInArchive { get; set; } + /// /// Gets or sets number of backup copies available for this backup /// item. diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/AzureIaaSVMProtectionPolicy.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/AzureIaaSVMProtectionPolicy.cs index 0f41ea7d07c90..d273af29ec0fc 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/AzureIaaSVMProtectionPolicy.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/AzureIaaSVMProtectionPolicy.cs @@ -42,18 +42,24 @@ public AzureIaaSVMProtectionPolicy() /// backup policy. /// Retention policy with the details on /// backup copy retention ranges. + /// Tiering policy to automatically move + /// RPs to another tier + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target + /// tier. /// Instant RP retention /// policy range in days /// TimeZone optional input as string. For /// example: TimeZone = "Pacific Standard Time". /// Possible values include: 'Invalid', 'V1', /// 'V2' - public AzureIaaSVMProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), InstantRPAdditionalDetails instantRPDetails = default(InstantRPAdditionalDetails), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), int? instantRpRetentionRangeInDays = default(int?), string timeZone = default(string), string policyType = default(string)) + public AzureIaaSVMProtectionPolicy(int? protectedItemsCount = default(int?), IList resourceGuardOperationRequests = default(IList), InstantRPAdditionalDetails instantRPDetails = default(InstantRPAdditionalDetails), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), IDictionary tieringPolicy = default(IDictionary), int? instantRpRetentionRangeInDays = default(int?), string timeZone = default(string), string policyType = default(string)) : base(protectedItemsCount, resourceGuardOperationRequests) { InstantRPDetails = instantRPDetails; SchedulePolicy = schedulePolicy; RetentionPolicy = retentionPolicy; + TieringPolicy = tieringPolicy; InstantRpRetentionRangeInDays = instantRpRetentionRangeInDays; TimeZone = timeZone; PolicyType = policyType; @@ -83,6 +89,16 @@ public AzureIaaSVMProtectionPolicy() [JsonProperty(PropertyName = "retentionPolicy")] public RetentionPolicy RetentionPolicy { get; set; } + /// + /// Gets or sets tiering policy to automatically move RPs to another + /// tier + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target + /// tier. + /// + [JsonProperty(PropertyName = "tieringPolicy")] + public IDictionary TieringPolicy { get; set; } + /// /// Gets or sets instant RP retention policy range in days /// diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/AzureVmWorkloadProtectedItemExtendedInfo.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/AzureVmWorkloadProtectedItemExtendedInfo.cs index 65a8d7ee1e5b4..9d462a9e732b7 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/AzureVmWorkloadProtectedItemExtendedInfo.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/AzureVmWorkloadProtectedItemExtendedInfo.cs @@ -32,16 +32,25 @@ public AzureVmWorkloadProtectedItemExtendedInfo() /// AzureVmWorkloadProtectedItemExtendedInfo class. /// /// The oldest backup copy available - /// for this backup item. + /// for this backup item across all tiers. + /// The oldest backup copy + /// available for this backup item in vault tier + /// The oldest backup copy + /// available for this backup item in archive tier + /// The latest backup copy + /// available for this backup item in archive tier /// Number of backup copies available /// for this backup item. /// Indicates consistency of policy object /// and policy applied to this backup item. /// Indicates consistency of policy object /// and policy applied to this backup item. - public AzureVmWorkloadProtectedItemExtendedInfo(System.DateTime? oldestRecoveryPoint = default(System.DateTime?), int? recoveryPointCount = default(int?), string policyState = default(string), string recoveryModel = default(string)) + public AzureVmWorkloadProtectedItemExtendedInfo(System.DateTime? oldestRecoveryPoint = default(System.DateTime?), System.DateTime? oldestRecoveryPointInVault = default(System.DateTime?), System.DateTime? oldestRecoveryPointInArchive = default(System.DateTime?), System.DateTime? newestRecoveryPointInArchive = default(System.DateTime?), int? recoveryPointCount = default(int?), string policyState = default(string), string recoveryModel = default(string)) { OldestRecoveryPoint = oldestRecoveryPoint; + OldestRecoveryPointInVault = oldestRecoveryPointInVault; + OldestRecoveryPointInArchive = oldestRecoveryPointInArchive; + NewestRecoveryPointInArchive = newestRecoveryPointInArchive; RecoveryPointCount = recoveryPointCount; PolicyState = policyState; RecoveryModel = recoveryModel; @@ -54,11 +63,33 @@ public AzureVmWorkloadProtectedItemExtendedInfo() partial void CustomInit(); /// - /// Gets or sets the oldest backup copy available for this backup item. + /// Gets or sets the oldest backup copy available for this backup item + /// across all tiers. /// [JsonProperty(PropertyName = "oldestRecoveryPoint")] public System.DateTime? OldestRecoveryPoint { get; set; } + /// + /// Gets or sets the oldest backup copy available for this backup item + /// in vault tier + /// + [JsonProperty(PropertyName = "oldestRecoveryPointInVault")] + public System.DateTime? OldestRecoveryPointInVault { get; set; } + + /// + /// Gets or sets the oldest backup copy available for this backup item + /// in archive tier + /// + [JsonProperty(PropertyName = "oldestRecoveryPointInArchive")] + public System.DateTime? OldestRecoveryPointInArchive { get; set; } + + /// + /// Gets or sets the latest backup copy available for this backup item + /// in archive tier + /// + [JsonProperty(PropertyName = "newestRecoveryPointInArchive")] + public System.DateTime? NewestRecoveryPointInArchive { get; set; } + /// /// Gets or sets number of backup copies available for this backup /// item. diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/IaaSVMContainer.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/IaaSVMContainer.cs index e705c87f1ce5c..2d192dcb55ae8 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/IaaSVMContainer.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/IaaSVMContainer.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models /// /// IaaS VM workload-specific container. /// + [Newtonsoft.Json.JsonObject("IaasVMContainer")] public partial class IaaSVMContainer : ProtectionContainer { /// diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/SubProtectionPolicy.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/SubProtectionPolicy.cs index e36626009932e..a7889be169951 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/SubProtectionPolicy.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/SubProtectionPolicy.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -36,11 +38,17 @@ public SubProtectionPolicy() /// backup policy. /// Retention policy with the details on /// backup copy retention ranges. - public SubProtectionPolicy(string policyType = default(string), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy)) + /// Tiering policy to automatically move + /// RPs to another tier. + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target + /// tier. + public SubProtectionPolicy(string policyType = default(string), SchedulePolicy schedulePolicy = default(SchedulePolicy), RetentionPolicy retentionPolicy = default(RetentionPolicy), IDictionary tieringPolicy = default(IDictionary)) { PolicyType = policyType; SchedulePolicy = schedulePolicy; RetentionPolicy = retentionPolicy; + TieringPolicy = tieringPolicy; CustomInit(); } @@ -70,5 +78,15 @@ public SubProtectionPolicy() [JsonProperty(PropertyName = "retentionPolicy")] public RetentionPolicy RetentionPolicy { get; set; } + /// + /// Gets or sets tiering policy to automatically move RPs to another + /// tier. + /// Key is Target Tier, defined in RecoveryPointTierType enum. + /// Tiering policy specifies the criteria to move RP to the target + /// tier. + /// + [JsonProperty(PropertyName = "tieringPolicy")] + public IDictionary TieringPolicy { get; set; } + } } diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/TieringMode.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/TieringMode.cs new file mode 100644 index 0000000000000..a260a60711d78 --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/TieringMode.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.Backup.Models +{ + + /// + /// Defines values for TieringMode. + /// + public static class TieringMode + { + public const string Invalid = "Invalid"; + public const string TierRecommended = "TierRecommended"; + public const string TierAfter = "TierAfter"; + public const string DoNotTier = "DoNotTier"; + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/TieringPolicy.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/TieringPolicy.cs new file mode 100644 index 0000000000000..9019e160dee0d --- /dev/null +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/Models/TieringPolicy.cs @@ -0,0 +1,93 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.RecoveryServices.Backup.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Tiering Policy for a target tier. + /// If the policy is not specified for a given target tier, service retains + /// the existing configured tiering policy for that tier + /// + public partial class TieringPolicy + { + /// + /// Initializes a new instance of the TieringPolicy class. + /// + public TieringPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TieringPolicy class. + /// + /// Tiering Mode to control automatic tiering + /// of recovery points. Supported values are: + /// 1. TierRecommended: Tier all recovery points recommended to be + /// tiered + /// 2. TierAfter: Tier all recovery points after a fixed period, as + /// specified in duration + durationType below. + /// 3. DoNotTier: Do not tier any recovery points. Possible values + /// include: 'Invalid', 'TierRecommended', 'TierAfter', + /// 'DoNotTier' + /// Number of days/weeks/months/years to retain + /// backups in current tier before tiering. + /// Used only if TieringMode is set to TierAfter + /// Retention duration type: + /// days/weeks/months/years + /// Used only if TieringMode is set to TierAfter. Possible values + /// include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' + public TieringPolicy(string tieringMode = default(string), int? duration = default(int?), string durationType = default(string)) + { + TieringMode = tieringMode; + Duration = duration; + DurationType = durationType; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets tiering Mode to control automatic tiering of recovery + /// points. Supported values are: + /// 1. TierRecommended: Tier all recovery points recommended to be + /// tiered + /// 2. TierAfter: Tier all recovery points after a fixed period, as + /// specified in duration + durationType below. + /// 3. DoNotTier: Do not tier any recovery points. Possible values + /// include: 'Invalid', 'TierRecommended', 'TierAfter', 'DoNotTier' + /// + [JsonProperty(PropertyName = "tieringMode")] + public string TieringMode { get; set; } + + /// + /// Gets or sets number of days/weeks/months/years to retain backups in + /// current tier before tiering. + /// Used only if TieringMode is set to TierAfter + /// + [JsonProperty(PropertyName = "duration")] + public int? Duration { get; set; } + + /// + /// Gets or sets retention duration type: days/weeks/months/years + /// Used only if TieringMode is set to TierAfter. Possible values + /// include: 'Invalid', 'Days', 'Weeks', 'Months', 'Years' + /// + [JsonProperty(PropertyName = "durationType")] + public string DurationType { get; set; } + + } +} diff --git a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/SdkInfo_RecoveryServicesBackupClient.cs b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/SdkInfo_RecoveryServicesBackupClient.cs index a2808980b82ab..e7b750a28a924 100644 --- a/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/SdkInfo_RecoveryServicesBackupClient.cs +++ b/sdk/recoveryservices-backup/Microsoft.Azure.Management.RecoveryServices.Backup/src/recoveryservicesbackup/Generated/SdkInfo_RecoveryServicesBackupClient.cs @@ -74,16 +74,5 @@ public static IEnumerable> ApiInfo_RecoveryService }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/recoveryservicesbackup/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp.namespace=Microsoft.Azure.Management.RecoveryServices.Backup --tag=package-2021-12 --csharp.output-folder=C:\\azure-sdk-for-net\\sdk\\recoveryservices-backup\\Microsoft.Azure.Management.RecoveryServices.Backup\\src\\recoveryservicesbackup\\Generated"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "main"; - public static readonly String GithubCommidId = "0e85ddcc82e288d60b444213c0beb7f698ce5649"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } -