Class ApprovalResult
- Namespace
- JD.AI.Core.Governance
- Assembly
- JD.AI.Core.dll
Result of an RequestApprovalAsync(ApprovalRequest, CancellationToken) call.
public sealed record ApprovalResult : IEquatable<ApprovalResult>
- Inheritance
-
ApprovalResult
- Implements
- Inherited Members
Constructors
ApprovalResult(ApprovalDecision, string?)
Result of an RequestApprovalAsync(ApprovalRequest, CancellationToken) call.
public ApprovalResult(ApprovalDecision Decision, string? Reason = null)
Parameters
DecisionApprovalDecisionReasonstring
Properties
Decision
public ApprovalDecision Decision { get; init; }
Property Value
IsApproved
Whether the decision is Approved.
public bool IsApproved { get; }
Property Value
Reason
public string? Reason { get; init; }
Property Value
Methods
Approved()
Returns Approved with no reason.
public static ApprovalResult Approved()
Returns
Rejected(string)
Returns Rejected with the given reason.
public static ApprovalResult Rejected(string reason)
Parameters
reasonstring
Returns
TimedOut()
Returns Timeout with no reason.
public static ApprovalResult TimedOut()