generated/api/Models/UpdateBackupDestination.PowerShell.cs
// Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.10.2, generator: @autorest/powershell@4.0.708) // Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Commvault.Powershell.Models { using Commvault.Powershell.Runtime.PowerShell; /// <summary> /// Region can be modified only when the backup destination does not belong to a region already /// </summary> [System.ComponentModel.TypeConverter(typeof(UpdateBackupDestinationTypeConverter))] public partial class UpdateBackupDestination { /// <summary> /// <c>AfterDeserializeDictionary</c> will be called after the deserialization has finished, allowing customization of the /// object before it is returned. Implement this method in a partial class to enable this behavior /// </summary> /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param> partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); /// <summary> /// <c>AfterDeserializePSObject</c> will be called after the deserialization has finished, allowing customization of the object /// before it is returned. Implement this method in a partial class to enable this behavior /// </summary> /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param> partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); /// <summary> /// <c>BeforeDeserializeDictionary</c> will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <paramref name="returnNow" /> output /// parameter. /// Implement this method in a partial class to enable this behavior. /// </summary> /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param> /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return /// instantly.</param> partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); /// <summary> /// <c>BeforeDeserializePSObject</c> will be called before the deserialization has commenced, allowing complete customization /// of the object before it is deserialized. /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <paramref name="returnNow" /> output /// parameter. /// Implement this method in a partial class to enable this behavior. /// </summary> /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param> /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return /// instantly.</param> partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); /// <summary> /// <c>OverrideToString</c> will be called if it is implemented. Implement this method in a partial class to enable this behavior /// </summary> /// <param name="stringResult">/// instance serialized to a string, normally it is a Json</param> /// <param name="returnNow">/// set returnNow to true if you provide a customized OverrideToString function</param> partial void OverrideToString(ref string stringResult, ref bool returnNow); /// <summary> /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into an instance of <see cref="Commvault.Powershell.Models.UpdateBackupDestination" /// />. /// </summary> /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param> /// <returns> /// an instance of <see cref="Commvault.Powershell.Models.IUpdateBackupDestination" />. /// </returns> public static Commvault.Powershell.Models.IUpdateBackupDestination DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UpdateBackupDestination(content); } /// <summary> /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into an instance of <see cref="Commvault.Powershell.Models.UpdateBackupDestination" /// />. /// </summary> /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param> /// <returns> /// an instance of <see cref="Commvault.Powershell.Models.IUpdateBackupDestination" />. /// </returns> public static Commvault.Powershell.Models.IUpdateBackupDestination DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UpdateBackupDestination(content); } /// <summary> /// Creates a new instance of <see cref="UpdateBackupDestination" />, deserializing the content from a json string. /// </summary> /// <param name="jsonText">a string containing a JSON serialized instance of this model.</param> /// <returns>an instance of the <see cref="UpdateBackupDestination" /> model class.</returns> public static Commvault.Powershell.Models.IUpdateBackupDestination FromJsonString(string jsonText) => FromJson(Commvault.Powershell.Runtime.Json.JsonNode.Parse(jsonText)); /// <summary>Serializes this instance to a json string.</summary> /// <returns>a <see cref="System.String" /> containing this model serialized to JSON text.</returns> public string ToJsonString() => ToJson(null, Commvault.Powershell.Runtime.SerializationMode.IncludeAll)?.ToString(); public override string ToString() { var returnNow = false; var result = global::System.String.Empty; OverrideToString(ref result, ref returnNow); if (returnNow) { return result; } return ToJsonString(); } /// <summary> /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into a new instance of <see cref="Commvault.Powershell.Models.UpdateBackupDestination" /// />. /// </summary> /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param> internal UpdateBackupDestination(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); if (returnNow) { return; } // actually deserialize if (content.Contains("Region")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Region = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Region",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Region, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("SourceCopy")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SourceCopy = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("SourceCopy",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SourceCopy, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("ExtendedRetentionRules")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRules = (Commvault.Powershell.Models.IExtendedRetentionRules) content.GetValueForProperty("ExtendedRetentionRules",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRules, Commvault.Powershell.Models.ExtendedRetentionRulesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Id = (long?) content.GetValueForProperty("Id",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Id, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("Name")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Name = (string) content.GetValueForProperty("Name",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("BackupsToCopy")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).BackupsToCopy = (string) content.GetValueForProperty("BackupsToCopy",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).BackupsToCopy, global::System.Convert.ToString); } if (content.Contains("BackupStartTime")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).BackupStartTime = (long?) content.GetValueForProperty("BackupStartTime",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).BackupStartTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("EnableDataAging")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).EnableDataAging = (bool?) content.GetValueForProperty("EnableDataAging",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).EnableDataAging, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("OverrideRetentionSettings")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).OverrideRetentionSettings = (bool?) content.GetValueForProperty("OverrideRetentionSettings",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).OverrideRetentionSettings, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("RetentionRuleType")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RetentionRuleType = (string) content.GetValueForProperty("RetentionRuleType",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RetentionRuleType, global::System.Convert.ToString); } if (content.Contains("RetentionPeriodDays")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RetentionPeriodDays = (long?) content.GetValueForProperty("RetentionPeriodDays",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RetentionPeriodDays, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SnapRecoveryPoints")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SnapRecoveryPoints = (long?) content.GetValueForProperty("SnapRecoveryPoints",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SnapRecoveryPoints, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("UseExtendedRetentionRules")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).UseExtendedRetentionRules = (bool?) content.GetValueForProperty("UseExtendedRetentionRules",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).UseExtendedRetentionRules, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Mappings")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Mappings = (System.Collections.Generic.List<Commvault.Powershell.Models.ISnapshotCopyMapping>) content.GetValueForProperty("Mappings",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Mappings, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.ISnapshotCopyMapping>(__y, Commvault.Powershell.Models.SnapshotCopyMappingTypeConverter.ConvertFrom)); } if (content.Contains("RegionId")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RegionId = (long?) content.GetValueForProperty("RegionId",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RegionId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("RegionName")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RegionName = (string) content.GetValueForProperty("RegionName",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RegionName, global::System.Convert.ToString); } if (content.Contains("SourceCopyId")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SourceCopyId = (long?) content.GetValueForProperty("SourceCopyId",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SourceCopyId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SourceCopyName")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SourceCopyName = (string) content.GetValueForProperty("SourceCopyName",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SourceCopyName, global::System.Convert.ToString); } if (content.Contains("ExtendedRetentionRuleFirstExtendedRetentionRule")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRuleFirstExtendedRetentionRule = (Commvault.Powershell.Models.IPlanRetentionRule) content.GetValueForProperty("ExtendedRetentionRuleFirstExtendedRetentionRule",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRuleFirstExtendedRetentionRule, Commvault.Powershell.Models.PlanRetentionRuleTypeConverter.ConvertFrom); } if (content.Contains("ExtendedRetentionRuleSecondExtendedRetentionRule")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRuleSecondExtendedRetentionRule = (Commvault.Powershell.Models.IPlanRetentionRule) content.GetValueForProperty("ExtendedRetentionRuleSecondExtendedRetentionRule",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRuleSecondExtendedRetentionRule, Commvault.Powershell.Models.PlanRetentionRuleTypeConverter.ConvertFrom); } if (content.Contains("ExtendedRetentionRuleThirdExtendedRetentionRule")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRuleThirdExtendedRetentionRule = (Commvault.Powershell.Models.IPlanRetentionRule) content.GetValueForProperty("ExtendedRetentionRuleThirdExtendedRetentionRule",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRuleThirdExtendedRetentionRule, Commvault.Powershell.Models.PlanRetentionRuleTypeConverter.ConvertFrom); } if (content.Contains("FirstExtendedRetentionRuleIsInfiniteRetention")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).FirstExtendedRetentionRuleIsInfiniteRetention = (bool?) content.GetValueForProperty("FirstExtendedRetentionRuleIsInfiniteRetention",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).FirstExtendedRetentionRuleIsInfiniteRetention, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("FirstExtendedRetentionRuleRetentionPeriodDays")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).FirstExtendedRetentionRuleRetentionPeriodDays = (long?) content.GetValueForProperty("FirstExtendedRetentionRuleRetentionPeriodDays",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).FirstExtendedRetentionRuleRetentionPeriodDays, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("FirstExtendedRetentionRuleType")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).FirstExtendedRetentionRuleType = (string) content.GetValueForProperty("FirstExtendedRetentionRuleType",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).FirstExtendedRetentionRuleType, global::System.Convert.ToString); } if (content.Contains("SecondExtendedRetentionRuleIsInfiniteRetention")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SecondExtendedRetentionRuleIsInfiniteRetention = (bool?) content.GetValueForProperty("SecondExtendedRetentionRuleIsInfiniteRetention",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SecondExtendedRetentionRuleIsInfiniteRetention, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("SecondExtendedRetentionRuleRetentionPeriodDays")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SecondExtendedRetentionRuleRetentionPeriodDays = (long?) content.GetValueForProperty("SecondExtendedRetentionRuleRetentionPeriodDays",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SecondExtendedRetentionRuleRetentionPeriodDays, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SecondExtendedRetentionRuleType")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SecondExtendedRetentionRuleType = (string) content.GetValueForProperty("SecondExtendedRetentionRuleType",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SecondExtendedRetentionRuleType, global::System.Convert.ToString); } if (content.Contains("ThirdExtendedRetentionRuleIsInfiniteRetention")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ThirdExtendedRetentionRuleIsInfiniteRetention = (bool?) content.GetValueForProperty("ThirdExtendedRetentionRuleIsInfiniteRetention",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ThirdExtendedRetentionRuleIsInfiniteRetention, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ThirdExtendedRetentionRuleRetentionPeriodDays")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ThirdExtendedRetentionRuleRetentionPeriodDays = (long?) content.GetValueForProperty("ThirdExtendedRetentionRuleRetentionPeriodDays",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ThirdExtendedRetentionRuleRetentionPeriodDays, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("ThirdExtendedRetentionRuleType")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ThirdExtendedRetentionRuleType = (string) content.GetValueForProperty("ThirdExtendedRetentionRuleType",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ThirdExtendedRetentionRuleType, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// <summary> /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into a new instance of <see cref="Commvault.Powershell.Models.UpdateBackupDestination" /// />. /// </summary> /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param> internal UpdateBackupDestination(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); if (returnNow) { return; } // actually deserialize if (content.Contains("Region")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Region = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Region",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Region, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("SourceCopy")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SourceCopy = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("SourceCopy",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SourceCopy, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("ExtendedRetentionRules")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRules = (Commvault.Powershell.Models.IExtendedRetentionRules) content.GetValueForProperty("ExtendedRetentionRules",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRules, Commvault.Powershell.Models.ExtendedRetentionRulesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Id = (long?) content.GetValueForProperty("Id",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Id, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("Name")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Name = (string) content.GetValueForProperty("Name",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("BackupsToCopy")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).BackupsToCopy = (string) content.GetValueForProperty("BackupsToCopy",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).BackupsToCopy, global::System.Convert.ToString); } if (content.Contains("BackupStartTime")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).BackupStartTime = (long?) content.GetValueForProperty("BackupStartTime",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).BackupStartTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("EnableDataAging")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).EnableDataAging = (bool?) content.GetValueForProperty("EnableDataAging",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).EnableDataAging, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("OverrideRetentionSettings")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).OverrideRetentionSettings = (bool?) content.GetValueForProperty("OverrideRetentionSettings",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).OverrideRetentionSettings, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("RetentionRuleType")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RetentionRuleType = (string) content.GetValueForProperty("RetentionRuleType",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RetentionRuleType, global::System.Convert.ToString); } if (content.Contains("RetentionPeriodDays")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RetentionPeriodDays = (long?) content.GetValueForProperty("RetentionPeriodDays",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RetentionPeriodDays, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SnapRecoveryPoints")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SnapRecoveryPoints = (long?) content.GetValueForProperty("SnapRecoveryPoints",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SnapRecoveryPoints, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("UseExtendedRetentionRules")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).UseExtendedRetentionRules = (bool?) content.GetValueForProperty("UseExtendedRetentionRules",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).UseExtendedRetentionRules, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Mappings")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Mappings = (System.Collections.Generic.List<Commvault.Powershell.Models.ISnapshotCopyMapping>) content.GetValueForProperty("Mappings",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).Mappings, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.ISnapshotCopyMapping>(__y, Commvault.Powershell.Models.SnapshotCopyMappingTypeConverter.ConvertFrom)); } if (content.Contains("RegionId")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RegionId = (long?) content.GetValueForProperty("RegionId",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RegionId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("RegionName")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RegionName = (string) content.GetValueForProperty("RegionName",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).RegionName, global::System.Convert.ToString); } if (content.Contains("SourceCopyId")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SourceCopyId = (long?) content.GetValueForProperty("SourceCopyId",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SourceCopyId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SourceCopyName")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SourceCopyName = (string) content.GetValueForProperty("SourceCopyName",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SourceCopyName, global::System.Convert.ToString); } if (content.Contains("ExtendedRetentionRuleFirstExtendedRetentionRule")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRuleFirstExtendedRetentionRule = (Commvault.Powershell.Models.IPlanRetentionRule) content.GetValueForProperty("ExtendedRetentionRuleFirstExtendedRetentionRule",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRuleFirstExtendedRetentionRule, Commvault.Powershell.Models.PlanRetentionRuleTypeConverter.ConvertFrom); } if (content.Contains("ExtendedRetentionRuleSecondExtendedRetentionRule")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRuleSecondExtendedRetentionRule = (Commvault.Powershell.Models.IPlanRetentionRule) content.GetValueForProperty("ExtendedRetentionRuleSecondExtendedRetentionRule",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRuleSecondExtendedRetentionRule, Commvault.Powershell.Models.PlanRetentionRuleTypeConverter.ConvertFrom); } if (content.Contains("ExtendedRetentionRuleThirdExtendedRetentionRule")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRuleThirdExtendedRetentionRule = (Commvault.Powershell.Models.IPlanRetentionRule) content.GetValueForProperty("ExtendedRetentionRuleThirdExtendedRetentionRule",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ExtendedRetentionRuleThirdExtendedRetentionRule, Commvault.Powershell.Models.PlanRetentionRuleTypeConverter.ConvertFrom); } if (content.Contains("FirstExtendedRetentionRuleIsInfiniteRetention")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).FirstExtendedRetentionRuleIsInfiniteRetention = (bool?) content.GetValueForProperty("FirstExtendedRetentionRuleIsInfiniteRetention",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).FirstExtendedRetentionRuleIsInfiniteRetention, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("FirstExtendedRetentionRuleRetentionPeriodDays")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).FirstExtendedRetentionRuleRetentionPeriodDays = (long?) content.GetValueForProperty("FirstExtendedRetentionRuleRetentionPeriodDays",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).FirstExtendedRetentionRuleRetentionPeriodDays, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("FirstExtendedRetentionRuleType")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).FirstExtendedRetentionRuleType = (string) content.GetValueForProperty("FirstExtendedRetentionRuleType",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).FirstExtendedRetentionRuleType, global::System.Convert.ToString); } if (content.Contains("SecondExtendedRetentionRuleIsInfiniteRetention")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SecondExtendedRetentionRuleIsInfiniteRetention = (bool?) content.GetValueForProperty("SecondExtendedRetentionRuleIsInfiniteRetention",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SecondExtendedRetentionRuleIsInfiniteRetention, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("SecondExtendedRetentionRuleRetentionPeriodDays")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SecondExtendedRetentionRuleRetentionPeriodDays = (long?) content.GetValueForProperty("SecondExtendedRetentionRuleRetentionPeriodDays",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SecondExtendedRetentionRuleRetentionPeriodDays, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SecondExtendedRetentionRuleType")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SecondExtendedRetentionRuleType = (string) content.GetValueForProperty("SecondExtendedRetentionRuleType",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).SecondExtendedRetentionRuleType, global::System.Convert.ToString); } if (content.Contains("ThirdExtendedRetentionRuleIsInfiniteRetention")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ThirdExtendedRetentionRuleIsInfiniteRetention = (bool?) content.GetValueForProperty("ThirdExtendedRetentionRuleIsInfiniteRetention",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ThirdExtendedRetentionRuleIsInfiniteRetention, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ThirdExtendedRetentionRuleRetentionPeriodDays")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ThirdExtendedRetentionRuleRetentionPeriodDays = (long?) content.GetValueForProperty("ThirdExtendedRetentionRuleRetentionPeriodDays",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ThirdExtendedRetentionRuleRetentionPeriodDays, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("ThirdExtendedRetentionRuleType")) { ((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ThirdExtendedRetentionRuleType = (string) content.GetValueForProperty("ThirdExtendedRetentionRuleType",((Commvault.Powershell.Models.IUpdateBackupDestinationInternal)this).ThirdExtendedRetentionRuleType, global::System.Convert.ToString); } AfterDeserializePSObject(content); } } /// Region can be modified only when the backup destination does not belong to a region already [System.ComponentModel.TypeConverter(typeof(UpdateBackupDestinationTypeConverter))] public partial interface IUpdateBackupDestination { } } |