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 an item in a grid layout. Items can contain text, an image, or both text and an image. Google Workspace Add-ons and Chat apps:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1GridItem

Returns a new instance of GoogleAppsCardV1GridItem.



2090
2091
2092
# File 'lib/google/apis/chat_v1/classes.rb', line 2090

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)


2067
2068
2069
# File 'lib/google/apis/chat_v1/classes.rb', line 2067

def id
  @id
end

#imageGoogle::Apis::ChatV1::GoogleAppsCardV1ImageComponent

Represents an image. Google Workspace Add-ons and Chat apps: Corresponds to the JSON property image



2073
2074
2075
# File 'lib/google/apis/chat_v1/classes.rb', line 2073

def image
  @image
end

#layoutString

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

Returns:

  • (String)


2078
2079
2080
# File 'lib/google/apis/chat_v1/classes.rb', line 2078

def layout
  @layout
end

#subtitleString

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

Returns:

  • (String)


2083
2084
2085
# File 'lib/google/apis/chat_v1/classes.rb', line 2083

def subtitle
  @subtitle
end

#titleString

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

Returns:

  • (String)


2088
2089
2090
# File 'lib/google/apis/chat_v1/classes.rb', line 2088

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2095
2096
2097
2098
2099
2100
2101
# File 'lib/google/apis/chat_v1/classes.rb', line 2095

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