# Google Cloud IoT Core V1 Client - Class MqttState (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.MqttState)
- [1.7.4](https://docs.cloud.google.com/php/docs/reference/cloud-iot/1.7.4/V1.MqttState)
- [1.6.4](https://docs.cloud.google.com/php/docs/reference/cloud-iot/1.6.4/V1.MqttState)
- [1.5.12](https://docs.cloud.google.com/php/docs/reference/cloud-iot/1.5.12/V1.MqttState)
Reference documentation and code samples for the Google Cloud IoT Core V1 Client class MqttState.

Indicates whether an MQTT connection is enabled or disabled. See the field
description for details.

Protobuf type `google.cloud.iot.v1.MqttState`

## Namespace

Google \\ Cloud \\ Iot \\ V1

## Methods

### static::name

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `value` | `mixed` |

### static::value

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `mixed` |

## Constants

### MQTT_STATE_UNSPECIFIED

    Value: 0

No MQTT state specified. If not specified, MQTT will be enabled by default.

Generated from protobuf enum `MQTT_STATE_UNSPECIFIED = 0;`

### MQTT_ENABLED

    Value: 1

Enables a MQTT connection.

Generated from protobuf enum `MQTT_ENABLED = 1;`

### MQTT_DISABLED

    Value: 2

Disables a MQTT connection.

Generated from protobuf enum `MQTT_DISABLED = 2;`