Class: PreludeSDK::Models::WatchEvaluateResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/prelude_sdk/models/watch_evaluate_response.rb,
sig/prelude_sdk/models/watch_evaluate_response.rbs

Overview

See Also:

  • PreludeSDK::Resources::Watch#evaluate

Defined Under Namespace

Modules: Action, Verdict Classes: Recipe

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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(id:, action:, recipes:, verdict:) ⇒ Object

Some parameter documentations has been truncated, see PreludeSDK::Models::WatchEvaluateResponse for more details.

Parameters:



# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 42

Instance Attribute Details

#action ⇒ Symbol, PreludeSDK::Models::WatchEvaluateResponse::Action

What the evaluation suggests you do, being the most severe action across the recipes that ran. Advisory: enforcement is yours.

  • ALLOW - Let the request through.
  • BLOCK - Refuse the request.
  • CHALLENGE - Let the request through behind an additional check.

Parameters:

  • value (PreludeSDK::Models::WatchEvaluateResponse::action)

Returns:



22
# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 22

required :action, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Action }

#id ⇒ String

The evaluation identifier.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 11

required :id, String

#recipes ⇒ Array<PreludeSDK::Models::WatchEvaluateResponse::Recipe>

One result per recipe that ran. A recipe the flow names but that is not in service is absent rather than reported as having passed.



29
30
# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 29

required :recipes,
-> { PreludeSDK::Internal::Type::ArrayOf[PreludeSDK::Models::WatchEvaluateResponse::Recipe] }

#verdict ⇒ Symbol, PreludeSDK::Models::WatchEvaluateResponse::Verdict

The evaluation-level verdict, being the most severe verdict across the recipes that ran.

  • PASS - No recipe flagged.
  • FLAG - At least one recipe flagged.

Parameters:

  • value (PreludeSDK::Models::WatchEvaluateResponse::verdict)

Returns:



40
# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 40

required :verdict, enum: -> { PreludeSDK::Models::WatchEvaluateResponse::Verdict }

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/prelude_sdk/models/watch_evaluate_response.rb', line 69

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


27
# File 'sig/prelude_sdk/models/watch_evaluate_response.rbs', line 27

def to_hash: -> {