Framework/Models/AzSKEvent.ps1

Set-StrictMode -Version Latest
class AzSKRootEvent {
    static [string] $CustomMessage = "AzSK.CustomMessage"; #EventArgument: AzSKRootEventArgument

    static [string] $GenerateRunIdentifier = "AzSK.GenerateRunIdentifier"; #Creates a timestamp and publish, Initialize listeners #EventArgument: AzSKRootEventArgument
    static [string] $UnsupportedResources = "AzSK.UnsupportedResources";
    static [string] $WriteCSV = "AzSK.WriteCSV";
    static [string] $PublishCustomData = "AzSK.PublishCustomData"


    #Command level event
    static [string] $CommandStarted = "AzSK.Command.Started"; #Initialize listeners #Command execution started #EventArgument: AzSKRootEventArgument
    static [string] $CommandCompleted = "AzSK.Command.Completed"; #Cleanup listeners #Command execution completed #EventArgument: AzSKRootEventArgument
    static [string] $CommandError = "AzSK.Command.Error"; #EventArgument: AzSKRootEventArgument
    static [string] $CommandProcessing = "AzSK.Command.Processing"; #EventArgument: AzSKRootEventArgument
}

class SubscriptionContext {
    [string] $SubscriptionId = "";
    [string] $SubscriptionName = "";
    [string] $Scope = "";
    hidden [hashtable] $SubscriptionMetadata = @{}
}

class AzSKRootEventArgument {
    [SubscriptionContext] $SubscriptionContext;
    [MessageData[]] $Messages = @();
    hidden [System.Management.Automation.ErrorRecord] $ExceptionMessage
}
class CustomData {
    [string] $Name
    [PSObject] $Value
}