# Interface ReadSessionOrBuilder (3.29.0)

3.27.0 (latest) 3.24.0 3.23.0 3.21.0 3.20.0 3.19.1 3.18.0 3.17.3 3.16.3 3.15.3 3.14.1 3.12.0 3.11.4 3.10.3 3.9.3 3.8.0 3.6.1 3.5.2 3.4.0 3.3.1 3.2.0 3.1.0 3.0.1 2.47.0 2.45.0 2.44.1 2.43.0

    public interface ReadSessionOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getArrowSchema()

    public abstract ArrowSchema getArrowSchema()

Output only. Arrow schema.

`
.google.cloud.bigquery.storage.v1beta2.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.ArrowSchema` | The arrowSchema. |

### getArrowSchemaOrBuilder()

    public abstract ArrowSchemaOrBuilder getArrowSchemaOrBuilder()

Output only. Arrow schema.

`
.google.cloud.bigquery.storage.v1beta2.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.ArrowSchemaOrBuilder` |   |

### getAvroSchema()

    public abstract AvroSchema getAvroSchema()

Output only. Avro schema.

`
.google.cloud.bigquery.storage.v1beta2.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.AvroSchema` | The avroSchema. |

### getAvroSchemaOrBuilder()

    public abstract AvroSchemaOrBuilder getAvroSchemaOrBuilder()

Output only. Avro schema.

`
.google.cloud.bigquery.storage.v1beta2.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.AvroSchemaOrBuilder` |   |

### getDataFormat()

    public abstract DataFormat getDataFormat()

Immutable. Data format of the output data.

`
.google.cloud.bigquery.storage.v1beta2.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.DataFormat` | The dataFormat. |

### getDataFormatValue()

    public abstract int getDataFormatValue()

Immutable. Data format of the output data.

`
.google.cloud.bigquery.storage.v1beta2.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE];
`

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

### getExpireTime()

    public abstract Timestamp getExpireTime()

Output only. Time at which the session becomes invalid. After this time, subsequent
requests to read this Session will return errors. The expire_time is
automatically assigned and currently cannot be specified or updated.

`.google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

### getExpireTimeOrBuilder()

    public abstract TimestampOrBuilder getExpireTimeOrBuilder()

Output only. Time at which the session becomes invalid. After this time, subsequent
requests to read this Session will return errors. The expire_time is
automatically assigned and currently cannot be specified or updated.

`.google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

### getName()

    public abstract String getName()

Output only. Unique identifier for the session, in the form
`projects/{project_id}/locations/{location}/sessions/{session_id}`.

`string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];`

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

### getNameBytes()

    public abstract ByteString getNameBytes()

Output only. Unique identifier for the session, in the form
`projects/{project_id}/locations/{location}/sessions/{session_id}`.

`string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];`

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

### getReadOptions()

    public abstract ReadSession.TableReadOptions getReadOptions()

Optional. Read options for this session (e.g. column selection, filters).

`
.google.cloud.bigquery.storage.v1beta2.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.ReadSession.TableReadOptions` | The readOptions. |

### getReadOptionsOrBuilder()

    public abstract ReadSession.TableReadOptionsOrBuilder getReadOptionsOrBuilder()

Optional. Read options for this session (e.g. column selection, filters).

`
.google.cloud.bigquery.storage.v1beta2.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.ReadSession.TableReadOptionsOrBuilder` |   |

### getSchemaCase()

    public abstract ReadSession.SchemaCase getSchemaCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.ReadSession.SchemaCase` |   |

### getStreams(int index)

    public abstract ReadStream getStreams(int index)

Output only. A list of streams created with the session.

At least one stream is created with the session. In the future, larger
request_stream_count values *may* result in this list being unpopulated,
in that case, the user will need to use a List method to get the streams
instead, which is not yet available.

`
repeated .google.cloud.bigquery.storage.v1beta2.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **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-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.ReadStream` |   |

### getStreamsCount()

    public abstract int getStreamsCount()

Output only. A list of streams created with the session.

At least one stream is created with the session. In the future, larger
request_stream_count values *may* result in this list being unpopulated,
in that case, the user will need to use a List method to get the streams
instead, which is not yet available.

`
repeated .google.cloud.bigquery.storage.v1beta2.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

### getStreamsList()

    public abstract List<ReadStream> getStreamsList()

Output only. A list of streams created with the session.

At least one stream is created with the session. In the future, larger
request_stream_count values *may* result in this list being unpopulated,
in that case, the user will need to use a List method to get the streams
instead, which is not yet available.

`
repeated .google.cloud.bigquery.storage.v1beta2.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.ReadStream>` |   |

### getStreamsOrBuilder(int index)

    public abstract ReadStreamOrBuilder getStreamsOrBuilder(int index)

Output only. A list of streams created with the session.

At least one stream is created with the session. In the future, larger
request_stream_count values *may* result in this list being unpopulated,
in that case, the user will need to use a List method to get the streams
instead, which is not yet available.

`
repeated .google.cloud.bigquery.storage.v1beta2.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **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-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.ReadStreamOrBuilder` |   |

### getStreamsOrBuilderList()

    public abstract List<? extends ReadStreamOrBuilder> getStreamsOrBuilderList()

Output only. A list of streams created with the session.

At least one stream is created with the session. In the future, larger
request_stream_count values *may* result in this list being unpopulated,
in that case, the user will need to use a List method to get the streams
instead, which is not yet available.

`
repeated .google.cloud.bigquery.storage.v1beta2.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.cloud.bigquery.storage.v1beta2.ReadStreamOrBuilder>` |   |

### getTable()

    public abstract String getTable()

Immutable. Table that this ReadSession is reading from, in the form
\`projects/{project_id}/datasets/{dataset_id}/tables/{table_id}

`
string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
`

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

### getTableBytes()

    public abstract ByteString getTableBytes()

Immutable. Table that this ReadSession is reading from, in the form
\`projects/{project_id}/datasets/{dataset_id}/tables/{table_id}

`
string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
`

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

### getTableModifiers()

    public abstract ReadSession.TableModifiers getTableModifiers()

Optional. Any modifiers which are applied when reading from the specified table.

`
.google.cloud.bigquery.storage.v1beta2.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.ReadSession.TableModifiers` | The tableModifiers. |

### getTableModifiersOrBuilder()

    public abstract ReadSession.TableModifiersOrBuilder getTableModifiersOrBuilder()

Optional. Any modifiers which are applied when reading from the specified table.

`
.google.cloud.bigquery.storage.v1beta2.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquerystorage/latest/com.google.cloud.bigquery.storage.v1beta2.ReadSession.TableModifiersOrBuilder` |   |

### hasArrowSchema()

    public abstract boolean hasArrowSchema()

Output only. Arrow schema.

`
.google.cloud.bigquery.storage.v1beta2.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

### hasAvroSchema()

    public abstract boolean hasAvroSchema()

Output only. Avro schema.

`
.google.cloud.bigquery.storage.v1beta2.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

### hasExpireTime()

    public abstract boolean hasExpireTime()

Output only. Time at which the session becomes invalid. After this time, subsequent
requests to read this Session will return errors. The expire_time is
automatically assigned and currently cannot be specified or updated.

`.google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

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

### hasReadOptions()

    public abstract boolean hasReadOptions()

Optional. Read options for this session (e.g. column selection, filters).

`
.google.cloud.bigquery.storage.v1beta2.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL];
`

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

### hasTableModifiers()

    public abstract boolean hasTableModifiers()

Optional. Any modifiers which are applied when reading from the specified table.

`
.google.cloud.bigquery.storage.v1beta2.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL];
`

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