Class: AWSCDK::CloudWatch::YAxisProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_watch/y_axis_props.rb

Overview

Properties for a Y-Axis.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label: nil, max: nil, min: nil, show_units: nil) ⇒ YAxisProps

Returns a new instance of YAxisProps.

Parameters:

  • label (String, nil) (defaults to: nil)

    The label.

  • max (Numeric, nil) (defaults to: nil)

    The max value.

  • min (Numeric, nil) (defaults to: nil)

    The min value.

  • show_units (Boolean, nil) (defaults to: nil)

    Whether to show units.



11
12
13
14
15
16
17
18
19
20
# File 'cloud_watch/y_axis_props.rb', line 11

def initialize(label: nil, max: nil, min: nil, show_units: nil)
  @label = label
  Jsii::Type.check_type(@label, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "label") unless @label.nil?
  @max = max
  Jsii::Type.check_type(@max, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "max") unless @max.nil?
  @min = min
  Jsii::Type.check_type(@min, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "min") unless @min.nil?
  @show_units = show_units
  Jsii::Type.check_type(@show_units, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "showUnits") unless @show_units.nil?
end

Instance Attribute Details

#labelString? (readonly)

Note:

Default: - No label

The label.

Returns:

  • (String, nil)


26
27
28
# File 'cloud_watch/y_axis_props.rb', line 26

def label
  @label
end

#maxNumeric? (readonly)

Note:

Default: - Auto

The max value.

Returns:

  • (Numeric, nil)


31
32
33
# File 'cloud_watch/y_axis_props.rb', line 31

def max
  @max
end

#minNumeric? (readonly)

Note:

Default: - Auto

The min value.

Returns:

  • (Numeric, nil)


36
37
38
# File 'cloud_watch/y_axis_props.rb', line 36

def min
  @min
end

#show_unitsBoolean? (readonly)

Note:

Default: true

Whether to show units.

Returns:

  • (Boolean, nil)


41
42
43
# File 'cloud_watch/y_axis_props.rb', line 41

def show_units
  @show_units
end

Class Method Details

.jsii_propertiesObject



43
44
45
46
47
48
49
50
# File 'cloud_watch/y_axis_props.rb', line 43

def self.jsii_properties
  {
    :label => "label",
    :max => "max",
    :min => "min",
    :show_units => "showUnits",
  }
end

Instance Method Details

#to_jsiiObject



52
53
54
55
56
57
58
59
60
61
# File 'cloud_watch/y_axis_props.rb', line 52

def to_jsii
  result = {}
  result.merge!({
    "label" => @label,
    "max" => @max,
    "min" => @min,
    "showUnits" => @show_units,
  })
  result.compact
end