generated/cmdlets/SetVMGroup_UpdateViaIdentityExpanded.cs
// Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.8.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>Updates the VM Group</summary> /// <remarks> /// [OpenAPI] UpdateVMGroup=>PUT:"/V4/VmGroup/{VmGroupId}" /// </remarks> [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Set, @"VMGroup_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(Commvault.Powershell.Models.IGetVMGroupResp), typeof(Commvault.Powershell.Models.IGenericResp))] [global::Commvault.Powershell.Description(@"Updates the VM Group")] [global::Commvault.Powershell.Generated] public partial class SetVMGroup_UpdateViaIdentityExpanded : 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>.</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 = @"accessNode", PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IIdName) })] public Commvault.Powershell.Models.IIdName[] AccessNode { get => Body.AccessNode ?? null /* arrayOf */; set => Body.AccessNode = value; } /// <summary>true if Backup is enabled</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "true if Backup is enabled")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"true if Backup is enabled", SerializedName = @"enableBackup", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter ActivityControlEnableBackup { get => Body.ActivityControlEnableBackup ?? default(global::System.Management.Automation.SwitchParameter); set => Body.ActivityControlEnableBackup = value; } /// <summary>true if Restore is enabled</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "true if Restore is enabled")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"true if Restore is enabled", SerializedName = @"enableRestore", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter ActivityControlEnableRestore { get => Body.ActivityControlEnableRestore ?? default(global::System.Management.Automation.SwitchParameter); set => Body.ActivityControlEnableRestore = value; } /// <summary>vmAppValidation</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "vmAppValidation")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"vmAppValidation", SerializedName = @"applicationValidation", PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IVMAppValidation) })] public Commvault.Powershell.Models.IVMAppValidation ApplicationValidation { get => Body.ApplicationValidation ?? null /* object */; set => Body.ApplicationValidation = value; } /// <summary>Delayed by n Hrs</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Delayed by n Hrs")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Delayed by n Hrs", SerializedName = @"delayTime", PossibleTypes = new [] { typeof(string) })] public string BackupActivityControlOptionDelayTime { get => Body.BackupActivityControlOptionDelayTime ?? null; set => Body.BackupActivityControlOptionDelayTime = value; } /// <summary>True if the activity will be enabled after a delay time interval</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if the activity will be enabled after a delay time interval")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if the activity will be enabled after a delay time interval", SerializedName = @"enableAfterDelay", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter BackupActivityControlOptionEnableAfterDelay { get => Body.BackupActivityControlOptionEnableAfterDelay ?? default(global::System.Management.Automation.SwitchParameter); set => Body.BackupActivityControlOptionEnableAfterDelay = 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 BackupActivityControlOptionsTimeZoneId { get => Body.BackupActivityControlOptionsTimeZoneId ?? default(long); set => Body.BackupActivityControlOptionsTimeZoneId = 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 BackupActivityControlOptionsTimeZoneName { get => Body.BackupActivityControlOptionsTimeZoneName ?? null; set => Body.BackupActivityControlOptionsTimeZoneName = value; } /// <summary>Backing field for <see cref="Body" /> property.</summary> private Commvault.Powershell.Models.IUpdatevmGroupReq _body= new Commvault.Powershell.Models.UpdatevmGroupReq(); /// <summary>UpdatevmGroupReq</summary> private Commvault.Powershell.Models.IUpdatevmGroupReq 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> /// True if content in vmgroup has to be overwritten, by default it will append the content /// </summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if content in vmgroup has to be overwritten, by default it will append the content")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if content in vmgroup has to be overwritten, by default it will append the content", SerializedName = @"overwrite", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter ContentOverwrite { get => Body.ContentOverwrite ?? default(global::System.Management.Automation.SwitchParameter); set => Body.ContentOverwrite = 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 = @"ruleGroups", PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IRuleGroupContent) })] public Commvault.Powershell.Models.IRuleGroupContent[] ContentRuleGroups { get => Body.ContentRuleGroups ?? null /* arrayOf */; set => Body.ContentRuleGroups = 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 = @"virtualMachines", PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IVirtualMachinecontent) })] public Commvault.Powershell.Models.IVirtualMachinecontent[] ContentVirtualMachines { get => Body.ContentVirtualMachines ?? null /* arrayOf */; set => Body.ContentVirtualMachines = value; } /// <summary>username to access the network path</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "username to access the network path")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"username to access the network path", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] public string CredentialsName { get => Body.CredentialsName ?? null; set => Body.CredentialsName = value; } /// <summary>password to access the network path</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "password to access the network path")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"password to access the network path", SerializedName = @"password", PossibleTypes = new [] { typeof(string) })] public string CredentialsPassword { get => Body.CredentialsPassword ?? null; set => Body.CredentialsPassword = 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 CrossAccountCopyDestinationClientId { get => Body.CrossAccountCopyDestinationClientId ?? default(long); set => Body.CrossAccountCopyDestinationClientId = 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 CrossAccountCopyDestinationClientName { get => Body.CrossAccountCopyDestinationClientName ?? null; set => Body.CrossAccountCopyDestinationClientName = 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 = @"diskFilters", PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IVMDiskFilter) })] public Commvault.Powershell.Models.IVMDiskFilter[] DiskFilters { get => Body.DiskFilters ?? null /* arrayOf */; set => Body.DiskFilters = value; } /// <summary>True if file indexing needs to be enabled</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if file indexing needs to be enabled")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if file indexing needs to be enabled", SerializedName = @"enableFileIndexing", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter EnableFileIndexing { get => Body.EnableFileIndexing ?? default(global::System.Management.Automation.SwitchParameter); set => Body.EnableFileIndexing = value; } /// <summary> /// True if content in vmgroup has to be overwritten, by default it will append the content /// </summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if content in vmgroup has to be overwritten, by default it will append the content")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if content in vmgroup has to be overwritten, by default it will append the content", SerializedName = @"overwrite", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter FilterOverwrite { get => Body.FilterOverwrite ?? default(global::System.Management.Automation.SwitchParameter); set => Body.FilterOverwrite = 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 = @"ruleGroups", PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IRuleGroupContent) })] public Commvault.Powershell.Models.IRuleGroupContent[] FilterRuleGroups { get => Body.FilterRuleGroups ?? null /* arrayOf */; set => Body.FilterRuleGroups = 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 = @"virtualMachines", PossibleTypes = new [] { typeof(Commvault.Powershell.Models.IVirtualMachinecontent) })] public Commvault.Powershell.Models.IVirtualMachinecontent[] FilterVirtualMachines { get => Body.FilterVirtualMachines ?? null /* arrayOf */; set => Body.FilterVirtualMachines = 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> /// <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>subclient name</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "subclient name ")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"subclient name ", SerializedName = @"newName", PossibleTypes = new [] { typeof(string) })] public string NewName { get => Body.NewName ?? null; set => Body.NewName = value; } /// <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>.</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 PlanId { get => Body.PlanId ?? default(long); set => Body.PlanId = 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 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>Delayed by n Hrs</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Delayed by n Hrs")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Delayed by n Hrs", SerializedName = @"delayTime", PossibleTypes = new [] { typeof(string) })] public string RestoreActivityControlOptionDelayTime { get => Body.RestoreActivityControlOptionDelayTime ?? null; set => Body.RestoreActivityControlOptionDelayTime = value; } /// <summary>True if the activity will be enabled after a delay time interval</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if the activity will be enabled after a delay time interval")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if the activity will be enabled after a delay time interval", SerializedName = @"enableAfterDelay", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter RestoreActivityControlOptionEnableAfterDelay { get => Body.RestoreActivityControlOptionEnableAfterDelay ?? default(global::System.Management.Automation.SwitchParameter); set => Body.RestoreActivityControlOptionEnableAfterDelay = 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 RestoreActivityControlOptionsTimeZoneId { get => Body.RestoreActivityControlOptionsTimeZoneId ?? default(long); set => Body.RestoreActivityControlOptionsTimeZoneId = 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 RestoreActivityControlOptionsTimeZoneName { get => Body.RestoreActivityControlOptionsTimeZoneName ?? null; set => Body.RestoreActivityControlOptionsTimeZoneName = 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 SavedCredentialsId { get => Body.SavedCredentialsId ?? default(long); set => Body.SavedCredentialsId = 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 SavedCredentialsName { get => Body.SavedCredentialsName ?? null; set => Body.SavedCredentialsName = 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 = @"securityAssociations", PossibleTypes = new [] { typeof(Commvault.Powershell.Models.ISecurityAssoc) })] public Commvault.Powershell.Models.ISecurityAssoc[] SecurityAssociations { get => Body.SecurityAssociations ?? null /* arrayOf */; set => Body.SecurityAssociations = value; } /// <summary>True if auto detect VM Owner enabled</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if auto detect VM Owner enabled")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if auto detect VM Owner enabled", SerializedName = @"autoDetectVMOwner", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SettingAutoDetectVMOwner { get => Body.SettingAutoDetectVMOwner ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SettingAutoDetectVMOwner = value; } /// <summary> /// True if metadata collection is enabled for intellisnap jobs. Only applicable for Indexing v1 /// </summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if metadata collection is enabled for intellisnap jobs. Only applicable for Indexing v1")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if metadata collection is enabled for intellisnap jobs. Only applicable for Indexing v1", SerializedName = @"collectFileDetailsFromSnapshotCopy", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SettingCollectFileDetailsFromSnapshotCopy { get => Body.SettingCollectFileDetailsFromSnapshotCopy ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SettingCollectFileDetailsFromSnapshotCopy = value; } /// <summary>True if metadata collection is enabled. Only applicable for Indexing v1</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if metadata collection is enabled. Only applicable for Indexing v1")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if metadata collection is enabled. Only applicable for Indexing v1", SerializedName = @"collectFileDetailsforGranularRecovery", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SettingCollectFileDetailsforGranularRecovery { get => Body.SettingCollectFileDetailsforGranularRecovery ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SettingCollectFileDetailsforGranularRecovery = value; } /// <summary>Custom snapshot resource group GUID for Azure</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Custom snapshot resource group GUID for Azure")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Custom snapshot resource group GUID for Azure", SerializedName = @"customSnapshotResourceGroup", PossibleTypes = new [] { typeof(string) })] public string SettingCustomSnapshotResourceGroup { get => Body.SettingCustomSnapshotResourceGroup ?? null; set => Body.SettingCustomSnapshotResourceGroup = value; } /// <summary>True if Datastore Free space check is enabled</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if Datastore Free space check is enabled")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if Datastore Free space check is enabled", SerializedName = @"datastoreFreespaceCheck", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SettingDatastoreFreespaceCheck { get => Body.SettingDatastoreFreespaceCheck ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SettingDatastoreFreespaceCheck = value; } /// <summary>precentage of datastore free space check value</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "precentage of datastore free space check value")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"precentage of datastore free space check value", SerializedName = @"datastoreFreespaceRequired", PossibleTypes = new [] { typeof(long) })] public long SettingDatastoreFreespaceRequired { get => Body.SettingDatastoreFreespaceRequired ?? default(long); set => Body.SettingDatastoreFreespaceRequired = value; } /// <summary>Is the VM App Aware</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Is the VM App Aware")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Is the VM App Aware", SerializedName = @"isApplicationAware", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SettingIsApplicationAware { get => Body.SettingIsApplicationAware ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SettingIsApplicationAware = value; } /// <summary>Start Time for the VM Group Job</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Start Time for the VM Group Job")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Start Time for the VM Group Job", SerializedName = @"jobStartTime", PossibleTypes = new [] { typeof(long) })] public long SettingJobStartTime { get => Body.SettingJobStartTime ?? default(long); set => Body.SettingJobStartTime = value; } /// <summary>Number of readers for backup</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Number of readers for backup")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Number of readers for backup", SerializedName = @"noOfReaders", PossibleTypes = new [] { typeof(long) })] public long SettingNoOfReaders { get => Body.SettingNoOfReaders ?? default(long); set => Body.SettingNoOfReaders = value; } /// <summary>transport mode based on environment. Values are case sensitive</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "transport mode based on environment. Values are case sensitive")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"transport mode based on environment. Values are case sensitive", SerializedName = @"transportMode", PossibleTypes = new [] { typeof(string) })] public string SettingTransportMode { get => Body.SettingTransportMode ?? null; set => Body.SettingTransportMode = value; } /// <summary>True if Changed Block Tracking is enabled</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if Changed Block Tracking is enabled")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if Changed Block Tracking is enabled", SerializedName = @"useChangedBlockTrackingOnVM", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SettingUseChangedBlockTrackingOnVM { get => Body.SettingUseChangedBlockTrackingOnVM ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SettingUseChangedBlockTrackingOnVM = value; } /// <summary>True if use VM CheckPoint setting is enabled</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if use VM CheckPoint setting is enabled")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if use VM CheckPoint setting is enabled", SerializedName = @"useVMCheckpointSetting", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SettingUseVMCheckpointSetting { get => Body.SettingUseVMCheckpointSetting ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SettingUseVMCheckpointSetting = 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 = @"vmBackupType", PossibleTypes = new [] { typeof(string) })] public string SettingVMBackupType { get => Body.SettingVMBackupType ?? null; set => Body.SettingVMBackupType = 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 SnapEngineId { get => Body.SnapEngineId ?? default(long); set => Body.SnapEngineId = 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 SnapEngineName { get => Body.SnapEngineName ?? null; set => Body.SnapEngineName = 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 SnapMountProxyId { get => Body.SnapMountProxyId ?? default(long); set => Body.SnapMountProxyId = 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 SnapMountProxyName { get => Body.SnapMountProxyName ?? null; set => Body.SnapMountProxyName = 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 = @"backupCopyInterface", PossibleTypes = new [] { typeof(string) })] public string SnapshotManagementBackupCopyInterface { get => Body.SnapshotManagementBackupCopyInterface ?? null; set => Body.SnapshotManagementBackupCopyInterface = value; } /// <summary>True if hardware snapshot is enabled</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if hardware snapshot is enabled")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if hardware snapshot is enabled", SerializedName = @"enableHardwareSnapshot", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SnapshotManagementEnableHardwareSnapshot { get => Body.SnapshotManagementEnableHardwareSnapshot ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SnapshotManagementEnableHardwareSnapshot = value; } /// <summary>True if full copy of amazon snapshot to different amazon account is enabled</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if full copy of amazon snapshot to different amazon account is enabled")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if full copy of amazon snapshot to different amazon account is enabled", SerializedName = @"isCrossAccountCopyEnabled", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SnapshotManagementIsCrossAccountCopyEnabled { get => Body.SnapshotManagementIsCrossAccountCopyEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SnapshotManagementIsCrossAccountCopyEnabled = value; } /// <summary> /// True if replicate and copy or sharing of amazon snapshot to different amazon account in same or different geographic location /// is enabled /// </summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if replicate and copy or sharing of amazon snapshot to different amazon account in same or different geographic location is enabled")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if replicate and copy or sharing of amazon snapshot to different amazon account in same or different geographic location is enabled", SerializedName = @"isCrossAccountEnabled", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SnapshotManagementIsCrossAccountEnabled { get => Body.SnapshotManagementIsCrossAccountEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SnapshotManagementIsCrossAccountEnabled = value; } /// <summary>True if independent disk option is enabled</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if independent disk option is enabled")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if independent disk option is enabled", SerializedName = @"isIndependentDisksEnabled", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SnapshotManagementIsIndependentDisksEnabled { get => Body.SnapshotManagementIsIndependentDisksEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SnapshotManagementIsIndependentDisksEnabled = value; } /// <summary>True if raw device maps option is enabled</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if raw device maps option is enabled")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if raw device maps option is enabled", SerializedName = @"isRawDeviceMapsEnabled", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SnapshotManagementIsRawDeviceMapsEnabled { get => Body.SnapshotManagementIsRawDeviceMapsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SnapshotManagementIsRawDeviceMapsEnabled = value; } /// <summary>Name of ESX Host</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of ESX Host")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Name of ESX Host", SerializedName = @"snapMountESXHost", PossibleTypes = new [] { typeof(string) })] public string SnapshotManagementSnapMountEsxHost { get => Body.SnapshotManagementSnapMountEsxHost ?? null; set => Body.SnapshotManagementSnapMountEsxHost = value; } /// <summary>True if separate proxy client is used for snap to tape</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True if separate proxy client is used for snap to tape")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"True if separate proxy client is used for snap to tape", SerializedName = @"useSeparateProxyForSnapToTape", PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] public global::System.Management.Automation.SwitchParameter SnapshotManagementUseSeparateProxyForSnapToTape { get => Body.SnapshotManagementUseSeparateProxyForSnapToTape ?? default(global::System.Management.Automation.SwitchParameter); set => Body.SnapshotManagementUseSeparateProxyForSnapToTape = value; } /// <summary>Virtual machine application user name</summary> [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Virtual machine application user name")] [global::Commvault.Powershell.Category(global::Commvault.Powershell.ParameterCategory.Body)] [Commvault.Powershell.Runtime.Info( Required = false, ReadOnly = false, Description = @"Virtual machine application user name", SerializedName = @"vmApplicationUserName", PossibleTypes = new [] { typeof(string) })] public string SnapshotManagementVMApplicationUserName { get => Body.SnapshotManagementVMApplicationUserName ?? null; set => Body.SnapshotManagementVMApplicationUserName = 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 StorageId { get => Body.StorageId ?? default(long); set => Body.StorageId = 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 StorageName { get => Body.StorageName ?? null; set => Body.StorageName = value; } /// <summary> /// <c>overrideOnBadRequest</c> will be called before the regular onBadRequest 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 onBadRequest method should be processed, or if the method should /// return immediately (set to true to skip further processing )</param> partial void overrideOnBadRequest(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> /// <c>overrideOnInternalServerError</c> will be called before the regular onInternalServerError 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 onInternalServerError method should be processed, or if the /// method should return immediately (set to true to skip further processing )</param> partial void overrideOnInternalServerError(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> /// <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.IGetVMGroupResp" /> 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.IGetVMGroupResp> 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>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 'UpdateVMGroup' 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.VMGroupId) { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.VMGroupId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } await this.Client.UpdateVMGroup(InputObject.VMGroupId ?? default(long), Body, onOk, onBadRequest, onInternalServerError, 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> /// Intializes a new instance of the <see cref="SetVMGroup_UpdateViaIdentityExpanded" /> cmdlet class. /// </summary> public SetVMGroup_UpdateViaIdentityExpanded() { } /// <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 400 (BadRequest).</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 onBadRequest(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); overrideOnBadRequest(responseMessage, response, ref _returnNow); // if overrideOnBadRequest has returned true, then return right away. if ((null != _returnNow && await _returnNow)) { return ; } // onBadRequest - response for 400 / application/json // (await response) // should be Commvault.Powershell.Models.IGenericResp WriteObject((await response)); } } /// <summary> /// a delegate that is called when the remote service returns 500 (InternalServerError). /// </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 onInternalServerError(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); overrideOnInternalServerError(responseMessage, response, ref _returnNow); // if overrideOnInternalServerError has returned true, then return right away. if ((null != _returnNow && await _returnNow)) { return ; } // onInternalServerError - response for 500 / application/json // (await response) // should be Commvault.Powershell.Models.IGenericResp WriteObject((await response)); } } /// <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.IGetVMGroupResp" /> 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.IGetVMGroupResp> 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.IGetVMGroupResp WriteObject((await response)); } } } } |