Framework/Models/ControlState.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Set-StrictMode -Version Latest 

class ControlState
{
    ControlState()
    {
        
    }

    ControlState([string] $ControlId, [string] $InternalId, [string] $ChildResourceName, [string] $ActualVerificationResult, [string] $Version)
    {
        $this.ControlId = $ControlId;
        $this.InternalId = $InternalId;
        $this.ChildResourceName = $ChildResourceName;
        $this.ActualVerificationResult = $ActualVerificationResult;
        #setting the effective control result default value actual. It would be reset once it is computed based on user input
        $this.EffectiveVerificationResult = $ActualVerificationResult;
        $this.Version = $Version;        
    }

    [string] $ControlId
    [string] $InternalId
    [string] $ResourceId
    [string] $HashId
    [StateData] $State    
    [string] $ChildResourceName
    [VerificationResult] $ActualVerificationResult
    [VerificationResult] $EffectiveVerificationResult
    [AttestationStatus] $AttestationStatus = [AttestationStatus]::None
    [string] $Version
}

class ControlStateIndexer
{
    [string] $ResourceId
    [string] $HashId
    [DateTime] $ExpiryTime
    [string] $AttestedBy
    [DateTime] $AttestedDate
    [string] $Version
}