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 Image.

An image that is specified by a URL and can have an `onClick` action. For an
example, see [Add an
image](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image).

[Google Workspace add-ons and Chat
apps](https://developers.google.com/workspace/extend):

Generated from protobuf message `google.apps.card.v1.Image`

## Namespace

Google \\ Apps \\ Card \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ image_url` | `string` The HTTPS URL that hosts the image. For example: `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png` |
| `↳ on_click` | `OnClick` When a user clicks the image, the click triggers this action. |
| `↳ alt_text` | `string` The alternative text of this image that's used for accessibility. |

### getImageUrl

The HTTPS URL that hosts the image.

For example:

```php
https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png
```

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setImageUrl

The HTTPS URL that hosts the image.

For example:

```php
https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png
```

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

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

### getOnClick

When a user clicks the image, the click triggers this action.

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

### hasOnClick

### clearOnClick

### setOnClick

When a user clicks the image, the click triggers this action.

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

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

### getAltText

The alternative text of this image that's used for accessibility.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setAltText

The alternative text of this image that's used for accessibility.

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

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