Class: ContextDev::Models::MonitorCreateResponse
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ContextDev::Models::MonitorCreateResponse
- Defined in:
- lib/context_dev/models/monitor_create_response.rb,
sig/context_dev/models/monitor_create_response.rbs
Overview
Defined Under Namespace
Modules: ChangeDetection, Mode, Status, Target Classes: LastError, Schedule, Webhook
Instance Attribute Summary collapse
-
#change_detection ⇒ ContextDev::Models::MonitorCreateResponse::ChangeDetection::Exact, ContextDev::Models::MonitorCreateResponse::ChangeDetection::Semantic
Discriminated union describing how changes are detected.
- #created_at ⇒ Time
- #id ⇒ String
- #last_change_at ⇒ Time?
-
#last_error ⇒ ContextDev::Models::MonitorCreateResponse::LastError?
Error from the most recent failed run; null when the last run succeeded.
- #last_run_at ⇒ Time?
-
#mode ⇒ Symbol, ContextDev::Models::MonitorCreateResponse::Mode
Top-level monitor category.
- #name ⇒ String
-
#next_run_at ⇒ Time?
When the next scheduled run is due.
-
#schedule ⇒ ContextDev::Models::MonitorCreateResponse::Schedule
Run the monitor on a fixed interval defined by a frequency and a unit, e.g.
-
#status ⇒ Symbol, ContextDev::Models::MonitorCreateResponse::Status
Monitor lifecycle status.
-
#tags ⇒ Array<String>?
User-defined tags for grouping and filtering monitors and their changes.
-
#target ⇒ ContextDev::Models::MonitorCreateResponse::Target::Page, ...
Discriminated union describing what the monitor watches.
- #updated_at ⇒ Time
- #webhook ⇒ ContextDev::Models::MonitorCreateResponse::Webhook?
Class Method Summary collapse
- .values ⇒ Array<Symbol>
- .variants ⇒ Array(ContextDev::Models::MonitorCreateResponse::Target::Page, ContextDev::Models::MonitorCreateResponse::Target::Sitemap, ContextDev::Models::MonitorCreateResponse::Target::Extract)
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_create_response.rb', line 97
|
Instance Attribute Details
#change_detection ⇒ ContextDev::Models::MonitorCreateResponse::ChangeDetection::Exact, ContextDev::Models::MonitorCreateResponse::ChangeDetection::Semantic
Discriminated union describing how changes are detected.
16 |
# File 'lib/context_dev/models/monitor_create_response.rb', line 16 required :change_detection, union: -> { ContextDev::Models::MonitorCreateResponse::ChangeDetection } |
#created_at ⇒ Time
21 |
# File 'lib/context_dev/models/monitor_create_response.rb', line 21 required :created_at, Time |
#id ⇒ String
10 |
# File 'lib/context_dev/models/monitor_create_response.rb', line 10 required :id, String |
#last_change_at ⇒ Time?
67 |
# File 'lib/context_dev/models/monitor_create_response.rb', line 67 optional :last_change_at, Time, nil?: true |
#last_error ⇒ ContextDev::Models::MonitorCreateResponse::LastError?
Error from the most recent failed run; null when the last run succeeded.
73 |
# File 'lib/context_dev/models/monitor_create_response.rb', line 73 optional :last_error, -> { ContextDev::Models::MonitorCreateResponse::LastError }, nil?: true |
#last_run_at ⇒ Time?
78 |
# File 'lib/context_dev/models/monitor_create_response.rb', line 78 optional :last_run_at, Time, nil?: true |
#mode ⇒ Symbol, ContextDev::Models::MonitorCreateResponse::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_create_response.rb', line 28 required :mode, enum: -> { ContextDev::Models::MonitorCreateResponse::Mode } |
#name ⇒ String
33 |
# File 'lib/context_dev/models/monitor_create_response.rb', line 33 required :name, String |
#next_run_at ⇒ Time?
When the next scheduled run is due.
84 |
# File 'lib/context_dev/models/monitor_create_response.rb', line 84 optional :next_run_at, Time, nil?: true |
#schedule ⇒ ContextDev::Models::MonitorCreateResponse::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_create_response.rb', line 41 required :schedule, -> { ContextDev::Models::MonitorCreateResponse::Schedule } |
#status ⇒ Symbol, ContextDev::Models::MonitorCreateResponse::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_create_response.rb', line 51 required :status, enum: -> { ContextDev::Models::MonitorCreateResponse::Status } |
#tags ⇒ Array<String>?
User-defined tags for grouping and filtering monitors and their changes.
90 |
# File 'lib/context_dev/models/monitor_create_response.rb', line 90 optional :tags, ContextDev::Internal::Type::ArrayOf[String] |
#target ⇒ ContextDev::Models::MonitorCreateResponse::Target::Page, ...
Discriminated union describing what the monitor watches.
57 |
# File 'lib/context_dev/models/monitor_create_response.rb', line 57 required :target, union: -> { ContextDev::Models::MonitorCreateResponse::Target } |
#updated_at ⇒ Time
62 |
# File 'lib/context_dev/models/monitor_create_response.rb', line 62 required :updated_at, Time |
#webhook ⇒ ContextDev::Models::MonitorCreateResponse::Webhook?
95 |
# File 'lib/context_dev/models/monitor_create_response.rb', line 95 optional :webhook, -> { ContextDev::Models::MonitorCreateResponse::Webhook }, nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/context_dev/models/monitor_create_response.rb', line 198
|
.variants ⇒ Array(ContextDev::Models::MonitorCreateResponse::Target::Page, ContextDev::Models::MonitorCreateResponse::Target::Sitemap, ContextDev::Models::MonitorCreateResponse::Target::Extract)
|
|
# File 'lib/context_dev/models/monitor_create_response.rb', line 185
|
Instance Method Details
#to_hash ⇒ {
73 |
# File 'sig/context_dev/models/monitor_create_response.rbs', line 73
def to_hash: -> {
|