Class: AWSCDK::CloudWatch::TextWidgetProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudWatch::TextWidgetProps
- Defined in:
- cloud_watch/text_widget_props.rb
Overview
Properties for a Text widget.
Instance Attribute Summary collapse
-
#background ⇒ AWSCDK::CloudWatch::TextWidgetBackground?
readonly
Background for the widget.
-
#height ⇒ Numeric?
readonly
Height of the widget.
-
#markdown ⇒ String
readonly
The text to display, in MarkDown format.
-
#width ⇒ Numeric?
readonly
Width of the widget, in a grid of 24 units wide.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(markdown:, background: nil, height: nil, width: nil) ⇒ TextWidgetProps
constructor
A new instance of TextWidgetProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(markdown:, background: nil, height: nil, width: nil) ⇒ TextWidgetProps
Returns a new instance of TextWidgetProps.
11 12 13 14 15 16 17 18 19 20 |
# File 'cloud_watch/text_widget_props.rb', line 11 def initialize(markdown:, background: nil, height: nil, width: nil) @markdown = markdown Jsii::Type.check_type(@markdown, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "markdown") @background = background Jsii::Type.check_type(@background, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5UZXh0V2lkZ2V0QmFja2dyb3VuZCJ9")), "background") unless @background.nil? @height = height Jsii::Type.check_type(@height, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "height") unless @height.nil? @width = width Jsii::Type.check_type(@width, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "width") unless @width.nil? end |
Instance Attribute Details
#background ⇒ AWSCDK::CloudWatch::TextWidgetBackground? (readonly)
Note:
Default: solid
Background for the widget.
30 31 32 |
# File 'cloud_watch/text_widget_props.rb', line 30 def background @background end |
#height ⇒ Numeric? (readonly)
Note:
Default: 2
Height of the widget.
35 36 37 |
# File 'cloud_watch/text_widget_props.rb', line 35 def height @height end |
#markdown ⇒ String (readonly)
The text to display, in MarkDown format.
25 26 27 |
# File 'cloud_watch/text_widget_props.rb', line 25 def markdown @markdown end |
#width ⇒ Numeric? (readonly)
Note:
Default: 6
Width of the widget, in a grid of 24 units wide.
40 41 42 |
# File 'cloud_watch/text_widget_props.rb', line 40 def width @width end |
Class Method Details
.jsii_properties ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'cloud_watch/text_widget_props.rb', line 42 def self.jsii_properties { :markdown => "markdown", :background => "background", :height => "height", :width => "width", } end |
Instance Method Details
#to_jsii ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'cloud_watch/text_widget_props.rb', line 51 def to_jsii result = {} result.merge!({ "markdown" => @markdown, "background" => @background, "height" => @height, "width" => @width, }) result.compact end |