generated/api/Models/PlanBackupDestinationGeneralInfo.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; [System.ComponentModel.TypeConverter(typeof(PlanBackupDestinationGeneralInfoTypeConverter))] public partial class PlanBackupDestinationGeneralInfo { /// <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.PlanBackupDestinationGeneralInfo" /// />. /// </summary> /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param> /// <returns> /// an instance of <see cref="Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfo" />. /// </returns> public static Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PlanBackupDestinationGeneralInfo(content); } /// <summary> /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into an instance of <see cref="Commvault.Powershell.Models.PlanBackupDestinationGeneralInfo" /// />. /// </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.IPlanBackupDestinationGeneralInfo" />. /// </returns> public static Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PlanBackupDestinationGeneralInfo(content); } /// <summary> /// Creates a new instance of <see cref="PlanBackupDestinationGeneralInfo" />, 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="PlanBackupDestinationGeneralInfo" /> model class.</returns> public static Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfo FromJsonString(string jsonText) => FromJson(Commvault.Powershell.Runtime.Json.JsonNode.Parse(jsonText)); /// <summary> /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into a new instance of <see cref="Commvault.Powershell.Models.PlanBackupDestinationGeneralInfo" /// />. /// </summary> /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param> internal PlanBackupDestinationGeneralInfo(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); if (returnNow) { return; } // actually deserialize if (content.Contains("Storage")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).Storage = (Commvault.Powershell.Models.IStoragePool) content.GetValueForProperty("Storage",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).Storage, Commvault.Powershell.Models.StoragePoolTypeConverter.ConvertFrom); } if (content.Contains("Source")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).Source = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Source",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).Source, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("StorageType")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageType = (string) content.GetValueForProperty("StorageType",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageType, global::System.Convert.ToString); } if (content.Contains("NetAppCloudTarget")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).NetAppCloudTarget = (bool?) content.GetValueForProperty("NetAppCloudTarget",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).NetAppCloudTarget, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsImmutableSnapCopy")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsImmutableSnapCopy = (bool?) content.GetValueForProperty("IsImmutableSnapCopy",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsImmutableSnapCopy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsDefault")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsDefault = (bool?) content.GetValueForProperty("IsDefault",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsDefault, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsActive")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsActive = (bool?) content.GetValueForProperty("IsActive",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsActive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsCopyInMaintenanceMode")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsCopyInMaintenanceMode = (bool?) content.GetValueForProperty("IsCopyInMaintenanceMode",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsCopyInMaintenanceMode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsCopyPromotionRequestSubmitted")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsCopyPromotionRequestSubmitted = (bool?) content.GetValueForProperty("IsCopyPromotionRequestSubmitted",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsCopyPromotionRequestSubmitted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ComplianceLock")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).ComplianceLock = (bool?) content.GetValueForProperty("ComplianceLock",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).ComplianceLock, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsSnapCopy")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsSnapCopy = (bool?) content.GetValueForProperty("IsSnapCopy",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsSnapCopy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsMirrorCopy")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsMirrorCopy = (bool?) content.GetValueForProperty("IsMirrorCopy",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsMirrorCopy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsAirgapCopy")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsAirgapCopy = (bool?) content.GetValueForProperty("IsAirgapCopy",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsAirgapCopy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("CopyType")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).CopyType = (string) content.GetValueForProperty("CopyType",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).CopyType, global::System.Convert.ToString); } if (content.Contains("SnapCopyType")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).SnapCopyType = (string) content.GetValueForProperty("SnapCopyType",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).SnapCopyType, global::System.Convert.ToString); } if (content.Contains("CopyPrecedence")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).CopyPrecedence = (long?) content.GetValueForProperty("CopyPrecedence",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).CopyPrecedence, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("StorageDeviceType")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageDeviceType = (Commvault.Powershell.Models.IDeviceType) content.GetValueForProperty("StorageDeviceType",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageDeviceType, Commvault.Powershell.Models.DeviceTypeTypeConverter.ConvertFrom); } if (content.Contains("StorageRegion")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageRegion = (Commvault.Powershell.Models.IIdNameDisplayName) content.GetValueForProperty("StorageRegion",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageRegion, Commvault.Powershell.Models.IdNameDisplayNameTypeConverter.ConvertFrom); } if (content.Contains("StorageId")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageId = (long?) content.GetValueForProperty("StorageId",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("StorageName")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageName = (string) content.GetValueForProperty("StorageName",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageName, global::System.Convert.ToString); } if (content.Contains("Type")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("StorageRetentionPeriodDays")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageRetentionPeriodDays = (long?) content.GetValueForProperty("StorageRetentionPeriodDays",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageRetentionPeriodDays, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("StorageWormStoragePoolFlag")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageWormStoragePoolFlag = (long?) content.GetValueForProperty("StorageWormStoragePoolFlag",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageWormStoragePoolFlag, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("StorageClass")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageClass = (string) content.GetValueForProperty("StorageClass",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageClass, global::System.Convert.ToString); } if (content.Contains("StorageIsArchiveStorage")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageIsArchiveStorage = (bool?) content.GetValueForProperty("StorageIsArchiveStorage",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageIsArchiveStorage, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("DeviceTypeId")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).DeviceTypeId = (long?) content.GetValueForProperty("DeviceTypeId",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).DeviceTypeId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SourceId")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).SourceId = (long?) content.GetValueForProperty("SourceId",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).SourceId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SourceName")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).SourceName, global::System.Convert.ToString); } if (content.Contains("DeviceTypeName")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).DeviceTypeName = (string) content.GetValueForProperty("DeviceTypeName",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).DeviceTypeName, global::System.Convert.ToString); } if (content.Contains("RegionId")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).RegionId = (long?) content.GetValueForProperty("RegionId",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).RegionId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("RegionName")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).RegionName = (string) content.GetValueForProperty("RegionName",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).RegionName, global::System.Convert.ToString); } if (content.Contains("RegionDisplayName")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).RegionDisplayName = (string) content.GetValueForProperty("RegionDisplayName",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).RegionDisplayName, 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.PlanBackupDestinationGeneralInfo" /// />. /// </summary> /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param> internal PlanBackupDestinationGeneralInfo(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); if (returnNow) { return; } // actually deserialize if (content.Contains("Storage")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).Storage = (Commvault.Powershell.Models.IStoragePool) content.GetValueForProperty("Storage",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).Storage, Commvault.Powershell.Models.StoragePoolTypeConverter.ConvertFrom); } if (content.Contains("Source")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).Source = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Source",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).Source, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("StorageType")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageType = (string) content.GetValueForProperty("StorageType",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageType, global::System.Convert.ToString); } if (content.Contains("NetAppCloudTarget")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).NetAppCloudTarget = (bool?) content.GetValueForProperty("NetAppCloudTarget",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).NetAppCloudTarget, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsImmutableSnapCopy")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsImmutableSnapCopy = (bool?) content.GetValueForProperty("IsImmutableSnapCopy",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsImmutableSnapCopy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsDefault")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsDefault = (bool?) content.GetValueForProperty("IsDefault",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsDefault, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsActive")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsActive = (bool?) content.GetValueForProperty("IsActive",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsActive, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsCopyInMaintenanceMode")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsCopyInMaintenanceMode = (bool?) content.GetValueForProperty("IsCopyInMaintenanceMode",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsCopyInMaintenanceMode, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsCopyPromotionRequestSubmitted")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsCopyPromotionRequestSubmitted = (bool?) content.GetValueForProperty("IsCopyPromotionRequestSubmitted",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsCopyPromotionRequestSubmitted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ComplianceLock")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).ComplianceLock = (bool?) content.GetValueForProperty("ComplianceLock",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).ComplianceLock, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsSnapCopy")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsSnapCopy = (bool?) content.GetValueForProperty("IsSnapCopy",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsSnapCopy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsMirrorCopy")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsMirrorCopy = (bool?) content.GetValueForProperty("IsMirrorCopy",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsMirrorCopy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("IsAirgapCopy")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsAirgapCopy = (bool?) content.GetValueForProperty("IsAirgapCopy",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).IsAirgapCopy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("CopyType")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).CopyType = (string) content.GetValueForProperty("CopyType",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).CopyType, global::System.Convert.ToString); } if (content.Contains("SnapCopyType")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).SnapCopyType = (string) content.GetValueForProperty("SnapCopyType",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).SnapCopyType, global::System.Convert.ToString); } if (content.Contains("CopyPrecedence")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).CopyPrecedence = (long?) content.GetValueForProperty("CopyPrecedence",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).CopyPrecedence, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("StorageDeviceType")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageDeviceType = (Commvault.Powershell.Models.IDeviceType) content.GetValueForProperty("StorageDeviceType",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageDeviceType, Commvault.Powershell.Models.DeviceTypeTypeConverter.ConvertFrom); } if (content.Contains("StorageRegion")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageRegion = (Commvault.Powershell.Models.IIdNameDisplayName) content.GetValueForProperty("StorageRegion",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageRegion, Commvault.Powershell.Models.IdNameDisplayNameTypeConverter.ConvertFrom); } if (content.Contains("StorageId")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageId = (long?) content.GetValueForProperty("StorageId",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("StorageName")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageName = (string) content.GetValueForProperty("StorageName",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageName, global::System.Convert.ToString); } if (content.Contains("Type")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("StorageRetentionPeriodDays")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageRetentionPeriodDays = (long?) content.GetValueForProperty("StorageRetentionPeriodDays",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageRetentionPeriodDays, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("StorageWormStoragePoolFlag")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageWormStoragePoolFlag = (long?) content.GetValueForProperty("StorageWormStoragePoolFlag",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageWormStoragePoolFlag, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("StorageClass")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageClass = (string) content.GetValueForProperty("StorageClass",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageClass, global::System.Convert.ToString); } if (content.Contains("StorageIsArchiveStorage")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageIsArchiveStorage = (bool?) content.GetValueForProperty("StorageIsArchiveStorage",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).StorageIsArchiveStorage, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("DeviceTypeId")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).DeviceTypeId = (long?) content.GetValueForProperty("DeviceTypeId",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).DeviceTypeId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SourceId")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).SourceId = (long?) content.GetValueForProperty("SourceId",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).SourceId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("SourceName")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).SourceName = (string) content.GetValueForProperty("SourceName",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).SourceName, global::System.Convert.ToString); } if (content.Contains("DeviceTypeName")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).DeviceTypeName = (string) content.GetValueForProperty("DeviceTypeName",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).DeviceTypeName, global::System.Convert.ToString); } if (content.Contains("RegionId")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).RegionId = (long?) content.GetValueForProperty("RegionId",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).RegionId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("RegionName")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).RegionName = (string) content.GetValueForProperty("RegionName",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).RegionName, global::System.Convert.ToString); } if (content.Contains("RegionDisplayName")) { ((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).RegionDisplayName = (string) content.GetValueForProperty("RegionDisplayName",((Commvault.Powershell.Models.IPlanBackupDestinationGeneralInfoInternal)this).RegionDisplayName, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// <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(); } } [System.ComponentModel.TypeConverter(typeof(PlanBackupDestinationGeneralInfoTypeConverter))] public partial interface IPlanBackupDestinationGeneralInfo { } } |