generated/cmdlets/NewCVServerPlan_CreateExpanded.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.Cmdlets
{
    using static Commvault.Powershell.Runtime.Extensions;

    /// <summary>Create a Server Plan</summary>
    /// <remarks>
    /// [OpenAPI] CreateServerPlan=>POST:"/V4/ServerPlan"
    /// </remarks>
    [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"CVServerPlan_CreateExpanded", SupportsShouldProcess = true)]
    [global::System.Management.Automation.OutputType(typeof(Commvault.Powershell.Models.IPlanResp))]
    [global::Commvault.Powershell.Description(@"Create a Server Plan")]
    [global::Commvault.Powershell.Generated]
    public partial class NewCVServerPlan_CreateExpanded : global::System.Management.Automation.PSCmdlet,
        Commvault.Powershell.Runtime.IEventListener
    {
        /// <summary>A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet)</summary>
        private global::System.Management.Automation.InvocationInfo __invocationInfo;

        /// <summary>
        /// The <see cref="global::System.Threading.CancellationTokenSource" /> for this operation.
        /// </summary>
        private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource();

        /// <summary>The least RPO in minutes for the plan</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The least RPO in minutes for the plan")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"The least RPO in minutes for the plan",
        SerializedName = @"RPO",
        PossibleTypes = new [] { typeof(long) })]
        public long AdditionalPropertyRpo { get => Body.AdditionalPropertyRpo ?? default(long); set => Body.AdditionalPropertyRpo = value; }

        /// <summary>status if plan backups are enabled or disabled</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "status if plan backups are enabled or disabled")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"status if plan backups are enabled or disabled",
        SerializedName = @"status",
        PossibleTypes = new [] { typeof(string) })]
        public string AdditionalPropertyStatus { get => Body.AdditionalPropertyStatus ?? null; set => Body.AdditionalPropertyStatus = value; }

        /// <summary>Database options should be shown with this plan</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Database options should be shown with this plan")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Database options should be shown with this plan",
        SerializedName = @"database",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter AddonDatabase { get => Body.AddonDatabase ?? default(global::System.Management.Automation.SwitchParameter); set => Body.AddonDatabase = value; }

        /// <summary>File system options should be shown with this plan</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "File system options should be shown with this plan")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"File system options should be shown with this plan",
        SerializedName = @"fileSystem",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter AddonFileSystem { get => Body.AddonFileSystem ?? default(global::System.Management.Automation.SwitchParameter); set => Body.AddonFileSystem = value; }

        /// <summary>Index copy options should be shown with this plan</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Index copy options should be shown with this plan")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Index copy options should be shown with this plan",
        SerializedName = @"indexCopy",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter AddonIndexCopy { get => Body.AddonIndexCopy ?? default(global::System.Management.Automation.SwitchParameter); set => Body.AddonIndexCopy = value; }

        /// <summary>Snap options should be shown with this plan</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Snap options should be shown with this plan")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Snap options should be shown with this plan",
        SerializedName = @"snap",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter AddonSnap { get => Body.AddonSnap ?? default(global::System.Management.Automation.SwitchParameter); set => Body.AddonSnap = value; }

        /// <summary>.</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @".",
        SerializedName = @"snapStatus",
        PossibleTypes = new [] { typeof(string) })]
        public string AddonSnapStatus { get => Body.AddonSnapStatus ?? null; set => Body.AddonSnapStatus = value; }

        /// <summary>Flag to enable overriding of plan. Plan cannot be overriden by default.</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to enable overriding of plan. Plan cannot be overriden by default.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Flag to enable overriding of plan. Plan cannot be overriden by default.",
        SerializedName = @"allowPlanOverride",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter AllowPlanOverride { get => Body.AllowPlanOverride ?? default(global::System.Management.Automation.SwitchParameter); set => Body.AllowPlanOverride = value; }

        /// <summary>Do you want to back up the system state Applicable only for Windows</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Do you want to back up the system state Applicable only for Windows")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Do you want to back up the system state Applicable only for Windows",
        SerializedName = @"backupSystemState",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter BackupContentBackupSystemState { get => Body.BackupContentBackupSystemState ?? default(global::System.Management.Automation.SwitchParameter); set => Body.BackupContentBackupSystemState = value; }

        /// <summary>
        /// Do you want to back up system state only with full backup Applicable only if the value of backupSystemState is true
        /// </summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Do you want to back up system state only with full backup Applicable only if the value of backupSystemState is true")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Do you want to back up system state only with full backup Applicable only if the value of backupSystemState is true",
        SerializedName = @"backupSystemStateOnlyWithFullBackup",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter BackupContentBackupSystemStateOnlyWithFullBackup { get => Body.BackupContentBackupSystemStateOnlyWithFullBackup ?? default(global::System.Management.Automation.SwitchParameter); set => Body.BackupContentBackupSystemStateOnlyWithFullBackup = value; }

        /// <summary>
        /// Do you want to sync properties on associated subclients even if properties are overriden at subclient level
        /// </summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Do you want to sync properties on associated subclients even if properties are overriden at subclient level")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Do you want to sync properties on associated subclients even if properties are overriden at subclient level",
        SerializedName = @"forceUpdateProperties",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter BackupContentForceUpdateProperties { get => Body.BackupContentForceUpdateProperties ?? default(global::System.Management.Automation.SwitchParameter); set => Body.BackupContentForceUpdateProperties = value; }

        /// <summary>Paths to exclude for Mac</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Paths to exclude for Mac")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Paths to exclude for Mac",
        SerializedName = @"macExcludedPaths",
        PossibleTypes = new [] { typeof(string) })]
        public string[] BackupContentMacExcludedPaths { get => Body.BackupContentMacExcludedPaths ?? null /* arrayOf */; set => Body.BackupContentMacExcludedPaths = value; }

        /// <summary>Paths that are exception to excluded paths for Mac</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Paths that are exception to excluded paths for Mac")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Paths that are exception to excluded paths for Mac",
        SerializedName = @"macFilterToExcludePaths",
        PossibleTypes = new [] { typeof(string) })]
        public string[] BackupContentMacFilterToExcludePaths { get => Body.BackupContentMacFilterToExcludePaths ?? null /* arrayOf */; set => Body.BackupContentMacFilterToExcludePaths = value; }

        /// <summary>Paths to include for Mac</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Paths to include for Mac")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Paths to include for Mac",
        SerializedName = @"macIncludedPaths",
        PossibleTypes = new [] { typeof(string) })]
        public string[] BackupContentMacIncludedPaths { get => Body.BackupContentMacIncludedPaths ?? null /* arrayOf */; set => Body.BackupContentMacIncludedPaths = value; }

        /// <summary>Paths to exclude for UNIX</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Paths to exclude for UNIX")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Paths to exclude for UNIX",
        SerializedName = @"unixExcludedPaths",
        PossibleTypes = new [] { typeof(string) })]
        public string[] BackupContentUnixExcludedPaths { get => Body.BackupContentUnixExcludedPaths ?? null /* arrayOf */; set => Body.BackupContentUnixExcludedPaths = value; }

        /// <summary>Paths that are exception to excluded paths for Unix</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Paths that are exception to excluded paths for Unix")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Paths that are exception to excluded paths for Unix",
        SerializedName = @"unixFilterToExcludePaths",
        PossibleTypes = new [] { typeof(string) })]
        public string[] BackupContentUnixFilterToExcludePaths { get => Body.BackupContentUnixFilterToExcludePaths ?? null /* arrayOf */; set => Body.BackupContentUnixFilterToExcludePaths = value; }

        /// <summary>Paths to include for UNIX</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Paths to include for UNIX")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Paths to include for UNIX",
        SerializedName = @"unixIncludedPaths",
        PossibleTypes = new [] { typeof(string) })]
        public string[] BackupContentUnixIncludedPaths { get => Body.BackupContentUnixIncludedPaths ?? null /* arrayOf */; set => Body.BackupContentUnixIncludedPaths = value; }

        /// <summary>
        /// Do you want to back up system state with VSS Applicable only if the value of backupSystemState is true
        /// </summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Do you want to back up system state with VSS Applicable only if the value of backupSystemState is true")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Do you want to back up system state with VSS Applicable only if the value of backupSystemState is true",
        SerializedName = @"useVSSForSystemState",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter BackupContentUseVssForSystemState { get => Body.BackupContentUseVssForSystemState ?? default(global::System.Management.Automation.SwitchParameter); set => Body.BackupContentUseVssForSystemState = value; }

        /// <summary>Paths to exclude for Windows</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Paths to exclude for Windows")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Paths to exclude for Windows",
        SerializedName = @"windowsExcludedPaths",
        PossibleTypes = new [] { typeof(string) })]
        public string[] BackupContentWindowsExcludedPaths { get => Body.BackupContentWindowsExcludedPaths ?? null /* arrayOf */; set => Body.BackupContentWindowsExcludedPaths = value; }

        /// <summary>Paths that are exception to excluded paths for Windows</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Paths that are exception to excluded paths for Windows")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Paths that are exception to excluded paths for Windows",
        SerializedName = @"windowsFilterToExcludePaths",
        PossibleTypes = new [] { typeof(string) })]
        public string[] BackupContentWindowsFilterToExcludePaths { get => Body.BackupContentWindowsFilterToExcludePaths ?? null /* arrayOf */; set => Body.BackupContentWindowsFilterToExcludePaths = value; }

        /// <summary>Paths to include for Windows</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Paths to include for Windows")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Paths to include for Windows",
        SerializedName = @"windowsIncludedPaths",
        PossibleTypes = new [] { typeof(string) })]
        public string[] BackupContentWindowsIncludedPaths { get => Body.BackupContentWindowsIncludedPaths ?? null /* arrayOf */; set => Body.BackupContentWindowsIncludedPaths = value; }

        /// <summary>
        /// Primary Backup Destination Ids (which were created before plan creation). This is only considered when backupDestinations
        /// array object is not defined.
        /// </summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Primary Backup Destination Ids (which were created before plan creation). This is only considered when backupDestinations array object is not defined.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Primary Backup Destination Ids (which were created before plan creation). This is only considered when backupDestinations array object is not defined.",
        SerializedName = @"backupDestinationIds",
        PossibleTypes = new [] { typeof(long) })]
        public long[] BackupDestinationIds { get => Body.BackupDestinationIds ?? null /* arrayOf */; set => Body.BackupDestinationIds = value; }

        /// <summary>
        /// Backup destinations for the plan. Specify where you want to store your backup data.
        /// </summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Backup destinations for the plan. Specify where you want to store your backup data.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Backup destinations for the plan. Specify where you want to store your backup data.",
        SerializedName = @"backupDestinations",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.ICreatePlanBackupDestination) })]
        public Commvault.Powershell.Models.ICreatePlanBackupDestination[] BackupDestinations { get => Body.BackupDestinations ?? null /* arrayOf */; set => Body.BackupDestinations = value; }

        /// <summary>Operation type for the list</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Operation type for the list")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Operation type for the list",
        SerializedName = @"operationType",
        PossibleTypes = new [] { typeof(string) })]
        public string BackupFrequencyOperationType { get => Body.BackupFrequencyOperationType ?? null; set => Body.BackupFrequencyOperationType = value; }

        /// <summary>.</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @".",
        SerializedName = @"schedules",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IPlanSchedule) })]
        public Commvault.Powershell.Models.IPlanSchedule[] BackupFrequencySchedules { get => Body.BackupFrequencySchedules ?? null /* arrayOf */; set => Body.BackupFrequencySchedules = value; }

        /// <summary>Backing field for <see cref="Body" /> property.</summary>
        private Commvault.Powershell.Models.ICreateServerPlan _body= new Commvault.Powershell.Models.CreateServerPlan();

        private Commvault.Powershell.Models.ICreateServerPlan Body { get => this._body; set => this._body = value; }

        /// <summary>Wait for .NET debugger to attach</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Runtime)]
        public global::System.Management.Automation.SwitchParameter Break { get; set; }

        /// <summary>The reference to the client API class.</summary>
        public Commvault.Powershell.CommvaultPowerShell Client => Commvault.Powershell.Module.Instance.ClientAPI;

        /// <summary>Commit frequency in hours</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Commit frequency in hours")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Commit frequency in hours",
        SerializedName = @"commitFrequencyInHours",
        PossibleTypes = new [] { typeof(long) })]
        public long DatabaseOptionCommitFrequencyInHours { get => Body.DatabaseOptionCommitFrequencyInHours ?? default(long); set => Body.DatabaseOptionCommitFrequencyInHours = value; }

        /// <summary>Log backup RPO in minutes</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Log backup RPO in minutes")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Log backup RPO in minutes",
        SerializedName = @"logBackupRPOMins",
        PossibleTypes = new [] { typeof(long) })]
        public long DatabaseOptionLogBackupRpoMins { get => Body.DatabaseOptionLogBackupRpoMins ?? default(long); set => Body.DatabaseOptionLogBackupRpoMins = value; }

        /// <summary>Use disk cache for log backups</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Use disk cache for log backups")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Use disk cache for log backups",
        SerializedName = @"useDiskCacheForLogBackups",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter DatabaseOptionUseDiskCacheForLogBackups { get => Body.DatabaseOptionUseDiskCacheForLogBackups ?? default(global::System.Management.Automation.SwitchParameter); set => Body.DatabaseOptionUseDiskCacheForLogBackups = value; }

        /// <summary>Flag for enabling indexing</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag for enabling indexing")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Flag for enabling indexing",
        SerializedName = @"enabled",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter FileSearchEnabled { get => Body.FileSearchEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => Body.FileSearchEnabled = value; }

        /// <summary>
        /// File search was enabled on plan but failed to process some of the storage pool(s) with these errors
        /// </summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "File search was enabled on plan but failed to process some of the storage pool(s) with these errors")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"File search was enabled on plan but failed to process some of the storage pool(s) with these errors",
        SerializedName = @"errors",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IPlanFileSearchSetupError) })]
        public Commvault.Powershell.Models.IPlanFileSearchSetupError[] FileSearchErrors { get => Body.FileSearchErrors ?? null /* arrayOf */; set => Body.FileSearchErrors = value; }

        /// <summary>Type of indexing status.</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of indexing status.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Type of indexing status.",
        SerializedName = @"status",
        PossibleTypes = new [] { typeof(string) })]
        public string FileSearchStatus { get => Body.FileSearchStatus ?? null; set => Body.FileSearchStatus = value; }

        /// <summary>
        /// Tells what is happening behind the scene, so that user can knows why indexing is not enabled or if its in progress
        /// </summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Tells what is happening behind the scene, so that user can knows why indexing is not enabled or if its in progress")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Tells what is happening behind the scene, so that user can knows why indexing is not enabled or if its in progress",
        SerializedName = @"statusMessage",
        PossibleTypes = new [] { typeof(string) })]
        public string FileSearchStatusMessage { get => Body.FileSearchStatusMessage ?? null; set => Body.FileSearchStatusMessage = value; }

        /// <summary>flag to enable backup content association for applicable file system workload.</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "flag to enable backup content association for applicable file system workload.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"flag to enable backup content association for applicable file system workload.",
        SerializedName = @"filesystemAddon",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter FilesystemAddon { get => Body.FilesystemAddon ?? default(global::System.Management.Automation.SwitchParameter); set => Body.FilesystemAddon = value; }

        /// <summary>SendAsync Pipeline Steps to be appended to the front of the pipeline</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")]
        [global::System.Management.Automation.ValidateNotNull]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Runtime)]
        public Commvault.Powershell.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; }

        /// <summary>SendAsync Pipeline Steps to be prepended to the front of the pipeline</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")]
        [global::System.Management.Automation.ValidateNotNull]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Runtime)]
        public Commvault.Powershell.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; }

        /// <summary>Accessor for our copy of the InvocationInfo.</summary>
        public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } }

        /// <summary>Number of data readers.</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Number of data readers.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Number of data readers.",
        SerializedName = @"count",
        PossibleTypes = new [] { typeof(long) })]
        public long MacNumberOfDataReaderCount { get => Body.MacNumberOfDataReaderCount ?? default(long); set => Body.MacNumberOfDataReaderCount = value; }

        /// <summary>
        /// Set optimal number of data readers. if it is set to true, count will be ignored.
        /// </summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set optimal number of data readers. if it is set to true, count will be ignored.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Set optimal number of data readers. if it is set to true, count will be ignored.",
        SerializedName = @"useOptimal",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter MacNumberOfDataReaderUseOptimal { get => Body.MacNumberOfDataReaderUseOptimal ?? default(global::System.Management.Automation.SwitchParameter); set => Body.MacNumberOfDataReaderUseOptimal = value; }

        /// <summary>
        /// <see cref="IEventListener" /> cancellation delegate. Stops the cmdlet when called.
        /// </summary>
        global::System.Action Commvault.Powershell.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel;

        /// <summary><see cref="IEventListener" /> cancellation token.</summary>
        global::System.Threading.CancellationToken Commvault.Powershell.Runtime.IEventListener.Token => _cancellationTokenSource.Token;

        /// <summary>.</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @".",
        SerializedName = @"backupContent",
        PossibleTypes = new [] { typeof(string) })]
        public string OverrideRestrictionBackupContent { get => Body.OverrideRestrictionBackupContent ?? null; set => Body.OverrideRestrictionBackupContent = value; }

        /// <summary>.</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @".",
        SerializedName = @"RPO",
        PossibleTypes = new [] { typeof(string) })]
        public string OverrideRestrictionRpo { get => Body.OverrideRestrictionRpo ?? null; set => Body.OverrideRestrictionRpo = value; }

        /// <summary>.</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @".",
        SerializedName = @"storagePool",
        PossibleTypes = new [] { typeof(string) })]
        public string OverrideRestrictionStoragePool { get => Body.OverrideRestrictionStoragePool ?? null; set => Body.OverrideRestrictionStoragePool = value; }

        /// <summary>.</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @".",
        SerializedName = @"id",
        PossibleTypes = new [] { typeof(long) })]
        public long ParentPlanId { get => Body.ParentPlanId ?? default(long); set => Body.ParentPlanId = value; }

        /// <summary>.</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @".",
        SerializedName = @"name",
        PossibleTypes = new [] { typeof(string) })]
        public string ParentPlanName { get => Body.ParentPlanName ?? null; set => Body.ParentPlanName = value; }

        /// <summary>
        /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default.
        /// </summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Runtime)]
        public global::System.Management.Automation.SwitchParameter PassThru { get; set; }

        /// <summary>
        /// The instance of the <see cref="Commvault.Powershell.Runtime.HttpPipeline" /> that the remote call will use.
        /// </summary>
        private Commvault.Powershell.Runtime.HttpPipeline Pipeline { get; set; }

        /// <summary>Name of the new plan</summary>
        [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Name of the new plan")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = true,
        ReadOnly = false,
        Description = @"Name of the new plan",
        SerializedName = @"planName",
        PossibleTypes = new [] { typeof(string) })]
        public string PlanName { get => Body.PlanName ?? null; set => Body.PlanName = value; }

        /// <summary>The URI for the proxy server to use</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Runtime)]
        public global::System.Uri Proxy { get; set; }

        /// <summary>Credentials for a proxy server to use for the remote call</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")]
        [global::System.Management.Automation.ValidateNotNull]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Runtime)]
        public global::System.Management.Automation.PSCredential ProxyCredential { get; set; }

        /// <summary>Use the default credentials for the proxy</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Runtime)]
        public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; }

        /// <summary>Backup window for incremental backup</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Backup window for incremental backup")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Backup window for incremental backup",
        SerializedName = @"backupWindow",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IDayAndTime) })]
        public Commvault.Powershell.Models.IDayAndTime[] RpoBackupWindow { get => Body.RpoBackupWindow ?? null /* arrayOf */; set => Body.RpoBackupWindow = value; }

        /// <summary>Backup window for full backup</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Backup window for full backup")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Backup window for full backup",
        SerializedName = @"fullBackupWindow",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IDayAndTime) })]
        public Commvault.Powershell.Models.IDayAndTime[] RpoFullBackupWindow { get => Body.RpoFullBackupWindow ?? null /* arrayOf */; set => Body.RpoFullBackupWindow = value; }

        /// <summary>
        /// Setting to suggest plan has some advanced settings present. Setting is OEM specific and not applicable for all cases.
        /// </summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Setting to suggest plan has some advanced settings present. Setting is OEM specific and not applicable for all cases.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Setting to suggest plan has some advanced settings present. Setting is OEM specific and not applicable for all cases.",
        SerializedName = @"enableAdvancedView",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter SettingEnableAdvancedView { get => Body.SettingEnableAdvancedView ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SettingEnableAdvancedView = value; }

        /// <summary>Backup copy RPO in minutes</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Backup copy RPO in minutes")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Backup copy RPO in minutes",
        SerializedName = @"backupCopyRPOMins",
        PossibleTypes = new [] { typeof(long) })]
        public long SnapshotOptionBackupCopyRpoMins { get => Body.SnapshotOptionBackupCopyRpoMins ?? default(long); set => Body.SnapshotOptionBackupCopyRpoMins = value; }

        /// <summary>Flag to enable backup copy</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to enable backup copy")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Flag to enable backup copy",
        SerializedName = @"enableBackupCopy",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter SnapshotOptionEnableBackupCopy { get => Body.SnapshotOptionEnableBackupCopy ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SnapshotOptionEnableBackupCopy = value; }

        /// <summary>
        /// Retention period in days. -1 can be specified for infinite retention. If this and snapRecoveryPoints both are not specified,
        /// this takes precedence.
        /// </summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period in days. -1 can be specified for infinite retention. If this and snapRecoveryPoints both are not specified, this takes precedence.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Retention period in days. -1 can be specified for infinite retention. If this and snapRecoveryPoints both are not specified, this takes precedence.",
        SerializedName = @"retentionPeriodDays",
        PossibleTypes = new [] { typeof(long) })]
        public long SnapshotOptionRetentionPeriodDays { get => Body.SnapshotOptionRetentionPeriodDays ?? default(long); set => Body.SnapshotOptionRetentionPeriodDays = value; }

        /// <summary>
        /// Number of snap recovery points for default snap copy for retention. Can be specified instead of retention period in Days
        /// for default snap copy.
        /// </summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Number of snap recovery points for default snap copy for retention. Can be specified instead of retention period in Days for default snap copy.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Number of snap recovery points for default snap copy for retention. Can be specified instead of retention period in Days for default snap copy.",
        SerializedName = @"snapRecoveryPoints",
        PossibleTypes = new [] { typeof(long) })]
        public long SnapshotOptionSnapRecoveryPoints { get => Body.SnapshotOptionSnapRecoveryPoints ?? default(long); set => Body.SnapshotOptionSnapRecoveryPoints = value; }

        /// <summary>Number of data readers.</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Number of data readers.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Number of data readers.",
        SerializedName = @"count",
        PossibleTypes = new [] { typeof(long) })]
        public long UnixNumberOfDataReaderCount { get => Body.UnixNumberOfDataReaderCount ?? default(long); set => Body.UnixNumberOfDataReaderCount = value; }

        /// <summary>
        /// Set optimal number of data readers. if it is set to true, count will be ignored.
        /// </summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set optimal number of data readers. if it is set to true, count will be ignored.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Set optimal number of data readers. if it is set to true, count will be ignored.",
        SerializedName = @"useOptimal",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter UnixNumberOfDataReaderUseOptimal { get => Body.UnixNumberOfDataReaderUseOptimal ?? default(global::System.Management.Automation.SwitchParameter); set => Body.UnixNumberOfDataReaderUseOptimal = value; }

        /// <summary>Number of data readers.</summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Number of data readers.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Number of data readers.",
        SerializedName = @"count",
        PossibleTypes = new [] { typeof(long) })]
        public long WindowNumberOfDataReaderCount { get => Body.WindowNumberOfDataReaderCount ?? default(long); set => Body.WindowNumberOfDataReaderCount = value; }

        /// <summary>
        /// Set optimal number of data readers. if it is set to true, count will be ignored.
        /// </summary>
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Set optimal number of data readers. if it is set to true, count will be ignored.")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @"Set optimal number of data readers. if it is set to true, count will be ignored.",
        SerializedName = @"useOptimal",
        PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })]
        public global::System.Management.Automation.SwitchParameter WindowNumberOfDataReaderUseOptimal { get => Body.WindowNumberOfDataReaderUseOptimal ?? default(global::System.Management.Automation.SwitchParameter); set => Body.WindowNumberOfDataReaderUseOptimal = value; }

        /// <summary>.</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @".",
        SerializedName = @"workloadGroupTypes",
        PossibleTypes = new [] { typeof(string) })]
        public string[] WorkloadGroupTypes { get => Body.WorkloadGroupTypes ?? null /* arrayOf */; set => Body.WorkloadGroupTypes = value; }

        /// <summary>.</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @".",
        SerializedName = @"solutions",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IIdName) })]
        public Commvault.Powershell.Models.IIdName[] WorkloadSolutions { get => Body.WorkloadSolutions ?? null /* arrayOf */; set => Body.WorkloadSolutions = value; }

        /// <summary>.</summary>
        [global::System.Management.Automation.AllowEmptyCollection]
        [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = ".")]
        [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)]
        [Commvault.Powershell.Runtime.Info(
        Required = false,
        ReadOnly = false,
        Description = @".",
        SerializedName = @"workloadTypes",
        PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IIdName) })]
        public Commvault.Powershell.Models.IIdName[] WorkloadTypes { get => Body.WorkloadTypes ?? null /* arrayOf */; set => Body.WorkloadTypes = value; }

        /// <summary>
        /// <c>overrideOnNotFound</c> will be called before the regular onNotFound has been processed, allowing customization of what
        /// happens on that response. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
        /// <param name="returnNow">/// Determines if the rest of the onNotFound method should be processed, or if the method should
        /// return immediately (set to true to skip further processing )</param>

        partial void overrideOnNotFound(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task<bool> returnNow);

        /// <summary>
        /// <c>overrideOnOk</c> will be called before the regular onOk has been processed, allowing customization of what happens
        /// on that response. Implement this method in a partial class to enable this behavior
        /// </summary>
        /// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
        /// <param name="response">the body result as a <see cref="Commvault.Powershell.Models.IPlanResp" /> from the remote call</param>
        /// <param name="returnNow">/// Determines if the rest of the onOk method should be processed, or if the method should return
        /// immediately (set to true to skip further processing )</param>

        partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Commvault.Powershell.Models.IPlanResp> response, ref global::System.Threading.Tasks.Task<bool> returnNow);

        /// <summary>
        /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet)
        /// </summary>
        protected override void BeginProcessing()
        {
            Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials);
            if (Break)
            {
                Commvault.Powershell.Runtime.AttachDebugger.Break();
            }
            ((Commvault.Powershell.Runtime.IEventListener)this).Signal(Commvault.Powershell.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Commvault.Powershell.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
        }

        /// <summary>Performs clean-up after the command execution</summary>
        protected override void EndProcessing()
        {
            ((Commvault.Powershell.Runtime.IEventListener)this).Signal(Commvault.Powershell.Runtime.Events.CmdletEndProcessing).Wait(); if( ((Commvault.Powershell.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
        }

        /// <summary>Handles/Dispatches events during the call to the REST service.</summary>
        /// <param name="id">The message id</param>
        /// <param name="token">The message cancellation token. When this call is cancelled, this should be <c>true</c></param>
        /// <param name="messageData">Detailed message data for the message event.</param>
        /// <returns>
        /// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the message is completed.
        /// </returns>
         async global::System.Threading.Tasks.Task Commvault.Powershell.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func<Commvault.Powershell.Runtime.EventData> messageData)
        {
            using( NoSynchronizationContext )
            {
                if (token.IsCancellationRequested)
                {
                    return ;
                }

                switch ( id )
                {
                    case Commvault.Powershell.Runtime.Events.Verbose:
                    {
                        WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}");
                        return ;
                    }
                    case Commvault.Powershell.Runtime.Events.Warning:
                    {
                        WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}");
                        return ;
                    }
                    case Commvault.Powershell.Runtime.Events.Information:
                    {
                        var data = messageData();
                        WriteInformation(data, new[] { data.Message });
                        return ;
                    }
                    case Commvault.Powershell.Runtime.Events.Debug:
                    {
                        WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}");
                        return ;
                    }
                    case Commvault.Powershell.Runtime.Events.Error:
                    {
                        WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) );
                        return ;
                    }
                }
                await Commvault.Powershell.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Commvault.Powershell.Runtime.IEventListener)this).Signal(i,t,()=> Commvault.Powershell.Runtime.EventDataConverter.ConvertFrom( m() ) as Commvault.Powershell.Runtime.EventData ), InvocationInformation, this.ParameterSetName, null );
                if (token.IsCancellationRequested)
                {
                    return ;
                }
                WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}");
            }
        }

        /// <summary>
        /// Intializes a new instance of the <see cref="NewCVServerPlan_CreateExpanded" /> cmdlet class.
        /// </summary>
        public NewCVServerPlan_CreateExpanded()
        {

        }

        /// <summary>Performs execution of the command.</summary>
        protected override void ProcessRecord()
        {
            ((Commvault.Powershell.Runtime.IEventListener)this).Signal(Commvault.Powershell.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Commvault.Powershell.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
            try
            {
                // work
                if (ShouldProcess($"Call remote 'CreateServerPlan' operation"))
                {
                    using( var asyncCommandRuntime = new Commvault.Powershell.Runtime.PowerShell.AsyncCommandRuntime(this, ((Commvault.Powershell.Runtime.IEventListener)this).Token) )
                    {
                        asyncCommandRuntime.Wait( ProcessRecordAsync(),((Commvault.Powershell.Runtime.IEventListener)this).Token);
                    }
                }
            }
            catch (global::System.AggregateException aggregateException)
            {
                // unroll the inner exceptions to get the root cause
                foreach( var innerException in aggregateException.Flatten().InnerExceptions )
                {
                    ((Commvault.Powershell.Runtime.IEventListener)this).Signal(Commvault.Powershell.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Commvault.Powershell.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
                    // Write exception out to error channel.
                    WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) );
                }
            }
            catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null)
            {
                ((Commvault.Powershell.Runtime.IEventListener)this).Signal(Commvault.Powershell.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Commvault.Powershell.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
                // Write exception out to error channel.
                WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) );
            }
            finally
            {
                ((Commvault.Powershell.Runtime.IEventListener)this).Signal(Commvault.Powershell.Runtime.Events.CmdletProcessRecordEnd).Wait();
            }
        }

        /// <summary>Performs execution of the command, working asynchronously if required.</summary>
        /// <returns>
        /// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the method is completed.
        /// </returns>
        protected async global::System.Threading.Tasks.Task ProcessRecordAsync()
        {
            using( NoSynchronizationContext )
            {
                await ((Commvault.Powershell.Runtime.IEventListener)this).Signal(Commvault.Powershell.Runtime.Events.CmdletProcessRecordAsyncStart); if( ((Commvault.Powershell.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
                await ((Commvault.Powershell.Runtime.IEventListener)this).Signal(Commvault.Powershell.Runtime.Events.CmdletGetPipeline); if( ((Commvault.Powershell.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
                Pipeline = Commvault.Powershell.Module.Instance.CreatePipeline(InvocationInformation, this.ParameterSetName);
                if (null != HttpPipelinePrepend)
                {
                    Pipeline.Prepend((this.CommandRuntime as Commvault.Powershell.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend);
                }
                if (null != HttpPipelineAppend)
                {
                    Pipeline.Append((this.CommandRuntime as Commvault.Powershell.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend);
                }
                // get the client instance
                try
                {
                    await ((Commvault.Powershell.Runtime.IEventListener)this).Signal(Commvault.Powershell.Runtime.Events.CmdletBeforeAPICall); if( ((Commvault.Powershell.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
                    await this.Client.CreateServerPlan(Body, onOk, onNotFound, this, Pipeline);
                    await ((Commvault.Powershell.Runtime.IEventListener)this).Signal(Commvault.Powershell.Runtime.Events.CmdletAfterAPICall); if( ((Commvault.Powershell.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
                }
                catch (Commvault.Powershell.Runtime.UndeclaredResponseException urexception)
                {
                    WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body})
                    {
                      ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
                    });
                }
                finally
                {
                    await ((Commvault.Powershell.Runtime.IEventListener)this).Signal(Commvault.Powershell.Runtime.Events.CmdletProcessRecordAsyncEnd);
                }
            }
        }

        /// <summary>Interrupts currently running code within the command.</summary>
        protected override void StopProcessing()
        {
            ((Commvault.Powershell.Runtime.IEventListener)this).Cancel();
            base.StopProcessing();
        }

        /// <summary>a delegate that is called when the remote service returns 404 (NotFound).</summary>
        /// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
        /// <returns>
        /// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the method is completed.
        /// </returns>
        private async global::System.Threading.Tasks.Task onNotFound(global::System.Net.Http.HttpResponseMessage responseMessage)
        {
            using( NoSynchronizationContext )
            {
                var _returnNow = global::System.Threading.Tasks.Task<bool>.FromResult(false);
                overrideOnNotFound(responseMessage, ref _returnNow);
                // if overrideOnNotFound has returned true, then return right away.
                if ((null != _returnNow && await _returnNow))
                {
                    return ;
                }
                // onNotFound - response for 404 /
                if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru"))
                {
                    WriteObject(true);
                }
            }
        }

        /// <summary>a delegate that is called when the remote service returns 200 (OK).</summary>
        /// <param name="responseMessage">the raw response message as an global::System.Net.Http.HttpResponseMessage.</param>
        /// <param name="response">the body result as a <see cref="Commvault.Powershell.Models.IPlanResp" /> from the remote call</param>
        /// <returns>
        /// A <see cref="global::System.Threading.Tasks.Task" /> that will be complete when handling of the method is completed.
        /// </returns>
        private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task<Commvault.Powershell.Models.IPlanResp> response)
        {
            using( NoSynchronizationContext )
            {
                var _returnNow = global::System.Threading.Tasks.Task<bool>.FromResult(false);
                overrideOnOk(responseMessage, response, ref _returnNow);
                // if overrideOnOk has returned true, then return right away.
                if ((null != _returnNow && await _returnNow))
                {
                    return ;
                }
                // onOk - response for 200 / application/json
                // (await response) // should be Commvault.Powershell.Models.IPlanResp
                WriteObject((await response));
            }
        }
    }
}