Class: Google::Apis::ChatV1::GoogleAppsCardV1GridItem

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

Represents a single item in the grid layout.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1GridItem

Returns a new instance of GoogleAppsCardV1GridItem.



1346
1347
1348
# File 'lib/google/apis/chat_v1/classes.rb', line 1346

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

Instance Attribute Details

#idString

A user-specified identifier for this grid item. This identifier is returned in the parent Grid's onClick callback parameters. Corresponds to the JSON property id

Returns:

  • (String)


1319
1320
1321
# File 'lib/google/apis/chat_v1/classes.rb', line 1319

def id
  @id
end

#imageGoogle::Apis::ChatV1::GoogleAppsCardV1ImageComponent

The image that displays in the grid item. Corresponds to the JSON property image



1324
1325
1326
# File 'lib/google/apis/chat_v1/classes.rb', line 1324

def image
  @image
end

#layoutString

The layout to use for the grid item. Corresponds to the JSON property layout

Returns:

  • (String)


1329
1330
1331
# File 'lib/google/apis/chat_v1/classes.rb', line 1329

def layout
  @layout
end

#subtitleString

The grid item's subtitle. Corresponds to the JSON property subtitle

Returns:

  • (String)


1334
1335
1336
# File 'lib/google/apis/chat_v1/classes.rb', line 1334

def subtitle
  @subtitle
end

#text_alignmentString

The horizontal alignment of the grid item's text. Corresponds to the JSON property textAlignment

Returns:

  • (String)


1339
1340
1341
# File 'lib/google/apis/chat_v1/classes.rb', line 1339

def text_alignment
  @text_alignment
end

#titleString

The grid item's title. Corresponds to the JSON property title

Returns:

  • (String)


1344
1345
1346
# File 'lib/google/apis/chat_v1/classes.rb', line 1344

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1351
1352
1353
1354
1355
1356
1357
1358
# File 'lib/google/apis/chat_v1/classes.rb', line 1351

def update!(**args)
  @id = args[:id] if args.key?(:id)
  @image = args[:image] if args.key?(:image)
  @layout = args[:layout] if args.key?(:layout)
  @subtitle = args[:subtitle] if args.key?(:subtitle)
  @text_alignment = args[:text_alignment] if args.key?(:text_alignment)
  @title = args[:title] if args.key?(:title)
end