Class: ContextDev::Models::MonitorListAccountRunsResponse::Data

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

Defined Under Namespace

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

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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/context_dev/models/monitor_list_account_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::MonitorListAccountRunsResponse::Data::ChangeDetectionType]
  required :change_detection_type,
           enum: -> { ContextDev::Models::MonitorListAccountRunsResponse::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::MonitorListAccountRunsResponse::Data::RunType]
  required :run_type, enum: -> { ContextDev::Models::MonitorListAccountRunsResponse::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::MonitorListAccountRunsResponse::Data::Status]
  required :status, enum: -> { ContextDev::Models::MonitorListAccountRunsResponse::Data::Status }

  # @!attribute target_type
  #
  #   @return [Symbol, ContextDev::Models::MonitorListAccountRunsResponse::Data::TargetType]
  required :target_type, enum: -> { ContextDev::Models::MonitorListAccountRunsResponse::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::MonitorListAccountRunsResponse::Data::Error, nil]
  optional :error, -> { ContextDev::Models::MonitorListAccountRunsResponse::Data::Error }, nil?: true

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

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

  # @!attribute webhook_delivery
  #   The webhook delivery attempted for a change detected by this run. Omitted when
  #   no webhook was attempted, including historical runs created before delivery
  #   tracking was added.
  #
  #   @return [ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery, nil]
  optional :webhook_delivery,
           -> { ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery }

  # @!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, webhook_delivery: nil)
  #   Some parameter documentations has been truncated, see
  #   {ContextDev::Models::MonitorListAccountRunsResponse::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::MonitorListAccountRunsResponse::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::MonitorListAccountRunsResponse::Data::RunType] The first run after monitor creation is a baseline run.
  #
  #   @param status [Symbol, ContextDev::Models::MonitorListAccountRunsResponse::Data::Status] Lifecycle status of a run. `skipped` runs never executed — see `skip_reason` (in
  #
  #   @param target_type [Symbol, ContextDev::Models::MonitorListAccountRunsResponse::Data::TargetType]
  #
  #   @param change_id [String, nil]
  #
  #   @param completed_at [Time, nil]
  #
  #   @param error [ContextDev::Models::MonitorListAccountRunsResponse::Data::Error, nil]
  #
  #   @param skip_reason [Symbol, ContextDev::Models::MonitorListAccountRunsResponse::Data::SkipReason, nil] Why a skipped run never executed; null unless status is `skipped`.
  #
  #   @param started_at [Time, nil]
  #
  #   @param webhook_delivery [ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery] The webhook delivery attempted for a change detected by this run. Omitted when n

  # @see ContextDev::Models::MonitorListAccountRunsResponse::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::MonitorListAccountRunsResponse::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::MonitorListAccountRunsResponse::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::MonitorListAccountRunsResponse::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::MonitorListAccountRunsResponse::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::MonitorListAccountRunsResponse::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

  # @see ContextDev::Models::MonitorListAccountRunsResponse::Data#webhook_delivery
  class WebhookDelivery < ContextDev::Internal::Type::BaseModel
    # @!attribute attempted_at
    #
    #   @return [Time]
    required :attempted_at, Time

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

    # @!attribute event_id
    #   Identifier sent in the X-Context-Id header.
    #
    #   @return [String]
    required :event_id, String

    # @!attribute http_status
    #   The endpoint's final HTTP response status, or null when no response was
    #   received.
    #
    #   @return [Integer, nil]
    required :http_status, Integer, nil?: true

    # @!attribute status
    #   Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
    #   response; failed means no HTTP response was received; skipped_unsafe_url means
    #   the URL failed the public-endpoint safety check.
    #
    #   @return [Symbol, ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status]
    required :status,
             enum: -> { ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status }

    # @!method initialize(attempted_at:, error:, event_id:, http_status:, status:)
    #   Some parameter documentations has been truncated, see
    #   {ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery} for
    #   more details.
    #
    #   The webhook delivery attempted for a change detected by this run. Omitted when
    #   no webhook was attempted, including historical runs created before delivery
    #   tracking was added.
    #
    #   @param attempted_at [Time]
    #
    #   @param error [ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Error, nil]
    #
    #   @param event_id [String] Identifier sent in the X-Context-Id header.
    #
    #   @param http_status [Integer, nil] The endpoint's final HTTP response status, or null when no response was received
    #
    #   @param status [Symbol, ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery::Status] Delivery outcome. delivered means any 2xx response; rejected means a non-2xx res

    # @see ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery#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

    # Delivery outcome. delivered means any 2xx response; rejected means a non-2xx
    # response; failed means no HTTP response was received; skipped_unsafe_url means
    # the URL failed the public-endpoint safety check.
    #
    # @see ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery#status
    module Status
      extend ContextDev::Internal::Type::Enum

      DELIVERED = :delivered
      REJECTED = :rejected
      FAILED = :failed
      SKIPPED_UNSAFE_URL = :skipped_unsafe_url

      # @!method self.values
      #   @return [Array<Symbol>]
    end
  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_account_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_account_runs_response.rb', line 44

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

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

Parameters:

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

Returns:



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

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

#change_idString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


84
# File 'lib/context_dev/models/monitor_list_account_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_account_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_account_runs_response.rb', line 56

required :credits_charged, Integer

#errorContextDev::Models::MonitorListAccountRunsResponse::Data::Error?



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

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

#idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#monitor_idString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :monitor_id, String

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

The first run after monitor creation is a baseline run.

Parameters:

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

Returns:



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

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

#skip_reasonSymbol, ...

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

Parameters:

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

Returns:



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

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

#started_atTime?

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


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

optional :started_at, Time, nil?: true

#statusSymbol, ContextDev::Models::MonitorListAccountRunsResponse::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::MonitorListAccountRunsResponse::Data::status)

Returns:



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

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

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

Parameters:

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

Returns:



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

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

#webhook_deliveryContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery?

The webhook delivery attempted for a change detected by this run. Omitted when no webhook was attempted, including historical runs created before delivery tracking was added.



115
116
# File 'lib/context_dev/models/monitor_list_account_runs_response.rb', line 115

optional :webhook_delivery,
-> { ContextDev::Models::MonitorListAccountRunsResponse::Data::WebhookDelivery }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/context_dev/models/monitor_list_account_runs_response.rb', line 159

Instance Method Details

#to_hash{

Returns:

  • ({)


101
# File 'sig/context_dev/models/monitor_list_account_runs_response.rbs', line 101

def to_hash: -> {