generated/api/Models/TestFailoverMonitorMachines.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>Test failover Machine details from Replication monitor</summary>
    [System.ComponentModel.TypeConverter(typeof(TestFailoverMonitorMachinesTypeConverter))]
    public partial class TestFailoverMonitorMachines
    {

        /// <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.TestFailoverMonitorMachines"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        /// <returns>
        /// an instance of <see cref="Commvault.Powershell.Models.ITestFailoverMonitorMachines" />.
        /// </returns>
        public static Commvault.Powershell.Models.ITestFailoverMonitorMachines DeserializeFromDictionary(global::System.Collections.IDictionary content)
        {
            return new TestFailoverMonitorMachines(content);
        }

        /// <summary>
        /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into an instance of <see cref="Commvault.Powershell.Models.TestFailoverMonitorMachines"
        /// />.
        /// </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.ITestFailoverMonitorMachines" />.
        /// </returns>
        public static Commvault.Powershell.Models.ITestFailoverMonitorMachines DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
        {
            return new TestFailoverMonitorMachines(content);
        }

        /// <summary>
        /// Creates a new instance of <see cref="TestFailoverMonitorMachines" />, 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="TestFailoverMonitorMachines" /> model class.</returns>
        public static Commvault.Powershell.Models.ITestFailoverMonitorMachines 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.TestFailoverMonitorMachines"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        internal TestFailoverMonitorMachines(global::System.Collections.IDictionary content)
        {
            bool returnNow = false;
            BeforeDeserializeDictionary(content, ref returnNow);
            if (returnNow)
            {
                return;
            }
            // actually deserialize
            if (content.Contains("ProxyClient"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ProxyClient = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("ProxyClient",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ProxyClient, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("IPAddress"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IPAddress = (Commvault.Powershell.Models.ITestFailoverIPAddress) content.GetValueForProperty("IPAddress",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IPAddress, Commvault.Powershell.Models.TestFailoverIPAddressTypeConverter.ConvertFrom);
            }
            if (content.Contains("VMLocation"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocation = (Commvault.Powershell.Models.ITestFailoverVMLocation) content.GetValueForProperty("VMLocation",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocation, Commvault.Powershell.Models.TestFailoverVMLocationTypeConverter.ConvertFrom);
            }
            if (content.Contains("VM"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VM = (Commvault.Powershell.Models.ITestFailoverVMInfo) content.GetValueForProperty("VM",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VM, Commvault.Powershell.Models.TestFailoverVMInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("Creator"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Creator = (Commvault.Powershell.Models.IIdNameGuid) content.GetValueForProperty("Creator",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Creator, Commvault.Powershell.Models.IdNameGuidTypeConverter.ConvertFrom);
            }
            if (content.Contains("AdvancedProperties"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).AdvancedProperties = (Commvault.Powershell.Models.ITestFailoverAdvancedProp) content.GetValueForProperty("AdvancedProperties",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).AdvancedProperties, Commvault.Powershell.Models.TestFailoverAdvancedPropTypeConverter.ConvertFrom);
            }
            if (content.Contains("Entity"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Entity = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Entity",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Entity, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("OperatingSystem"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).OperatingSystem = (string) content.GetValueForProperty("OperatingSystem",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).OperatingSystem, global::System.Convert.ToString);
            }
            if (content.Contains("UserCapabilities"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).UserCapabilities = (long?) content.GetValueForProperty("UserCapabilities",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).UserCapabilities, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("NumberOfDisks"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).NumberOfDisks = (long?) content.GetValueForProperty("NumberOfDisks",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).NumberOfDisks, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("Memory"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Memory = (long?) content.GetValueForProperty("Memory",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Memory, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("Flags"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Flags = (long?) content.GetValueForProperty("Flags",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Flags, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("IsVirtualLabGateway"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IsVirtualLabGateway = (bool?) content.GetValueForProperty("IsVirtualLabGateway",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IsVirtualLabGateway, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("VMAllocPolicyId"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMAllocPolicyId = (long?) content.GetValueForProperty("VMAllocPolicyId",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMAllocPolicyId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("NumberOfCpUs"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).NumberOfCpUs = (long?) content.GetValueForProperty("NumberOfCpUs",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).NumberOfCpUs, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("VMState"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMState = (long?) content.GetValueForProperty("VMState",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMState, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("ModifiedTime"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ModifiedTime = (long?) content.GetValueForProperty("ModifiedTime",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ModifiedTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("ExpirationTime"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ExpirationTime = (long?) content.GetValueForProperty("ExpirationTime",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ExpirationTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("CreationTime"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreationTime = (long?) content.GetValueForProperty("CreationTime",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreationTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("LastPowerOnTime"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).LastPowerOnTime = (long?) content.GetValueForProperty("LastPowerOnTime",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).LastPowerOnTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("InstanceTypeEntity"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).InstanceTypeEntity = (string) content.GetValueForProperty("InstanceTypeEntity",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).InstanceTypeEntity, global::System.Convert.ToString);
            }
            if (content.Contains("ProxyClientId"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ProxyClientId = (long?) content.GetValueForProperty("ProxyClientId",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ProxyClientId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("ProxyClientName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ProxyClientName = (string) content.GetValueForProperty("ProxyClientName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ProxyClientName, global::System.Convert.ToString);
            }
            if (content.Contains("IPAddressSubnet"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IPAddressSubnet = (long?) content.GetValueForProperty("IPAddressSubnet",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IPAddressSubnet, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("IpAddressAddress"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IpAddressAddress = (string) content.GetValueForProperty("IpAddressAddress",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IpAddressAddress, global::System.Convert.ToString);
            }
            if (content.Contains("IPAddressFamily"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IPAddressFamily = (long?) content.GetValueForProperty("IPAddressFamily",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IPAddressFamily, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("VMLocationHostName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocationHostName = (string) content.GetValueForProperty("VMLocationHostName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocationHostName, global::System.Convert.ToString);
            }
            if (content.Contains("VMLocationDataCenterName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocationDataCenterName = (string) content.GetValueForProperty("VMLocationDataCenterName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocationDataCenterName, global::System.Convert.ToString);
            }
            if (content.Contains("VMLocationVcenter"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocationVcenter = (string) content.GetValueForProperty("VMLocationVcenter",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocationVcenter, global::System.Convert.ToString);
            }
            if (content.Contains("VMHostName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMHostName = (string) content.GetValueForProperty("VMHostName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMHostName, global::System.Convert.ToString);
            }
            if (content.Contains("VMClientName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMClientName = (string) content.GetValueForProperty("VMClientName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMClientName, global::System.Convert.ToString);
            }
            if (content.Contains("VMName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMName = (string) content.GetValueForProperty("VMName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMName, global::System.Convert.ToString);
            }
            if (content.Contains("VMClientId"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMClientId = (long?) content.GetValueForProperty("VMClientId",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMClientId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("VMGuid"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMGuid = (string) content.GetValueForProperty("VMGuid",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMGuid, global::System.Convert.ToString);
            }
            if (content.Contains("CreatorId"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreatorId = (long?) content.GetValueForProperty("CreatorId",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreatorId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("CreatorGuid"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreatorGuid = (string) content.GetValueForProperty("CreatorGuid",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreatorGuid, global::System.Convert.ToString);
            }
            if (content.Contains("CreatorName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreatorName = (string) content.GetValueForProperty("CreatorName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreatorName, global::System.Convert.ToString);
            }
            if (content.Contains("AdvancedPropertyConnectionString"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).AdvancedPropertyConnectionString = (string) content.GetValueForProperty("AdvancedPropertyConnectionString",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).AdvancedPropertyConnectionString, global::System.Convert.ToString);
            }
            if (content.Contains("AdvancedPropertyAdditionalFlags"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).AdvancedPropertyAdditionalFlags = (long?) content.GetValueForProperty("AdvancedPropertyAdditionalFlags",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).AdvancedPropertyAdditionalFlags, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("EntityId"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).EntityId = (long?) content.GetValueForProperty("EntityId",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).EntityId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("EntityName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).EntityName = (string) content.GetValueForProperty("EntityName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).EntityName, 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.TestFailoverMonitorMachines"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
        internal TestFailoverMonitorMachines(global::System.Management.Automation.PSObject content)
        {
            bool returnNow = false;
            BeforeDeserializePSObject(content, ref returnNow);
            if (returnNow)
            {
                return;
            }
            // actually deserialize
            if (content.Contains("ProxyClient"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ProxyClient = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("ProxyClient",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ProxyClient, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("IPAddress"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IPAddress = (Commvault.Powershell.Models.ITestFailoverIPAddress) content.GetValueForProperty("IPAddress",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IPAddress, Commvault.Powershell.Models.TestFailoverIPAddressTypeConverter.ConvertFrom);
            }
            if (content.Contains("VMLocation"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocation = (Commvault.Powershell.Models.ITestFailoverVMLocation) content.GetValueForProperty("VMLocation",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocation, Commvault.Powershell.Models.TestFailoverVMLocationTypeConverter.ConvertFrom);
            }
            if (content.Contains("VM"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VM = (Commvault.Powershell.Models.ITestFailoverVMInfo) content.GetValueForProperty("VM",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VM, Commvault.Powershell.Models.TestFailoverVMInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("Creator"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Creator = (Commvault.Powershell.Models.IIdNameGuid) content.GetValueForProperty("Creator",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Creator, Commvault.Powershell.Models.IdNameGuidTypeConverter.ConvertFrom);
            }
            if (content.Contains("AdvancedProperties"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).AdvancedProperties = (Commvault.Powershell.Models.ITestFailoverAdvancedProp) content.GetValueForProperty("AdvancedProperties",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).AdvancedProperties, Commvault.Powershell.Models.TestFailoverAdvancedPropTypeConverter.ConvertFrom);
            }
            if (content.Contains("Entity"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Entity = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("Entity",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Entity, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("OperatingSystem"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).OperatingSystem = (string) content.GetValueForProperty("OperatingSystem",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).OperatingSystem, global::System.Convert.ToString);
            }
            if (content.Contains("UserCapabilities"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).UserCapabilities = (long?) content.GetValueForProperty("UserCapabilities",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).UserCapabilities, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("NumberOfDisks"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).NumberOfDisks = (long?) content.GetValueForProperty("NumberOfDisks",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).NumberOfDisks, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("Memory"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Memory = (long?) content.GetValueForProperty("Memory",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Memory, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("Flags"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Flags = (long?) content.GetValueForProperty("Flags",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).Flags, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("IsVirtualLabGateway"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IsVirtualLabGateway = (bool?) content.GetValueForProperty("IsVirtualLabGateway",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IsVirtualLabGateway, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("VMAllocPolicyId"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMAllocPolicyId = (long?) content.GetValueForProperty("VMAllocPolicyId",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMAllocPolicyId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("NumberOfCpUs"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).NumberOfCpUs = (long?) content.GetValueForProperty("NumberOfCpUs",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).NumberOfCpUs, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("VMState"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMState = (long?) content.GetValueForProperty("VMState",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMState, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("ModifiedTime"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ModifiedTime = (long?) content.GetValueForProperty("ModifiedTime",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ModifiedTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("ExpirationTime"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ExpirationTime = (long?) content.GetValueForProperty("ExpirationTime",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ExpirationTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("CreationTime"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreationTime = (long?) content.GetValueForProperty("CreationTime",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreationTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("LastPowerOnTime"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).LastPowerOnTime = (long?) content.GetValueForProperty("LastPowerOnTime",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).LastPowerOnTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("InstanceTypeEntity"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).InstanceTypeEntity = (string) content.GetValueForProperty("InstanceTypeEntity",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).InstanceTypeEntity, global::System.Convert.ToString);
            }
            if (content.Contains("ProxyClientId"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ProxyClientId = (long?) content.GetValueForProperty("ProxyClientId",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ProxyClientId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("ProxyClientName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ProxyClientName = (string) content.GetValueForProperty("ProxyClientName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).ProxyClientName, global::System.Convert.ToString);
            }
            if (content.Contains("IPAddressSubnet"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IPAddressSubnet = (long?) content.GetValueForProperty("IPAddressSubnet",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IPAddressSubnet, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("IpAddressAddress"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IpAddressAddress = (string) content.GetValueForProperty("IpAddressAddress",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IpAddressAddress, global::System.Convert.ToString);
            }
            if (content.Contains("IPAddressFamily"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IPAddressFamily = (long?) content.GetValueForProperty("IPAddressFamily",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).IPAddressFamily, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("VMLocationHostName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocationHostName = (string) content.GetValueForProperty("VMLocationHostName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocationHostName, global::System.Convert.ToString);
            }
            if (content.Contains("VMLocationDataCenterName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocationDataCenterName = (string) content.GetValueForProperty("VMLocationDataCenterName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocationDataCenterName, global::System.Convert.ToString);
            }
            if (content.Contains("VMLocationVcenter"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocationVcenter = (string) content.GetValueForProperty("VMLocationVcenter",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMLocationVcenter, global::System.Convert.ToString);
            }
            if (content.Contains("VMHostName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMHostName = (string) content.GetValueForProperty("VMHostName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMHostName, global::System.Convert.ToString);
            }
            if (content.Contains("VMClientName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMClientName = (string) content.GetValueForProperty("VMClientName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMClientName, global::System.Convert.ToString);
            }
            if (content.Contains("VMName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMName = (string) content.GetValueForProperty("VMName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMName, global::System.Convert.ToString);
            }
            if (content.Contains("VMClientId"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMClientId = (long?) content.GetValueForProperty("VMClientId",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMClientId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("VMGuid"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMGuid = (string) content.GetValueForProperty("VMGuid",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).VMGuid, global::System.Convert.ToString);
            }
            if (content.Contains("CreatorId"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreatorId = (long?) content.GetValueForProperty("CreatorId",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreatorId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("CreatorGuid"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreatorGuid = (string) content.GetValueForProperty("CreatorGuid",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreatorGuid, global::System.Convert.ToString);
            }
            if (content.Contains("CreatorName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreatorName = (string) content.GetValueForProperty("CreatorName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).CreatorName, global::System.Convert.ToString);
            }
            if (content.Contains("AdvancedPropertyConnectionString"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).AdvancedPropertyConnectionString = (string) content.GetValueForProperty("AdvancedPropertyConnectionString",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).AdvancedPropertyConnectionString, global::System.Convert.ToString);
            }
            if (content.Contains("AdvancedPropertyAdditionalFlags"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).AdvancedPropertyAdditionalFlags = (long?) content.GetValueForProperty("AdvancedPropertyAdditionalFlags",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).AdvancedPropertyAdditionalFlags, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("EntityId"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).EntityId = (long?) content.GetValueForProperty("EntityId",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).EntityId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("EntityName"))
            {
                ((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).EntityName = (string) content.GetValueForProperty("EntityName",((Commvault.Powershell.Models.ITestFailoverMonitorMachinesInternal)this).EntityName, 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();
        }
    }
    /// Test failover Machine details from Replication monitor
    [System.ComponentModel.TypeConverter(typeof(TestFailoverMonitorMachinesTypeConverter))]
    public partial interface ITestFailoverMonitorMachines

    {

    }
}