generated/api/Models/AlertRuleQueryEntityDetails.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>query entity object</summary>
    [System.ComponentModel.TypeConverter(typeof(AlertRuleQueryEntityDetailsTypeConverter))]
    public partial class AlertRuleQueryEntityDetails
    {

        /// <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 a new instance of <see cref="Commvault.Powershell.Models.AlertRuleQueryEntityDetails"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        internal AlertRuleQueryEntityDetails(global::System.Collections.IDictionary content)
        {
            bool returnNow = false;
            BeforeDeserializeDictionary(content, ref returnNow);
            if (returnNow)
            {
                return;
            }
            // actually deserialize
            if (content.Contains("Creator"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).Creator = (Commvault.Powershell.Models.IAlertRuleQueryCreator) content.GetValueForProperty("Creator",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).Creator, Commvault.Powershell.Models.AlertRuleQueryCreatorTypeConverter.ConvertFrom);
            }
            if (content.Contains("AdditionalQueryDetails"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).AdditionalQueryDetails = (Commvault.Powershell.Models.IAlertRuleAdditionalQueryDetails) content.GetValueForProperty("AdditionalQueryDetails",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).AdditionalQueryDetails, Commvault.Powershell.Models.AlertRuleAdditionalQueryDetailsTypeConverter.ConvertFrom);
            }
            if (content.Contains("QueryEntity"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryEntity = (Commvault.Powershell.Models.IAlertRuleQueryEntity) content.GetValueForProperty("QueryEntity",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryEntity, Commvault.Powershell.Models.AlertRuleQueryEntityTypeConverter.ConvertFrom);
            }
            if (content.Contains("SecurityAssociations"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).SecurityAssociations = (Commvault.Powershell.Models.IAlertRuleSecurityAssociations) content.GetValueForProperty("SecurityAssociations",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).SecurityAssociations, Commvault.Powershell.Models.AlertRuleSecurityAssociationsTypeConverter.ConvertFrom);
            }
            if (content.Contains("IsQueryModifyEnabled"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsQueryModifyEnabled = (bool?) content.GetValueForProperty("IsQueryModifyEnabled",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsQueryModifyEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("Visibility"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).Visibility = (long?) content.GetValueForProperty("Visibility",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).Visibility, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("SqlQuery"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).SqlQuery = (string) content.GetValueForProperty("SqlQuery",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).SqlQuery, global::System.Convert.ToString);
            }
            if (content.Contains("DoesQuerySupportOutputFilter"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).DoesQuerySupportOutputFilter = (bool?) content.GetValueForProperty("DoesQuerySupportOutputFilter",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).DoesQuerySupportOutputFilter, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("Frequency"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).Frequency = (long?) content.GetValueForProperty("Frequency",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).Frequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("IsOverwriteAssociationAtAlertAllowed"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsOverwriteAssociationAtAlertAllowed = (bool?) content.GetValueForProperty("IsOverwriteAssociationAtAlertAllowed",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsOverwriteAssociationAtAlertAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("IsSystemCreated"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsSystemCreated = (bool?) content.GetValueForProperty("IsSystemCreated",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsSystemCreated, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("IsPrimaryKeyPresent"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsPrimaryKeyPresent = (bool?) content.GetValueForProperty("IsPrimaryKeyPresent",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsPrimaryKeyPresent, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("IsDisabled"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsDisabled = (bool?) content.GetValueForProperty("IsDisabled",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("QueryDescription"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryDescription = (string) content.GetValueForProperty("QueryDescription",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryDescription, global::System.Convert.ToString);
            }
            if (content.Contains("QueryCriteriaName"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryCriteriaName = (string) content.GetValueForProperty("QueryCriteriaName",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryCriteriaName, global::System.Convert.ToString);
            }
            if (content.Contains("CustomAlertType"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).CustomAlertType = (long?) content.GetValueForProperty("CustomAlertType",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).CustomAlertType, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("QueryOutputColumns"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryOutputColumns = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertRuleQueryOutputColumnObject>) content.GetValueForProperty("QueryOutputColumns",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryOutputColumns, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertRuleQueryOutputColumnObject>(__y, Commvault.Powershell.Models.AlertRuleQueryOutputColumnObjectTypeConverter.ConvertFrom));
            }
            if (content.Contains("CreatorUserName"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).CreatorUserName = (string) content.GetValueForProperty("CreatorUserName",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).CreatorUserName, global::System.Convert.ToString);
            }
            if (content.Contains("CreatorUserId"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).CreatorUserId = (long?) content.GetValueForProperty("CreatorUserId",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).CreatorUserId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("AdditionalQueryDetailScriptDescription"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).AdditionalQueryDetailScriptDescription = (Commvault.Powershell.Models.IScriptDescriptionDetails) content.GetValueForProperty("AdditionalQueryDetailScriptDescription",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).AdditionalQueryDetailScriptDescription, Commvault.Powershell.Models.ScriptDescriptionDetailsTypeConverter.ConvertFrom);
            }
            if (content.Contains("AdditionalQueryDetailQuerySeverity"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).AdditionalQueryDetailQuerySeverity = (string) content.GetValueForProperty("AdditionalQueryDetailQuerySeverity",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).AdditionalQueryDetailQuerySeverity, global::System.Convert.ToString);
            }
            if (content.Contains("QueryEntityQueryId"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryEntityQueryId = (long?) content.GetValueForProperty("QueryEntityQueryId",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryEntityQueryId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("QueryEntityQueryName"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryEntityQueryName = (string) content.GetValueForProperty("QueryEntityQueryName",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryEntityQueryName, global::System.Convert.ToString);
            }
            if (content.Contains("SecurityAssociationAssociations"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).SecurityAssociationAssociations = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertRuleAssociationsObject>) content.GetValueForProperty("SecurityAssociationAssociations",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).SecurityAssociationAssociations, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertRuleAssociationsObject>(__y, Commvault.Powershell.Models.AlertRuleAssociationsObjectTypeConverter.ConvertFrom));
            }
            if (content.Contains("ScriptDescriptionReportName"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).ScriptDescriptionReportName = (string) content.GetValueForProperty("ScriptDescriptionReportName",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).ScriptDescriptionReportName, global::System.Convert.ToString);
            }
            if (content.Contains("ScriptDescription"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).ScriptDescription = (string) content.GetValueForProperty("ScriptDescription",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).ScriptDescription, global::System.Convert.ToString);
            }
            if (content.Contains("ScriptDescriptionGuid"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).ScriptDescriptionGuid = (string) content.GetValueForProperty("ScriptDescriptionGuid",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).ScriptDescriptionGuid, 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.AlertRuleQueryEntityDetails"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
        internal AlertRuleQueryEntityDetails(global::System.Management.Automation.PSObject content)
        {
            bool returnNow = false;
            BeforeDeserializePSObject(content, ref returnNow);
            if (returnNow)
            {
                return;
            }
            // actually deserialize
            if (content.Contains("Creator"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).Creator = (Commvault.Powershell.Models.IAlertRuleQueryCreator) content.GetValueForProperty("Creator",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).Creator, Commvault.Powershell.Models.AlertRuleQueryCreatorTypeConverter.ConvertFrom);
            }
            if (content.Contains("AdditionalQueryDetails"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).AdditionalQueryDetails = (Commvault.Powershell.Models.IAlertRuleAdditionalQueryDetails) content.GetValueForProperty("AdditionalQueryDetails",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).AdditionalQueryDetails, Commvault.Powershell.Models.AlertRuleAdditionalQueryDetailsTypeConverter.ConvertFrom);
            }
            if (content.Contains("QueryEntity"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryEntity = (Commvault.Powershell.Models.IAlertRuleQueryEntity) content.GetValueForProperty("QueryEntity",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryEntity, Commvault.Powershell.Models.AlertRuleQueryEntityTypeConverter.ConvertFrom);
            }
            if (content.Contains("SecurityAssociations"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).SecurityAssociations = (Commvault.Powershell.Models.IAlertRuleSecurityAssociations) content.GetValueForProperty("SecurityAssociations",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).SecurityAssociations, Commvault.Powershell.Models.AlertRuleSecurityAssociationsTypeConverter.ConvertFrom);
            }
            if (content.Contains("IsQueryModifyEnabled"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsQueryModifyEnabled = (bool?) content.GetValueForProperty("IsQueryModifyEnabled",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsQueryModifyEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("Visibility"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).Visibility = (long?) content.GetValueForProperty("Visibility",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).Visibility, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("SqlQuery"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).SqlQuery = (string) content.GetValueForProperty("SqlQuery",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).SqlQuery, global::System.Convert.ToString);
            }
            if (content.Contains("DoesQuerySupportOutputFilter"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).DoesQuerySupportOutputFilter = (bool?) content.GetValueForProperty("DoesQuerySupportOutputFilter",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).DoesQuerySupportOutputFilter, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("Frequency"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).Frequency = (long?) content.GetValueForProperty("Frequency",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).Frequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("IsOverwriteAssociationAtAlertAllowed"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsOverwriteAssociationAtAlertAllowed = (bool?) content.GetValueForProperty("IsOverwriteAssociationAtAlertAllowed",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsOverwriteAssociationAtAlertAllowed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("IsSystemCreated"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsSystemCreated = (bool?) content.GetValueForProperty("IsSystemCreated",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsSystemCreated, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("IsPrimaryKeyPresent"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsPrimaryKeyPresent = (bool?) content.GetValueForProperty("IsPrimaryKeyPresent",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsPrimaryKeyPresent, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("IsDisabled"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsDisabled = (bool?) content.GetValueForProperty("IsDisabled",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).IsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            }
            if (content.Contains("QueryDescription"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryDescription = (string) content.GetValueForProperty("QueryDescription",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryDescription, global::System.Convert.ToString);
            }
            if (content.Contains("QueryCriteriaName"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryCriteriaName = (string) content.GetValueForProperty("QueryCriteriaName",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryCriteriaName, global::System.Convert.ToString);
            }
            if (content.Contains("CustomAlertType"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).CustomAlertType = (long?) content.GetValueForProperty("CustomAlertType",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).CustomAlertType, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("QueryOutputColumns"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryOutputColumns = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertRuleQueryOutputColumnObject>) content.GetValueForProperty("QueryOutputColumns",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryOutputColumns, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertRuleQueryOutputColumnObject>(__y, Commvault.Powershell.Models.AlertRuleQueryOutputColumnObjectTypeConverter.ConvertFrom));
            }
            if (content.Contains("CreatorUserName"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).CreatorUserName = (string) content.GetValueForProperty("CreatorUserName",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).CreatorUserName, global::System.Convert.ToString);
            }
            if (content.Contains("CreatorUserId"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).CreatorUserId = (long?) content.GetValueForProperty("CreatorUserId",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).CreatorUserId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("AdditionalQueryDetailScriptDescription"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).AdditionalQueryDetailScriptDescription = (Commvault.Powershell.Models.IScriptDescriptionDetails) content.GetValueForProperty("AdditionalQueryDetailScriptDescription",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).AdditionalQueryDetailScriptDescription, Commvault.Powershell.Models.ScriptDescriptionDetailsTypeConverter.ConvertFrom);
            }
            if (content.Contains("AdditionalQueryDetailQuerySeverity"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).AdditionalQueryDetailQuerySeverity = (string) content.GetValueForProperty("AdditionalQueryDetailQuerySeverity",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).AdditionalQueryDetailQuerySeverity, global::System.Convert.ToString);
            }
            if (content.Contains("QueryEntityQueryId"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryEntityQueryId = (long?) content.GetValueForProperty("QueryEntityQueryId",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryEntityQueryId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            }
            if (content.Contains("QueryEntityQueryName"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryEntityQueryName = (string) content.GetValueForProperty("QueryEntityQueryName",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).QueryEntityQueryName, global::System.Convert.ToString);
            }
            if (content.Contains("SecurityAssociationAssociations"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).SecurityAssociationAssociations = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertRuleAssociationsObject>) content.GetValueForProperty("SecurityAssociationAssociations",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).SecurityAssociationAssociations, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertRuleAssociationsObject>(__y, Commvault.Powershell.Models.AlertRuleAssociationsObjectTypeConverter.ConvertFrom));
            }
            if (content.Contains("ScriptDescriptionReportName"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).ScriptDescriptionReportName = (string) content.GetValueForProperty("ScriptDescriptionReportName",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).ScriptDescriptionReportName, global::System.Convert.ToString);
            }
            if (content.Contains("ScriptDescription"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).ScriptDescription = (string) content.GetValueForProperty("ScriptDescription",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).ScriptDescription, global::System.Convert.ToString);
            }
            if (content.Contains("ScriptDescriptionGuid"))
            {
                ((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).ScriptDescriptionGuid = (string) content.GetValueForProperty("ScriptDescriptionGuid",((Commvault.Powershell.Models.IAlertRuleQueryEntityDetailsInternal)this).ScriptDescriptionGuid, global::System.Convert.ToString);
            }
            AfterDeserializePSObject(content);
        }

        /// <summary>
        /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into an instance of <see cref="Commvault.Powershell.Models.AlertRuleQueryEntityDetails"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        /// <returns>
        /// an instance of <see cref="Commvault.Powershell.Models.IAlertRuleQueryEntityDetails" />.
        /// </returns>
        public static Commvault.Powershell.Models.IAlertRuleQueryEntityDetails DeserializeFromDictionary(global::System.Collections.IDictionary content)
        {
            return new AlertRuleQueryEntityDetails(content);
        }

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

        /// <summary>
        /// Creates a new instance of <see cref="AlertRuleQueryEntityDetails" />, 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="AlertRuleQueryEntityDetails" /> model class.</returns>
        public static Commvault.Powershell.Models.IAlertRuleQueryEntityDetails FromJsonString(string jsonText) => FromJson(Commvault.Powershell.Runtime.Json.JsonNode.Parse(jsonText));

        /// <summary>Serializes this instance to a json string.</summary>

        /// <returns>a <see cref="System.String" /> containing this model serialized to JSON text.</returns>
        public string ToJsonString() => ToJson(null, Commvault.Powershell.Runtime.SerializationMode.IncludeAll)?.ToString();

        public override string ToString()
        {
            var returnNow = false;
            var result = global::System.String.Empty;
            OverrideToString(ref result, ref returnNow);
            if (returnNow)
            {
                return result;
            }
            return ToJsonString();
        }
    }
    /// query entity object
    [System.ComponentModel.TypeConverter(typeof(AlertRuleQueryEntityDetailsTypeConverter))]
    public partial interface IAlertRuleQueryEntityDetails

    {

    }
}