Class: ContextDev::Models::MonitorCreateParams::Schedule

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

Defined Under Namespace

Modules: Type, Unit

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(frequency:, type:, unit:) ⇒ Object

Some parameter documentations has been truncated, see ContextDev::Models::MonitorCreateParams::Schedule for more details.

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.

Parameters:



# File 'lib/context_dev/models/monitor_create_params.rb', line 145

Instance Attribute Details

#frequencyInteger

Number of units between runs. The resulting interval (frequency × unit) must be at least 10 minutes and at most 1 year (e.g. minimum 10 when unit is minutes; maximum 365 when unit is days).

Parameters:

  • value (Integer)

Returns:

  • (Integer)


133
# File 'lib/context_dev/models/monitor_create_params.rb', line 133

required :frequency, Integer

#typeSymbol, ContextDev::Models::MonitorCreateParams::Schedule::Type

Parameters:

  • value (ContextDev::Models::MonitorCreateParams::Schedule::type_)

Returns:



138
# File 'lib/context_dev/models/monitor_create_params.rb', line 138

required :type, enum: -> { ContextDev::MonitorCreateParams::Schedule::Type }

#unitSymbol, ContextDev::Models::MonitorCreateParams::Schedule::Unit

Parameters:

  • value (ContextDev::Models::MonitorCreateParams::Schedule::unit)

Returns:



143
# File 'lib/context_dev/models/monitor_create_params.rb', line 143

required :unit, enum: -> { ContextDev::MonitorCreateParams::Schedule::Unit }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/context_dev/models/monitor_create_params.rb', line 165

Instance Method Details

#to_hash{

Returns:

  • ({)


126
# File 'sig/context_dev/models/monitor_create_params.rbs', line 126

def to_hash: -> {