generated/api/Models/AlertDefinitionsEdit.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>AlertDefinitionsEdit</summary> [System.ComponentModel.TypeConverter(typeof(AlertDefinitionsEditTypeConverter))] public partial class AlertDefinitionsEdit { /// <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.AlertDefinitionsEdit" /// />. /// </summary> /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param> internal AlertDefinitionsEdit(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); if (returnNow) { return; } // actually deserialize if (content.Contains("AlertTarget")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTarget = (Commvault.Powershell.Models.IAlertDefinitionsTarget) content.GetValueForProperty("AlertTarget",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTarget, Commvault.Powershell.Models.AlertDefinitionsTargetTypeConverter.ConvertFrom); } if (content.Contains("Templates")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).Templates = (Commvault.Powershell.Models.IAlertDefinitionsTemplate) content.GetValueForProperty("Templates",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).Templates, Commvault.Powershell.Models.AlertDefinitionsTemplateTypeConverter.ConvertFrom); } if (content.Contains("Tokens")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).Tokens = (Commvault.Powershell.Models.ITokenRuleGroups) content.GetValueForProperty("Tokens",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).Tokens, Commvault.Powershell.Models.TokenRuleGroupsTypeConverter.ConvertFrom); } if (content.Contains("EventCriteriaDetails")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriteriaDetails = (Commvault.Powershell.Models.IEventCriteriaDetails) content.GetValueForProperty("EventCriteriaDetails",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriteriaDetails, Commvault.Powershell.Models.EventCriteriaDetailsTypeConverter.ConvertFrom); } if (content.Contains("GlobalConfigInfo")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfo = (Commvault.Powershell.Models.IGlobalConfigInfo) content.GetValueForProperty("GlobalConfigInfo",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfo, Commvault.Powershell.Models.GlobalConfigInfoTypeConverter.ConvertFrom); } if (content.Contains("NewName")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).NewName = (string) content.GetValueForProperty("NewName",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).NewName, global::System.Convert.ToString); } if (content.Contains("CriteriaList")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).CriteriaList = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertCriteriaIdName1>) content.GetValueForProperty("CriteriaList",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).CriteriaList, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertCriteriaIdName1>(__y, Commvault.Powershell.Models.AlertCriteriaIdName1TypeConverter.ConvertFrom)); } if (content.Contains("SendIndividualNotifications")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).SendIndividualNotifications = (bool?) content.GetValueForProperty("SendIndividualNotifications",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).SendIndividualNotifications, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("SubscriptionBasedAlert")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).SubscriptionBasedAlert = (bool?) content.GetValueForProperty("SubscriptionBasedAlert",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).SubscriptionBasedAlert, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ProcessDiscoveredVMS")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).ProcessDiscoveredVMS = (bool?) content.GetValueForProperty("ProcessDiscoveredVMS",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).ProcessDiscoveredVMS, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("AssociationsOperationType")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AssociationsOperationType = (string) content.GetValueForProperty("AssociationsOperationType",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AssociationsOperationType, global::System.Convert.ToString); } if (content.Contains("Associations")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).Associations = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertAssociationIdNameType1>) content.GetValueForProperty("Associations",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).Associations, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertAssociationIdNameType1>(__y, Commvault.Powershell.Models.AlertAssociationIdNameType1TypeConverter.ConvertFrom)); } if (content.Contains("EventCriterionDetailCriteriaName")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriterionDetailCriteriaName = (string) content.GetValueForProperty("EventCriterionDetailCriteriaName",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriterionDetailCriteriaName, global::System.Convert.ToString); } if (content.Contains("EventCriterionDetailConditions")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriterionDetailConditions = (System.Collections.Generic.List<Commvault.Powershell.Models.IConditionDetails>) content.GetValueForProperty("EventCriterionDetailConditions",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriterionDetailConditions, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IConditionDetails>(__y, Commvault.Powershell.Models.ConditionDetailsTypeConverter.ConvertFrom)); } if (content.Contains("GlobalConfigInfoId")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoId = (string) content.GetValueForProperty("GlobalConfigInfoId",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoId, global::System.Convert.ToString); } if (content.Contains("GlobalConfigInfoName")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoName = (string) content.GetValueForProperty("GlobalConfigInfoName",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoName, global::System.Convert.ToString); } if (content.Contains("GlobalConfigInfoCommcells")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoCommcells = (System.Collections.Generic.List<Commvault.Powershell.Models.IGlobalConfigCommcellInfo>) content.GetValueForProperty("GlobalConfigInfoCommcells",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoCommcells, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IGlobalConfigCommcellInfo>(__y, Commvault.Powershell.Models.GlobalConfigCommcellInfoTypeConverter.ConvertFrom)); } if (content.Contains("GlobalConfigInfoScope")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoScope = (string) content.GetValueForProperty("GlobalConfigInfoScope",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoScope, global::System.Convert.ToString); } if (content.Contains("GlobalConfigInfoStatus")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoStatus = (string) content.GetValueForProperty("GlobalConfigInfoStatus",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoStatus, global::System.Convert.ToString); } if (content.Contains("AlertTargetRecipients")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTargetRecipients = (Commvault.Powershell.Models.IAlertDefinitionsTargetRecipients) content.GetValueForProperty("AlertTargetRecipients",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTargetRecipients, Commvault.Powershell.Models.AlertDefinitionsTargetRecipientsTypeConverter.ConvertFrom); } if (content.Contains("AlertTargetSendAlertTo")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTargetSendAlertTo = (System.Collections.Generic.List<string>) content.GetValueForProperty("AlertTargetSendAlertTo",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTargetSendAlertTo, __y => TypeConverterExtensions.SelectToList<string>(__y, global::System.Convert.ToString)); } if (content.Contains("AlertTargetRecipientsOperationType")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTargetRecipientsOperationType = (string) content.GetValueForProperty("AlertTargetRecipientsOperationType",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTargetRecipientsOperationType, global::System.Convert.ToString); } if (content.Contains("TemplateLocale")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateLocale = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("TemplateLocale",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateLocale, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("TemplateWorkflow")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateWorkflow = (Commvault.Powershell.Models.IWorkflowEntity) content.GetValueForProperty("TemplateWorkflow",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateWorkflow, Commvault.Powershell.Models.WorkflowEntityTypeConverter.ConvertFrom); } if (content.Contains("TemplateEmail")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateEmail = (string) content.GetValueForProperty("TemplateEmail",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateEmail, global::System.Convert.ToString); } if (content.Contains("TemplateConsole")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateConsole = (string) content.GetValueForProperty("TemplateConsole",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateConsole, global::System.Convert.ToString); } if (content.Contains("TemplateEventViewer")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateEventViewer = (string) content.GetValueForProperty("TemplateEventViewer",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateEventViewer, global::System.Convert.ToString); } if (content.Contains("TemplateWebhook")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateWebhook = (string) content.GetValueForProperty("TemplateWebhook",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateWebhook, global::System.Convert.ToString); } if (content.Contains("TemplateWorkflowInputDetails")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateWorkflowInputDetails = (string) content.GetValueForProperty("TemplateWorkflowInputDetails",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateWorkflowInputDetails, global::System.Convert.ToString); } if (content.Contains("TokenMatch")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TokenMatch = (string) content.GetValueForProperty("TokenMatch",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TokenMatch, global::System.Convert.ToString); } if (content.Contains("TokenRuleGroups")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TokenRuleGroups = (System.Collections.Generic.List<Commvault.Powershell.Models.ITokenRuleGroup>) content.GetValueForProperty("TokenRuleGroups",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TokenRuleGroups, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.ITokenRuleGroup>(__y, Commvault.Powershell.Models.TokenRuleGroupTypeConverter.ConvertFrom)); } if (content.Contains("EventCriterionDetailOpBetweenConditions")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriterionDetailOpBetweenConditions = (long?) content.GetValueForProperty("EventCriterionDetailOpBetweenConditions",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriterionDetailOpBetweenConditions, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("GlobalConfigInfoScopeFilterQuery")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoScopeFilterQuery = (string) content.GetValueForProperty("GlobalConfigInfoScopeFilterQuery",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoScopeFilterQuery, global::System.Convert.ToString); } if (content.Contains("GlobalConfigInfoApplyOnAllCommCells")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoApplyOnAllCommCells = (bool?) content.GetValueForProperty("GlobalConfigInfoApplyOnAllCommCells",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoApplyOnAllCommCells, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("GlobalConfigInfoIsMarkedForDeletion")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoIsMarkedForDeletion = (bool?) content.GetValueForProperty("GlobalConfigInfoIsMarkedForDeletion",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoIsMarkedForDeletion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("RecipientTo")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientTo = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertTargetIdNameType1>) content.GetValueForProperty("RecipientTo",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientTo, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertTargetIdNameType1>(__y, Commvault.Powershell.Models.AlertTargetIdNameType1TypeConverter.ConvertFrom)); } if (content.Contains("RecipientCc")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientCc = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertTargetIdNameType1>) content.GetValueForProperty("RecipientCc",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientCc, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertTargetIdNameType1>(__y, Commvault.Powershell.Models.AlertTargetIdNameType1TypeConverter.ConvertFrom)); } if (content.Contains("RecipientBcc")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientBcc = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertTargetIdNameType1>) content.GetValueForProperty("RecipientBcc",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientBcc, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertTargetIdNameType1>(__y, Commvault.Powershell.Models.AlertTargetIdNameType1TypeConverter.ConvertFrom)); } if (content.Contains("RecipientWebHookId")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientWebHookId = (long?) content.GetValueForProperty("RecipientWebHookId",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientWebHookId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("LocaleId")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).LocaleId = (long?) content.GetValueForProperty("LocaleId",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).LocaleId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("LocaleName")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).LocaleName = (string) content.GetValueForProperty("LocaleName",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).LocaleName, global::System.Convert.ToString); } if (content.Contains("WorkflowId")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowId = (long) content.GetValueForProperty("WorkflowId",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("WorkflowName")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowName = (string) content.GetValueForProperty("WorkflowName",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowName, global::System.Convert.ToString); } if (content.Contains("WorkflowClientId")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowClientId = (long) content.GetValueForProperty("WorkflowClientId",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowClientId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("WorkflowClientName")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowClientName = (string) content.GetValueForProperty("WorkflowClientName",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowClientName, 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.AlertDefinitionsEdit" /// />. /// </summary> /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param> internal AlertDefinitionsEdit(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); if (returnNow) { return; } // actually deserialize if (content.Contains("AlertTarget")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTarget = (Commvault.Powershell.Models.IAlertDefinitionsTarget) content.GetValueForProperty("AlertTarget",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTarget, Commvault.Powershell.Models.AlertDefinitionsTargetTypeConverter.ConvertFrom); } if (content.Contains("Templates")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).Templates = (Commvault.Powershell.Models.IAlertDefinitionsTemplate) content.GetValueForProperty("Templates",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).Templates, Commvault.Powershell.Models.AlertDefinitionsTemplateTypeConverter.ConvertFrom); } if (content.Contains("Tokens")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).Tokens = (Commvault.Powershell.Models.ITokenRuleGroups) content.GetValueForProperty("Tokens",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).Tokens, Commvault.Powershell.Models.TokenRuleGroupsTypeConverter.ConvertFrom); } if (content.Contains("EventCriteriaDetails")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriteriaDetails = (Commvault.Powershell.Models.IEventCriteriaDetails) content.GetValueForProperty("EventCriteriaDetails",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriteriaDetails, Commvault.Powershell.Models.EventCriteriaDetailsTypeConverter.ConvertFrom); } if (content.Contains("GlobalConfigInfo")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfo = (Commvault.Powershell.Models.IGlobalConfigInfo) content.GetValueForProperty("GlobalConfigInfo",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfo, Commvault.Powershell.Models.GlobalConfigInfoTypeConverter.ConvertFrom); } if (content.Contains("NewName")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).NewName = (string) content.GetValueForProperty("NewName",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).NewName, global::System.Convert.ToString); } if (content.Contains("CriteriaList")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).CriteriaList = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertCriteriaIdName1>) content.GetValueForProperty("CriteriaList",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).CriteriaList, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertCriteriaIdName1>(__y, Commvault.Powershell.Models.AlertCriteriaIdName1TypeConverter.ConvertFrom)); } if (content.Contains("SendIndividualNotifications")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).SendIndividualNotifications = (bool?) content.GetValueForProperty("SendIndividualNotifications",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).SendIndividualNotifications, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("SubscriptionBasedAlert")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).SubscriptionBasedAlert = (bool?) content.GetValueForProperty("SubscriptionBasedAlert",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).SubscriptionBasedAlert, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ProcessDiscoveredVMS")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).ProcessDiscoveredVMS = (bool?) content.GetValueForProperty("ProcessDiscoveredVMS",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).ProcessDiscoveredVMS, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("AssociationsOperationType")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AssociationsOperationType = (string) content.GetValueForProperty("AssociationsOperationType",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AssociationsOperationType, global::System.Convert.ToString); } if (content.Contains("Associations")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).Associations = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertAssociationIdNameType1>) content.GetValueForProperty("Associations",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).Associations, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertAssociationIdNameType1>(__y, Commvault.Powershell.Models.AlertAssociationIdNameType1TypeConverter.ConvertFrom)); } if (content.Contains("EventCriterionDetailCriteriaName")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriterionDetailCriteriaName = (string) content.GetValueForProperty("EventCriterionDetailCriteriaName",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriterionDetailCriteriaName, global::System.Convert.ToString); } if (content.Contains("EventCriterionDetailConditions")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriterionDetailConditions = (System.Collections.Generic.List<Commvault.Powershell.Models.IConditionDetails>) content.GetValueForProperty("EventCriterionDetailConditions",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriterionDetailConditions, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IConditionDetails>(__y, Commvault.Powershell.Models.ConditionDetailsTypeConverter.ConvertFrom)); } if (content.Contains("GlobalConfigInfoId")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoId = (string) content.GetValueForProperty("GlobalConfigInfoId",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoId, global::System.Convert.ToString); } if (content.Contains("GlobalConfigInfoName")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoName = (string) content.GetValueForProperty("GlobalConfigInfoName",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoName, global::System.Convert.ToString); } if (content.Contains("GlobalConfigInfoCommcells")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoCommcells = (System.Collections.Generic.List<Commvault.Powershell.Models.IGlobalConfigCommcellInfo>) content.GetValueForProperty("GlobalConfigInfoCommcells",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoCommcells, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IGlobalConfigCommcellInfo>(__y, Commvault.Powershell.Models.GlobalConfigCommcellInfoTypeConverter.ConvertFrom)); } if (content.Contains("GlobalConfigInfoScope")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoScope = (string) content.GetValueForProperty("GlobalConfigInfoScope",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoScope, global::System.Convert.ToString); } if (content.Contains("GlobalConfigInfoStatus")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoStatus = (string) content.GetValueForProperty("GlobalConfigInfoStatus",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoStatus, global::System.Convert.ToString); } if (content.Contains("AlertTargetRecipients")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTargetRecipients = (Commvault.Powershell.Models.IAlertDefinitionsTargetRecipients) content.GetValueForProperty("AlertTargetRecipients",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTargetRecipients, Commvault.Powershell.Models.AlertDefinitionsTargetRecipientsTypeConverter.ConvertFrom); } if (content.Contains("AlertTargetSendAlertTo")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTargetSendAlertTo = (System.Collections.Generic.List<string>) content.GetValueForProperty("AlertTargetSendAlertTo",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTargetSendAlertTo, __y => TypeConverterExtensions.SelectToList<string>(__y, global::System.Convert.ToString)); } if (content.Contains("AlertTargetRecipientsOperationType")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTargetRecipientsOperationType = (string) content.GetValueForProperty("AlertTargetRecipientsOperationType",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).AlertTargetRecipientsOperationType, global::System.Convert.ToString); } if (content.Contains("TemplateLocale")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateLocale = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("TemplateLocale",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateLocale, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom); } if (content.Contains("TemplateWorkflow")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateWorkflow = (Commvault.Powershell.Models.IWorkflowEntity) content.GetValueForProperty("TemplateWorkflow",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateWorkflow, Commvault.Powershell.Models.WorkflowEntityTypeConverter.ConvertFrom); } if (content.Contains("TemplateEmail")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateEmail = (string) content.GetValueForProperty("TemplateEmail",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateEmail, global::System.Convert.ToString); } if (content.Contains("TemplateConsole")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateConsole = (string) content.GetValueForProperty("TemplateConsole",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateConsole, global::System.Convert.ToString); } if (content.Contains("TemplateEventViewer")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateEventViewer = (string) content.GetValueForProperty("TemplateEventViewer",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateEventViewer, global::System.Convert.ToString); } if (content.Contains("TemplateWebhook")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateWebhook = (string) content.GetValueForProperty("TemplateWebhook",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateWebhook, global::System.Convert.ToString); } if (content.Contains("TemplateWorkflowInputDetails")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateWorkflowInputDetails = (string) content.GetValueForProperty("TemplateWorkflowInputDetails",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TemplateWorkflowInputDetails, global::System.Convert.ToString); } if (content.Contains("TokenMatch")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TokenMatch = (string) content.GetValueForProperty("TokenMatch",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TokenMatch, global::System.Convert.ToString); } if (content.Contains("TokenRuleGroups")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TokenRuleGroups = (System.Collections.Generic.List<Commvault.Powershell.Models.ITokenRuleGroup>) content.GetValueForProperty("TokenRuleGroups",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).TokenRuleGroups, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.ITokenRuleGroup>(__y, Commvault.Powershell.Models.TokenRuleGroupTypeConverter.ConvertFrom)); } if (content.Contains("EventCriterionDetailOpBetweenConditions")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriterionDetailOpBetweenConditions = (long?) content.GetValueForProperty("EventCriterionDetailOpBetweenConditions",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).EventCriterionDetailOpBetweenConditions, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("GlobalConfigInfoScopeFilterQuery")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoScopeFilterQuery = (string) content.GetValueForProperty("GlobalConfigInfoScopeFilterQuery",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoScopeFilterQuery, global::System.Convert.ToString); } if (content.Contains("GlobalConfigInfoApplyOnAllCommCells")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoApplyOnAllCommCells = (bool?) content.GetValueForProperty("GlobalConfigInfoApplyOnAllCommCells",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoApplyOnAllCommCells, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("GlobalConfigInfoIsMarkedForDeletion")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoIsMarkedForDeletion = (bool?) content.GetValueForProperty("GlobalConfigInfoIsMarkedForDeletion",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).GlobalConfigInfoIsMarkedForDeletion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("RecipientTo")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientTo = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertTargetIdNameType1>) content.GetValueForProperty("RecipientTo",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientTo, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertTargetIdNameType1>(__y, Commvault.Powershell.Models.AlertTargetIdNameType1TypeConverter.ConvertFrom)); } if (content.Contains("RecipientCc")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientCc = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertTargetIdNameType1>) content.GetValueForProperty("RecipientCc",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientCc, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertTargetIdNameType1>(__y, Commvault.Powershell.Models.AlertTargetIdNameType1TypeConverter.ConvertFrom)); } if (content.Contains("RecipientBcc")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientBcc = (System.Collections.Generic.List<Commvault.Powershell.Models.IAlertTargetIdNameType1>) content.GetValueForProperty("RecipientBcc",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientBcc, __y => TypeConverterExtensions.SelectToList<Commvault.Powershell.Models.IAlertTargetIdNameType1>(__y, Commvault.Powershell.Models.AlertTargetIdNameType1TypeConverter.ConvertFrom)); } if (content.Contains("RecipientWebHookId")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientWebHookId = (long?) content.GetValueForProperty("RecipientWebHookId",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).RecipientWebHookId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("LocaleId")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).LocaleId = (long?) content.GetValueForProperty("LocaleId",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).LocaleId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("LocaleName")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).LocaleName = (string) content.GetValueForProperty("LocaleName",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).LocaleName, global::System.Convert.ToString); } if (content.Contains("WorkflowId")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowId = (long) content.GetValueForProperty("WorkflowId",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("WorkflowName")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowName = (string) content.GetValueForProperty("WorkflowName",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowName, global::System.Convert.ToString); } if (content.Contains("WorkflowClientId")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowClientId = (long) content.GetValueForProperty("WorkflowClientId",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowClientId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); } if (content.Contains("WorkflowClientName")) { ((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowClientName = (string) content.GetValueForProperty("WorkflowClientName",((Commvault.Powershell.Models.IAlertDefinitionsEditInternal)this).WorkflowClientName, global::System.Convert.ToString); } AfterDeserializePSObject(content); } /// <summary> /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into an instance of <see cref="Commvault.Powershell.Models.AlertDefinitionsEdit" /// />. /// </summary> /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param> /// <returns> /// an instance of <see cref="Commvault.Powershell.Models.IAlertDefinitionsEdit" />. /// </returns> public static Commvault.Powershell.Models.IAlertDefinitionsEdit DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AlertDefinitionsEdit(content); } /// <summary> /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into an instance of <see cref="Commvault.Powershell.Models.AlertDefinitionsEdit" /// />. /// </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.IAlertDefinitionsEdit" />. /// </returns> public static Commvault.Powershell.Models.IAlertDefinitionsEdit DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AlertDefinitionsEdit(content); } /// <summary> /// Creates a new instance of <see cref="AlertDefinitionsEdit" />, 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="AlertDefinitionsEdit" /> model class.</returns> public static Commvault.Powershell.Models.IAlertDefinitionsEdit 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(); } } /// AlertDefinitionsEdit [System.ComponentModel.TypeConverter(typeof(AlertDefinitionsEditTypeConverter))] public partial interface IAlertDefinitionsEdit { } } |