Class: ContextDev::Models::MonitorListRunsResponse::Data

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

Defined Under Namespace

Modules: ChangeDetectionType, RunType, SkipReason, Status, TargetType Classes: Error

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(code:, message:) ⇒ Object

Parameters:

  • code (String)
  • message (String)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 28

class Data < ContextDev::Internal::Type::BaseModel
  # @!attribute id
  #
  #   @return [String]
  required :id, String

  # @!attribute baseline_created
  #   True when this run established the monitor's initial baseline; baseline runs
  #   perform no change detection.
  #
  #   @return [Boolean]
  required :baseline_created, ContextDev::Internal::Type::Boolean

  # @!attribute change_detected
  #
  #   @return [Boolean]
  required :change_detected, ContextDev::Internal::Type::Boolean

  # @!attribute change_detection_type
  #
  #   @return [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::ChangeDetectionType]
  required :change_detection_type,
           enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::ChangeDetectionType }

  # @!attribute credits_charged
  #   Credits charged for this run (0 for skipped/failed runs).
  #
  #   @return [Integer]
  required :credits_charged, Integer

  # @!attribute monitor_id
  #
  #   @return [String]
  required :monitor_id, String

  # @!attribute run_type
  #   The first run after monitor creation is a baseline run.
  #
  #   @return [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::RunType]
  required :run_type, enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::RunType }

  # @!attribute status
  #   Lifecycle status of a run. `skipped` runs never executed — see `skip_reason`
  #   (insufficient credits, monitor paused, or superseded by a concurrent run).
  #
  #   @return [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::Status]
  required :status, enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::Status }

  # @!attribute target_type
  #
  #   @return [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::TargetType]
  required :target_type, enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::TargetType }

  # @!attribute change_id
  #
  #   @return [String, nil]
  optional :change_id, String, nil?: true

  # @!attribute completed_at
  #
  #   @return [Time, nil]
  optional :completed_at, Time, nil?: true

  # @!attribute error
  #
  #   @return [ContextDev::Models::MonitorListRunsResponse::Data::Error, nil]
  optional :error, -> { ContextDev::Models::MonitorListRunsResponse::Data::Error }, nil?: true

  # @!attribute skip_reason
  #   Why a skipped run never executed; null unless status is `skipped`.
  #
  #   @return [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::SkipReason, nil]
  optional :skip_reason,
           enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::SkipReason },
           nil?: true

  # @!attribute started_at
  #
  #   @return [Time, nil]
  optional :started_at, Time, nil?: true

  # @!method initialize(id:, baseline_created:, change_detected:, change_detection_type:, credits_charged:, monitor_id:, run_type:, status:, target_type:, change_id: nil, completed_at: nil, error: nil, skip_reason: nil, started_at: nil)
  #   Some parameter documentations has been truncated, see
  #   {ContextDev::Models::MonitorListRunsResponse::Data} for more details.
  #
  #   @param id [String]
  #
  #   @param baseline_created [Boolean] True when this run established the monitor's initial baseline; baseline runs per
  #
  #   @param change_detected [Boolean]
  #
  #   @param change_detection_type [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::ChangeDetectionType]
  #
  #   @param credits_charged [Integer] Credits charged for this run (0 for skipped/failed runs).
  #
  #   @param monitor_id [String]
  #
  #   @param run_type [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::RunType] The first run after monitor creation is a baseline run.
  #
  #   @param status [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::Status] Lifecycle status of a run. `skipped` runs never executed — see `skip_reason` (in
  #
  #   @param target_type [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::TargetType]
  #
  #   @param change_id [String, nil]
  #
  #   @param completed_at [Time, nil]
  #
  #   @param error [ContextDev::Models::MonitorListRunsResponse::Data::Error, nil]
  #
  #   @param skip_reason [Symbol, ContextDev::Models::MonitorListRunsResponse::Data::SkipReason, nil] Why a skipped run never executed; null unless status is `skipped`.
  #
  #   @param started_at [Time, nil]

  # @see ContextDev::Models::MonitorListRunsResponse::Data#change_detection_type
  module ChangeDetectionType
    extend ContextDev::Internal::Type::Enum

    EXACT = :exact
    SEMANTIC = :semantic

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # The first run after monitor creation is a baseline run.
  #
  # @see ContextDev::Models::MonitorListRunsResponse::Data#run_type
  module RunType
    extend ContextDev::Internal::Type::Enum

    BASELINE = :baseline
    SCHEDULED = :scheduled

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # Lifecycle status of a run. `skipped` runs never executed — see `skip_reason`
  # (insufficient credits, monitor paused, or superseded by a concurrent run).
  #
  # @see ContextDev::Models::MonitorListRunsResponse::Data#status
  module Status
    extend ContextDev::Internal::Type::Enum

    QUEUED = :queued
    RUNNING = :running
    COMPLETED = :completed
    FAILED = :failed
    SKIPPED = :skipped

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @see ContextDev::Models::MonitorListRunsResponse::Data#target_type
  module TargetType
    extend ContextDev::Internal::Type::Enum

    PAGE = :page
    SITEMAP = :sitemap
    EXTRACT = :extract

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @see ContextDev::Models::MonitorListRunsResponse::Data#error
  class Error < ContextDev::Internal::Type::BaseModel
    # @!attribute code
    #
    #   @return [String]
    required :code, String

    # @!attribute message
    #
    #   @return [String]
    required :message, String

    # @!method initialize(code:, message:)
    #   @param code [String]
    #   @param message [String]
  end

  # Why a skipped run never executed; null unless status is `skipped`.
  #
  # @see ContextDev::Models::MonitorListRunsResponse::Data#skip_reason
  module SkipReason
    extend ContextDev::Internal::Type::Enum

    INSUFFICIENT_CREDITS = :insufficient_credits
    MONITOR_PAUSED = :monitor_paused
    SUPERSEDED = :superseded

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#baseline_createdBoolean

True when this run established the monitor's initial baseline; baseline runs perform no change detection.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


39
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 39

required :baseline_created, ContextDev::Internal::Type::Boolean

#change_detectedBoolean

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


44
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 44

required :change_detected, ContextDev::Internal::Type::Boolean

#change_detection_typeSymbol, ContextDev::Models::MonitorListRunsResponse::Data::ChangeDetectionType

Parameters:

  • value (ContextDev::Models::MonitorListRunsResponse::Data::change_detection_type)

Returns:



49
50
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 49

required :change_detection_type,
enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::ChangeDetectionType }

#change_idString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


84
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 84

optional :change_id, String, nil?: true

#completed_atTime?

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


89
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 89

optional :completed_at, Time, nil?: true

#credits_chargedInteger

Credits charged for this run (0 for skipped/failed runs).

Parameters:

  • value (Integer)

Returns:

  • (Integer)


56
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 56

required :credits_charged, Integer

#errorContextDev::Models::MonitorListRunsResponse::Data::Error?



94
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 94

optional :error, -> { ContextDev::Models::MonitorListRunsResponse::Data::Error }, nil?: true

#idString

Parameters:

  • value (String)

Returns:

  • (String)


32
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 32

required :id, String

#monitor_idString

Parameters:

  • value (String)

Returns:

  • (String)


61
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 61

required :monitor_id, String

#run_typeSymbol, ContextDev::Models::MonitorListRunsResponse::Data::RunType

The first run after monitor creation is a baseline run.

Parameters:

  • value (ContextDev::Models::MonitorListRunsResponse::Data::run_type)

Returns:



67
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 67

required :run_type, enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::RunType }

#skip_reasonSymbol, ...

Why a skipped run never executed; null unless status is skipped.

Parameters:

  • value (ContextDev::Models::MonitorListRunsResponse::Data::skip_reason, nil)

Returns:



100
101
102
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 100

optional :skip_reason,
enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::SkipReason },
nil?: true

#started_atTime?

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


107
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 107

optional :started_at, Time, nil?: true

#statusSymbol, ContextDev::Models::MonitorListRunsResponse::Data::Status

Lifecycle status of a run. skipped runs never executed — see skip_reason (insufficient credits, monitor paused, or superseded by a concurrent run).

Parameters:

  • value (ContextDev::Models::MonitorListRunsResponse::Data::status)

Returns:



74
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 74

required :status, enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::Status }

#target_typeSymbol, ContextDev::Models::MonitorListRunsResponse::Data::TargetType

Parameters:

  • value (ContextDev::Models::MonitorListRunsResponse::Data::target_type)

Returns:



79
# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 79

required :target_type, enum: -> { ContextDev::Models::MonitorListRunsResponse::Data::TargetType }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/context_dev/models/monitor_list_runs_response.rb', line 148

Instance Method Details

#to_hash{

Returns:

  • ({)


93
# File 'sig/context_dev/models/monitor_list_runs_response.rbs', line 93

def to_hash: -> {