Framework/Models/AzSdkGenericEvent.ps1
Set-StrictMode -Version Latest class AzSdkGenericEvent { static [string] $CustomMessage = "AzSdk.Generic.CustomMessage"; #EventArgument: MessageData static [string] $Exception = "AzSdk.Generic.Exception"; #EventArgument: ErrorRecord } class MessageData { [MessageType] $MessageType = [MessageType]::Info; [string] $Message = ""; [bool] $MaintainState = $false; hidden [PSObject] $DataObject; hidden [string] $DataObjectType; MessageData() { } MessageData([string] $message, [MessageType] $messageType) { $this.Message = $message; $this.MessageType = $messageType; } MessageData([string] $message, [PSObject] $dataObject, [MessageType] $messageType) { $this.Message = $message; $this.DataObject = $dataObject; $this.MessageType = $messageType; } MessageData([string] $message, [PSObject] $dataObject, [MessageType] $messageType, [bool] $maintainState, [string] $dataObjectType) { $this.Message = $message; $this.DataObject = $dataObject; $this.MessageType = $messageType; $this.MaintainState = $maintainState; $this.DataObjectType = $dataObjectType; } MessageData([string] $message, [PSObject] $dataObject) { $this.Message = $message; $this.DataObject = $dataObject; } MessageData([string] $message, [PSObject] $dataObject, [bool] $maintainState, [string] $dataObjectType) { $this.Message = $message; $this.DataObject = $dataObject; $this.MaintainState = $maintainState; $this.DataObjectType = $dataObjectType; } MessageData([string] $message) { $this.Message = $message; } MessageData([PSObject] $dataObject) { $this.DataObject = $dataObject; } MessageData([PSObject] $dataObject, [bool] $maintainState, [string] $dataObjectType) { $this.DataObject = $dataObject; $this.MaintainState = $maintainState; $this.DataObjectType = $dataObjectType; } MessageData([PSObject] $dataObject, [MessageType] $messageType) { $this.MessageType = $messageType; $this.DataObject = $dataObject; } MessageData([PSObject] $dataObject, [MessageType] $messageType, [bool] $maintainState, [string] $dataObjectType) { $this.MessageType = $messageType; $this.DataObject = $dataObject; $this.MaintainState = $maintainState; $this.DataObjectType = $dataObjectType; } } |