Class: Google::Apis::ChatV1::GoogleAppsCardV1TextParagraph

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/chat_v1/classes.rb,
lib/google/apis/chat_v1/representations.rb,
lib/google/apis/chat_v1/representations.rb

Overview

A paragraph of text that supports formatting. For an example in Google Chat apps, see Add a paragraph of formatted text. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace add-ons. Google Workspace add-ons and Chat apps:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1TextParagraph

Returns a new instance of GoogleAppsCardV1TextParagraph.



3959
3960
3961
# File 'lib/google/apis/chat_v1/classes.rb', line 3959

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#max_linesFixnum

The maximum number of lines of text that are displayed in the widget. If the text exceeds the specified maximum number of lines, the excess content is concealed behind a show more button. If the text is equal or shorter than the specified maximum number of lines, a show more button isn't displayed. The default value is 0, in which case all context is displayed. Negative values are ignored. Corresponds to the JSON property maxLines

Returns:

  • (Fixnum)


3946
3947
3948
# File 'lib/google/apis/chat_v1/classes.rb', line 3946

def max_lines
  @max_lines
end

#textString

The text that's shown in the widget. Corresponds to the JSON property text

Returns:

  • (String)


3951
3952
3953
# File 'lib/google/apis/chat_v1/classes.rb', line 3951

def text
  @text
end

#text_syntaxString

The syntax of the text. If not set, the text is rendered as HTML. Google Chat apps: Corresponds to the JSON property textSyntax

Returns:

  • (String)


3957
3958
3959
# File 'lib/google/apis/chat_v1/classes.rb', line 3957

def text_syntax
  @text_syntax
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3964
3965
3966
3967
3968
# File 'lib/google/apis/chat_v1/classes.rb', line 3964

def update!(**args)
  @max_lines = args[:max_lines] if args.key?(:max_lines)
  @text = args[:text] if args.key?(:text)
  @text_syntax = args[:text_syntax] if args.key?(:text_syntax)
end