Google Apps Chat V1 Client - Class CardWithId (0.27.0)

Reference documentation and code samples for the Google Apps Chat V1 Client class CardWithId.

A card in a Google Chat message.

Chat apps can create cards with app authentication. As part of the Developer Preview Program, if your Chat app authenticates as a user, it can create card messages. If your Chat app is not part of Developer Preview Program, it can't create cards with user authentication. To learn how to create a message that contains cards, see Send a message. Card builder

Generated from protobuf message google.chat.v1.CardWithId

Namespace

Google \ Apps \ Chat \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ card_id string

Required if the message contains multiple cards. A unique identifier for a card in a message.

↳ card Google\Apps\Card\V1\Card

A card. Maximum size is 32 KB.

getCardId

Required if the message contains multiple cards. A unique identifier for a card in a message.

Returns
Type Description
string

setCardId

Required if the message contains multiple cards. A unique identifier for a card in a message.

Parameter
Name Description
var string
Returns
Type Description
$this

getCard

A card. Maximum size is 32 KB.

Returns
Type Description
Google\Apps\Card\V1\Card|null

hasCard

clearCard

setCard

A card. Maximum size is 32 KB.

Parameter
Name Description
var Google\Apps\Card\V1\Card
Returns
Type Description
$this