Class: DatadogAPIClient::V1::WidgetPalette

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

Overview

Color palette to apply.

Constant Summary collapse

BLUE =
"blue".freeze
CUSTOM_BACKGROUND =
"custom_bg".freeze
CUSTOM_IMAGE =
"custom_image".freeze
CUSTOM_TEXT =
"custom_text".freeze
GRAY_ON_WHITE =
"gray_on_white".freeze
GREY =
"grey".freeze
GREEN =
"green".freeze
ORANGE =
"orange".freeze
RED =
"red".freeze
RED_ON_WHITE =
"red_on_white".freeze
WHITE_ON_GRAY =
"white_on_gray".freeze
WHITE_ON_GREEN =
"white_on_green".freeze
GREEN_ON_WHITE =
"green_on_white".freeze
WHITE_ON_RED =
"white_on_red".freeze
WHITE_ON_YELLOW =
"white_on_yellow".freeze
YELLOW_ON_WHITE =
"yellow_on_white".freeze
BLACK_ON_LIGHT_YELLOW =
"black_on_light_yellow".freeze
BLACK_ON_LIGHT_GREEN =
"black_on_light_green".freeze
BLACK_ON_LIGHT_RED =
"black_on_light_red".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



44
45
46
# File 'lib/datadog_api_client/v1/models/widget_palette.rb', line 44

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



51
52
53
54
# File 'lib/datadog_api_client/v1/models/widget_palette.rb', line 51

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