# Google Cloud IoT Core V1 Client - Class GatewayConfig (1.7.5)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.7.5 (latest)](https://docs.cloud.google.com/php/docs/reference/cloud-iot/latest/V1.GatewayConfig)
- [1.7.4](https://docs.cloud.google.com/php/docs/reference/cloud-iot/1.7.4/V1.GatewayConfig)
- [1.6.4](https://docs.cloud.google.com/php/docs/reference/cloud-iot/1.6.4/V1.GatewayConfig)
- [1.5.12](https://docs.cloud.google.com/php/docs/reference/cloud-iot/1.5.12/V1.GatewayConfig)
Reference documentation and code samples for the Google Cloud IoT Core V1 Client class GatewayConfig.

Gateway-related configuration and state.

Generated from protobuf message `google.cloud.iot.v1.GatewayConfig`

## Namespace

Google \\ Cloud \\ Iot \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ gateway_type` | `int` Indicates whether the device is a gateway. |
| `↳ gateway_auth_method` | `int` Indicates how to authorize and/or authenticate devices to access the gateway. |
| `↳ last_accessed_gateway_id` | `string` \[Output only\] The ID of the gateway the device accessed most recently. |
| `↳ last_accessed_gateway_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` \[Output only\] The most recent time at which the device accessed the gateway specified in `last_accessed_gateway`. |

### getGatewayType

Indicates whether the device is a gateway.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setGatewayType

Indicates whether the device is a gateway.

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

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

### getGatewayAuthMethod

Indicates how to authorize and/or authenticate devices to access the
gateway.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setGatewayAuthMethod

Indicates how to authorize and/or authenticate devices to access the
gateway.

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

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

### getLastAccessedGatewayId

\[Output only\] The ID of the gateway the device accessed most recently.

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

### setLastAccessedGatewayId

\[Output only\] The ID of the gateway the device accessed most recently.

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

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

### getLastAccessedGatewayTime

\[Output only\] The most recent time at which the device accessed the gateway
specified in `last_accessed_gateway`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasLastAccessedGatewayTime

### clearLastAccessedGatewayTime

### setLastAccessedGatewayTime

\[Output only\] The most recent time at which the device accessed the gateway
specified in `last_accessed_gateway`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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