Class: DatadogAPIClient::V1::WidgetLiveSpan

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

Overview

The available timeframes depend on the widget you are using.

Constant Summary collapse

PAST_ONE_MINUTE =
"1m".freeze
PAST_FIVE_MINUTES =
"5m".freeze
PAST_TEN_MINUTES =
"10m".freeze
PAST_FIFTEEN_MINUTES =
"15m".freeze
PAST_THIRTY_MINUTES =
"30m".freeze
PAST_ONE_HOUR =
"1h".freeze
PAST_FOUR_HOURS =
"4h".freeze
PAST_ONE_DAY =
"1d".freeze
PAST_TWO_DAYS =
"2d".freeze
PAST_ONE_WEEK =
"1w".freeze
PAST_ONE_MONTH =
"1mo".freeze
PAST_THREE_MONTHS =
"3mo".freeze
PAST_SIX_MONTHS =
"6mo".freeze
PAST_ONE_YEAR =
"1y".freeze
ALERT =
"alert".freeze
WEEK_TO_DATE =
"week_to_date".freeze
MONTH_TO_DATE =
"month_to_date".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



40
41
42
# File 'lib/datadog_api_client/v1/models/widget_live_span.rb', line 40

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



47
48
49
50
# File 'lib/datadog_api_client/v1/models/widget_live_span.rb', line 47

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