generated/api/Models/ReplicationGroupScript.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>Pre/post failover and failback scripts at group level</summary>
    [System.ComponentModel.TypeConverter(typeof(ReplicationGroupScriptTypeConverter))]
    public partial class ReplicationGroupScript
    {

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

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

        /// <summary>
        /// Creates a new instance of <see cref="ReplicationGroupScript" />, 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="ReplicationGroupScript" /> model class.</returns>
        public static Commvault.Powershell.Models.IReplicationGroupScript 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.ReplicationGroupScript"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        internal ReplicationGroupScript(global::System.Collections.IDictionary content)
        {
            bool returnNow = false;
            BeforeDeserializeDictionary(content, ref returnNow);
            if (returnNow)
            {
                return;
            }
            // actually deserialize
            if (content.Contains("PreFailover"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailover = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PreFailover",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailover, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailover"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailover = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PostFailover",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailover, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailback"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailback = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PreFailback",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailback, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailback"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailback = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PostFailback",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailback, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverOSType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverOSType = (string) content.GetValueForProperty("PreFailoverOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverOSType, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverOSType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverOSType = (string) content.GetValueForProperty("PostFailoverOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverOSType, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackOSType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackOSType = (string) content.GetValueForProperty("PreFailbackOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackOSType, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackOSType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackOSType = (string) content.GetValueForProperty("PostFailbackOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackOSType, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverScriptCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailoverScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverGuestCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailoverGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverPath"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverPath = (string) content.GetValueForProperty("PreFailoverPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverPath, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverType = (string) content.GetValueForProperty("PreFailoverType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverType, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverGuid"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuid = (string) content.GetValueForProperty("PreFailoverGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuid, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverScriptContent"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptContent = (string) content.GetValueForProperty("PreFailoverScriptContent",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptContent, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverScriptName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptName = (string) content.GetValueForProperty("PreFailoverScriptName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverReset"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverReset = (bool?) content.GetValueForProperty("PreFailoverReset",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverReset, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("PostFailoverScriptCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailoverScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailoverGuestCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailoverGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailoverPath"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverPath = (string) content.GetValueForProperty("PostFailoverPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverPath, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverType = (string) content.GetValueForProperty("PostFailoverType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverType, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverGuid"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuid = (string) content.GetValueForProperty("PostFailoverGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuid, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverScriptContent"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptContent = (string) content.GetValueForProperty("PostFailoverScriptContent",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptContent, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverScriptName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptName = (string) content.GetValueForProperty("PostFailoverScriptName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverReset"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverReset = (bool?) content.GetValueForProperty("PostFailoverReset",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverReset, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("PreFailbackScriptCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailbackScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailbackGuestCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailbackGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailbackPath"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackPath = (string) content.GetValueForProperty("PreFailbackPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackPath, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackType = (string) content.GetValueForProperty("PreFailbackType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackType, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackGuid"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuid = (string) content.GetValueForProperty("PreFailbackGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuid, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackScriptContent"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptContent = (string) content.GetValueForProperty("PreFailbackScriptContent",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptContent, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackScriptName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptName = (string) content.GetValueForProperty("PreFailbackScriptName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackReset"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackReset = (bool?) content.GetValueForProperty("PreFailbackReset",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackReset, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("PostFailbackScriptCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailbackScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailbackGuestCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailbackGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailbackPath"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackPath = (string) content.GetValueForProperty("PostFailbackPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackPath, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackType = (string) content.GetValueForProperty("PostFailbackType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackType, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackGuid"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuid = (string) content.GetValueForProperty("PostFailbackGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuid, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackScriptContent"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptContent = (string) content.GetValueForProperty("PostFailbackScriptContent",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptContent, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackScriptName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptName = (string) content.GetValueForProperty("PostFailbackScriptName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackReset"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackReset = (bool?) content.GetValueForProperty("PostFailbackReset",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackReset, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("PreFailoverScriptCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailoverScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverScriptCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailoverScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverGuestCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailoverGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverGuestCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailoverGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailoverScriptCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailoverScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailoverScriptCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailoverScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailoverGuestCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailoverGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailoverGuestCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailoverGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailbackScriptCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailbackScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailbackScriptCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailbackScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailbackGuestCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailbackGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailbackGuestCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailbackGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailbackScriptCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailbackScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailbackScriptCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailbackScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailbackGuestCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailbackGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailbackGuestCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailbackGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverScriptCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PreFailoverScriptCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PreFailoverScriptCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailoverScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverScriptCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailoverScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverScriptCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailoverScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverGuestCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PreFailoverGuestCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PreFailoverGuestCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailoverGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverGuestCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailoverGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverGuestCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailoverGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverScriptCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PostFailoverScriptCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PostFailoverScriptCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailoverScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverScriptCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailoverScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverScriptCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailoverScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverGuestCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PostFailoverGuestCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PostFailoverGuestCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailoverGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverGuestCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailoverGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverGuestCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailoverGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackScriptCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PreFailbackScriptCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PreFailbackScriptCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailbackScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackScriptCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailbackScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackScriptCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailbackScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackGuestCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PreFailbackGuestCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PreFailbackGuestCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailbackGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackGuestCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailbackGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackGuestCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailbackGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackScriptCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PostFailbackScriptCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PostFailbackScriptCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailbackScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackScriptCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailbackScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackScriptCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailbackScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackGuestCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PostFailbackGuestCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PostFailbackGuestCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailbackGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackGuestCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailbackGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackGuestCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailbackGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentialsPassword, 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.ReplicationGroupScript"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
        internal ReplicationGroupScript(global::System.Management.Automation.PSObject content)
        {
            bool returnNow = false;
            BeforeDeserializePSObject(content, ref returnNow);
            if (returnNow)
            {
                return;
            }
            // actually deserialize
            if (content.Contains("PreFailover"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailover = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PreFailover",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailover, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailover"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailover = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PostFailover",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailover, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailback"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailback = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PreFailback",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailback, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailback"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailback = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PostFailback",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailback, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverOSType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverOSType = (string) content.GetValueForProperty("PreFailoverOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverOSType, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverOSType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverOSType = (string) content.GetValueForProperty("PostFailoverOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverOSType, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackOSType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackOSType = (string) content.GetValueForProperty("PreFailbackOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackOSType, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackOSType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackOSType = (string) content.GetValueForProperty("PostFailbackOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackOSType, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverScriptCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailoverScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverGuestCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailoverGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverPath"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverPath = (string) content.GetValueForProperty("PreFailoverPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverPath, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverType = (string) content.GetValueForProperty("PreFailoverType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverType, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverGuid"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuid = (string) content.GetValueForProperty("PreFailoverGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuid, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverScriptContent"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptContent = (string) content.GetValueForProperty("PreFailoverScriptContent",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptContent, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverScriptName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptName = (string) content.GetValueForProperty("PreFailoverScriptName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverReset"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverReset = (bool?) content.GetValueForProperty("PreFailoverReset",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverReset, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("PostFailoverScriptCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailoverScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailoverGuestCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailoverGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailoverPath"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverPath = (string) content.GetValueForProperty("PostFailoverPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverPath, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverType = (string) content.GetValueForProperty("PostFailoverType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverType, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverGuid"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuid = (string) content.GetValueForProperty("PostFailoverGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuid, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverScriptContent"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptContent = (string) content.GetValueForProperty("PostFailoverScriptContent",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptContent, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverScriptName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptName = (string) content.GetValueForProperty("PostFailoverScriptName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverReset"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverReset = (bool?) content.GetValueForProperty("PostFailoverReset",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverReset, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("PreFailbackScriptCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailbackScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailbackGuestCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailbackGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailbackPath"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackPath = (string) content.GetValueForProperty("PreFailbackPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackPath, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackType = (string) content.GetValueForProperty("PreFailbackType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackType, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackGuid"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuid = (string) content.GetValueForProperty("PreFailbackGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuid, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackScriptContent"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptContent = (string) content.GetValueForProperty("PreFailbackScriptContent",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptContent, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackScriptName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptName = (string) content.GetValueForProperty("PreFailbackScriptName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackReset"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackReset = (bool?) content.GetValueForProperty("PreFailbackReset",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackReset, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("PostFailbackScriptCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailbackScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailbackGuestCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailbackGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailbackPath"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackPath = (string) content.GetValueForProperty("PostFailbackPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackPath, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackType"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackType = (string) content.GetValueForProperty("PostFailbackType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackType, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackGuid"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuid = (string) content.GetValueForProperty("PostFailbackGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuid, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackScriptContent"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptContent = (string) content.GetValueForProperty("PostFailbackScriptContent",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptContent, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackScriptName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptName = (string) content.GetValueForProperty("PostFailbackScriptName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackReset"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackReset = (bool?) content.GetValueForProperty("PostFailbackReset",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackReset, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("PreFailoverScriptCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailoverScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverScriptCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailoverScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverGuestCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailoverGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverGuestCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailoverGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailoverScriptCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailoverScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailoverScriptCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailoverScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailoverGuestCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailoverGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailoverGuestCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailoverGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailbackScriptCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailbackScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailbackScriptCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailbackScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailbackGuestCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailbackGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailbackGuestCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailbackGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailbackScriptCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailbackScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailbackScriptCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailbackScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailbackGuestCredentialsSavedCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailbackGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            }
            if (content.Contains("PostFailbackGuestCredentialsCredentials"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailbackGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            }
            if (content.Contains("PreFailoverScriptCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PreFailoverScriptCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PreFailoverScriptCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailoverScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverScriptCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailoverScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverScriptCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailoverScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverGuestCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PreFailoverGuestCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PreFailoverGuestCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailoverGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverGuestCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailoverGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailoverGuestCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailoverGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverScriptCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PostFailoverScriptCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PostFailoverScriptCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailoverScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverScriptCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailoverScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverScriptCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailoverScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverGuestCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PostFailoverGuestCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PostFailoverGuestCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailoverGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverGuestCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailoverGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailoverGuestCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailoverGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackScriptCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PreFailbackScriptCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PreFailbackScriptCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailbackScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackScriptCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailbackScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackScriptCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailbackScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackGuestCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PreFailbackGuestCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PreFailbackGuestCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailbackGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackGuestCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailbackGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PreFailbackGuestCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailbackGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackScriptCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PostFailbackScriptCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PostFailbackScriptCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailbackScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackScriptCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailbackScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackScriptCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailbackScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackGuestCredentialsSavedCredentialsId"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentialsId = (long?) content.GetValueForProperty("PostFailbackGuestCredentialsSavedCredentialsId",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentialsId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("PostFailbackGuestCredentialsSavedCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailbackGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackGuestCredentialsCredentialsName"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailbackGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentialsName, global::System.Convert.ToString);
            }
            if (content.Contains("PostFailbackGuestCredentialsCredentialsPassword"))
            {
                ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailbackGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentialsPassword, 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();
        }
    }
    /// Pre/post failover and failback scripts at group level
    [System.ComponentModel.TypeConverter(typeof(ReplicationGroupScriptTypeConverter))]
    public partial interface IReplicationGroupScript

    {

    }
}