# Google Cloud Storage Control V2 Client - Class CloudStorageBuckets (1.9.0)

1.9.0 (latest) 1.8.0 1.7.0 1.6.3 1.5.0 1.4.1 1.3.0 1.1.0 1.0.3 0.2.1 0.1.1 Reference documentation and code samples for the Google Cloud Storage Control V2 Client class CloudStorageBuckets.

Collection of buckets.

Generated from protobuf message `google.storage.control.v2.IntelligenceConfig.Filter.CloudStorageBuckets`

## Namespace

Google \\ Cloud \\ Storage \\ Control \\ V2 \\ IntelligenceConfig \\ Filter

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ bucket_id_regexes` | `string[]` Optional. A regex pattern for matching bucket names. Regex should follow the syntax specified in [google/re2](https://github.com/google/re2). For example, `^sample_.*` matches all buckets of the form `gs://sample_bucket-1`, `gs://sample_bucket-2`, `gs://sample_bucket-n` but not `gs://test_sample_bucket`. If you want to match a single bucket, say `gs://sample_bucket`, use `sample_bucket`. |

### getBucketIdRegexes

Optional. A regex pattern for matching bucket names. Regex should
follow the syntax specified in
[google/re2](https://github.com/google/re2). For example,
`^sample_.*` matches all buckets of the form
`gs://sample_bucket-1`, `gs://sample_bucket-2`,
`gs://sample_bucket-n` but not `gs://test_sample_bucket`.

If you want to match a single bucket, say `gs://sample_bucket`,
use `sample_bucket`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setBucketIdRegexes

Optional. A regex pattern for matching bucket names. Regex should
follow the syntax specified in
[google/re2](https://github.com/google/re2). For example,
`^sample_.*` matches all buckets of the form
`gs://sample_bucket-1`, `gs://sample_bucket-2`,
`gs://sample_bucket-n` but not `gs://test_sample_bucket`.

If you want to match a single bucket, say `gs://sample_bucket`,
use `sample_bucket`.

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

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