generated/cmdlets/InvokeCVModifyPlan_ModifyViaIdentityExpanded.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>Used to modify an exsiting server plan</summary> /// <remarks> /// [OpenAPI] ModifyPlan=>PUT:"/V4/ServerPlan/{planId}" /// </remarks> [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"CVModifyPlan_ModifyViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Commvault.Powershell.Models.IGenericResp))] [global::Commvault.Powershell.Description(@"Used to modify an exsiting server plan")] [global::Commvault.Powershell.Generated] public partial class InvokeCVModifyPlan_ModifyViaIdentityExpanded : 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>Flag to enable overriding of plan. Once enabled, cannot be disabled.</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to enable overriding of plan. Once enabled, cannot be disabled.")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Flag to enable overriding of plan. Once enabled, cannot be disabled.", 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> /// Frequency of the schedule based on schedule frequency type eg. for Hours, value 2 is 2 hours, for Minutes, 30 is 30 minutes, /// for Daily, 2 is 2 days. for Monthly 2 is it repeats every 2 months /// </summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Frequency of the schedule based on schedule frequency type eg. for Hours, value 2 is 2 hours, for Minutes, 30 is 30 minutes, for Daily, 2 is 2 days. for Monthly 2 is it repeats every 2 months")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Frequency of the schedule based on schedule frequency type eg. for Hours, value 2 is 2 hours, for Minutes, 30 is 30 minutes, for Daily, 2 is 2 days. for Monthly 2 is it repeats every 2 months", SerializedName = @"frequency", PossibleTypes = new [] { typeof(long) })] public long BackupCopyFrequency { get => Body.BackupCopyFrequency ?? default(long); set => Body.BackupCopyFrequency = value; } /// <summary>Day on which to run the schedule, applicable for monthly, yearly</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Day on which to run the schedule, applicable for monthly, yearly")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Day on which to run the schedule, applicable for monthly, yearly", SerializedName = @"dayOfMonth", PossibleTypes = new [] { typeof(long) })] public long BackupCopyFrequencyDayOfMonth { get => Body.BackupCopyFrequencyDayOfMonth ?? default(long); set => Body.BackupCopyFrequencyDayOfMonth = 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 = @"dayOfWeek", PossibleTypes = new [] { typeof(string) })] public string BackupCopyFrequencyDayOfWeek { get => Body.BackupCopyFrequencyDayOfWeek ?? null; set => Body.BackupCopyFrequencyDayOfWeek = 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 = @"monthOfYear", PossibleTypes = new [] { typeof(string) })] public string BackupCopyFrequencyMonthOfYear { get => Body.BackupCopyFrequencyMonthOfYear ?? null; set => Body.BackupCopyFrequencyMonthOfYear = value; } /// <summary>schedule frequency type</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "schedule frequency type")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"schedule frequency type", SerializedName = @"scheduleFrequencyType", PossibleTypes = new [] { typeof(string) })] public string BackupCopyFrequencyScheduleFrequencyType { get => Body.BackupCopyFrequencyScheduleFrequencyType ?? null; set => Body.BackupCopyFrequencyScheduleFrequencyType = value; } /// <summary>start time of schedule in seconds for daily, weekly, monthly, yearly frequency</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "start time of schedule in seconds for daily, weekly, monthly, yearly frequency")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"start time of schedule in seconds for daily, weekly, monthly, yearly frequency", SerializedName = @"startTime", PossibleTypes = new [] { typeof(long) })] public long BackupCopyFrequencyStartTime { get => Body.BackupCopyFrequencyStartTime ?? default(long); set => Body.BackupCopyFrequencyStartTime = value; } /// <summary>Specific week of a month</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specific week of a month")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Specific week of a month", SerializedName = @"weekOfMonth", PossibleTypes = new [] { typeof(string) })] public string BackupCopyFrequencyWeekOfMonth { get => Body.BackupCopyFrequencyWeekOfMonth ?? null; set => Body.BackupCopyFrequencyWeekOfMonth = value; } /// <summary>Days of the week for weekly frequency</summary> [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Days of the week for weekly frequency")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Days of the week for weekly frequency", SerializedName = @"weeklyDays", PossibleTypes = new [] { typeof(string) })] public string[] BackupCopyFrequencyWeeklyDays { get => Body.BackupCopyFrequencyWeeklyDays ?? null /* arrayOf */; set => Body.BackupCopyFrequencyWeeklyDays = value; } /// <summary>Primary Backup Destination Ids (which were created before plan creation).</summary> [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Primary Backup Destination Ids (which were created before plan creation).")] [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).", SerializedName = @"backupDestinationIds", PossibleTypes = new [] { typeof(long) })] public long[] BackupDestinationIds { get => Body.BackupDestinationIds ?? null /* arrayOf */; set => Body.BackupDestinationIds = 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.IUpdateServerPlan _body= new Commvault.Powershell.Models.UpdateServerPlan(); private Commvault.Powershell.Models.IUpdateServerPlan 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>Full backup frequency in days</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Full backup frequency in days")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Full backup frequency in days", SerializedName = @"runFullBackupEvery", PossibleTypes = new [] { typeof(long) })] public long DatabaseOptionRunFullBackupEvery { get => Body.DatabaseOptionRunFullBackupEvery ?? default(long); set => Body.DatabaseOptionRunFullBackupEvery = 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>Backing field for <see cref="InputObject" /> property.</summary> private Commvault.Powershell.Models.ICommvaultPowerShellIdentity _inputObject; /// <summary>Identity Parameter</summary> [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Path)] public Commvault.Powershell.Models.ICommvaultPowerShellIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } /// <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>New plan name to update</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "New plan name to update")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"New plan name to update", SerializedName = @"newName", PossibleTypes = new [] { typeof(string) })] public string NewName { get => Body.NewName ?? null; set => Body.NewName = value; } /// <summary> /// Flag to specify if parent or derived plan backupContent should be used when inherit mode is optional. True - derived, /// False - Base. /// </summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to specify if parent or derived plan backupContent should be used when inherit mode is optional. True - derived, False - Base.")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Flag to specify if parent or derived plan backupContent should be used when inherit mode is optional. True - derived, False - Base.", SerializedName = @"backupContent", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter OverrideInheritSettingBackupContent { get => Body.OverrideInheritSettingBackupContent ?? default(global::System.Management.Automation.SwitchParameter); set => Body.OverrideInheritSettingBackupContent = value; } /// <summary> /// Flag to specify if parent or derived plan backupDestination should be used when inherit mode is optional. True - derived, /// False - Base. /// </summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to specify if parent or derived plan backupDestination should be used when inherit mode is optional. True - derived, False - Base.")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Flag to specify if parent or derived plan backupDestination should be used when inherit mode is optional. True - derived, False - Base.", SerializedName = @"backupDestination", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter OverrideInheritSettingBackupDestination { get => Body.OverrideInheritSettingBackupDestination ?? default(global::System.Management.Automation.SwitchParameter); set => Body.OverrideInheritSettingBackupDestination = value; } /// <summary> /// Flag to specify if parent or derived plan rpo should be used when inherit mode is optional. True - derived, False - Base. /// </summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to specify if parent or derived plan rpo should be used when inherit mode is optional. True - derived, False - Base.")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Flag to specify if parent or derived plan rpo should be used when inherit mode is optional. True - derived, False - Base.", SerializedName = @"rpo", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter OverrideInheritSettingRpo { get => Body.OverrideInheritSettingRpo ?? default(global::System.Management.Automation.SwitchParameter); set => Body.OverrideInheritSettingRpo = 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 = @"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> /// 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>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>.</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 RegionToConfigureId { get => Body.RegionToConfigureId ?? default(long); set => Body.RegionToConfigureId = 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 RegionToConfigureName { get => Body.RegionToConfigureName ?? null; set => Body.RegionToConfigureName = value; } /// <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>Time provided in Unix format. Give 0 to reset any existing delay.</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Time provided in Unix format. Give 0 to reset any existing delay.")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Time provided in Unix format. Give 0 to reset any existing delay.", SerializedName = @"enableAfterDelay", PossibleTypes = new [] { typeof(long) })] public long SlaEnableAfterDelay { get => Body.SlaEnableAfterDelay ?? default(long); set => Body.SlaEnableAfterDelay = value; } /// <summary>Flag to set to exclude plan from SLA</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to set to exclude plan from SLA")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Flag to set to exclude plan from SLA", SerializedName = @"excludeFromSLA", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SlaExcludeFromSla { get => Body.SlaExcludeFromSla ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SlaExcludeFromSla = value; } /// <summary>Reason for exclusion from SLA</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Reason for exclusion from SLA")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Reason for exclusion from SLA", SerializedName = @"exclusionReason", PossibleTypes = new [] { typeof(string) })] public string SlaExclusionReason { get => Body.SlaExclusionReason ?? null; set => Body.SlaExclusionReason = value; } /// <summary>SLA Period in Days</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "SLA Period in Days")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"SLA Period in Days", SerializedName = @"SLAPeriod", PossibleTypes = new [] { typeof(long) })] public long SlaPeriod { get => Body.SlaPeriod ?? default(long); set => Body.SlaPeriod = value; } /// <summary>Flag to set to use System Default Service Level Agreement</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag to set to use System Default Service Level Agreement")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Flag to set to use System Default Service Level Agreement", SerializedName = @"useSystemDefaultSLA", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SlaUseSystemDefaultSla { get => Body.SlaUseSystemDefaultSla ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SlaUseSystemDefaultSla = 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>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.IGenericResp" /> 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.IGenericResp> 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> /// Intializes a new instance of the <see cref="InvokeCVModifyPlan_ModifyViaIdentityExpanded" /> cmdlet class. /// </summary> public InvokeCVModifyPlan_ModifyViaIdentityExpanded() { } /// <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>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 'ModifyPlan' 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; } // try to call with PATH parameters from Input Object if (null == InputObject.PlanId) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PlanId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } await this.Client.ModifyPlan(InputObject.PlanId ?? default(long), 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.IGenericResp" /> 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.IGenericResp> 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.IGenericResp WriteObject((await response)); } } } } |