generated/api/Models/ReplicationGroupScript.PowerShell.cs

// Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.9.4, generator: @autorest/powershell@3.0.415)
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

namespace Commvault.Powershell.Models
{
    using Commvault.Powershell.Runtime.PowerShell;

    /// <summary>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 <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);

        /// <summary>
        /// <c>BeforeDeserializePSObject</c> will be called before the deserialization has commenced, allowing complete customization
        /// of the object before it is deserialized.
        /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
        /// Implement this method in a partial class to enable this behavior.
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
        /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
        /// instantly.</param>

        partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);

        /// <summary>
        /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into an instance of <see cref="Commvault.Powershell.Models.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="className" /> 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
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailover = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PreFailover",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailover, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailover = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PostFailover",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailover, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailback = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PreFailback",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailback, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailback = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PostFailback",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailback, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverOSType = (string) content.GetValueForProperty("PreFailoverOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverOSType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverOSType = (string) content.GetValueForProperty("PostFailoverOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverOSType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackOSType = (string) content.GetValueForProperty("PreFailbackOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackOSType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackOSType = (string) content.GetValueForProperty("PostFailbackOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackOSType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailoverScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailoverGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverPath = (string) content.GetValueForProperty("PreFailoverPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverPath, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverType = (string) content.GetValueForProperty("PreFailoverType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuid = (string) content.GetValueForProperty("PreFailoverGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuid, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailoverScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailoverGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverPath = (string) content.GetValueForProperty("PostFailoverPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverPath, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverType = (string) content.GetValueForProperty("PostFailoverType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuid = (string) content.GetValueForProperty("PostFailoverGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuid, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailbackScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailbackGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackPath = (string) content.GetValueForProperty("PreFailbackPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackPath, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackType = (string) content.GetValueForProperty("PreFailbackType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuid = (string) content.GetValueForProperty("PreFailbackGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuid, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailbackScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailbackGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackPath = (string) content.GetValueForProperty("PostFailbackPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackPath, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackType = (string) content.GetValueForProperty("PostFailbackType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuid = (string) content.GetValueForProperty("PostFailbackGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuid, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailoverScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailoverScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailoverGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailoverGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailoverScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailoverScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailoverGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailoverGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailbackScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailbackScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailbackGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailbackGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailbackScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailbackScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailbackGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailbackGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailoverScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailoverScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailoverScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailoverGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailoverGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailoverGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailoverScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailoverScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailoverScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailoverGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailoverGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailoverGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailbackScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailbackScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailbackScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailbackGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailbackGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailbackGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailbackScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailbackScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailbackScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailbackGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailbackGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentialsName, global::System.Convert.ToString);
            ((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
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailover = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PreFailover",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailover, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailover = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PostFailover",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailover, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailback = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PreFailback",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailback, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailback = (Commvault.Powershell.Models.IDrOperationScript) content.GetValueForProperty("PostFailback",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailback, Commvault.Powershell.Models.DrOperationScriptTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverOSType = (string) content.GetValueForProperty("PreFailoverOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverOSType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverOSType = (string) content.GetValueForProperty("PostFailoverOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverOSType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackOSType = (string) content.GetValueForProperty("PreFailbackOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackOSType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackOSType = (string) content.GetValueForProperty("PostFailbackOSType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackOSType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailoverScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailoverGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverPath = (string) content.GetValueForProperty("PreFailoverPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverPath, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverType = (string) content.GetValueForProperty("PreFailoverType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuid = (string) content.GetValueForProperty("PreFailoverGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuid, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailoverScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailoverGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverPath = (string) content.GetValueForProperty("PostFailoverPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverPath, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverType = (string) content.GetValueForProperty("PostFailoverType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuid = (string) content.GetValueForProperty("PostFailoverGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuid, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailbackScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PreFailbackGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackPath = (string) content.GetValueForProperty("PreFailbackPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackPath, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackType = (string) content.GetValueForProperty("PreFailbackType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuid = (string) content.GetValueForProperty("PreFailbackGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuid, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailbackScriptCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentials = (Commvault.Powershell.Models.IGuestCredentialInfo) content.GetValueForProperty("PostFailbackGuestCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentials, Commvault.Powershell.Models.GuestCredentialInfoTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackPath = (string) content.GetValueForProperty("PostFailbackPath",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackPath, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackType = (string) content.GetValueForProperty("PostFailbackType",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuid = (string) content.GetValueForProperty("PostFailbackGuid",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuid, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailoverScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailoverScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailoverGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailoverGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailoverScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailoverScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailoverGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailoverGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailbackScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailbackScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PreFailbackGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PreFailbackGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailbackScriptCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailbackScriptCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentials = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("PostFailbackGuestCredentialsSavedCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentials, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentials = (Commvault.Powershell.Models.IUserNamePassword) content.GetValueForProperty("PostFailbackGuestCredentialsCredentials",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentials, Commvault.Powershell.Models.UserNamePasswordTypeConverter.ConvertFrom);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailoverScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailoverScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailoverScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailoverGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailoverGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailoverGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailoverGuestCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailoverScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailoverScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailoverScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailoverGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailoverGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailoverGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailoverGuestCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailbackScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailbackScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailbackScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PreFailbackGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PreFailbackGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsPassword = (string) content.GetValueForProperty("PreFailbackGuestCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PreFailbackGuestCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailbackScriptCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailbackScriptCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsPassword = (string) content.GetValueForProperty("PostFailbackScriptCredentialsCredentialsPassword",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackScriptCredentialsCredentialsPassword, global::System.Convert.ToString);
            ((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)));
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentialsName = (string) content.GetValueForProperty("PostFailbackGuestCredentialsSavedCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsSavedCredentialsName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentialsName = (string) content.GetValueForProperty("PostFailbackGuestCredentialsCredentialsName",((Commvault.Powershell.Models.IReplicationGroupScriptInternal)this).PostFailbackGuestCredentialsCredentialsName, global::System.Convert.ToString);
            ((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();
    }
    /// Pre/post failover and failback scripts at group level
    [System.ComponentModel.TypeConverter(typeof(ReplicationGroupScriptTypeConverter))]
    public partial interface IReplicationGroupScript

    {

    }
}