Class: DatadogAPIClient::V1::MonitorType

Inherits:
Object
  • Object
show all
Includes:
BaseEnumModel
Defined in:
lib/datadog_api_client/v1/models/monitor_type.rb,
lib/datadog_api_client/v1/models/monitor_type.rb

Overview

The type of the monitor. For more information about type, see the monitor options docs.

Constant Summary collapse

COMPOSITE =
"composite".freeze
EVENT_ALERT =
"event alert".freeze
LOG_ALERT =
"log alert".freeze
METRIC_ALERT =
"metric alert".freeze
PROCESS_ALERT =
"process alert".freeze
QUERY_ALERT =
"query alert".freeze
RUM_ALERT =
"rum alert".freeze
SERVICE_CHECK =
"service check".freeze
SYNTHETICS_ALERT =
"synthetics alert".freeze
TRACE_ANALYTICS_ALERT =
"trace-analytics alert".freeze
SLO_ALERT =
"slo alert".freeze
EVENT_V2_ALERT =
"event-v2 alert".freeze
AUDIT_ALERT =
"audit alert".freeze
CI_PIPELINES_ALERT =
"ci-pipelines alert".freeze
CI_TESTS_ALERT =
"ci-tests alert".freeze
ERROR_TRACKING_ALERT =
"error-tracking alert".freeze
DATABASE_MONITORING_ALERT =
"database-monitoring alert".freeze

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BaseEnumModel

included

Class Method Details

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



39
40
41
# File 'lib/datadog_api_client/v1/models/monitor_type.rb', line 39

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



46
47
48
49
# File 'lib/datadog_api_client/v1/models/monitor_type.rb', line 46

def build_from_hash(value)
  constantValues = MonitorType.constants.select { |c| MonitorType::const_get(c) == value }
  constantValues.empty? ? DatadogAPIClient::V1::UnparsedObject.new(value) : value
end