0.31.0 (latest) 0.30.0 0.29.0 0.28.0 0.27.0 0.23.0 0.20.0 0.19.0 0.18.0 0.17.1 0.16.1 0.15.0 0.14.0 0.13.1 0.12.1 0.11.2 0.10.0 0.9.0 0.8.1 0.7.2 0.6.1 0.5.0 0.4.0 0.3.0 0.2.0 0.1.4 Reference documentation and code samples for the Google Apps Chat V1 Client class CardWithId.

A
[card](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards)
in a Google Chat message.

Chat apps can create cards with [app
authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
As part of the [Developer Preview
Program](https://developers.google.com/workspace/preview), if your Chat app
[authenticates as a
user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-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](https://developers.google.com/workspace/chat/create-messages).
[Card builder](https://addons.gsuite.google.com/uikit/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. |
| `↳ owner_user` | `User` Output only. The app that owns the card. |

### 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` |   |

### getOwnerUser

Output only. The app that owns the card.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `User|null` |   |

### hasOwnerUser

### clearOwnerUser

### setOwnerUser

Output only. The app that owns the card.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `User` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |