Class ReadSession (2.44.1)

public final class ReadSession extends GeneratedMessageV3 implements ReadSessionOrBuilder

Information about the ReadSession.

Protobuf type google.cloud.bigquery.storage.v1.ReadSession

Static Fields

ARROW_SCHEMA_FIELD_NUMBER

public static final int ARROW_SCHEMA_FIELD_NUMBER
Field Value
TypeDescription
int

AVRO_SCHEMA_FIELD_NUMBER

public static final int AVRO_SCHEMA_FIELD_NUMBER
Field Value
TypeDescription
int

DATA_FORMAT_FIELD_NUMBER

public static final int DATA_FORMAT_FIELD_NUMBER
Field Value
TypeDescription
int

ESTIMATED_ROW_COUNT_FIELD_NUMBER

public static final int ESTIMATED_ROW_COUNT_FIELD_NUMBER
Field Value
TypeDescription
int

ESTIMATED_TOTAL_BYTES_SCANNED_FIELD_NUMBER

public static final int ESTIMATED_TOTAL_BYTES_SCANNED_FIELD_NUMBER
Field Value
TypeDescription
int

ESTIMATED_TOTAL_PHYSICAL_FILE_SIZE_FIELD_NUMBER

public static final int ESTIMATED_TOTAL_PHYSICAL_FILE_SIZE_FIELD_NUMBER
Field Value
TypeDescription
int

EXPIRE_TIME_FIELD_NUMBER

public static final int EXPIRE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

READ_OPTIONS_FIELD_NUMBER

public static final int READ_OPTIONS_FIELD_NUMBER
Field Value
TypeDescription
int

STREAMS_FIELD_NUMBER

public static final int STREAMS_FIELD_NUMBER
Field Value
TypeDescription
int

TABLE_FIELD_NUMBER

public static final int TABLE_FIELD_NUMBER
Field Value
TypeDescription
int

TABLE_MODIFIERS_FIELD_NUMBER

public static final int TABLE_MODIFIERS_FIELD_NUMBER
Field Value
TypeDescription
int

TRACE_ID_FIELD_NUMBER

public static final int TRACE_ID_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ReadSession getDefaultInstance()
Returns
TypeDescription
ReadSession

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static ReadSession.Builder newBuilder()
Returns
TypeDescription
ReadSession.Builder

newBuilder(ReadSession prototype)

public static ReadSession.Builder newBuilder(ReadSession prototype)
Parameter
NameDescription
prototypeReadSession
Returns
TypeDescription
ReadSession.Builder

parseDelimitedFrom(InputStream input)

public static ReadSession parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ReadSession
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ReadSession parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ReadSession
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ReadSession parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ReadSession
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ReadSession parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ReadSession
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ReadSession parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ReadSession
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ReadSession parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ReadSession
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ReadSession parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ReadSession
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ReadSession parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ReadSession
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ReadSession parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ReadSession
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ReadSession parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ReadSession
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ReadSession parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ReadSession
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ReadSession parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ReadSession
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ReadSession> parser()
Returns
TypeDescription
Parser<ReadSession>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getArrowSchema()

public ArrowSchema getArrowSchema()

Output only. Arrow schema.

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

Returns
TypeDescription
ArrowSchema

The arrowSchema.

getArrowSchemaOrBuilder()

public ArrowSchemaOrBuilder getArrowSchemaOrBuilder()

Output only. Arrow schema.

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

Returns
TypeDescription
ArrowSchemaOrBuilder

getAvroSchema()

public AvroSchema getAvroSchema()

Output only. Avro schema.

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

Returns
TypeDescription
AvroSchema

The avroSchema.

getAvroSchemaOrBuilder()

public AvroSchemaOrBuilder getAvroSchemaOrBuilder()

Output only. Avro schema.

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

Returns
TypeDescription
AvroSchemaOrBuilder

getDataFormat()

public DataFormat getDataFormat()

Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not supported.

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

Returns
TypeDescription
DataFormat

The dataFormat.

getDataFormatValue()

public int getDataFormatValue()

Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not supported.

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

Returns
TypeDescription
int

The enum numeric value on the wire for dataFormat.

getDefaultInstanceForType()

public ReadSession getDefaultInstanceForType()
Returns
TypeDescription
ReadSession

getEstimatedRowCount()

public long getEstimatedRowCount()

Output only. An estimate on the number of rows present in this session's streams. This estimate is based on metadata from the table which might be incomplete or stale.

int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
long

The estimatedRowCount.

getEstimatedTotalBytesScanned()

public long getEstimatedTotalBytesScanned()

Output only. An estimate on the number of bytes this session will scan when all streams are completely consumed. This estimate is based on metadata from the table which might be incomplete or stale.

int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
long

The estimatedTotalBytesScanned.

getEstimatedTotalPhysicalFileSize()

public long getEstimatedTotalPhysicalFileSize()

Output only. A pre-projected estimate of the total physical size of files (in bytes) that this session will scan when all streams are consumed. This estimate is independent of the selected columns and can be based on incomplete or stale metadata from the table. This field is only set for BigLake tables.

int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
long

The estimatedTotalPhysicalFileSize.

getExpireTime()

public 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
TypeDescription
Timestamp

The expireTime.

getExpireTimeOrBuilder()

public 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
TypeDescription
TimestampOrBuilder

getName()

public 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
TypeDescription
String

The name.

getNameBytes()

public 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
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<ReadSession> getParserForType()
Returns
TypeDescription
Parser<ReadSession>
Overrides

getReadOptions()

public ReadSession.TableReadOptions getReadOptions()

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

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

Returns
TypeDescription
ReadSession.TableReadOptions

The readOptions.

getReadOptionsOrBuilder()

public ReadSession.TableReadOptionsOrBuilder getReadOptionsOrBuilder()

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

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

Returns
TypeDescription
ReadSession.TableReadOptionsOrBuilder

getSchemaCase()

public ReadSession.SchemaCase getSchemaCase()
Returns
TypeDescription
ReadSession.SchemaCase

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getStreams(int index)

public 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.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
ReadStream

getStreamsCount()

public 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.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

getStreamsList()

public 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.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<ReadStream>

getStreamsOrBuilder(int index)

public 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.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
ReadStreamOrBuilder

getStreamsOrBuilderList()

public 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.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<? extends com.google.cloud.bigquery.storage.v1.ReadStreamOrBuilder>

getTable()

public 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
TypeDescription
String

The table.

getTableBytes()

public 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
TypeDescription
ByteString

The bytes for table.

getTableModifiers()

public ReadSession.TableModifiers getTableModifiers()

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

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

Returns
TypeDescription
ReadSession.TableModifiers

The tableModifiers.

getTableModifiersOrBuilder()

public ReadSession.TableModifiersOrBuilder getTableModifiersOrBuilder()

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

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

Returns
TypeDescription
ReadSession.TableModifiersOrBuilder

getTraceId()

public String getTraceId()

Optional. ID set by client to annotate a session identity. This does not need to be strictly unique, but instead the same ID should be used to group logically connected sessions (e.g. All using the same ID for all sessions needed to complete a Spark SQL query is reasonable).

Maximum length is 256 bytes.

string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The traceId.

getTraceIdBytes()

public ByteString getTraceIdBytes()

Optional. ID set by client to annotate a session identity. This does not need to be strictly unique, but instead the same ID should be used to group logically connected sessions (e.g. All using the same ID for all sessions needed to complete a Spark SQL query is reasonable).

Maximum length is 256 bytes.

string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for traceId.

hasArrowSchema()

public boolean hasArrowSchema()

Output only. Arrow schema.

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

Returns
TypeDescription
boolean

Whether the arrowSchema field is set.

hasAvroSchema()

public boolean hasAvroSchema()

Output only. Avro schema.

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

Returns
TypeDescription
boolean

Whether the avroSchema field is set.

hasExpireTime()

public 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
TypeDescription
boolean

Whether the expireTime field is set.

hasReadOptions()

public boolean hasReadOptions()

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

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

Returns
TypeDescription
boolean

Whether the readOptions field is set.

hasTableModifiers()

public boolean hasTableModifiers()

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

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

Returns
TypeDescription
boolean

Whether the tableModifiers field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ReadSession.Builder newBuilderForType()
Returns
TypeDescription
ReadSession.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ReadSession.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ReadSession.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ReadSession.Builder toBuilder()
Returns
TypeDescription
ReadSession.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException