Class: PreludeSDK::Models::WatchEvaluateResponse::Recipe
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- PreludeSDK::Models::WatchEvaluateResponse::Recipe
- Defined in:
- lib/prelude_sdk/models/watch_evaluate_response.rb,
sig/prelude_sdk/models/watch_evaluate_response.rbs
Defined Under Namespace
Modules: Verdict Classes: Rule
Instance Attribute Summary collapse
-
#determined_by ⇒ String?
The preempting rule that set
verdict, present only when a rule rather than the score decided it. -
#partial_evidence ⇒ Boolean
At least one rule could not be evaluated, so the score rests on less than the whole recipe.
-
#recipe_id ⇒ String
The recipe that produced this result.
-
#rules ⇒ Array<PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule>
One result per rule in the recipe, in membership order.
-
#score ⇒ Integer
The sum of the weights of the rules that triggered, clamped to the range -100 to 100.
-
#threshold ⇒ Integer
The score at or above which this recipe flags.
-
#verdict ⇒ Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Verdict
This recipe's own verdict.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize ⇒ Object constructor
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize ⇒ Object
74 |
# File 'sig/prelude_sdk/models/watch_evaluate_response.rbs', line 74
def initialize: (
|
Instance Attribute Details
#determined_by ⇒ String?
The preempting rule that set verdict, present only when a rule rather than the
score decided it. Without it a recipe can report a score under its threshold and
still flag, with nothing in the payload accounting for the difference.
123 |
# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 123 optional :determined_by, String |
#partial_evidence ⇒ Boolean
At least one rule could not be evaluated, so the score rests on less than the whole recipe. The score is still returned — a partial verdict is more useful than none — but it is labeled rather than passed off as whole.
80 |
# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 80 required :partial_evidence, PreludeSDK::Internal::Type::Boolean |
#recipe_id ⇒ String
The recipe that produced this result.
86 |
# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 86 required :recipe_id, String |
#rules ⇒ Array<PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule>
One result per rule in the recipe, in membership order. Every rule runs — a score is only meaningful when complete, so there is no short-circuit on the first trigger.
94 95 |
# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 94 required :rules, -> { PreludeSDK::Internal::Type::ArrayOf[PreludeSDK::Models::WatchEvaluateResponse::Recipe::Rule] } |
#score ⇒ Integer
The sum of the weights of the rules that triggered, clamped to the range -100 to 100. Two scores at a bound are not comparable.
102 |
# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 102 required :score, Integer |
#threshold ⇒ Integer
The score at or above which this recipe flags.
108 |
# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 108 required :threshold, Integer |
#verdict ⇒ Symbol, PreludeSDK::Models::WatchEvaluateResponse::Recipe::Verdict
This recipe's own verdict. Normally the score against the threshold, unless a
preempting rule fired — see determined_by.
115 |
# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 115 required :verdict, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Recipe::Verdict } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 228
|
Instance Method Details
#to_hash ⇒ {
84 |
# File 'sig/prelude_sdk/models/watch_evaluate_response.rbs', line 84
def to_hash: -> {
|