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.



1672
1673
1674
# File 'lib/google/apis/chat_v1/classes.rb', line 1672

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)


1650
1651
1652
# File 'lib/google/apis/chat_v1/classes.rb', line 1650

def id
  @id
end

#imageGoogle::Apis::ChatV1::GoogleAppsCardV1ImageComponent

Represents an image. Corresponds to the JSON property image



1655
1656
1657
# File 'lib/google/apis/chat_v1/classes.rb', line 1655

def image
  @image
end

#layoutString

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

Returns:

  • (String)


1660
1661
1662
# File 'lib/google/apis/chat_v1/classes.rb', line 1660

def layout
  @layout
end

#subtitleString

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

Returns:

  • (String)


1665
1666
1667
# File 'lib/google/apis/chat_v1/classes.rb', line 1665

def subtitle
  @subtitle
end

#titleString

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

Returns:

  • (String)


1670
1671
1672
# File 'lib/google/apis/chat_v1/classes.rb', line 1670

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1677
1678
1679
1680
1681
1682
1683
# File 'lib/google/apis/chat_v1/classes.rb', line 1677

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)
  @title = args[:title] if args.key?(:title)
end