generated/api/Models/PlanSchedule.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>Used to describe single plan schedule information</summary>
    [System.ComponentModel.TypeConverter(typeof(PlanScheduleTypeConverter))]
    public partial class PlanSchedule
    {

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

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

        /// <summary>
        /// Creates a new instance of <see cref="PlanSchedule" />, 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.IPlanSchedule 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.PlanSchedule"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
        internal PlanSchedule(global::System.Collections.IDictionary content)
        {
            bool returnNow = false;
            BeforeDeserializeDictionary(content, ref returnNow);
            if (returnNow)
            {
                return;
            }
            // actually deserialize
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePattern = (Commvault.Powershell.Models.ISchedulePattern) content.GetValueForProperty("SchedulePattern",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePattern, Commvault.Powershell.Models.SchedulePatternTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOption = (Commvault.Powershell.Models.IScheduleOption) content.GetValueForProperty("ScheduleOption",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOption, Commvault.Powershell.Models.ScheduleOptionTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleId = (long?) content.GetValueForProperty("ScheduleId",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleName = (string) content.GetValueForProperty("ScheduleName",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).PolicyId = (long?) content.GetValueForProperty("PolicyId",((Commvault.Powershell.Models.IPlanScheduleInternal)this).PolicyId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOperation = (string) content.GetValueForProperty("ScheduleOperation",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOperation, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).VMOperationType = (string) content.GetValueForProperty("VMOperationType",((Commvault.Powershell.Models.IPlanScheduleInternal)this).VMOperationType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).BackupType = (string) content.GetValueForProperty("BackupType",((Commvault.Powershell.Models.IPlanScheduleInternal)this).BackupType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ForDatabasesOnly = (bool?) content.GetValueForProperty("ForDatabasesOnly",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ForDatabasesOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).IsRetentionBasedSyntheticFull = (bool?) content.GetValueForProperty("IsRetentionBasedSyntheticFull",((Commvault.Powershell.Models.IPlanScheduleInternal)this).IsRetentionBasedSyntheticFull, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternFrequency = (long?) content.GetValueForProperty("SchedulePatternFrequency",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternFrequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternWeeklyDays = (string[]) content.GetValueForProperty("SchedulePatternWeeklyDays",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternWeeklyDays, __y => TypeConverterExtensions.SelectToArray<string>(__y, global::System.Convert.ToString));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternStartTime = (long?) content.GetValueForProperty("SchedulePatternStartTime",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternStartTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternStartDate = (long?) content.GetValueForProperty("SchedulePatternStartDate",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternStartDate, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternEndDate = (long?) content.GetValueForProperty("SchedulePatternEndDate",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternEndDate, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternExceptions = (Commvault.Powershell.Models.IScheduleRunException[]) content.GetValueForProperty("SchedulePatternExceptions",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternExceptions, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IScheduleRunException>(__y, Commvault.Powershell.Models.ScheduleRunExceptionTypeConverter.ConvertFrom));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternTimezone = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("SchedulePatternTimezone",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternTimezone, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternScheduleFrequencyType = (string) content.GetValueForProperty("SchedulePatternScheduleFrequencyType",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternScheduleFrequencyType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternDayOfMonth = (long?) content.GetValueForProperty("SchedulePatternDayOfMonth",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternDayOfMonth, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternWeekOfMonth = (string) content.GetValueForProperty("SchedulePatternWeekOfMonth",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternWeekOfMonth, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternDayOfWeek = (string) content.GetValueForProperty("SchedulePatternDayOfWeek",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternDayOfWeek, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternMonthOfYear = (string) content.GetValueForProperty("SchedulePatternMonthOfYear",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternMonthOfYear, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternRepeatIntervalInMinutes = (long?) content.GetValueForProperty("SchedulePatternRepeatIntervalInMinutes",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternRepeatIntervalInMinutes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternRepeatUntilTime = (long?) content.GetValueForProperty("SchedulePatternRepeatUntilTime",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternRepeatUntilTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternNoOfTimes = (long?) content.GetValueForProperty("SchedulePatternNoOfTimes",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternNoOfTimes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternDaysBetweenSyntheticFulls = (long?) content.GetValueForProperty("SchedulePatternDaysBetweenSyntheticFulls",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternDaysBetweenSyntheticFulls, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternMaxBackupIntervalInMins = (long?) content.GetValueForProperty("SchedulePatternMaxBackupIntervalInMins",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternMaxBackupIntervalInMins, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionUseDiskCacheForLogBackups = (bool?) content.GetValueForProperty("ScheduleOptionUseDiskCacheForLogBackups",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionUseDiskCacheForLogBackups, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionCommitFrequencyInHours = (long?) content.GetValueForProperty("ScheduleOptionCommitFrequencyInHours",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionCommitFrequencyInHours, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionDaysBetweenAutoConvert = (long?) content.GetValueForProperty("ScheduleOptionDaysBetweenAutoConvert",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionDaysBetweenAutoConvert, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionO365ItemSelectionOption = (string) content.GetValueForProperty("ScheduleOptionO365ItemSelectionOption",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionO365ItemSelectionOption, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionJobRunningTimeInMins = (long?) content.GetValueForProperty("ScheduleOptionJobRunningTimeInMins",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionJobRunningTimeInMins, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionMinBackupIntervalInMins = (long?) content.GetValueForProperty("ScheduleOptionMinBackupIntervalInMins",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionMinBackupIntervalInMins, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionLogFilesThreshold = (long?) content.GetValueForProperty("ScheduleOptionLogFilesThreshold",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionLogFilesThreshold, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionLogsDiskUtilizationPercent = (long?) content.GetValueForProperty("ScheduleOptionLogsDiskUtilizationPercent",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionLogsDiskUtilizationPercent, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).TimezoneId = (long?) content.GetValueForProperty("TimezoneId",((Commvault.Powershell.Models.IPlanScheduleInternal)this).TimezoneId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).TimezoneName = (string) content.GetValueForProperty("TimezoneName",((Commvault.Powershell.Models.IPlanScheduleInternal)this).TimezoneName, 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.PlanSchedule"
        /// />.
        /// </summary>
        /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
        internal PlanSchedule(global::System.Management.Automation.PSObject content)
        {
            bool returnNow = false;
            BeforeDeserializePSObject(content, ref returnNow);
            if (returnNow)
            {
                return;
            }
            // actually deserialize
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePattern = (Commvault.Powershell.Models.ISchedulePattern) content.GetValueForProperty("SchedulePattern",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePattern, Commvault.Powershell.Models.SchedulePatternTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOption = (Commvault.Powershell.Models.IScheduleOption) content.GetValueForProperty("ScheduleOption",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOption, Commvault.Powershell.Models.ScheduleOptionTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleId = (long?) content.GetValueForProperty("ScheduleId",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleName = (string) content.GetValueForProperty("ScheduleName",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleName, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).PolicyId = (long?) content.GetValueForProperty("PolicyId",((Commvault.Powershell.Models.IPlanScheduleInternal)this).PolicyId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOperation = (string) content.GetValueForProperty("ScheduleOperation",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOperation, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).VMOperationType = (string) content.GetValueForProperty("VMOperationType",((Commvault.Powershell.Models.IPlanScheduleInternal)this).VMOperationType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).BackupType = (string) content.GetValueForProperty("BackupType",((Commvault.Powershell.Models.IPlanScheduleInternal)this).BackupType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ForDatabasesOnly = (bool?) content.GetValueForProperty("ForDatabasesOnly",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ForDatabasesOnly, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).IsRetentionBasedSyntheticFull = (bool?) content.GetValueForProperty("IsRetentionBasedSyntheticFull",((Commvault.Powershell.Models.IPlanScheduleInternal)this).IsRetentionBasedSyntheticFull, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternFrequency = (long?) content.GetValueForProperty("SchedulePatternFrequency",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternFrequency, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternWeeklyDays = (string[]) content.GetValueForProperty("SchedulePatternWeeklyDays",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternWeeklyDays, __y => TypeConverterExtensions.SelectToArray<string>(__y, global::System.Convert.ToString));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternStartTime = (long?) content.GetValueForProperty("SchedulePatternStartTime",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternStartTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternStartDate = (long?) content.GetValueForProperty("SchedulePatternStartDate",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternStartDate, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternEndDate = (long?) content.GetValueForProperty("SchedulePatternEndDate",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternEndDate, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternExceptions = (Commvault.Powershell.Models.IScheduleRunException[]) content.GetValueForProperty("SchedulePatternExceptions",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternExceptions, __y => TypeConverterExtensions.SelectToArray<Commvault.Powershell.Models.IScheduleRunException>(__y, Commvault.Powershell.Models.ScheduleRunExceptionTypeConverter.ConvertFrom));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternTimezone = (Commvault.Powershell.Models.IIdName) content.GetValueForProperty("SchedulePatternTimezone",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternTimezone, Commvault.Powershell.Models.IdNameTypeConverter.ConvertFrom);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternScheduleFrequencyType = (string) content.GetValueForProperty("SchedulePatternScheduleFrequencyType",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternScheduleFrequencyType, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternDayOfMonth = (long?) content.GetValueForProperty("SchedulePatternDayOfMonth",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternDayOfMonth, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternWeekOfMonth = (string) content.GetValueForProperty("SchedulePatternWeekOfMonth",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternWeekOfMonth, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternDayOfWeek = (string) content.GetValueForProperty("SchedulePatternDayOfWeek",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternDayOfWeek, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternMonthOfYear = (string) content.GetValueForProperty("SchedulePatternMonthOfYear",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternMonthOfYear, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternRepeatIntervalInMinutes = (long?) content.GetValueForProperty("SchedulePatternRepeatIntervalInMinutes",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternRepeatIntervalInMinutes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternRepeatUntilTime = (long?) content.GetValueForProperty("SchedulePatternRepeatUntilTime",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternRepeatUntilTime, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternNoOfTimes = (long?) content.GetValueForProperty("SchedulePatternNoOfTimes",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternNoOfTimes, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternDaysBetweenSyntheticFulls = (long?) content.GetValueForProperty("SchedulePatternDaysBetweenSyntheticFulls",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternDaysBetweenSyntheticFulls, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternMaxBackupIntervalInMins = (long?) content.GetValueForProperty("SchedulePatternMaxBackupIntervalInMins",((Commvault.Powershell.Models.IPlanScheduleInternal)this).SchedulePatternMaxBackupIntervalInMins, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionUseDiskCacheForLogBackups = (bool?) content.GetValueForProperty("ScheduleOptionUseDiskCacheForLogBackups",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionUseDiskCacheForLogBackups, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionCommitFrequencyInHours = (long?) content.GetValueForProperty("ScheduleOptionCommitFrequencyInHours",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionCommitFrequencyInHours, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionDaysBetweenAutoConvert = (long?) content.GetValueForProperty("ScheduleOptionDaysBetweenAutoConvert",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionDaysBetweenAutoConvert, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionO365ItemSelectionOption = (string) content.GetValueForProperty("ScheduleOptionO365ItemSelectionOption",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionO365ItemSelectionOption, global::System.Convert.ToString);
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionJobRunningTimeInMins = (long?) content.GetValueForProperty("ScheduleOptionJobRunningTimeInMins",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionJobRunningTimeInMins, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionMinBackupIntervalInMins = (long?) content.GetValueForProperty("ScheduleOptionMinBackupIntervalInMins",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionMinBackupIntervalInMins, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionLogFilesThreshold = (long?) content.GetValueForProperty("ScheduleOptionLogFilesThreshold",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionLogFilesThreshold, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionLogsDiskUtilizationPercent = (long?) content.GetValueForProperty("ScheduleOptionLogsDiskUtilizationPercent",((Commvault.Powershell.Models.IPlanScheduleInternal)this).ScheduleOptionLogsDiskUtilizationPercent, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).TimezoneId = (long?) content.GetValueForProperty("TimezoneId",((Commvault.Powershell.Models.IPlanScheduleInternal)this).TimezoneId, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long)));
            ((Commvault.Powershell.Models.IPlanScheduleInternal)this).TimezoneName = (string) content.GetValueForProperty("TimezoneName",((Commvault.Powershell.Models.IPlanScheduleInternal)this).TimezoneName, 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();
    }
    /// Used to describe single plan schedule information
    [System.ComponentModel.TypeConverter(typeof(PlanScheduleTypeConverter))]
    public partial interface IPlanSchedule

    {

    }
}