Class: DatadogAPIClient::V2::SecurityMonitoringRuleNewValueOptionsForgetAfter

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

Overview

The duration in days after which a learned value is forgotten.

Constant Summary collapse

ONE_DAY =
1.freeze
TWO_DAYS =
2.freeze
ONE_WEEK =
7.freeze
TWO_WEEKS =
14.freeze
THREE_WEEKS =
21.freeze
FOUR_WEEKS =
28.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



31
32
33
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_forget_after.rb', line 31

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



38
39
40
41
# File 'lib/datadog_api_client/v2/models/security_monitoring_rule_new_value_options_forget_after.rb', line 38

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