Class: ContextDev::Models::MonitorUpdateResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ContextDev::Models::MonitorUpdateResponse
- Defined in:
- lib/context_dev/models/monitor_update_response.rb,
sig/context_dev/models/monitor_update_response.rbs
Overview
Defined Under Namespace
Modules: Baseline, ChangeDetection, Mode, Status, Target Classes: LastError, Schedule, Webhook
Instance Attribute Summary collapse
-
#baseline ⇒ ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsPageBaseline, ...
Current baseline: the last observed value the monitor compares new snapshots against.
-
#change_detection ⇒ ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Exact, ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Semantic
Discriminated union describing how changes are detected.
- #created_at ⇒ Time
- #id ⇒ String
- #last_change_at ⇒ Time?
-
#last_error ⇒ ContextDev::Models::MonitorUpdateResponse::LastError?
Error from the most recent failed run; null when the last run succeeded.
- #last_run_at ⇒ Time?
-
#mode ⇒ Symbol, ContextDev::Models::MonitorUpdateResponse::Mode
Top-level monitor category.
- #name ⇒ String
-
#next_run_at ⇒ Time?
When the next scheduled run is due.
-
#schedule ⇒ ContextDev::Models::MonitorUpdateResponse::Schedule
Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
-
#status ⇒ Symbol, ContextDev::Models::MonitorUpdateResponse::Status
Monitor lifecycle status.
-
#tags ⇒ Array<String>?
User-defined tags for grouping and filtering monitors and their changes.
-
#target ⇒ ContextDev::Models::MonitorUpdateResponse::Target::Page, ...
Discriminated union describing what the monitor watches.
- #updated_at ⇒ Time
- #webhook ⇒ ContextDev::Models::MonitorUpdateResponse::Webhook?
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsPageBaseline, ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsSitemapBaseline, ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsExtractBaseline)
Instance Method Summary collapse
-
#initialize(code:, message:) ⇒ Object
constructor
Error from the most recent failed run; null when the last run succeeded.
- #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(code:, message:) ⇒ Object
Error from the most recent failed run; null when the last run succeeded.
|
|
# File 'lib/context_dev/models/monitor_update_response.rb', line 106
|
Instance Attribute Details
#baseline ⇒ ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsPageBaseline, ...
Current baseline: the last observed value the monitor compares new snapshots
against. Its shape follows target.type (page/sitemap/extract). Only populated
on GET /monitors/monitor_id; null until the first baseline run completes (and
after a target or change_detection update, which resets the baseline).
71 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 71 optional :baseline, union: -> { ContextDev::Models::MonitorUpdateResponse::Baseline }, nil?: true |
#change_detection ⇒ ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Exact, ContextDev::Models::MonitorUpdateResponse::ChangeDetection::Semantic
Discriminated union describing how changes are detected.
16 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 16 required :change_detection, union: -> { ContextDev::Models::MonitorUpdateResponse::ChangeDetection } |
#created_at ⇒ Time
21 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 21 required :created_at, Time |
#id ⇒ String
10 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 10 required :id, String |
#last_change_at ⇒ Time?
76 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 76 optional :last_change_at, Time, nil?: true |
#last_error ⇒ ContextDev::Models::MonitorUpdateResponse::LastError?
Error from the most recent failed run; null when the last run succeeded.
82 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 82 optional :last_error, -> { ContextDev::Models::MonitorUpdateResponse::LastError }, nil?: true |
#last_run_at ⇒ Time?
87 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 87 optional :last_run_at, Time, nil?: true |
#mode ⇒ Symbol, ContextDev::Models::MonitorUpdateResponse::Mode
Top-level monitor category. Always web today; the concrete behavior is
described by target and change_detection.
28 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 28 required :mode, enum: -> { ContextDev::Models::MonitorUpdateResponse::Mode } |
#name ⇒ String
33 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 33 required :name, String |
#next_run_at ⇒ Time?
When the next scheduled run is due.
93 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 93 optional :next_run_at, Time, nil?: true |
#schedule ⇒ ContextDev::Models::MonitorUpdateResponse::Schedule
Run the monitor on a fixed interval defined by a frequency and a unit, e.g. every 6 hours or every 2 days. The total interval (frequency × unit) must be between 10 minutes and 1 year.
41 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 41 required :schedule, -> { ContextDev::Models::MonitorUpdateResponse::Schedule } |
#status ⇒ Symbol, ContextDev::Models::MonitorUpdateResponse::Status
Monitor lifecycle status. failed means the most recent run failed (see the
monitor's last_error); failed monitors keep running on schedule and flip back
to active on the next successful run. Monitors are auto-paused after
repeated consecutive failures or insufficient-credit skips; resume by PATCHing
status to active.
51 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 51 required :status, enum: -> { ContextDev::Models::MonitorUpdateResponse::Status } |
#tags ⇒ Array<String>?
User-defined tags for grouping and filtering monitors and their changes.
99 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 99 optional :tags, ContextDev::Internal::Type::ArrayOf[String] |
#target ⇒ ContextDev::Models::MonitorUpdateResponse::Target::Page, ...
Discriminated union describing what the monitor watches.
57 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 57 required :target, union: -> { ContextDev::Models::MonitorUpdateResponse::Target } |
#updated_at ⇒ Time
62 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 62 required :updated_at, Time |
#webhook ⇒ ContextDev::Models::MonitorUpdateResponse::Webhook?
104 |
# File 'lib/context_dev/models/monitor_update_response.rb', line 104 optional :webhook, -> { ContextDev::Models::MonitorUpdateResponse::Webhook }, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/context_dev/models/monitor_update_response.rb', line 205
|
.variants ⇒ Array(ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsPageBaseline, ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsSitemapBaseline, ContextDev::Models::MonitorUpdateResponse::Baseline::MonitorsExtractBaseline)
|
|
# File 'lib/context_dev/models/monitor_update_response.rb', line 192
|
Instance Method Details
#to_hash ⇒ {
77 |
# File 'sig/context_dev/models/monitor_update_response.rbs', line 77
def to_hash: -> {
|