# Interface StreamOrBuilder (0.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.16.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.StreamOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.datastream.v1.StreamOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.datastream.v1.StreamOrBuilder)

    public interface StreamOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsLabels(String key)

    public abstract boolean containsLabels(String key)

Labels.

`map<string, string> labels = 4;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getBackfillAll()

    public abstract Stream.BackfillAllStrategy getBackfillAll()

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

`.google.events.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.Stream.BackfillAllStrategy` | The backfillAll. |

### getBackfillAllOrBuilder()

    public abstract Stream.BackfillAllStrategyOrBuilder getBackfillAllOrBuilder()

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

`.google.events.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.Stream.BackfillAllStrategyOrBuilder` |   |

### getBackfillNone()

    public abstract Stream.BackfillNoneStrategy getBackfillNone()

Do not automatically backfill any objects.

`.google.events.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.Stream.BackfillNoneStrategy` | The backfillNone. |

### getBackfillNoneOrBuilder()

    public abstract Stream.BackfillNoneStrategyOrBuilder getBackfillNoneOrBuilder()

Do not automatically backfill any objects.

`.google.events.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.Stream.BackfillNoneStrategyOrBuilder` |   |

### getBackfillStrategyCase()

    public abstract Stream.BackfillStrategyCase getBackfillStrategyCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.Stream.BackfillStrategyCase` |   |

### getCreateTime()

    public abstract Timestamp getCreateTime()

Output only. The creation time of the stream.

`.google.protobuf.Timestamp create_time = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The createTime. |

### getCreateTimeOrBuilder()

    public abstract TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The creation time of the stream.

`.google.protobuf.Timestamp create_time = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getCustomerManagedEncryptionKey()

    public abstract String 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.

`optional string customer_managed_encryption_key = 10;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The customerManagedEncryptionKey. |

### getCustomerManagedEncryptionKeyBytes()

    public abstract ByteString getCustomerManagedEncryptionKeyBytes()

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.

`optional string customer_managed_encryption_key = 10;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for customerManagedEncryptionKey. |

### getDestinationConfig()

    public abstract DestinationConfig getDestinationConfig()

Required. Destination connection profile configuration.

`.google.events.cloud.datastream.v1.DestinationConfig destination_config = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.DestinationConfig` | The destinationConfig. |

### getDestinationConfigOrBuilder()

    public abstract DestinationConfigOrBuilder getDestinationConfigOrBuilder()

Required. Destination connection profile configuration.

`.google.events.cloud.datastream.v1.DestinationConfig destination_config = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.DestinationConfigOrBuilder` |   |

### getDisplayName()

    public abstract String getDisplayName()

Required. Display name.

`string display_name = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The displayName. |

### getDisplayNameBytes()

    public abstract ByteString getDisplayNameBytes()

Required. Display name.

`string display_name = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for displayName. |

### getErrors(int index)

    public abstract Error getErrors(int index)

Output only. Errors on the Stream.

`repeated .google.events.cloud.datastream.v1.Error errors = 9;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.Error` |   |

### getErrorsCount()

    public abstract int getErrorsCount()

Output only. Errors on the Stream.

`repeated .google.events.cloud.datastream.v1.Error errors = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getErrorsList()

    public abstract List<Error> getErrorsList()

Output only. Errors on the Stream.

`repeated .google.events.cloud.datastream.v1.Error errors = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.Error>` |   |

### getErrorsOrBuilder(int index)

    public abstract ErrorOrBuilder getErrorsOrBuilder(int index)

Output only. Errors on the Stream.

`repeated .google.events.cloud.datastream.v1.Error errors = 9;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.ErrorOrBuilder` |   |

### getErrorsOrBuilderList()

    public abstract List<? extends ErrorOrBuilder> getErrorsOrBuilderList()

Output only. Errors on the Stream.

`repeated .google.events.cloud.datastream.v1.Error errors = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.events.cloud.datastream.v1.ErrorOrBuilder>` |   |

### getLabels()

    public abstract Map<String,String> getLabels()

Use [#getLabelsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.StreamOrBuilder#com_google_events_cloud_datastream_v1_StreamOrBuilder_getLabelsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsCount()

    public abstract int getLabelsCount()

Labels.

`map<string, string> labels = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getLabelsMap()

    public abstract Map<String,String> getLabelsMap()

Labels.

`map<string, string> labels = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsOrDefault(String key, String defaultValue)

    public abstract String getLabelsOrDefault(String key, String defaultValue)

Labels.

`map<string, string> labels = 4;`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getLabelsOrThrow(String key)

    public abstract String getLabelsOrThrow(String key)

Labels.

`map<string, string> labels = 4;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getName()

    public abstract String getName()

Output only. The stream's name.

`string name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

Output only. The stream's name.

`string name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getSourceConfig()

    public abstract SourceConfig getSourceConfig()

Required. Source connection profile configuration.

`.google.events.cloud.datastream.v1.SourceConfig source_config = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.SourceConfig` | The sourceConfig. |

### getSourceConfigOrBuilder()

    public abstract SourceConfigOrBuilder getSourceConfigOrBuilder()

Required. Source connection profile configuration.

`.google.events.cloud.datastream.v1.SourceConfig source_config = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.SourceConfigOrBuilder` |   |

### getState()

    public abstract Stream.State getState()

The state of the stream.

`.google.events.cloud.datastream.v1.Stream.State state = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastream.v1.Stream.State` | The state. |

### getStateValue()

    public abstract int getStateValue()

The state of the stream.

`.google.events.cloud.datastream.v1.Stream.State state = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for state. |

### getUpdateTime()

    public abstract Timestamp getUpdateTime()

Output only. The last update time of the stream.

`.google.protobuf.Timestamp update_time = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The updateTime. |

### getUpdateTimeOrBuilder()

    public abstract TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The last update time of the stream.

`.google.protobuf.Timestamp update_time = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### hasBackfillAll()

    public abstract boolean hasBackfillAll()

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

`.google.events.cloud.datastream.v1.Stream.BackfillAllStrategy backfill_all = 101;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the backfillAll field is set. |

### hasBackfillNone()

    public abstract boolean hasBackfillNone()

Do not automatically backfill any objects.

`.google.events.cloud.datastream.v1.Stream.BackfillNoneStrategy backfill_none = 102;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the backfillNone field is set. |

### hasCreateTime()

    public abstract boolean hasCreateTime()

Output only. The creation time of the stream.

`.google.protobuf.Timestamp create_time = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the createTime field is set. |

### hasCustomerManagedEncryptionKey()

    public abstract boolean hasCustomerManagedEncryptionKey()

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.

`optional string customer_managed_encryption_key = 10;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the customerManagedEncryptionKey field is set. |

### hasDestinationConfig()

    public abstract boolean hasDestinationConfig()

Required. Destination connection profile configuration.

`.google.events.cloud.datastream.v1.DestinationConfig destination_config = 7;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the destinationConfig field is set. |

### hasSourceConfig()

    public abstract boolean hasSourceConfig()

Required. Source connection profile configuration.

`.google.events.cloud.datastream.v1.SourceConfig source_config = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the sourceConfig field is set. |

### hasUpdateTime()

    public abstract boolean hasUpdateTime()

Output only. The last update time of the stream.

`.google.protobuf.Timestamp update_time = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the updateTime field is set. |