# Cloud PubSub V1 Client - Class CloudStorage (2.19.3)

2.19.3 (latest) 2.19.2 2.18.0 2.17.0 2.16.2 2.15.1 2.14.0 2.13.2 2.12.0 2.11.3 2.10.1 2.9.1 2.8.2 2.7.0 2.6.0 2.5.2 2.4.0 2.3.0 2.2.1 2.1.2 1.50.0 1.49.0 1.48.0 1.47.0 1.46.5 1.45.2 1.44.0 1.43.2 1.42.1 1.41.3 1.40.1 1.39.3 Reference documentation and code samples for the Cloud PubSub V1 Client class CloudStorage.

Ingestion settings for Cloud Storage.

Generated from protobuf message `google.pubsub.v1.IngestionDataSourceSettings.CloudStorage`

## Namespace

Google \\ Cloud \\ PubSub \\ V1 \\ IngestionDataSourceSettings

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ state` | `int` Output only. An output-only field that indicates the state of the Cloud Storage ingestion source. |
| `↳ bucket` | `string` Optional. Cloud Storage bucket. The bucket name must be without any prefix like "gs://". See the [bucket naming requirements](https://cloud.google.com/storage/docs/buckets#naming). |
| `↳ text_format` | `https://docs.cloud.google.com/php/docs/reference/cloud-pubsub/latest/V1.IngestionDataSourceSettings.CloudStorage.TextFormat` Optional. Data from Cloud Storage will be interpreted as text. |
| `↳ avro_format` | `https://docs.cloud.google.com/php/docs/reference/cloud-pubsub/latest/V1.IngestionDataSourceSettings.CloudStorage.AvroFormat` Optional. Data from Cloud Storage will be interpreted in Avro format. |
| `↳ pubsub_avro_format` | `https://docs.cloud.google.com/php/docs/reference/cloud-pubsub/latest/V1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat` Optional. It will be assumed data from Cloud Storage was written via [Cloud Storage subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage). |
| `↳ minimum_object_create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Optional. Only objects with a larger or equal creation timestamp will be ingested. |
| `↳ match_glob` | `string` Optional. Glob pattern used to match objects that will be ingested. If unset, all objects will be ingested. See the [supported patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob). |

### getState

Output only. An output-only field that indicates the state of the Cloud
Storage ingestion source.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-pubsub/latest/V1.IngestionDataSourceSettings.CloudStorage.State). |

### setState

Output only. An output-only field that indicates the state of the Cloud
Storage ingestion source.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-pubsub/latest/V1.IngestionDataSourceSettings.CloudStorage.State). |

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

### getBucket

Optional. Cloud Storage bucket. The bucket name must be without any
prefix like "gs://". See the [bucket naming requirements](https://cloud.google.com/storage/docs/buckets#naming).

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

### setBucket

Optional. Cloud Storage bucket. The bucket name must be without any
prefix like "gs://". See the [bucket naming requirements](https://cloud.google.com/storage/docs/buckets#naming).

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

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

### getTextFormat

Optional. Data from Cloud Storage will be interpreted as text.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-pubsub/latest/V1.IngestionDataSourceSettings.CloudStorage.TextFormat|null` |   |

### hasTextFormat

### setTextFormat

Optional. Data from Cloud Storage will be interpreted as text.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-pubsub/latest/V1.IngestionDataSourceSettings.CloudStorage.TextFormat` |

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

### getAvroFormat

Optional. Data from Cloud Storage will be interpreted in Avro format.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-pubsub/latest/V1.IngestionDataSourceSettings.CloudStorage.AvroFormat|null` |   |

### hasAvroFormat

### setAvroFormat

Optional. Data from Cloud Storage will be interpreted in Avro format.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-pubsub/latest/V1.IngestionDataSourceSettings.CloudStorage.AvroFormat` |

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

### getPubsubAvroFormat

Optional. It will be assumed data from Cloud Storage was written via
[Cloud Storage
subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-pubsub/latest/V1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat|null` |   |

### hasPubsubAvroFormat

### setPubsubAvroFormat

Optional. It will be assumed data from Cloud Storage was written via
[Cloud Storage
subscriptions](https://cloud.google.com/pubsub/docs/cloudstorage).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-pubsub/latest/V1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat` |

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

### getMinimumObjectCreateTime

Optional. Only objects with a larger or equal creation timestamp will be
ingested.

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

### hasMinimumObjectCreateTime

### clearMinimumObjectCreateTime

### setMinimumObjectCreateTime

Optional. Only objects with a larger or equal creation timestamp will be
ingested.

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

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

### getMatchGlob

Optional. Glob pattern used to match objects that will be ingested. If
unset, all objects will be ingested. See the [supported
patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).

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

### setMatchGlob

Optional. Glob pattern used to match objects that will be ingested. If
unset, all objects will be ingested. See the [supported
patterns](https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-objects-and-prefixes-using-glob).

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

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

### getInputFormat

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