# Google Cloud Storage Insights V1 Client - Class CloudStorageBucket (1.4.0)

1.4.0 (latest) 1.3.3 1.2.1 1.1.0 1.0.3 0.3.5 0.2.3 0.1.1 Reference documentation and code samples for the Google Cloud Storage Insights V1 Client class CloudStorageBucket.

Defines the bucket by its name or a regex pattern to match buckets.

Generated from protobuf message `google.cloud.storageinsights.v1.DatasetConfig.CloudStorageBuckets.CloudStorageBucket`

## Namespace

Google \\ Cloud \\ StorageInsights \\ V1 \\ DatasetConfig \\ CloudStorageBuckets

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ bucket_name` | `string` Cloud Storage bucket name. |
| `↳ bucket_prefix_regex` | `string` A regex pattern for bucket names matching the regex. Regex should follow the syntax specified in `google/re2` on GitHub. |

### getBucketName

Cloud Storage bucket name.

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

### hasBucketName

### setBucketName

Cloud Storage bucket name.

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

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

### getBucketPrefixRegex

A regex pattern for bucket names matching the regex. Regex should
follow the syntax specified in `google/re2` on GitHub.

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

### hasBucketPrefixRegex

### setBucketPrefixRegex

A regex pattern for bucket names matching the regex. Regex should
follow the syntax specified in `google/re2` on GitHub.

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

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

### getCloudStorageBucket

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