Class: DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow

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

Overview

A time window is specified to match when at least one of the cases matches true. This is a sliding window and evaluates in real time. For third party rules, this field is not used.

Constant Summary collapse

ZERO_MINUTES =
0.freeze
ONE_MINUTE =
60.freeze
FIVE_MINUTES =
300.freeze
TEN_MINUTES =
600.freeze
FIFTEEN_MINUTES =
900.freeze
THIRTY_MINUTES =
1800.freeze
ONE_HOUR =
3600.freeze
TWO_HOURS =
7200.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



33
34
35
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb', line 33

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



40
41
42
43
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_evaluation_window.rb', line 40

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