2.5.3 (latest) 2.5.2 2.4.0 2.3.1 2.2.0 2.1.1 2.0.1 1.5.5 1.4.2 1.3.0 1.2.1 1.1.0 1.0.5 Reference documentation and code samples for the Google Cloud Datastream V1 Client class Stream.

A resource representing streaming data from a source to a destination.

Generated from protobuf message `google.cloud.datastream.v1.Stream`

## Namespace

Google \\ Cloud \\ Datastream \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. Identifier. The stream's name. |
| `↳ create_time` | `Google\Protobuf\Timestamp` Output only. The creation time of the stream. |
| `↳ update_time` | `Google\Protobuf\Timestamp` Output only. The last update time of the stream. |
| `↳ labels` | `array|Google\Protobuf\Internal\MapField` Labels. |
| `↳ display_name` | `string` Required. Display name. |
| `↳ source_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.SourceConfig` Required. Source connection profile configuration. |
| `↳ destination_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.DestinationConfig` Required. Destination connection profile configuration. |
| `↳ state` | `int` The state of the stream. |
| `↳ backfill_all` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.Stream.BackfillAllStrategy` Automatically backfill objects included in the stream source configuration. Specific objects can be excluded. |
| `↳ backfill_none` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.Stream.BackfillNoneStrategy` Do not automatically backfill any objects. |
| `↳ errors` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.Error>` Output only. Errors on the Stream. |
| `↳ customer_managed_encryption_key` | `string` Immutable. A reference to a KMS encryption key. If provided, it will be used to encrypt the data. If left blank, data will be encrypted using an internal Stream-specific encryption key provisioned through KMS. |
| `↳ last_recovery_time` | `Google\Protobuf\Timestamp` Output only. If the stream was recovered, the time of the last recovery. Note: This field is currently experimental. |
| `↳ satisfies_pzs` | `bool` Output only. Reserved for future use. |
| `↳ satisfies_pzi` | `bool` Output only. Reserved for future use. |

### getName

Output only. Identifier. The stream's name.

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

### setName

Output only. Identifier. The stream's name.

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

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

### getCreateTime

Output only. The creation time of the stream.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The creation time of the stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getUpdateTime

Output only. The last update time of the stream.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The last update time of the stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getLabels

Labels.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Internal\MapField` |   |

### setLabels

Labels.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|Google\Protobuf\Internal\MapField` |

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

### getDisplayName

Required. Display name.

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

### setDisplayName

Required. Display name.

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

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

### getSourceConfig

Required. Source connection profile configuration.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.SourceConfig|null` |   |

### hasSourceConfig

### clearSourceConfig

### setSourceConfig

Required. Source connection profile configuration.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.SourceConfig` |

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

### getDestinationConfig

Required. Destination connection profile configuration.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.DestinationConfig|null` |   |

### hasDestinationConfig

### clearDestinationConfig

### setDestinationConfig

Required. Destination connection profile configuration.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.DestinationConfig` |

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

### getState

The state of the stream.

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

### setState

The state of the stream.

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

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

### getBackfillAll

Automatically backfill objects included in the stream source
configuration. Specific objects can be excluded.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.Stream.BackfillAllStrategy|null` |   |

### hasBackfillAll

### setBackfillAll

Automatically backfill objects included in the stream source
configuration. Specific objects can be excluded.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.Stream.BackfillAllStrategy` |

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

### getBackfillNone

Do not automatically backfill any objects.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.Stream.BackfillNoneStrategy|null` |   |

### hasBackfillNone

### setBackfillNone

Do not automatically backfill any objects.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.Stream.BackfillNoneStrategy` |

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

### getErrors

Output only. Errors on the Stream.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.Error>` |   |

### setErrors

Output only. Errors on the Stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.Error>` |

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

### getCustomerManagedEncryptionKey

Immutable. A reference to a KMS encryption key.

If provided, it will be used to encrypt the data.
If left blank, data will be encrypted using an internal Stream-specific
encryption key provisioned through KMS.

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

### hasCustomerManagedEncryptionKey

### clearCustomerManagedEncryptionKey

### setCustomerManagedEncryptionKey

Immutable. A reference to a KMS encryption key.

If provided, it will be used to encrypt the data.
If left blank, data will be encrypted using an internal Stream-specific
encryption key provisioned through KMS.

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

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

### getLastRecoveryTime

Output only. If the stream was recovered, the time of the last recovery.

Note: This field is currently experimental.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasLastRecoveryTime

### clearLastRecoveryTime

### setLastRecoveryTime

Output only. If the stream was recovered, the time of the last recovery.

Note: This field is currently experimental.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getSatisfiesPzs

Output only. Reserved for future use.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasSatisfiesPzs

### clearSatisfiesPzs

### setSatisfiesPzs

Output only. Reserved for future use.

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

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

### getSatisfiesPzi

Output only. Reserved for future use.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### hasSatisfiesPzi

### clearSatisfiesPzi

### setSatisfiesPzi

Output only. Reserved for future use.

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

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

### getBackfillStrategy

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