generated/api/Models/FailoverGroupDetails.PowerShell.cs
// Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.4, generator: @autorest/powershell@3.0.415) // Changes may cause incorrect behavior and will be lost if the code is regenerated. namespace Commvault.Powershell.Models { using Commvault.Powershell.Runtime.PowerShell; /// <summary>Failover group details</summary> [System.ComponentModel.TypeConverter(typeof(FailoverGroupDetailsTypeConverter))] public partial class FailoverGroupDetails { /// <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 <see "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 <see "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> /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into an instance of <see cref="Commvault.Powershell.Models.FailoverGroupDetails" /// />. /// </summary> /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param> /// <returns> /// an instance of <see cref="Commvault.Powershell.Models.IFailoverGroupDetails" />. /// </returns> public static Commvault.Powershell.Models.IFailoverGroupDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new FailoverGroupDetails(content); } /// <summary> /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into an instance of <see cref="Commvault.Powershell.Models.FailoverGroupDetails" /// />. /// </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.IFailoverGroupDetails" />. /// </returns> public static Commvault.Powershell.Models.IFailoverGroupDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new FailoverGroupDetails(content); } /// <summary> /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into a new instance of <see cref="Commvault.Powershell.Models.FailoverGroupDetails" /// />. /// </summary> /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param> internal FailoverGroupDetails(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); if (returnNow) { return; } // actually deserialize ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisor = (Commvault.Powershell.Models.IFailoverGroupHypervisor) content.GetValueForProperty("SourceHypervisor",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisor, Commvault.Powershell.Models.FailoverGroupHypervisorTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisor = (Commvault.Powershell.Models.IFailoverGroupHypervisor) content.GetValueForProperty("DestinationHypervisor",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisor, Commvault.Powershell.Models.FailoverGroupHypervisorTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Subclient = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Subclient",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Subclient, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).StoragePolicy = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("StoragePolicy",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).StoragePolicy, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Copy = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Copy",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Copy, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).RecoveryTarget = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("RecoveryTarget",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).RecoveryTarget, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailover = (Commvault.Powershell.Models.IFailoverGroupAutomaticFailover) content.GetValueForProperty("AutomaticFailover",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailover, Commvault.Powershell.Models.FailoverGroupAutomaticFailoverTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Id = (long?) content.GetValueForProperty("Id",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Id, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Name = (string) content.GetValueForProperty("Name",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Name, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Source = (string) content.GetValueForProperty("Source",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Source, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).IsApprovalRequired = (bool?) content.GetValueForProperty("IsApprovalRequired",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).IsApprovalRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).UsersToNotify = (Commvault.Powershell.Models.IIdNameDisplayNameCompany[]) content.GetValueForProperty("UsersToNotify",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).UsersToNotify, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IIdNameDisplayNameCompany>(__y, Commvault.Powershell.Models.IdNameDisplayNameCompanyTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).OperationType = (string) content.GetValueForProperty("OperationType",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).OperationType, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).PriorityIntervalInMinutes = (long?) content.GetValueForProperty("PriorityIntervalInMinutes",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).PriorityIntervalInMinutes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).ContinueDrOnFailure = (bool?) content.GetValueForProperty("ContinueDrOnFailure",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).ContinueDrOnFailure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).PlannedFailoverSchedules = (Commvault.Powershell.Models.IPlanSchedule[]) content.GetValueForProperty("PlannedFailoverSchedules",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).PlannedFailoverSchedules, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IPlanSchedule>(__y, Commvault.Powershell.Models.PlanScheduleTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).TestBootSchedules = (Commvault.Powershell.Models.IPlanSchedule[]) content.GetValueForProperty("TestBootSchedules",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).TestBootSchedules, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IPlanSchedule>(__y, Commvault.Powershell.Models.PlanScheduleTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).EsxServerMappings = (Commvault.Powershell.Models.IEsxServerMapping[]) content.GetValueForProperty("EsxServerMappings",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).EsxServerMappings, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IEsxServerMapping>(__y, Commvault.Powershell.Models.EsxServerMappingTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).ReplicationPairs = (Commvault.Powershell.Models.IFailoverGroupReplicationPair[]) content.GetValueForProperty("ReplicationPairs",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).ReplicationPairs, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IFailoverGroupReplicationPair>(__y, Commvault.Powershell.Models.FailoverGroupReplicationPairTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).ArrayReplicationPairs = (Commvault.Powershell.Models.IFailoverGroupArrayReplicationPair[]) content.GetValueForProperty("ArrayReplicationPairs",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).ArrayReplicationPairs, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IFailoverGroupArrayReplicationPair>(__y, Commvault.Powershell.Models.FailoverGroupArrayReplicationPairTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Script = (Commvault.Powershell.Models.IReplicationGroupScript) content.GetValueForProperty("Script",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Script, Commvault.Powershell.Models.ReplicationGroupScriptTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverMonitoringStatus = (string) content.GetValueForProperty("AutomaticFailoverMonitoringStatus",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverMonitoringStatus, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverStatus = (string) content.GetValueForProperty("AutomaticFailoverStatus",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverStatus, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorId = (long?) content.GetValueForProperty("SourceHypervisorId",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorName = (string) content.GetValueForProperty("SourceHypervisorName",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorName, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorType = (string) content.GetValueForProperty("SourceHypervisorType",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorType, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorVendor = (string) content.GetValueForProperty("SourceHypervisorVendor",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorVendor, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorId = (long?) content.GetValueForProperty("DestinationHypervisorId",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorName = (string) content.GetValueForProperty("DestinationHypervisorName",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorName, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorType = (string) content.GetValueForProperty("DestinationHypervisorType",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorType, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorVendor = (string) content.GetValueForProperty("DestinationHypervisorVendor",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorVendor, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SubclientId = (long?) content.GetValueForProperty("SubclientId",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SubclientId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SubclientName = (string) content.GetValueForProperty("SubclientName",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SubclientName, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).StoragePolicyId = (long?) content.GetValueForProperty("StoragePolicyId",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).StoragePolicyId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).StoragePolicyName = (string) content.GetValueForProperty("StoragePolicyName",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).StoragePolicyName, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).CopyId = (long?) content.GetValueForProperty("CopyId",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).CopyId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).CopyName = (string) content.GetValueForProperty("CopyName",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).CopyName, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).RecoveryTargetId = (long?) content.GetValueForProperty("RecoveryTargetId",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).RecoveryTargetId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).RecoveryTargetName = (string) content.GetValueForProperty("RecoveryTargetName",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).RecoveryTargetName, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverMachines = (Commvault.Powershell.Models.IIdName[]) content.GetValueForProperty("AutomaticFailoverMachines",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverMachines, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IIdName>(__y, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverOutageDelayTimeInMinutes = (long?) content.GetValueForProperty("AutomaticFailoverOutageDelayTimeInMinutes",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverOutageDelayTimeInMinutes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); AfterDeserializeDictionary(content); } /// <summary> /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into a new instance of <see cref="Commvault.Powershell.Models.FailoverGroupDetails" /// />. /// </summary> /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param> internal FailoverGroupDetails(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); if (returnNow) { return; } // actually deserialize ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisor = (Commvault.Powershell.Models.IFailoverGroupHypervisor) content.GetValueForProperty("SourceHypervisor",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisor, Commvault.Powershell.Models.FailoverGroupHypervisorTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisor = (Commvault.Powershell.Models.IFailoverGroupHypervisor) content.GetValueForProperty("DestinationHypervisor",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisor, Commvault.Powershell.Models.FailoverGroupHypervisorTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Subclient = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Subclient",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Subclient, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).StoragePolicy = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("StoragePolicy",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).StoragePolicy, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Copy = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Copy",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Copy, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).RecoveryTarget = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("RecoveryTarget",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).RecoveryTarget, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailover = (Commvault.Powershell.Models.IFailoverGroupAutomaticFailover) content.GetValueForProperty("AutomaticFailover",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailover, Commvault.Powershell.Models.FailoverGroupAutomaticFailoverTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Id = (long?) content.GetValueForProperty("Id",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Id, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Name = (string) content.GetValueForProperty("Name",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Name, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Source = (string) content.GetValueForProperty("Source",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Source, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).IsApprovalRequired = (bool?) content.GetValueForProperty("IsApprovalRequired",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).IsApprovalRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).UsersToNotify = (Commvault.Powershell.Models.IIdNameDisplayNameCompany[]) content.GetValueForProperty("UsersToNotify",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).UsersToNotify, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IIdNameDisplayNameCompany>(__y, Commvault.Powershell.Models.IdNameDisplayNameCompanyTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).OperationType = (string) content.GetValueForProperty("OperationType",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).OperationType, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).PriorityIntervalInMinutes = (long?) content.GetValueForProperty("PriorityIntervalInMinutes",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).PriorityIntervalInMinutes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).ContinueDrOnFailure = (bool?) content.GetValueForProperty("ContinueDrOnFailure",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).ContinueDrOnFailure, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).PlannedFailoverSchedules = (Commvault.Powershell.Models.IPlanSchedule[]) content.GetValueForProperty("PlannedFailoverSchedules",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).PlannedFailoverSchedules, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IPlanSchedule>(__y, Commvault.Powershell.Models.PlanScheduleTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).TestBootSchedules = (Commvault.Powershell.Models.IPlanSchedule[]) content.GetValueForProperty("TestBootSchedules",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).TestBootSchedules, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IPlanSchedule>(__y, Commvault.Powershell.Models.PlanScheduleTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).EsxServerMappings = (Commvault.Powershell.Models.IEsxServerMapping[]) content.GetValueForProperty("EsxServerMappings",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).EsxServerMappings, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IEsxServerMapping>(__y, Commvault.Powershell.Models.EsxServerMappingTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).ReplicationPairs = (Commvault.Powershell.Models.IFailoverGroupReplicationPair[]) content.GetValueForProperty("ReplicationPairs",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).ReplicationPairs, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IFailoverGroupReplicationPair>(__y, Commvault.Powershell.Models.FailoverGroupReplicationPairTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).ArrayReplicationPairs = (Commvault.Powershell.Models.IFailoverGroupArrayReplicationPair[]) content.GetValueForProperty("ArrayReplicationPairs",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).ArrayReplicationPairs, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IFailoverGroupArrayReplicationPair>(__y, Commvault.Powershell.Models.FailoverGroupArrayReplicationPairTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Script = (Commvault.Powershell.Models.IReplicationGroupScript) content.GetValueForProperty("Script",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).Script, Commvault.Powershell.Models.ReplicationGroupScriptTypeConverter.ConvertFrom); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverMonitoringStatus = (string) content.GetValueForProperty("AutomaticFailoverMonitoringStatus",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverMonitoringStatus, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverStatus = (string) content.GetValueForProperty("AutomaticFailoverStatus",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverStatus, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorId = (long?) content.GetValueForProperty("SourceHypervisorId",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorName = (string) content.GetValueForProperty("SourceHypervisorName",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorName, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorType = (string) content.GetValueForProperty("SourceHypervisorType",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorType, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorVendor = (string) content.GetValueForProperty("SourceHypervisorVendor",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SourceHypervisorVendor, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorId = (long?) content.GetValueForProperty("DestinationHypervisorId",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorName = (string) content.GetValueForProperty("DestinationHypervisorName",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorName, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorType = (string) content.GetValueForProperty("DestinationHypervisorType",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorType, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorVendor = (string) content.GetValueForProperty("DestinationHypervisorVendor",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).DestinationHypervisorVendor, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SubclientId = (long?) content.GetValueForProperty("SubclientId",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SubclientId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SubclientName = (string) content.GetValueForProperty("SubclientName",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).SubclientName, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).StoragePolicyId = (long?) content.GetValueForProperty("StoragePolicyId",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).StoragePolicyId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).StoragePolicyName = (string) content.GetValueForProperty("StoragePolicyName",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).StoragePolicyName, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).CopyId = (long?) content.GetValueForProperty("CopyId",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).CopyId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).CopyName = (string) content.GetValueForProperty("CopyName",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).CopyName, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).RecoveryTargetId = (long?) content.GetValueForProperty("RecoveryTargetId",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).RecoveryTargetId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).RecoveryTargetName = (string) content.GetValueForProperty("RecoveryTargetName",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).RecoveryTargetName, global::System.Convert.ToString); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverMachines = (Commvault.Powershell.Models.IIdName[]) content.GetValueForProperty("AutomaticFailoverMachines",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverMachines, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IIdName>(__y, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom)); ((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverOutageDelayTimeInMinutes = (long?) content.GetValueForProperty("AutomaticFailoverOutageDelayTimeInMinutes",((Commvault.Powershell.Models.IFailoverGroupDetailsInternal)this).AutomaticFailoverOutageDelayTimeInMinutes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); AfterDeserializePSObject(content); } /// <summary> /// Creates a new instance of <see cref="FailoverGroupDetails" />, 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="className" /> model class.</returns> public static Commvault.Powershell.Models.IFailoverGroupDetails 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(); } /// Failover group details [System.ComponentModel.TypeConverter(typeof(FailoverGroupDetailsTypeConverter))] public partial interface IFailoverGroupDetails { } } |