From 201a41722b1d7ee3003e7735262c2774ce355521 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 14 Aug 2026 00:01:07 +0000 Subject: [PATCH 1/2] feat: add support for client-side metrics in AppendRowsRequest docs: enable client to send operational metrics in AppendRowsRequest for internal consumption Client operational metrics can now be transmitted to the server for internal use. PiperOrigin-RevId: 964315677 Source-Link: https://github.com/googleapis/googleapis/commit/707695738fc80e7d3ed8fb08253158ad052527ae Source-Link: https://github.com/googleapis/googleapis-gen/commit/3587d7f43b596e8fffebd22e9116d1f7ae62d001 Copy-Tag: eyJwIjoiQmlnUXVlcnlTdG9yYWdlLy5Pd2xCb3QueWFtbCIsImgiOiIzNTg3ZDdmNDNiNTk2ZThmZmZlYmQyMmU5MTE2ZDFmN2FlNjJkMDAxIn0= --- .../Cloud/Bigquery/Storage/V1/Annotations.php | 24 + .../Cloud/Bigquery/Storage/V1/Arrow.php | 24 + .../Google/Cloud/Bigquery/Storage/V1/Avro.php | 24 + .../Cloud/Bigquery/Storage/V1/Protobuf.php | 24 + .../Cloud/Bigquery/Storage/V1/Storage.php | 36 + .../Cloud/Bigquery/Storage/V1/Stream.php | 30 + .../Cloud/Bigquery/Storage/V1/Table.php | 26 + .../BigQuery/Storage/V1/AppendRowsRequest.php | 588 ++++++++++++++++ .../V1/AppendRowsRequest/ArrowData.php | 121 ++++ .../MissingValueInterpretation.php | 65 ++ .../V1/AppendRowsRequest/ProtoData.php | 150 +++++ .../Storage/V1/AppendRowsResponse.php | 279 ++++++++ .../V1/AppendRowsResponse/AppendResult.php | 110 +++ .../BigQuery/Storage/V1/ArrowRecordBatch.php | 112 ++++ .../Cloud/BigQuery/Storage/V1/ArrowSchema.php | 71 ++ .../Storage/V1/ArrowSerializationOptions.php | 109 +++ .../CompressionCodec.php | 61 ++ .../PicosTimestampPrecision.php | 74 ++ .../Cloud/BigQuery/Storage/V1/AvroRows.php | 112 ++++ .../Cloud/BigQuery/Storage/V1/AvroSchema.php | 71 ++ .../Storage/V1/AvroSerializationOptions.php | 133 ++++ .../PicosTimestampPrecision.php | 74 ++ .../V1/BatchCommitWriteStreamsRequest.php | 120 ++++ .../V1/BatchCommitWriteStreamsResponse.php | 135 ++++ .../Cloud/BigQuery/Storage/V1/ClientStats.php | 122 ++++ .../Storage/V1/ClientStats/RequestStats.php | 130 ++++ .../Storage/V1/ClientStats/WindowStats.php | 413 ++++++++++++ .../Storage/V1/CreateReadSessionRequest.php | 267 ++++++++ .../Storage/V1/CreateWriteStreamRequest.php | 132 ++++ .../Cloud/BigQuery/Storage/V1/DataFormat.php | 63 ++ .../Storage/V1/FinalizeWriteStreamRequest.php | 86 +++ .../V1/FinalizeWriteStreamResponse.php | 67 ++ .../BigQuery/Storage/V1/FlushRowsRequest.php | 158 +++++ .../BigQuery/Storage/V1/FlushRowsResponse.php | 67 ++ .../Storage/V1/GetWriteStreamRequest.php | 124 ++++ .../Cloud/BigQuery/Storage/V1/ProtoRows.php | 73 ++ .../Cloud/BigQuery/Storage/V1/ProtoSchema.php | 105 +++ .../BigQuery/Storage/V1/ReadRowsRequest.php | 172 +++++ .../BigQuery/Storage/V1/ReadRowsResponse.php | 458 +++++++++++++ .../Cloud/BigQuery/Storage/V1/ReadSession.php | 604 +++++++++++++++++ .../Storage/V1/ReadSession/TableModifiers.php | 77 +++ .../V1/ReadSession/TableReadOptions.php | 468 +++++++++++++ .../ResponseCompressionCodec.php | 60 ++ .../Cloud/BigQuery/Storage/V1/ReadStream.php | 73 ++ .../Cloud/BigQuery/Storage/V1/RowError.php | 135 ++++ .../Storage/V1/RowError/RowErrorCode.php | 54 ++ .../Storage/V1/SplitReadStreamRequest.php | 125 ++++ .../Storage/V1/SplitReadStreamResponse.php | 133 ++++ .../BigQuery/Storage/V1/StorageError.php | 138 ++++ .../V1/StorageError/StorageErrorCode.php | 151 +++++ .../Cloud/BigQuery/Storage/V1/StreamStats.php | 77 +++ .../Storage/V1/StreamStats/Progress.php | 139 ++++ .../BigQuery/Storage/V1/TableFieldSchema.php | 630 ++++++++++++++++++ .../V1/TableFieldSchema/FieldElementType.php | 67 ++ .../Storage/V1/TableFieldSchema/Mode.php | 60 ++ .../Storage/V1/TableFieldSchema/Type.php | 157 +++++ .../Cloud/BigQuery/Storage/V1/TableSchema.php | 69 ++ .../BigQuery/Storage/V1/ThrottleState.php | 71 ++ .../Cloud/BigQuery/Storage/V1/WriteStream.php | 341 ++++++++++ .../BigQuery/Storage/V1/WriteStream/Type.php | 69 ++ .../Storage/V1/WriteStream/WriteMode.php | 55 ++ .../BigQuery/Storage/V1/WriteStreamView.php | 66 ++ .../create_read_session.php | 92 +++ .../V1/BigQueryReadClient/read_rows.php | 87 +++ .../BigQueryReadClient/split_read_stream.php | 87 +++ .../V1/BigQueryWriteClient/append_rows.php | 143 ++++ .../batch_commit_write_streams.php | 83 +++ .../create_write_stream.php | 79 +++ .../finalize_write_stream.php | 78 +++ .../V1/BigQueryWriteClient/flush_rows.php | 83 +++ .../BigQueryWriteClient/get_write_stream.php | 77 +++ .../v1/src/V1/Client/BigQueryReadClient.php | 409 ++++++++++++ .../v1/src/V1/Client/BigQueryWriteClient.php | 474 +++++++++++++ .../v1/src/V1/gapic_metadata.json | 72 ++ .../big_query_read_client_config.json | 73 ++ .../big_query_read_descriptor_config.php | 74 ++ .../big_query_read_rest_client_config.php | 63 ++ .../big_query_write_client_config.json | 90 +++ .../big_query_write_descriptor_config.php | 107 +++ .../big_query_write_rest_client_config.php | 90 +++ .../Unit/V1/Client/BigQueryReadClientTest.php | 344 ++++++++++ .../V1/Client/BigQueryWriteClientTest.php | 537 +++++++++++++++ 82 files changed, 11971 insertions(+) create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Avro.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Stream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/PicosTimestampPrecision.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions/PicosTimestampPrecision.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats/RequestStats.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats/WindowStats.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php create mode 100644 owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php new file mode 100644 index 000000000000..1201e2f28fdf --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xC3\x02\x0A2google/cloud/bigquery/storage/v1/annotations.proto\x12 google.cloud.bigquery.storage.v1\x1A google/protobuf/descriptor.protoB\xC0\x01\x0A\$com.google.cloud.bigquery.storage.v1B\x10AnnotationsProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php new file mode 100644 index 000000000000..b3f36d333f99 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xFA\x06\x0A,google/cloud/bigquery/storage/v1/arrow.proto\x12 google.cloud.bigquery.storage.v1\"(\x0A\x0BArrowSchema\x12\x19\x0A\x11serialized_schema\x18\x01 \x01(\x0C\"J\x0A\x10ArrowRecordBatch\x12\x1F\x0A\x17serialized_record_batch\x18\x01 \x01(\x0C\x12\x15\x0A\x09row_count\x18\x02 \x01(\x03B\x02\x18\x01\"\xEC\x03\x0A\x19ArrowSerializationOptions\x12h\x0A\x12buffer_compression\x18\x02 \x01(\x0E2L.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec\x12v\x0A\x19picos_timestamp_precision\x18\x03 \x01(\x0E2S.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision\"H\x0A\x10CompressionCodec\x12\x1B\x0A\x17COMPRESSION_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09LZ4_FRAME\x10\x01\x12\x08\x0A\x04ZSTD\x10\x02\"\xA2\x01\x0A\x17PicosTimestampPrecision\x12)\x0A%PICOS_TIMESTAMP_PRECISION_UNSPECIFIED\x10\x00\x12\x1E\x0A\x1ATIMESTAMP_PRECISION_MICROS\x10\x01\x12\x1D\x0A\x19TIMESTAMP_PRECISION_NANOS\x10\x02\x12\x1D\x0A\x19TIMESTAMP_PRECISION_PICOS\x10\x03B\xBA\x01\x0A\$com.google.cloud.bigquery.storage.v1B\x0AArrowProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Avro.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Avro.php new file mode 100644 index 000000000000..ae9403c293b3 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Avro.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xD4\x05\x0A+google/cloud/bigquery/storage/v1/avro.proto\x12 google.cloud.bigquery.storage.v1\"\x1C\x0A\x0AAvroSchema\x12\x0E\x0A\x06schema\x18\x01 \x01(\x09\"A\x0A\x08AvroRows\x12\x1E\x0A\x16serialized_binary_rows\x18\x01 \x01(\x0C\x12\x15\x0A\x09row_count\x18\x02 \x01(\x03B\x02\x18\x01\"\xDD\x02\x0A\x18AvroSerializationOptions\x12%\x0A\x1Denable_display_name_attribute\x18\x01 \x01(\x08\x12u\x0A\x19picos_timestamp_precision\x18\x02 \x01(\x0E2R.google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision\"\xA2\x01\x0A\x17PicosTimestampPrecision\x12)\x0A%PICOS_TIMESTAMP_PRECISION_UNSPECIFIED\x10\x00\x12\x1E\x0A\x1ATIMESTAMP_PRECISION_MICROS\x10\x01\x12\x1D\x0A\x19TIMESTAMP_PRECISION_NANOS\x10\x02\x12\x1D\x0A\x19TIMESTAMP_PRECISION_PICOS\x10\x03B\xB9\x01\x0A\$com.google.cloud.bigquery.storage.v1B\x09AvroProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php new file mode 100644 index 000000000000..655e16fcf808 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xAE\x03\x0A/google/cloud/bigquery/storage/v1/protobuf.proto\x12 google.cloud.bigquery.storage.v1\x1A google/protobuf/descriptor.proto\"I\x0A\x0BProtoSchema\x12:\x0A\x10proto_descriptor\x18\x01 \x01(\x0B2 .google.protobuf.DescriptorProto\"\$\x0A\x09ProtoRows\x12\x17\x0A\x0Fserialized_rows\x18\x01 \x03(\x0CB\xBD\x01\x0A\$com.google.cloud.bigquery.storage.v1B\x0DProtoBufProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php new file mode 100644 index 000000000000..b4a2d096c920 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile( + "\x0A\xE1D\x0A.google/cloud/bigquery/storage/v1/storage.proto\x12 google.cloud.bigquery.storage.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/bigquery/storage/v1/arrow.proto\x1A+google/cloud/bigquery/storage/v1/avro.proto\x1A/google/cloud/bigquery/storage/v1/protobuf.proto\x1A-google/cloud/bigquery/storage/v1/stream.proto\x1A,google/cloud/bigquery/storage/v1/table.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/protobuf/wrappers.proto\x1A\x17google/rpc/status.proto\"\xE7\x01\x0A\x18CreateReadSessionRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x12H\x0A\x0Cread_session\x18\x02 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ReadSessionB\x03\xE0A\x02\x12\x18\x0A\x10max_stream_count\x18\x03 \x01(\x05\x12\"\x0A\x1Apreferred_min_stream_count\x18\x04 \x01(\x05\"\xF9\x01\x0A\x0FReadRowsRequest\x12F\x0A\x0Bread_stream\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)bigquerystorage.googleapis.com/ReadStream\x12\x0E\x0A\x06offset\x18\x02 \x01(\x03\x12g\x0A\x1Barrow_serialization_options\x18\x05 \x01(\x0B2;.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsB\x03\xE0A\x01H\x00B%\x0A#output_format_serialization_options\")\x0A\x0DThrottleState\x12\x18\x0A\x10throttle_percent\x18\x01 \x01(\x05\"\x97\x01\x0A\x0BStreamStats\x12H\x0A\x08progress\x18\x02 \x01(\x0B26.google.cloud.bigquery.storage.v1.StreamStats.Progress\x1A>\x0A\x08Progress\x12\x19\x0A\x11at_response_start\x18\x01 \x01(\x01\x12\x17\x0A\x0Fat_response_end\x18\x02 \x01(\x01\"\xF7\x04\x0A\x10ReadRowsResponse\x12?\x0A\x09avro_rows\x18\x03 \x01(\x0B2*.google.cloud.bigquery.storage.v1.AvroRowsH\x00\x12P\x0A\x12arrow_record_batch\x18\x04 \x01(\x0B22.google.cloud.bigquery.storage.v1.ArrowRecordBatchH\x00\x12\x11\x0A\x09row_count\x18\x06 \x01(\x03\x12<\x0A\x05stats\x18\x02 \x01(\x0B2-.google.cloud.bigquery.storage.v1.StreamStats\x12G\x0A\x0Ethrottle_state\x18\x05 \x01(\x0B2/.google.cloud.bigquery.storage.v1.ThrottleState\x12H\x0A\x0Bavro_schema\x18\x07 \x01(\x0B2,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xE0A\x03H\x01\x12J\x0A\x0Carrow_schema\x18\x08 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xE0A\x03H\x01\x12(\x0A\x16uncompressed_byte_size\x18\x09 \x01(\x03B\x03\xE0A\x01H\x02\x88\x01\x01\x12+\x0A\x19total_estimated_row_count\x18\x0A \x01(\x03B\x03\xE0A\x03H\x03\x88\x01\x01B\x06\x0A\x04rowsB\x08\x0A\x06schemaB\x19\x0A\x17_uncompressed_byte_sizeB\x1C\x0A\x1A_total_estimated_row_count\"k\x0A\x16SplitReadStreamRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)bigquerystorage.googleapis.com/ReadStream\x12\x10\x0A\x08fraction\x18\x02 \x01(\x01\"\xA7\x01\x0A\x17SplitReadStreamResponse\x12D\x0A\x0Eprimary_stream\x18\x01 \x01(\x0B2,.google.cloud.bigquery.storage.v1.ReadStream\x12F\x0A\x10remainder_stream\x18\x02 \x01(\x0B2,.google.cloud.bigquery.storage.v1.ReadStream\"\x9B\x01\x0A\x18CreateWriteStreamRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dbigquery.googleapis.com/Table\x12H\x0A\x0Cwrite_stream\x18\x02 \x01(\x0B2-.google.cloud.bigquery.storage.v1.WriteStreamB\x03\xE0A\x02\"\xC2\x09\x0A\x11AppendRowsRequest\x12H\x0A\x0Cwrite_stream\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\x12+\x0A\x06offset\x18\x02 \x01(\x0B2\x1B.google.protobuf.Int64Value\x12S\x0A\x0Aproto_rows\x18\x04 \x01(\x0B2=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoDataH\x00\x12S\x0A\x0Aarrow_rows\x18\x05 \x01(\x0B2=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataH\x00\x12\x10\x0A\x08trace_id\x18\x06 \x01(\x09\x12{\x0A\x1Dmissing_value_interpretations\x18\x07 \x03(\x0B2T.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationsEntry\x12\x81\x01\x0A\$default_missing_value_interpretation\x18\x08 \x01(\x0E2N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationB\x03\xE0A\x01\x12H\x0A\x0Cclient_stats\x18\x09 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ClientStatsB\x03\xE0A\x01\x1A\x93\x01\x0A\x09ArrowData\x12D\x0A\x0Dwriter_schema\x18\x01 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ArrowSchema\x12@\x0A\x04rows\x18\x02 \x01(\x0B22.google.cloud.bigquery.storage.v1.ArrowRecordBatch\x1A\x8C\x01\x0A\x09ProtoData\x12D\x0A\x0Dwriter_schema\x18\x01 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ProtoSchema\x129\x0A\x04rows\x18\x02 \x01(\x0B2+.google.cloud.bigquery.storage.v1.ProtoRows\x1A\x92\x01\x0A MissingValueInterpretationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12]\x0A\x05value\x18\x02 \x01(\x0E2N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation:\x028\x01\"m\x0A\x1AMissingValueInterpretation\x12,\x0A(MISSING_VALUE_INTERPRETATION_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ANULL_VALUE\x10\x01\x12\x11\x0A\x0DDEFAULT_VALUE\x10\x02B\x06\x0A\x04rows\"\xFB\x02\x0A\x12AppendRowsResponse\x12Z\x0A\x0Dappend_result\x18\x01 \x01(\x0B2A.google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResultH\x00\x12#\x0A\x05error\x18\x02 \x01(\x0B2\x12.google.rpc.StatusH\x00\x12E\x0A\x0Eupdated_schema\x18\x03 \x01(\x0B2-.google.cloud.bigquery.storage.v1.TableSchema\x12>\x0A\x0Arow_errors\x18\x04 \x03(\x0B2*.google.cloud.bigquery.storage.v1.RowError\x12\x14\x0A\x0Cwrite_stream\x18\x05 \x01(\x09\x1A;\x0A\x0CAppendResult\x12+\x0A\x06offset\x18\x01 \x01(\x0B2\x1B.google.protobuf.Int64ValueB\x0A\x0A\x08response\"\x9A\x01\x0A\x15GetWriteStreamRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\x12?\x0A\x04view\x18\x03 \x01(\x0E21.google.cloud.bigquery.storage.v1.WriteStreamView\"s\x0A\x1EBatchCommitWriteStreamsRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dbigquery.googleapis.com/Table\x12\x1A\x0A\x0Dwrite_streams\x18\x02 \x03(\x09B\x03\xE0A\x02\"\x99\x01\x0A\x1FBatchCommitWriteStreamsResponse\x12/\x0A\x0Bcommit_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12E\x0A\x0Dstream_errors\x18\x02 \x03(\x0B2..google.cloud.bigquery.storage.v1.StorageError\"^\x0A\x1AFinalizeWriteStreamRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\"0\x0A\x1BFinalizeWriteStreamResponse\x12\x11\x0A\x09row_count\x18\x01 \x01(\x03\"\x89\x01\x0A\x10FlushRowsRequest\x12H\x0A\x0Cwrite_stream\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\x12+\x0A\x06offset\x18\x02 \x01(\x0B2\x1B.google.protobuf.Int64Value\"#\x0A\x11FlushRowsResponse\x12\x0E\x0A\x06offset\x18\x01 \x01(\x03\"\xA4\x04\x0A\x0CStorageError\x12M\x0A\x04code\x18\x01 \x01(\x0E2?.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode\x12\x0E\x0A\x06entity\x18\x02 \x01(\x09\x12\x15\x0A\x0Derror_message\x18\x03 \x01(\x09\"\x9D\x03\x0A\x10StorageErrorCode\x12\"\x0A\x1ESTORAGE_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FTABLE_NOT_FOUND\x10\x01\x12\x1C\x0A\x18STREAM_ALREADY_COMMITTED\x10\x02\x12\x14\x0A\x10STREAM_NOT_FOUND\x10\x03\x12\x17\x0A\x13INVALID_STREAM_TYPE\x10\x04\x12\x18\x0A\x14INVALID_STREAM_STATE\x10\x05\x12\x14\x0A\x10STREAM_FINALIZED\x10\x06\x12 \x0A\x1CSCHEMA_MISMATCH_EXTRA_FIELDS\x10\x07\x12\x19\x0A\x15OFFSET_ALREADY_EXISTS\x10\x08\x12\x17\x0A\x13OFFSET_OUT_OF_RANGE\x10\x09\x12\x15\x0A\x11CMEK_NOT_PROVIDED\x10\x0A\x12\x19\x0A\x15INVALID_CMEK_PROVIDED\x10\x0B\x12\x19\x0A\x15CMEK_ENCRYPTION_ERROR\x10\x0C\x12\x15\x0A\x11KMS_SERVICE_ERROR\x10\x0D\x12\x19\x0A\x15KMS_PERMISSION_DENIED\x10\x0E\"\xB3\x01\x0A\x08RowError\x12\x0D\x0A\x05index\x18\x01 \x01(\x03\x12E\x0A\x04code\x18\x02 \x01(\x0E27.google.cloud.bigquery.storage.v1.RowError.RowErrorCode\x12\x0F\x0A\x07message\x18\x03 \x01(\x09\"@\x0A\x0CRowErrorCode\x12\x1E\x0A\x1AROW_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CFIELDS_ERROR\x10\x01\"\x96\x07\x0A\x0BClientStats\x12V\x0A\x0Drequest_stats\x18\x01 \x01(\x0B2:.google.cloud.bigquery.storage.v1.ClientStats.RequestStatsB\x03\xE0A\x01\x12T\x0A\x0Cwindow_stats\x18\x02 \x01(\x0B29.google.cloud.bigquery.storage.v1.ClientStats.WindowStatsB\x03\xE0A\x01\x1A\x8A\x01\x0A\x0CRequestStats\x12\"\x0A\x10send_time_millis\x18\x01 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12'\x0A\x15queued_requests_count\x18\x02 \x01(\x03B\x03\xE0A\x01H\x01\x88\x01\x01B\x13\x0A\x11_send_time_millisB\x18\x0A\x16_queued_requests_count\x1A\xCB\x04\x0A\x0BWindowStats\x12-\x0A\x1Bmax_response_latency_millis\x18\x01 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12-\x0A\x1Bavg_response_latency_millis\x18\x02 \x01(\x03B\x03\xE0A\x01H\x01\x88\x01\x01\x121\x0A\x1Flongest_wait_no_response_millis\x18\x03 \x01(\x03B\x03\xE0A\x01H\x02\x88\x01\x01\x12%\x0A\x13requests_sent_count\x18\x04 \x01(\x03B\x03\xE0A\x01H\x03\x88\x01\x01\x12*\x0A\x18responses_received_count\x18\x05 \x01(\x03B\x03\xE0A\x01H\x04\x88\x01\x01\x12\"\x0A\x10bytes_sent_count\x18\x06 \x01(\x03B\x03\xE0A\x01H\x05\x88\x01\x01\x120\x0A\x1Ewindow_start_time_epoch_millis\x18\x07 \x01(\x03B\x03\xE0A\x01H\x06\x88\x01\x01\x12\x1F\x0A\x0Dwindow_millis\x18\x08 \x01(\x03B\x03\xE0A\x01H\x07\x88\x01\x01B\x1E\x0A\x1C_max_response_latency_millisB\x1E\x0A\x1C_avg_response_latency_millisB\"\x0A _longest_wait_no_response_millisB\x16\x0A\x14_requests_sent_countB\x1B\x0A\x19_responses_received_countB\x13\x0A\x11_bytes_sent_countB!\x0A\x1F_window_start_time_epoch_millisB\x10\x0A\x0E_window_millis2\x92\x06\x0A\x0CBigQueryRead\x12\xE9\x01\x0A\x11CreateReadSession\x12:.google.cloud.bigquery.storage.v1.CreateReadSessionRequest\x1A-.google.cloud.bigquery.storage.v1.ReadSession\"i\xDAA\$parent,read_session,max_stream_count\x82\xD3\xE4\x93\x02<\"7/v1/{read_session.table=projects/*/datasets/*/tables/*}:\x01*\x12\xCF\x01\x0A\x08ReadRows\x121.google.cloud.bigquery.storage.v1.ReadRowsRequest\x1A2.google.cloud.bigquery.storage.v1.ReadRowsResponse\"Z\xDAA\x12read_stream,offset\x82\xD3\xE4\x93\x02?\x12=/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}0\x01\x12\xC6\x01\x0A\x0FSplitReadStream\x128.google.cloud.bigquery.storage.v1.SplitReadStreamRequest\x1A9.google.cloud.bigquery.storage.v1.SplitReadStreamResponse\">\x82\xD3\xE4\x93\x028\x126/v1/{name=projects/*/locations/*/sessions/*/streams/*}\x1A{\xCAA\x1Ebigquerystorage.googleapis.com\xD2AWhttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platform2\xBC\x0B\x0A\x0DBigQueryWrite\x12\xD7\x01\x0A\x11CreateWriteStream\x12:.google.cloud.bigquery.storage.v1.CreateWriteStreamRequest\x1A-.google.cloud.bigquery.storage.v1.WriteStream\"W\xDAA\x13parent,write_stream\x82\xD3\xE4\x93\x02;\"+/v1/{parent=projects/*/datasets/*/tables/*}:\x0Cwrite_stream\x12\xD2\x01\x0A\x0AAppendRows\x123.google.cloud.bigquery.storage.v1.AppendRowsRequest\x1A4.google.cloud.bigquery.storage.v1.AppendRowsResponse\"U\xDAA\x0Cwrite_stream\x82\xD3\xE4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*(\x010\x01\x12\xBF\x01\x0A\x0EGetWriteStream\x127.google.cloud.bigquery.storage.v1.GetWriteStreamRequest\x1A-.google.cloud.bigquery.storage.v1.WriteStream\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xD9\x01\x0A\x13FinalizeWriteStream\x12<.google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest\x1A=.google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xDC\x01\x0A\x17BatchCommitWriteStreams\x12@.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest\x1AA.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse\"<\xDAA\x06parent\x82\xD3\xE4\x93\x02-\x12+/v1/{parent=projects/*/datasets/*/tables/*}\x12\xCB\x01\x0A\x09FlushRows\x122.google.cloud.bigquery.storage.v1.FlushRowsRequest\x1A3.google.cloud.bigquery.storage.v1.FlushRowsResponse\"U\xDAA\x0Cwrite_stream\x82\xD3\xE4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*\x1A\xB0\x01\xCAA\x1Ebigquerystorage.googleapis.com\xD2A\x8B\x01https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/bigquery.insertdata,https://www.googleapis.com/auth/cloud-platformB\x94\x02\x0A\$com.google.cloud.bigquery.storage.v1B\x0CStorageProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1\xEAAU\x0A\x1Dbigquery.googleapis.com/Table\x124projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Stream.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Stream.php new file mode 100644 index 000000000000..35a5cd3299b6 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Stream.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\xCA\x17\x0A-google/cloud/bigquery/storage/v1/stream.proto\x12 google.cloud.bigquery.storage.v1\x1A\x19google/api/resource.proto\x1A,google/cloud/bigquery/storage/v1/arrow.proto\x1A+google/cloud/bigquery/storage/v1/avro.proto\x1A,google/cloud/bigquery/storage/v1/table.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xC3\x0C\x0A\x0BReadSession\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bexpire_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12F\x0A\x0Bdata_format\x18\x03 \x01(\x0E2,.google.cloud.bigquery.storage.v1.DataFormatB\x03\xE0A\x05\x12H\x0A\x0Bavro_schema\x18\x04 \x01(\x0B2,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xE0A\x03H\x00\x12J\x0A\x0Carrow_schema\x18\x05 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xE0A\x03H\x00\x124\x0A\x05table\x18\x06 \x01(\x09B%\xE0A\x05\xFAA\x1F\x0A\x1Dbigquery.googleapis.com/Table\x12Z\x0A\x0Ftable_modifiers\x18\x07 \x01(\x0B2<.google.cloud.bigquery.storage.v1.ReadSession.TableModifiersB\x03\xE0A\x01\x12Y\x0A\x0Cread_options\x18\x08 \x01(\x0B2>.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptionsB\x03\xE0A\x01\x12B\x0A\x07streams\x18\x0A \x03(\x0B2,.google.cloud.bigquery.storage.v1.ReadStreamB\x03\xE0A\x03\x12*\x0A\x1Destimated_total_bytes_scanned\x18\x0C \x01(\x03B\x03\xE0A\x03\x12/\x0A\"estimated_total_physical_file_size\x18\x0F \x01(\x03B\x03\xE0A\x03\x12 \x0A\x13estimated_row_count\x18\x0E \x01(\x03B\x03\xE0A\x03\x12\x15\x0A\x08trace_id\x18\x0D \x01(\x09B\x03\xE0A\x01\x1AC\x0A\x0ETableModifiers\x121\x0A\x0Dsnapshot_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1A\x89\x05\x0A\x10TableReadOptions\x12\x17\x0A\x0Fselected_fields\x18\x01 \x03(\x09\x12\x17\x0A\x0Frow_restriction\x18\x02 \x01(\x09\x12g\x0A\x1Barrow_serialization_options\x18\x03 \x01(\x0B2;.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsB\x03\xE0A\x01H\x00\x12e\x0A\x1Aavro_serialization_options\x18\x04 \x01(\x0B2:.google.cloud.bigquery.storage.v1.AvroSerializationOptionsB\x03\xE0A\x01H\x00\x12#\x0A\x11sample_percentage\x18\x05 \x01(\x01B\x03\xE0A\x01H\x01\x88\x01\x01\x12\x85\x01\x0A\x1Aresponse_compression_codec\x18\x06 \x01(\x0E2W.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodecB\x03\xE0A\x01H\x02\x88\x01\x01\"j\x0A\x18ResponseCompressionCodec\x12*\x0A&RESPONSE_COMPRESSION_CODEC_UNSPECIFIED\x10\x00\x12\"\x0A\x1ERESPONSE_COMPRESSION_CODEC_LZ4\x10\x02B%\x0A#output_format_serialization_optionsB\x14\x0A\x12_sample_percentageB\x1D\x0A\x1B_response_compression_codec:k\xEAAh\x0A*bigquerystorage.googleapis.com/ReadSession\x12:projects/{project}/locations/{location}/sessions/{session}B\x08\x0A\x06schema\"\x9C\x01\x0A\x0AReadStream\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03:{\xEAAx\x0A)bigquerystorage.googleapis.com/ReadStream\x12Kprojects/{project}/locations/{location}/sessions/{session}/streams/{stream}\"\xFB\x04\x0A\x0BWriteStream\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12E\x0A\x04type\x18\x02 \x01(\x0E22.google.cloud.bigquery.storage.v1.WriteStream.TypeB\x03\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bcommit_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12H\x0A\x0Ctable_schema\x18\x05 \x01(\x0B2-.google.cloud.bigquery.storage.v1.TableSchemaB\x03\xE0A\x03\x12P\x0A\x0Awrite_mode\x18\x07 \x01(\x0E27.google.cloud.bigquery.storage.v1.WriteStream.WriteModeB\x03\xE0A\x05\x12\x15\x0A\x08location\x18\x08 \x01(\x09B\x03\xE0A\x03\"F\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09COMMITTED\x10\x01\x12\x0B\x0A\x07PENDING\x10\x02\x12\x0C\x0A\x08BUFFERED\x10\x03\"3\x0A\x09WriteMode\x12\x1A\x0A\x16WRITE_MODE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06INSERT\x10\x01:v\xEAAs\x0A*bigquerystorage.googleapis.com/WriteStream\x12Eprojects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}*>\x0A\x0ADataFormat\x12\x1B\x0A\x17DATA_FORMAT_UNSPECIFIED\x10\x00\x12\x08\x0A\x04AVRO\x10\x01\x12\x09\x0A\x05ARROW\x10\x02*I\x0A\x0FWriteStreamView\x12!\x0A\x1DWRITE_STREAM_VIEW_UNSPECIFIED\x10\x00\x12\x09\x0A\x05BASIC\x10\x01\x12\x08\x0A\x04FULL\x10\x02B\xBB\x01\x0A\$com.google.cloud.bigquery.storage.v1B\x0BStreamProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php new file mode 100644 index 000000000000..35eca1cfedcb --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xC7\x0A\x0A,google/cloud/bigquery/storage/v1/table.proto\x12 google.cloud.bigquery.storage.v1\x1A\x1Egoogle/protobuf/wrappers.proto\"Q\x0A\x0BTableSchema\x12B\x0A\x06fields\x18\x01 \x03(\x0B22.google.cloud.bigquery.storage.v1.TableFieldSchema\"\xBC\x07\x0A\x10TableFieldSchema\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12J\x0A\x04type\x18\x02 \x01(\x0E27.google.cloud.bigquery.storage.v1.TableFieldSchema.TypeB\x03\xE0A\x02\x12J\x0A\x04mode\x18\x03 \x01(\x0E27.google.cloud.bigquery.storage.v1.TableFieldSchema.ModeB\x03\xE0A\x01\x12G\x0A\x06fields\x18\x04 \x03(\x0B22.google.cloud.bigquery.storage.v1.TableFieldSchemaB\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x06 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Amax_length\x18\x07 \x01(\x03B\x03\xE0A\x01\x12\x16\x0A\x09precision\x18\x08 \x01(\x03B\x03\xE0A\x01\x12\x12\x0A\x05scale\x18\x09 \x01(\x03B\x03\xE0A\x01\x12%\x0A\x18default_value_expression\x18\x0A \x01(\x09B\x03\xE0A\x01\x12=\x0A\x13timestamp_precision\x18\x1B \x01(\x0B2\x1B.google.protobuf.Int64ValueB\x03\xE0A\x01\x12d\x0A\x12range_element_type\x18\x0B \x01(\x0B2C.google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementTypeB\x03\xE0A\x01\x1A^\x0A\x10FieldElementType\x12J\x0A\x04type\x18\x01 \x01(\x0E27.google.cloud.bigquery.storage.v1.TableFieldSchema.TypeB\x03\xE0A\x02\"\xE0\x01\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06STRING\x10\x01\x12\x09\x0A\x05INT64\x10\x02\x12\x0A\x0A\x06DOUBLE\x10\x03\x12\x0A\x0A\x06STRUCT\x10\x04\x12\x09\x0A\x05BYTES\x10\x05\x12\x08\x0A\x04BOOL\x10\x06\x12\x0D\x0A\x09TIMESTAMP\x10\x07\x12\x08\x0A\x04DATE\x10\x08\x12\x08\x0A\x04TIME\x10\x09\x12\x0C\x0A\x08DATETIME\x10\x0A\x12\x0D\x0A\x09GEOGRAPHY\x10\x0B\x12\x0B\x0A\x07NUMERIC\x10\x0C\x12\x0E\x0A\x0ABIGNUMERIC\x10\x0D\x12\x0C\x0A\x08INTERVAL\x10\x0E\x12\x08\x0A\x04JSON\x10\x0F\x12\x09\x0A\x05RANGE\x10\x10\"F\x0A\x04Mode\x12\x14\x0A\x10MODE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08NULLABLE\x10\x01\x12\x0C\x0A\x08REQUIRED\x10\x02\x12\x0C\x0A\x08REPEATED\x10\x03B\xBA\x01\x0A\$com.google.cloud.bigquery.storage.v1B\x0ATableProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php new file mode 100644 index 000000000000..56de7ef223a0 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php @@ -0,0 +1,588 @@ +google.cloud.bigquery.storage.v1.AppendRowsRequest + */ +class AppendRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The write_stream identifies the append operation. It must be + * provided in the following scenarios: + * * In the first request to an AppendRows connection. + * * In all subsequent requests to an AppendRows connection, if you use the + * same connection to write to multiple tables or change the input schema for + * default streams. + * For explicitly created write streams, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` + * For the special default stream, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. + * An example of a possible sequence of requests with write_stream fields + * within a single connection: + * * r1: {write_stream: stream_name_1} + * * r2: {write_stream: /*omit{@*}} + * * r3: {write_stream: /*omit{@*}} + * * r4: {write_stream: stream_name_2} + * * r5: {write_stream: stream_name_2} + * The destination changed in request_4, so the write_stream field must be + * populated in all subsequent requests in this stream. + * + * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $write_stream = ''; + /** + * If present, the write is only performed if the next append offset is same + * as the provided value. If not present, the write is performed at the + * current end of stream. Specifying a value for this field is not allowed + * when calling AppendRows for the '_default' stream. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + */ + protected $offset = null; + /** + * Id set by client to annotate its identity. Only initial request setting is + * respected. + * + * Generated from protobuf field string trace_id = 6; + */ + protected $trace_id = ''; + /** + * A map to indicate how to interpret missing value for some fields. Missing + * values are fields present in user schema but missing in rows. The key is + * the field name. The value is the interpretation of missing values for the + * field. + * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all + * missing values in field foo are interpreted as NULL, all missing values in + * field bar are interpreted as the default value of field bar in table + * schema. + * If a field is not in this map and has missing values, the missing values + * in this field are interpreted as NULL. + * This field only applies to the current request, it won't affect other + * requests on the connection. + * Currently, field name can only be top-level column name, can't be a struct + * field path like 'foo.bar'. + * + * Generated from protobuf field map missing_value_interpretations = 7; + */ + private $missing_value_interpretations; + /** + * Optional. Default missing value interpretation for all columns in the + * table. When a value is specified on an `AppendRowsRequest`, it is applied + * to all requests from that point forward, until a subsequent + * `AppendRowsRequest` sets it to a different value. + * `missing_value_interpretation` can override + * `default_missing_value_interpretation`. For example, if you want to write + * `NULL` instead of using default values for some columns, you can set + * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same + * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_missing_value_interpretation = 0; + /** + * Optional. Stats and telemetry data gathered on the client side. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats client_stats = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $client_stats = null; + protected $rows; + + /** + * @param string $writeStream Required. The write_stream identifies the append operation. It must be + * provided in the following scenarios: + * + * * In the first request to an AppendRows connection. + * + * * In all subsequent requests to an AppendRows connection, if you use the + * same connection to write to multiple tables or change the input schema for + * default streams. + * + * For explicitly created write streams, the format is: + * + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` + * + * For the special default stream, the format is: + * + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. + * + * An example of a possible sequence of requests with write_stream fields + * within a single connection: + * + * * r1: {write_stream: stream_name_1} + * + * * r2: {write_stream: /*omit*/} + * + * * r3: {write_stream: /*omit*/} + * + * * r4: {write_stream: stream_name_2} + * + * * r5: {write_stream: stream_name_2} + * + * The destination changed in request_4, so the write_stream field must be + * populated in all subsequent requests in this stream. Please see + * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest + * + * @experimental + */ + public static function build(string $writeStream): self + { + return (new self()) + ->setWriteStream($writeStream); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $write_stream + * Required. The write_stream identifies the append operation. It must be + * provided in the following scenarios: + * * In the first request to an AppendRows connection. + * * In all subsequent requests to an AppendRows connection, if you use the + * same connection to write to multiple tables or change the input schema for + * default streams. + * For explicitly created write streams, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` + * For the special default stream, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. + * An example of a possible sequence of requests with write_stream fields + * within a single connection: + * * r1: {write_stream: stream_name_1} + * * r2: {write_stream: /*omit{@*}} + * * r3: {write_stream: /*omit{@*}} + * * r4: {write_stream: stream_name_2} + * * r5: {write_stream: stream_name_2} + * The destination changed in request_4, so the write_stream field must be + * populated in all subsequent requests in this stream. + * @type \Google\Protobuf\Int64Value $offset + * If present, the write is only performed if the next append offset is same + * as the provided value. If not present, the write is performed at the + * current end of stream. Specifying a value for this field is not allowed + * when calling AppendRows for the '_default' stream. + * @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData $proto_rows + * Rows in proto format. + * @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData $arrow_rows + * Rows in arrow format. + * @type string $trace_id + * Id set by client to annotate its identity. Only initial request setting is + * respected. + * @type array|\Google\Protobuf\Internal\MapField $missing_value_interpretations + * A map to indicate how to interpret missing value for some fields. Missing + * values are fields present in user schema but missing in rows. The key is + * the field name. The value is the interpretation of missing values for the + * field. + * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all + * missing values in field foo are interpreted as NULL, all missing values in + * field bar are interpreted as the default value of field bar in table + * schema. + * If a field is not in this map and has missing values, the missing values + * in this field are interpreted as NULL. + * This field only applies to the current request, it won't affect other + * requests on the connection. + * Currently, field name can only be top-level column name, can't be a struct + * field path like 'foo.bar'. + * @type int $default_missing_value_interpretation + * Optional. Default missing value interpretation for all columns in the + * table. When a value is specified on an `AppendRowsRequest`, it is applied + * to all requests from that point forward, until a subsequent + * `AppendRowsRequest` sets it to a different value. + * `missing_value_interpretation` can override + * `default_missing_value_interpretation`. For example, if you want to write + * `NULL` instead of using default values for some columns, you can set + * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same + * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. + * @type \Google\Cloud\BigQuery\Storage\V1\ClientStats $client_stats + * Optional. Stats and telemetry data gathered on the client side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. The write_stream identifies the append operation. It must be + * provided in the following scenarios: + * * In the first request to an AppendRows connection. + * * In all subsequent requests to an AppendRows connection, if you use the + * same connection to write to multiple tables or change the input schema for + * default streams. + * For explicitly created write streams, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` + * For the special default stream, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. + * An example of a possible sequence of requests with write_stream fields + * within a single connection: + * * r1: {write_stream: stream_name_1} + * * r2: {write_stream: /*omit{@*}} + * * r3: {write_stream: /*omit{@*}} + * * r4: {write_stream: stream_name_2} + * * r5: {write_stream: stream_name_2} + * The destination changed in request_4, so the write_stream field must be + * populated in all subsequent requests in this stream. + * + * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getWriteStream() + { + return $this->write_stream; + } + + /** + * Required. The write_stream identifies the append operation. It must be + * provided in the following scenarios: + * * In the first request to an AppendRows connection. + * * In all subsequent requests to an AppendRows connection, if you use the + * same connection to write to multiple tables or change the input schema for + * default streams. + * For explicitly created write streams, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` + * For the special default stream, the format is: + * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. + * An example of a possible sequence of requests with write_stream fields + * within a single connection: + * * r1: {write_stream: stream_name_1} + * * r2: {write_stream: /*omit{@*}} + * * r3: {write_stream: /*omit{@*}} + * * r4: {write_stream: stream_name_2} + * * r5: {write_stream: stream_name_2} + * The destination changed in request_4, so the write_stream field must be + * populated in all subsequent requests in this stream. + * + * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setWriteStream($var) + { + GPBUtil::checkString($var, True); + $this->write_stream = $var; + + return $this; + } + + /** + * If present, the write is only performed if the next append offset is same + * as the provided value. If not present, the write is performed at the + * current end of stream. Specifying a value for this field is not allowed + * when calling AppendRows for the '_default' stream. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @return \Google\Protobuf\Int64Value|null + */ + public function getOffset() + { + return $this->offset; + } + + public function hasOffset() + { + return isset($this->offset); + } + + public function clearOffset() + { + unset($this->offset); + } + + /** + * Returns the unboxed value from getOffset() + + * If present, the write is only performed if the next append offset is same + * as the provided value. If not present, the write is performed at the + * current end of stream. Specifying a value for this field is not allowed + * when calling AppendRows for the '_default' stream. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @return int|string|null + */ + public function getOffsetUnwrapped() + { + return $this->readWrapperValue("offset"); + } + + /** + * If present, the write is only performed if the next append offset is same + * as the provided value. If not present, the write is performed at the + * current end of stream. Specifying a value for this field is not allowed + * when calling AppendRows for the '_default' stream. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->offset = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * If present, the write is only performed if the next append offset is same + * as the provided value. If not present, the write is performed at the + * current end of stream. Specifying a value for this field is not allowed + * when calling AppendRows for the '_default' stream. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @param int|string|null $var + * @return $this + */ + public function setOffsetUnwrapped($var) + { + $this->writeWrapperValue("offset", $var); + return $this;} + + /** + * Rows in proto format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData proto_rows = 4; + * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData|null + */ + public function getProtoRows() + { + return $this->readOneof(4); + } + + public function hasProtoRows() + { + return $this->hasOneof(4); + } + + /** + * Rows in proto format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData proto_rows = 4; + * @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData $var + * @return $this + */ + public function setProtoRows($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Rows in arrow format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData|null + */ + public function getArrowRows() + { + return $this->readOneof(5); + } + + public function hasArrowRows() + { + return $this->hasOneof(5); + } + + /** + * Rows in arrow format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; + * @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData $var + * @return $this + */ + public function setArrowRows($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Id set by client to annotate its identity. Only initial request setting is + * respected. + * + * Generated from protobuf field string trace_id = 6; + * @return string + */ + public function getTraceId() + { + return $this->trace_id; + } + + /** + * Id set by client to annotate its identity. Only initial request setting is + * respected. + * + * Generated from protobuf field string trace_id = 6; + * @param string $var + * @return $this + */ + public function setTraceId($var) + { + GPBUtil::checkString($var, True); + $this->trace_id = $var; + + return $this; + } + + /** + * A map to indicate how to interpret missing value for some fields. Missing + * values are fields present in user schema but missing in rows. The key is + * the field name. The value is the interpretation of missing values for the + * field. + * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all + * missing values in field foo are interpreted as NULL, all missing values in + * field bar are interpreted as the default value of field bar in table + * schema. + * If a field is not in this map and has missing values, the missing values + * in this field are interpreted as NULL. + * This field only applies to the current request, it won't affect other + * requests on the connection. + * Currently, field name can only be top-level column name, can't be a struct + * field path like 'foo.bar'. + * + * Generated from protobuf field map missing_value_interpretations = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMissingValueInterpretations() + { + return $this->missing_value_interpretations; + } + + /** + * A map to indicate how to interpret missing value for some fields. Missing + * values are fields present in user schema but missing in rows. The key is + * the field name. The value is the interpretation of missing values for the + * field. + * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all + * missing values in field foo are interpreted as NULL, all missing values in + * field bar are interpreted as the default value of field bar in table + * schema. + * If a field is not in this map and has missing values, the missing values + * in this field are interpreted as NULL. + * This field only applies to the current request, it won't affect other + * requests on the connection. + * Currently, field name can only be top-level column name, can't be a struct + * field path like 'foo.bar'. + * + * Generated from protobuf field map missing_value_interpretations = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setMissingValueInterpretations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\MissingValueInterpretation::class); + $this->missing_value_interpretations = $arr; + + return $this; + } + + /** + * Optional. Default missing value interpretation for all columns in the + * table. When a value is specified on an `AppendRowsRequest`, it is applied + * to all requests from that point forward, until a subsequent + * `AppendRowsRequest` sets it to a different value. + * `missing_value_interpretation` can override + * `default_missing_value_interpretation`. For example, if you want to write + * `NULL` instead of using default values for some columns, you can set + * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same + * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDefaultMissingValueInterpretation() + { + return $this->default_missing_value_interpretation; + } + + /** + * Optional. Default missing value interpretation for all columns in the + * table. When a value is specified on an `AppendRowsRequest`, it is applied + * to all requests from that point forward, until a subsequent + * `AppendRowsRequest` sets it to a different value. + * `missing_value_interpretation` can override + * `default_missing_value_interpretation`. For example, if you want to write + * `NULL` instead of using default values for some columns, you can set + * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same + * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDefaultMissingValueInterpretation($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\MissingValueInterpretation::class); + $this->default_missing_value_interpretation = $var; + + return $this; + } + + /** + * Optional. Stats and telemetry data gathered on the client side. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats client_stats = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\ClientStats|null + */ + public function getClientStats() + { + return $this->client_stats; + } + + public function hasClientStats() + { + return isset($this->client_stats); + } + + public function clearClientStats() + { + unset($this->client_stats); + } + + /** + * Optional. Stats and telemetry data gathered on the client side. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats client_stats = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\ClientStats $var + * @return $this + */ + public function setClientStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ClientStats::class); + $this->client_stats = $var; + + return $this; + } + + /** + * @return string + */ + public function getRows() + { + return $this->whichOneof("rows"); + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php new file mode 100644 index 000000000000..8569f74e00c1 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php @@ -0,0 +1,121 @@ +google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData + */ +class ArrowData extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Arrow Schema used to serialize the data. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + */ + protected $writer_schema = null; + /** + * Required. Serialized row data in Arrow format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + */ + protected $rows = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $writer_schema + * Optional. Arrow Schema used to serialize the data. + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $rows + * Required. Serialized row data in Arrow format. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Arrow Schema used to serialize the data. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null + */ + public function getWriterSchema() + { + return $this->writer_schema; + } + + public function hasWriterSchema() + { + return isset($this->writer_schema); + } + + public function clearWriterSchema() + { + unset($this->writer_schema); + } + + /** + * Optional. Arrow Schema used to serialize the data. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $var + * @return $this + */ + public function setWriterSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSchema::class); + $this->writer_schema = $var; + + return $this; + } + + /** + * Required. Serialized row data in Arrow format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch|null + */ + public function getRows() + { + return $this->rows; + } + + public function hasRows() + { + return isset($this->rows); + } + + public function clearRows() + { + unset($this->rows); + } + + /** + * Required. Serialized row data in Arrow format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $var + * @return $this + */ + public function setRows($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch::class); + $this->rows = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php new file mode 100644 index 000000000000..402c780095b4 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php @@ -0,0 +1,65 @@ +google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation + */ +class MissingValueInterpretation +{ + /** + * Invalid missing value interpretation. Requests with this value will be + * rejected. + * + * Generated from protobuf enum MISSING_VALUE_INTERPRETATION_UNSPECIFIED = 0; + */ + const MISSING_VALUE_INTERPRETATION_UNSPECIFIED = 0; + /** + * Missing value is interpreted as NULL. + * + * Generated from protobuf enum NULL_VALUE = 1; + */ + const NULL_VALUE = 1; + /** + * Missing value is interpreted as column default value if declared in the + * table schema, NULL otherwise. + * + * Generated from protobuf enum DEFAULT_VALUE = 2; + */ + const DEFAULT_VALUE = 2; + + private static $valueToName = [ + self::MISSING_VALUE_INTERPRETATION_UNSPECIFIED => 'MISSING_VALUE_INTERPRETATION_UNSPECIFIED', + self::NULL_VALUE => 'NULL_VALUE', + self::DEFAULT_VALUE => 'DEFAULT_VALUE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php new file mode 100644 index 000000000000..0be07e61683c --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php @@ -0,0 +1,150 @@ +google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData + */ +class ProtoData extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The protocol buffer schema used to serialize the data. Provide + * this value whenever: + * * You send the first request of an RPC connection. + * * You change the input schema. + * * You specify a new destination table. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoSchema writer_schema = 1; + */ + protected $writer_schema = null; + /** + * Required. Serialized row data in protobuf message format. + * Currently, the backend expects the serialized rows to adhere to + * proto2 semantics when appending rows, particularly with respect to + * how default values are encoded. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoRows rows = 2; + */ + protected $rows = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\ProtoSchema $writer_schema + * Optional. The protocol buffer schema used to serialize the data. Provide + * this value whenever: + * * You send the first request of an RPC connection. + * * You change the input schema. + * * You specify a new destination table. + * @type \Google\Cloud\BigQuery\Storage\V1\ProtoRows $rows + * Required. Serialized row data in protobuf message format. + * Currently, the backend expects the serialized rows to adhere to + * proto2 semantics when appending rows, particularly with respect to + * how default values are encoded. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The protocol buffer schema used to serialize the data. Provide + * this value whenever: + * * You send the first request of an RPC connection. + * * You change the input schema. + * * You specify a new destination table. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoSchema writer_schema = 1; + * @return \Google\Cloud\BigQuery\Storage\V1\ProtoSchema|null + */ + public function getWriterSchema() + { + return $this->writer_schema; + } + + public function hasWriterSchema() + { + return isset($this->writer_schema); + } + + public function clearWriterSchema() + { + unset($this->writer_schema); + } + + /** + * Optional. The protocol buffer schema used to serialize the data. Provide + * this value whenever: + * * You send the first request of an RPC connection. + * * You change the input schema. + * * You specify a new destination table. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoSchema writer_schema = 1; + * @param \Google\Cloud\BigQuery\Storage\V1\ProtoSchema $var + * @return $this + */ + public function setWriterSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ProtoSchema::class); + $this->writer_schema = $var; + + return $this; + } + + /** + * Required. Serialized row data in protobuf message format. + * Currently, the backend expects the serialized rows to adhere to + * proto2 semantics when appending rows, particularly with respect to + * how default values are encoded. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoRows rows = 2; + * @return \Google\Cloud\BigQuery\Storage\V1\ProtoRows|null + */ + public function getRows() + { + return $this->rows; + } + + public function hasRows() + { + return isset($this->rows); + } + + public function clearRows() + { + unset($this->rows); + } + + /** + * Required. Serialized row data in protobuf message format. + * Currently, the backend expects the serialized rows to adhere to + * proto2 semantics when appending rows, particularly with respect to + * how default values are encoded. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoRows rows = 2; + * @param \Google\Cloud\BigQuery\Storage\V1\ProtoRows $var + * @return $this + */ + public function setRows($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ProtoRows::class); + $this->rows = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php new file mode 100644 index 000000000000..21eb7c1a4efc --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php @@ -0,0 +1,279 @@ +google.cloud.bigquery.storage.v1.AppendRowsResponse + */ +class AppendRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * If backend detects a schema update, pass it to user so that user can + * use it to input new type of message. It will be empty when no schema + * updates have occurred. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3; + */ + protected $updated_schema = null; + /** + * If a request failed due to corrupted rows, no rows in the batch will be + * appended. The API will return row level error info, so that the caller can + * remove the bad rows and retry the request. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4; + */ + private $row_errors; + /** + * The target of the append operation. Matches the write_stream in the + * corresponding request. + * + * Generated from protobuf field string write_stream = 5; + */ + protected $write_stream = ''; + protected $response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult $append_result + * Result if the append is successful. + * @type \Google\Rpc\Status $error + * Error returned when problems were encountered. If present, + * it indicates rows were not accepted into the system. + * Users can retry or continue with other append requests within the + * same connection. + * Additional information about error signalling: + * ALREADY_EXISTS: Happens when an append specified an offset, and the + * backend already has received data at this offset. Typically encountered + * in retry scenarios, and can be ignored. + * OUT_OF_RANGE: Returned when the specified offset in the stream is beyond + * the current end of the stream. + * INVALID_ARGUMENT: Indicates a malformed request or data. + * ABORTED: Request processing is aborted because of prior failures. The + * request can be retried if previous failure is addressed. + * INTERNAL: Indicates server side error(s) that can be retried. + * @type \Google\Cloud\BigQuery\Storage\V1\TableSchema $updated_schema + * If backend detects a schema update, pass it to user so that user can + * use it to input new type of message. It will be empty when no schema + * updates have occurred. + * @type \Google\Cloud\BigQuery\Storage\V1\RowError[] $row_errors + * If a request failed due to corrupted rows, no rows in the batch will be + * appended. The API will return row level error info, so that the caller can + * remove the bad rows and retry the request. + * @type string $write_stream + * The target of the append operation. Matches the write_stream in the + * corresponding request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Result if the append is successful. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult append_result = 1; + * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult|null + */ + public function getAppendResult() + { + return $this->readOneof(1); + } + + public function hasAppendResult() + { + return $this->hasOneof(1); + } + + /** + * Result if the append is successful. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult append_result = 1; + * @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult $var + * @return $this + */ + public function setAppendResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Error returned when problems were encountered. If present, + * it indicates rows were not accepted into the system. + * Users can retry or continue with other append requests within the + * same connection. + * Additional information about error signalling: + * ALREADY_EXISTS: Happens when an append specified an offset, and the + * backend already has received data at this offset. Typically encountered + * in retry scenarios, and can be ignored. + * OUT_OF_RANGE: Returned when the specified offset in the stream is beyond + * the current end of the stream. + * INVALID_ARGUMENT: Indicates a malformed request or data. + * ABORTED: Request processing is aborted because of prior failures. The + * request can be retried if previous failure is addressed. + * INTERNAL: Indicates server side error(s) that can be retried. + * + * Generated from protobuf field .google.rpc.Status error = 2; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->readOneof(2); + } + + public function hasError() + { + return $this->hasOneof(2); + } + + /** + * Error returned when problems were encountered. If present, + * it indicates rows were not accepted into the system. + * Users can retry or continue with other append requests within the + * same connection. + * Additional information about error signalling: + * ALREADY_EXISTS: Happens when an append specified an offset, and the + * backend already has received data at this offset. Typically encountered + * in retry scenarios, and can be ignored. + * OUT_OF_RANGE: Returned when the specified offset in the stream is beyond + * the current end of the stream. + * INVALID_ARGUMENT: Indicates a malformed request or data. + * ABORTED: Request processing is aborted because of prior failures. The + * request can be retried if previous failure is addressed. + * INTERNAL: Indicates server side error(s) that can be retried. + * + * Generated from protobuf field .google.rpc.Status error = 2; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * If backend detects a schema update, pass it to user so that user can + * use it to input new type of message. It will be empty when no schema + * updates have occurred. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3; + * @return \Google\Cloud\BigQuery\Storage\V1\TableSchema|null + */ + public function getUpdatedSchema() + { + return $this->updated_schema; + } + + public function hasUpdatedSchema() + { + return isset($this->updated_schema); + } + + public function clearUpdatedSchema() + { + unset($this->updated_schema); + } + + /** + * If backend detects a schema update, pass it to user so that user can + * use it to input new type of message. It will be empty when no schema + * updates have occurred. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3; + * @param \Google\Cloud\BigQuery\Storage\V1\TableSchema $var + * @return $this + */ + public function setUpdatedSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableSchema::class); + $this->updated_schema = $var; + + return $this; + } + + /** + * If a request failed due to corrupted rows, no rows in the batch will be + * appended. The API will return row level error info, so that the caller can + * remove the bad rows and retry the request. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4; + * @return RepeatedField<\Google\Cloud\BigQuery\Storage\V1\RowError> + */ + public function getRowErrors() + { + return $this->row_errors; + } + + /** + * If a request failed due to corrupted rows, no rows in the batch will be + * appended. The API will return row level error info, so that the caller can + * remove the bad rows and retry the request. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4; + * @param \Google\Cloud\BigQuery\Storage\V1\RowError[] $var + * @return $this + */ + public function setRowErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\RowError::class); + $this->row_errors = $arr; + + return $this; + } + + /** + * The target of the append operation. Matches the write_stream in the + * corresponding request. + * + * Generated from protobuf field string write_stream = 5; + * @return string + */ + public function getWriteStream() + { + return $this->write_stream; + } + + /** + * The target of the append operation. Matches the write_stream in the + * corresponding request. + * + * Generated from protobuf field string write_stream = 5; + * @param string $var + * @return $this + */ + public function setWriteStream($var) + { + GPBUtil::checkString($var, True); + $this->write_stream = $var; + + return $this; + } + + /** + * @return string + */ + public function getResponse() + { + return $this->whichOneof("response"); + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php new file mode 100644 index 000000000000..7ff2509cb36a --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php @@ -0,0 +1,110 @@ +google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult + */ +class AppendResult extends \Google\Protobuf\Internal\Message +{ + /** + * The row offset at which the last append occurred. The offset will not be + * set if appending using default streams. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 1; + */ + protected $offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int64Value $offset + * The row offset at which the last append occurred. The offset will not be + * set if appending using default streams. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * The row offset at which the last append occurred. The offset will not be + * set if appending using default streams. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 1; + * @return \Google\Protobuf\Int64Value|null + */ + public function getOffset() + { + return $this->offset; + } + + public function hasOffset() + { + return isset($this->offset); + } + + public function clearOffset() + { + unset($this->offset); + } + + /** + * Returns the unboxed value from getOffset() + + * The row offset at which the last append occurred. The offset will not be + * set if appending using default streams. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 1; + * @return int|string|null + */ + public function getOffsetUnwrapped() + { + return $this->readWrapperValue("offset"); + } + + /** + * The row offset at which the last append occurred. The offset will not be + * set if appending using default streams. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 1; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->offset = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * The row offset at which the last append occurred. The offset will not be + * set if appending using default streams. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 1; + * @param int|string|null $var + * @return $this + */ + public function setOffsetUnwrapped($var) + { + $this->writeWrapperValue("offset", $var); + return $this;} + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php new file mode 100644 index 000000000000..792e714a6bf9 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php @@ -0,0 +1,112 @@ +google.cloud.bigquery.storage.v1.ArrowRecordBatch + */ +class ArrowRecordBatch extends \Google\Protobuf\Internal\Message +{ + /** + * IPC-serialized Arrow RecordBatch. + * + * Generated from protobuf field bytes serialized_record_batch = 1; + */ + protected $serialized_record_batch = ''; + /** + * [Deprecated] The count of rows in `serialized_record_batch`. + * Please use the format-independent ReadRowsResponse.row_count instead. + * + * Generated from protobuf field int64 row_count = 2 [deprecated = true]; + * @deprecated + */ + protected $row_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $serialized_record_batch + * IPC-serialized Arrow RecordBatch. + * @type int|string $row_count + * [Deprecated] The count of rows in `serialized_record_batch`. + * Please use the format-independent ReadRowsResponse.row_count instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Arrow::initOnce(); + parent::__construct($data); + } + + /** + * IPC-serialized Arrow RecordBatch. + * + * Generated from protobuf field bytes serialized_record_batch = 1; + * @return string + */ + public function getSerializedRecordBatch() + { + return $this->serialized_record_batch; + } + + /** + * IPC-serialized Arrow RecordBatch. + * + * Generated from protobuf field bytes serialized_record_batch = 1; + * @param string $var + * @return $this + */ + public function setSerializedRecordBatch($var) + { + GPBUtil::checkString($var, False); + $this->serialized_record_batch = $var; + + return $this; + } + + /** + * [Deprecated] The count of rows in `serialized_record_batch`. + * Please use the format-independent ReadRowsResponse.row_count instead. + * + * Generated from protobuf field int64 row_count = 2 [deprecated = true]; + * @return int|string + * @deprecated + */ + public function getRowCount() + { + if ($this->row_count !== 0) { + @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); + } + return $this->row_count; + } + + /** + * [Deprecated] The count of rows in `serialized_record_batch`. + * Please use the format-independent ReadRowsResponse.row_count instead. + * + * Generated from protobuf field int64 row_count = 2 [deprecated = true]; + * @param int|string $var + * @return $this + * @deprecated + */ + public function setRowCount($var) + { + @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt64($var); + $this->row_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php new file mode 100644 index 000000000000..6f5f9866a54f --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php @@ -0,0 +1,71 @@ +google.cloud.bigquery.storage.v1.ArrowSchema + */ +class ArrowSchema extends \Google\Protobuf\Internal\Message +{ + /** + * IPC serialized Arrow schema. + * + * Generated from protobuf field bytes serialized_schema = 1; + */ + protected $serialized_schema = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $serialized_schema + * IPC serialized Arrow schema. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Arrow::initOnce(); + parent::__construct($data); + } + + /** + * IPC serialized Arrow schema. + * + * Generated from protobuf field bytes serialized_schema = 1; + * @return string + */ + public function getSerializedSchema() + { + return $this->serialized_schema; + } + + /** + * IPC serialized Arrow schema. + * + * Generated from protobuf field bytes serialized_schema = 1; + * @param string $var + * @return $this + */ + public function setSerializedSchema($var) + { + GPBUtil::checkString($var, False); + $this->serialized_schema = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php new file mode 100644 index 000000000000..25ce3c41cd6c --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php @@ -0,0 +1,109 @@ +google.cloud.bigquery.storage.v1.ArrowSerializationOptions + */ +class ArrowSerializationOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The compression codec to use for Arrow buffers in serialized record + * batches. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec buffer_compression = 2; + */ + protected $buffer_compression = 0; + /** + * Optional. Set timestamp precision option. If not set, the default precision + * is microseconds. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision picos_timestamp_precision = 3; + */ + protected $picos_timestamp_precision = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $buffer_compression + * The compression codec to use for Arrow buffers in serialized record + * batches. + * @type int $picos_timestamp_precision + * Optional. Set timestamp precision option. If not set, the default precision + * is microseconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Arrow::initOnce(); + parent::__construct($data); + } + + /** + * The compression codec to use for Arrow buffers in serialized record + * batches. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec buffer_compression = 2; + * @return int + */ + public function getBufferCompression() + { + return $this->buffer_compression; + } + + /** + * The compression codec to use for Arrow buffers in serialized record + * batches. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec buffer_compression = 2; + * @param int $var + * @return $this + */ + public function setBufferCompression($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions\CompressionCodec::class); + $this->buffer_compression = $var; + + return $this; + } + + /** + * Optional. Set timestamp precision option. If not set, the default precision + * is microseconds. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision picos_timestamp_precision = 3; + * @return int + */ + public function getPicosTimestampPrecision() + { + return $this->picos_timestamp_precision; + } + + /** + * Optional. Set timestamp precision option. If not set, the default precision + * is microseconds. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision picos_timestamp_precision = 3; + * @param int $var + * @return $this + */ + public function setPicosTimestampPrecision($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions\PicosTimestampPrecision::class); + $this->picos_timestamp_precision = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php new file mode 100644 index 000000000000..b32b64cba715 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php @@ -0,0 +1,61 @@ +google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec + */ +class CompressionCodec +{ + /** + * If unspecified no compression will be used. + * + * Generated from protobuf enum COMPRESSION_UNSPECIFIED = 0; + */ + const COMPRESSION_UNSPECIFIED = 0; + /** + * LZ4 Frame (https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md) + * + * Generated from protobuf enum LZ4_FRAME = 1; + */ + const LZ4_FRAME = 1; + /** + * Zstandard compression. + * + * Generated from protobuf enum ZSTD = 2; + */ + const ZSTD = 2; + + private static $valueToName = [ + self::COMPRESSION_UNSPECIFIED => 'COMPRESSION_UNSPECIFIED', + self::LZ4_FRAME => 'LZ4_FRAME', + self::ZSTD => 'ZSTD', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/PicosTimestampPrecision.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/PicosTimestampPrecision.php new file mode 100644 index 000000000000..29a0e80ab9a7 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/PicosTimestampPrecision.php @@ -0,0 +1,74 @@ +google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision + */ +class PicosTimestampPrecision +{ + /** + * Unspecified timestamp precision. The default precision is microseconds. + * + * Generated from protobuf enum PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0; + */ + const PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0; + /** + * Timestamp values returned by Read API will be truncated to microsecond + * level precision. The value will be encoded as Arrow TIMESTAMP type in a + * 64 bit integer. + * + * Generated from protobuf enum TIMESTAMP_PRECISION_MICROS = 1; + */ + const TIMESTAMP_PRECISION_MICROS = 1; + /** + * Timestamp values returned by Read API will be truncated to nanosecond + * level precision. The value will be encoded as Arrow TIMESTAMP type in a + * 64 bit integer. + * + * Generated from protobuf enum TIMESTAMP_PRECISION_NANOS = 2; + */ + const TIMESTAMP_PRECISION_NANOS = 2; + /** + * Read API will return full precision picosecond value. The value will be + * encoded as a string which conforms to ISO 8601 format. + * + * Generated from protobuf enum TIMESTAMP_PRECISION_PICOS = 3; + */ + const TIMESTAMP_PRECISION_PICOS = 3; + + private static $valueToName = [ + self::PICOS_TIMESTAMP_PRECISION_UNSPECIFIED => 'PICOS_TIMESTAMP_PRECISION_UNSPECIFIED', + self::TIMESTAMP_PRECISION_MICROS => 'TIMESTAMP_PRECISION_MICROS', + self::TIMESTAMP_PRECISION_NANOS => 'TIMESTAMP_PRECISION_NANOS', + self::TIMESTAMP_PRECISION_PICOS => 'TIMESTAMP_PRECISION_PICOS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php new file mode 100644 index 000000000000..3f4259a47315 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php @@ -0,0 +1,112 @@ +google.cloud.bigquery.storage.v1.AvroRows + */ +class AvroRows extends \Google\Protobuf\Internal\Message +{ + /** + * Binary serialized rows in a block. + * + * Generated from protobuf field bytes serialized_binary_rows = 1; + */ + protected $serialized_binary_rows = ''; + /** + * [Deprecated] The count of rows in the returning block. + * Please use the format-independent ReadRowsResponse.row_count instead. + * + * Generated from protobuf field int64 row_count = 2 [deprecated = true]; + * @deprecated + */ + protected $row_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $serialized_binary_rows + * Binary serialized rows in a block. + * @type int|string $row_count + * [Deprecated] The count of rows in the returning block. + * Please use the format-independent ReadRowsResponse.row_count instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Avro::initOnce(); + parent::__construct($data); + } + + /** + * Binary serialized rows in a block. + * + * Generated from protobuf field bytes serialized_binary_rows = 1; + * @return string + */ + public function getSerializedBinaryRows() + { + return $this->serialized_binary_rows; + } + + /** + * Binary serialized rows in a block. + * + * Generated from protobuf field bytes serialized_binary_rows = 1; + * @param string $var + * @return $this + */ + public function setSerializedBinaryRows($var) + { + GPBUtil::checkString($var, False); + $this->serialized_binary_rows = $var; + + return $this; + } + + /** + * [Deprecated] The count of rows in the returning block. + * Please use the format-independent ReadRowsResponse.row_count instead. + * + * Generated from protobuf field int64 row_count = 2 [deprecated = true]; + * @return int|string + * @deprecated + */ + public function getRowCount() + { + if ($this->row_count !== 0) { + @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); + } + return $this->row_count; + } + + /** + * [Deprecated] The count of rows in the returning block. + * Please use the format-independent ReadRowsResponse.row_count instead. + * + * Generated from protobuf field int64 row_count = 2 [deprecated = true]; + * @param int|string $var + * @return $this + * @deprecated + */ + public function setRowCount($var) + { + @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkInt64($var); + $this->row_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php new file mode 100644 index 000000000000..46229d3779e8 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php @@ -0,0 +1,71 @@ +google.cloud.bigquery.storage.v1.AvroSchema + */ +class AvroSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + * + * Generated from protobuf field string schema = 1; + */ + protected $schema = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $schema + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Avro::initOnce(); + parent::__construct($data); + } + + /** + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + * + * Generated from protobuf field string schema = 1; + * @return string + */ + public function getSchema() + { + return $this->schema; + } + + /** + * Json serialized schema, as described at + * https://avro.apache.org/docs/1.8.1/spec.html. + * + * Generated from protobuf field string schema = 1; + * @param string $var + * @return $this + */ + public function setSchema($var) + { + GPBUtil::checkString($var, True); + $this->schema = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php new file mode 100644 index 000000000000..a5d87ce8dd53 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php @@ -0,0 +1,133 @@ +google.cloud.bigquery.storage.v1.AvroSerializationOptions + */ +class AvroSerializationOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Enable displayName attribute in Avro schema. + * The Avro specification requires field names to be alphanumeric. By + * default, in cases when column names do not conform to these requirements + * (e.g. non-ascii unicode codepoints) and Avro is requested as an output + * format, the CreateReadSession call will fail. + * Setting this field to true, populates avro field names with a placeholder + * value and populates a "displayName" attribute for every avro field with the + * original column name. + * + * Generated from protobuf field bool enable_display_name_attribute = 1; + */ + protected $enable_display_name_attribute = false; + /** + * Optional. Set timestamp precision option. If not set, the default precision + * is microseconds. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision picos_timestamp_precision = 2; + */ + protected $picos_timestamp_precision = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_display_name_attribute + * Enable displayName attribute in Avro schema. + * The Avro specification requires field names to be alphanumeric. By + * default, in cases when column names do not conform to these requirements + * (e.g. non-ascii unicode codepoints) and Avro is requested as an output + * format, the CreateReadSession call will fail. + * Setting this field to true, populates avro field names with a placeholder + * value and populates a "displayName" attribute for every avro field with the + * original column name. + * @type int $picos_timestamp_precision + * Optional. Set timestamp precision option. If not set, the default precision + * is microseconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Avro::initOnce(); + parent::__construct($data); + } + + /** + * Enable displayName attribute in Avro schema. + * The Avro specification requires field names to be alphanumeric. By + * default, in cases when column names do not conform to these requirements + * (e.g. non-ascii unicode codepoints) and Avro is requested as an output + * format, the CreateReadSession call will fail. + * Setting this field to true, populates avro field names with a placeholder + * value and populates a "displayName" attribute for every avro field with the + * original column name. + * + * Generated from protobuf field bool enable_display_name_attribute = 1; + * @return bool + */ + public function getEnableDisplayNameAttribute() + { + return $this->enable_display_name_attribute; + } + + /** + * Enable displayName attribute in Avro schema. + * The Avro specification requires field names to be alphanumeric. By + * default, in cases when column names do not conform to these requirements + * (e.g. non-ascii unicode codepoints) and Avro is requested as an output + * format, the CreateReadSession call will fail. + * Setting this field to true, populates avro field names with a placeholder + * value and populates a "displayName" attribute for every avro field with the + * original column name. + * + * Generated from protobuf field bool enable_display_name_attribute = 1; + * @param bool $var + * @return $this + */ + public function setEnableDisplayNameAttribute($var) + { + GPBUtil::checkBool($var); + $this->enable_display_name_attribute = $var; + + return $this; + } + + /** + * Optional. Set timestamp precision option. If not set, the default precision + * is microseconds. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision picos_timestamp_precision = 2; + * @return int + */ + public function getPicosTimestampPrecision() + { + return $this->picos_timestamp_precision; + } + + /** + * Optional. Set timestamp precision option. If not set, the default precision + * is microseconds. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision picos_timestamp_precision = 2; + * @param int $var + * @return $this + */ + public function setPicosTimestampPrecision($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions\PicosTimestampPrecision::class); + $this->picos_timestamp_precision = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions/PicosTimestampPrecision.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions/PicosTimestampPrecision.php new file mode 100644 index 000000000000..852bc808c1ff --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions/PicosTimestampPrecision.php @@ -0,0 +1,74 @@ +google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision + */ +class PicosTimestampPrecision +{ + /** + * Unspecified timestamp precision. The default precision is microseconds. + * + * Generated from protobuf enum PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0; + */ + const PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0; + /** + * Timestamp values returned by Read API will be truncated to microsecond + * level precision. The value will be encoded as Avro TIMESTAMP type in a + * 64 bit integer. + * + * Generated from protobuf enum TIMESTAMP_PRECISION_MICROS = 1; + */ + const TIMESTAMP_PRECISION_MICROS = 1; + /** + * Timestamp values returned by Read API will be truncated to nanosecond + * level precision. The value will be encoded as Avro TIMESTAMP type in a + * 64 bit integer. + * + * Generated from protobuf enum TIMESTAMP_PRECISION_NANOS = 2; + */ + const TIMESTAMP_PRECISION_NANOS = 2; + /** + * Read API will return full precision picosecond value. The value will be + * encoded as a string which conforms to ISO 8601 format. + * + * Generated from protobuf enum TIMESTAMP_PRECISION_PICOS = 3; + */ + const TIMESTAMP_PRECISION_PICOS = 3; + + private static $valueToName = [ + self::PICOS_TIMESTAMP_PRECISION_UNSPECIFIED => 'PICOS_TIMESTAMP_PRECISION_UNSPECIFIED', + self::TIMESTAMP_PRECISION_MICROS => 'TIMESTAMP_PRECISION_MICROS', + self::TIMESTAMP_PRECISION_NANOS => 'TIMESTAMP_PRECISION_NANOS', + self::TIMESTAMP_PRECISION_PICOS => 'TIMESTAMP_PRECISION_PICOS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php new file mode 100644 index 000000000000..0e92d0d05a9d --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php @@ -0,0 +1,120 @@ +google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest + */ +class BatchCommitWriteStreamsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent table that all the streams should belong to, in the form + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The group of streams that will be committed atomically. + * + * Generated from protobuf field repeated string write_streams = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $write_streams; + + /** + * @param string $parent Required. Parent table that all the streams should belong to, in the form + * of `projects/{project}/datasets/{dataset}/tables/{table}`. Please see + * {@see BigQueryWriteClient::tableName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Storage\V1\BatchCommitWriteStreamsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent table that all the streams should belong to, in the form + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * @type string[] $write_streams + * Required. The group of streams that will be committed atomically. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent table that all the streams should belong to, in the form + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent table that all the streams should belong to, in the form + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The group of streams that will be committed atomically. + * + * Generated from protobuf field repeated string write_streams = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getWriteStreams() + { + return $this->write_streams; + } + + /** + * Required. The group of streams that will be committed atomically. + * + * Generated from protobuf field repeated string write_streams = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setWriteStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->write_streams = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php new file mode 100644 index 000000000000..01cfeb6ae5ae --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php @@ -0,0 +1,135 @@ +google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse + */ +class BatchCommitWriteStreamsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The time at which streams were committed in microseconds granularity. + * This field will only exist when there are no stream errors. + * **Note** if this field is not set, it means the commit was not successful. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 1; + */ + protected $commit_time = null; + /** + * Stream level error if commit failed. Only streams with error will be in + * the list. + * If empty, there is no error and all streams are committed successfully. + * If non empty, certain streams have errors and ZERO stream is committed due + * to atomicity guarantee. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.StorageError stream_errors = 2; + */ + private $stream_errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $commit_time + * The time at which streams were committed in microseconds granularity. + * This field will only exist when there are no stream errors. + * **Note** if this field is not set, it means the commit was not successful. + * @type \Google\Cloud\BigQuery\Storage\V1\StorageError[] $stream_errors + * Stream level error if commit failed. Only streams with error will be in + * the list. + * If empty, there is no error and all streams are committed successfully. + * If non empty, certain streams have errors and ZERO stream is committed due + * to atomicity guarantee. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * The time at which streams were committed in microseconds granularity. + * This field will only exist when there are no stream errors. + * **Note** if this field is not set, it means the commit was not successful. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitTime() + { + return $this->commit_time; + } + + public function hasCommitTime() + { + return isset($this->commit_time); + } + + public function clearCommitTime() + { + unset($this->commit_time); + } + + /** + * The time at which streams were committed in microseconds granularity. + * This field will only exist when there are no stream errors. + * **Note** if this field is not set, it means the commit was not successful. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commit_time = $var; + + return $this; + } + + /** + * Stream level error if commit failed. Only streams with error will be in + * the list. + * If empty, there is no error and all streams are committed successfully. + * If non empty, certain streams have errors and ZERO stream is committed due + * to atomicity guarantee. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.StorageError stream_errors = 2; + * @return RepeatedField<\Google\Cloud\BigQuery\Storage\V1\StorageError> + */ + public function getStreamErrors() + { + return $this->stream_errors; + } + + /** + * Stream level error if commit failed. Only streams with error will be in + * the list. + * If empty, there is no error and all streams are committed successfully. + * If non empty, certain streams have errors and ZERO stream is committed due + * to atomicity guarantee. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.StorageError stream_errors = 2; + * @param \Google\Cloud\BigQuery\Storage\V1\StorageError[] $var + * @return $this + */ + public function setStreamErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\StorageError::class); + $this->stream_errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats.php new file mode 100644 index 000000000000..72fffa66cbd8 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats.php @@ -0,0 +1,122 @@ +google.cloud.bigquery.storage.v1.ClientStats + */ +class ClientStats extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Per-request stats. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats.RequestStats request_stats = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_stats = null; + /** + * Optional. Windowed stats. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats.WindowStats window_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $window_stats = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\ClientStats\RequestStats $request_stats + * Optional. Per-request stats. + * @type \Google\Cloud\BigQuery\Storage\V1\ClientStats\WindowStats $window_stats + * Optional. Windowed stats. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Per-request stats. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats.RequestStats request_stats = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\ClientStats\RequestStats|null + */ + public function getRequestStats() + { + return $this->request_stats; + } + + public function hasRequestStats() + { + return isset($this->request_stats); + } + + public function clearRequestStats() + { + unset($this->request_stats); + } + + /** + * Optional. Per-request stats. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats.RequestStats request_stats = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\ClientStats\RequestStats $var + * @return $this + */ + public function setRequestStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ClientStats\RequestStats::class); + $this->request_stats = $var; + + return $this; + } + + /** + * Optional. Windowed stats. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats.WindowStats window_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\ClientStats\WindowStats|null + */ + public function getWindowStats() + { + return $this->window_stats; + } + + public function hasWindowStats() + { + return isset($this->window_stats); + } + + public function clearWindowStats() + { + unset($this->window_stats); + } + + /** + * Optional. Windowed stats. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats.WindowStats window_stats = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\ClientStats\WindowStats $var + * @return $this + */ + public function setWindowStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ClientStats\WindowStats::class); + $this->window_stats = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats/RequestStats.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats/RequestStats.php new file mode 100644 index 000000000000..060b5a19bcc5 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats/RequestStats.php @@ -0,0 +1,130 @@ +google.cloud.bigquery.storage.v1.ClientStats.RequestStats + */ +class RequestStats extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Timestamp indicating when the request was sent over the + * network, expressed in epoch milliseconds. + * + * Generated from protobuf field optional int64 send_time_millis = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $send_time_millis = null; + /** + * Optional. Number of pending requests at the moment this request was sent. + * This includes requests waiting to be sent, and those that are inflight. + * + * Generated from protobuf field optional int64 queued_requests_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $queued_requests_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $send_time_millis + * Optional. Timestamp indicating when the request was sent over the + * network, expressed in epoch milliseconds. + * @type int|string $queued_requests_count + * Optional. Number of pending requests at the moment this request was sent. + * This includes requests waiting to be sent, and those that are inflight. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Timestamp indicating when the request was sent over the + * network, expressed in epoch milliseconds. + * + * Generated from protobuf field optional int64 send_time_millis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getSendTimeMillis() + { + return isset($this->send_time_millis) ? $this->send_time_millis : 0; + } + + public function hasSendTimeMillis() + { + return isset($this->send_time_millis); + } + + public function clearSendTimeMillis() + { + unset($this->send_time_millis); + } + + /** + * Optional. Timestamp indicating when the request was sent over the + * network, expressed in epoch milliseconds. + * + * Generated from protobuf field optional int64 send_time_millis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setSendTimeMillis($var) + { + GPBUtil::checkInt64($var); + $this->send_time_millis = $var; + + return $this; + } + + /** + * Optional. Number of pending requests at the moment this request was sent. + * This includes requests waiting to be sent, and those that are inflight. + * + * Generated from protobuf field optional int64 queued_requests_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getQueuedRequestsCount() + { + return isset($this->queued_requests_count) ? $this->queued_requests_count : 0; + } + + public function hasQueuedRequestsCount() + { + return isset($this->queued_requests_count); + } + + public function clearQueuedRequestsCount() + { + unset($this->queued_requests_count); + } + + /** + * Optional. Number of pending requests at the moment this request was sent. + * This includes requests waiting to be sent, and those that are inflight. + * + * Generated from protobuf field optional int64 queued_requests_count = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setQueuedRequestsCount($var) + { + GPBUtil::checkInt64($var); + $this->queued_requests_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats/WindowStats.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats/WindowStats.php new file mode 100644 index 000000000000..591f43a9482a --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats/WindowStats.php @@ -0,0 +1,413 @@ +google.cloud.bigquery.storage.v1.ClientStats.WindowStats + */ +class WindowStats extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The maximum response latency observed in the window, expressed + * in milliseconds. + * + * Generated from protobuf field optional int64 max_response_latency_millis = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_response_latency_millis = null; + /** + * Optional. The average response latency observed in the window, expressed + * in milliseconds. + * + * Generated from protobuf field optional int64 avg_response_latency_millis = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $avg_response_latency_millis = null; + /** + * Optional. The longest time spent waiting without receiving a response in + * the window. This could exceed max_response_latency_millis because the + * latter is evaluated only when a response is received. Expressed in + * milliseconds. + * + * Generated from protobuf field optional int64 longest_wait_no_response_millis = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $longest_wait_no_response_millis = null; + /** + * Optional. How many requests were sent in the window. + * + * Generated from protobuf field optional int64 requests_sent_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $requests_sent_count = null; + /** + * Optional. How many responses were received in the window. + * + * Generated from protobuf field optional int64 responses_received_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $responses_received_count = null; + /** + * Optional. How many bytes were sent in the window. + * + * Generated from protobuf field optional int64 bytes_sent_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $bytes_sent_count = null; + /** + * Optional. Start time of the window interval for which these stats are + * aggregated, expressed in epoch milliseconds. + * + * Generated from protobuf field optional int64 window_start_time_epoch_millis = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $window_start_time_epoch_millis = null; + /** + * Optional. Duration of the window interval for which these stats are + * aggregated, expressed in milliseconds. + * + * Generated from protobuf field optional int64 window_millis = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $window_millis = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $max_response_latency_millis + * Optional. The maximum response latency observed in the window, expressed + * in milliseconds. + * @type int|string $avg_response_latency_millis + * Optional. The average response latency observed in the window, expressed + * in milliseconds. + * @type int|string $longest_wait_no_response_millis + * Optional. The longest time spent waiting without receiving a response in + * the window. This could exceed max_response_latency_millis because the + * latter is evaluated only when a response is received. Expressed in + * milliseconds. + * @type int|string $requests_sent_count + * Optional. How many requests were sent in the window. + * @type int|string $responses_received_count + * Optional. How many responses were received in the window. + * @type int|string $bytes_sent_count + * Optional. How many bytes were sent in the window. + * @type int|string $window_start_time_epoch_millis + * Optional. Start time of the window interval for which these stats are + * aggregated, expressed in epoch milliseconds. + * @type int|string $window_millis + * Optional. Duration of the window interval for which these stats are + * aggregated, expressed in milliseconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The maximum response latency observed in the window, expressed + * in milliseconds. + * + * Generated from protobuf field optional int64 max_response_latency_millis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMaxResponseLatencyMillis() + { + return isset($this->max_response_latency_millis) ? $this->max_response_latency_millis : 0; + } + + public function hasMaxResponseLatencyMillis() + { + return isset($this->max_response_latency_millis); + } + + public function clearMaxResponseLatencyMillis() + { + unset($this->max_response_latency_millis); + } + + /** + * Optional. The maximum response latency observed in the window, expressed + * in milliseconds. + * + * Generated from protobuf field optional int64 max_response_latency_millis = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMaxResponseLatencyMillis($var) + { + GPBUtil::checkInt64($var); + $this->max_response_latency_millis = $var; + + return $this; + } + + /** + * Optional. The average response latency observed in the window, expressed + * in milliseconds. + * + * Generated from protobuf field optional int64 avg_response_latency_millis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getAvgResponseLatencyMillis() + { + return isset($this->avg_response_latency_millis) ? $this->avg_response_latency_millis : 0; + } + + public function hasAvgResponseLatencyMillis() + { + return isset($this->avg_response_latency_millis); + } + + public function clearAvgResponseLatencyMillis() + { + unset($this->avg_response_latency_millis); + } + + /** + * Optional. The average response latency observed in the window, expressed + * in milliseconds. + * + * Generated from protobuf field optional int64 avg_response_latency_millis = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setAvgResponseLatencyMillis($var) + { + GPBUtil::checkInt64($var); + $this->avg_response_latency_millis = $var; + + return $this; + } + + /** + * Optional. The longest time spent waiting without receiving a response in + * the window. This could exceed max_response_latency_millis because the + * latter is evaluated only when a response is received. Expressed in + * milliseconds. + * + * Generated from protobuf field optional int64 longest_wait_no_response_millis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getLongestWaitNoResponseMillis() + { + return isset($this->longest_wait_no_response_millis) ? $this->longest_wait_no_response_millis : 0; + } + + public function hasLongestWaitNoResponseMillis() + { + return isset($this->longest_wait_no_response_millis); + } + + public function clearLongestWaitNoResponseMillis() + { + unset($this->longest_wait_no_response_millis); + } + + /** + * Optional. The longest time spent waiting without receiving a response in + * the window. This could exceed max_response_latency_millis because the + * latter is evaluated only when a response is received. Expressed in + * milliseconds. + * + * Generated from protobuf field optional int64 longest_wait_no_response_millis = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setLongestWaitNoResponseMillis($var) + { + GPBUtil::checkInt64($var); + $this->longest_wait_no_response_millis = $var; + + return $this; + } + + /** + * Optional. How many requests were sent in the window. + * + * Generated from protobuf field optional int64 requests_sent_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getRequestsSentCount() + { + return isset($this->requests_sent_count) ? $this->requests_sent_count : 0; + } + + public function hasRequestsSentCount() + { + return isset($this->requests_sent_count); + } + + public function clearRequestsSentCount() + { + unset($this->requests_sent_count); + } + + /** + * Optional. How many requests were sent in the window. + * + * Generated from protobuf field optional int64 requests_sent_count = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setRequestsSentCount($var) + { + GPBUtil::checkInt64($var); + $this->requests_sent_count = $var; + + return $this; + } + + /** + * Optional. How many responses were received in the window. + * + * Generated from protobuf field optional int64 responses_received_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getResponsesReceivedCount() + { + return isset($this->responses_received_count) ? $this->responses_received_count : 0; + } + + public function hasResponsesReceivedCount() + { + return isset($this->responses_received_count); + } + + public function clearResponsesReceivedCount() + { + unset($this->responses_received_count); + } + + /** + * Optional. How many responses were received in the window. + * + * Generated from protobuf field optional int64 responses_received_count = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setResponsesReceivedCount($var) + { + GPBUtil::checkInt64($var); + $this->responses_received_count = $var; + + return $this; + } + + /** + * Optional. How many bytes were sent in the window. + * + * Generated from protobuf field optional int64 bytes_sent_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getBytesSentCount() + { + return isset($this->bytes_sent_count) ? $this->bytes_sent_count : 0; + } + + public function hasBytesSentCount() + { + return isset($this->bytes_sent_count); + } + + public function clearBytesSentCount() + { + unset($this->bytes_sent_count); + } + + /** + * Optional. How many bytes were sent in the window. + * + * Generated from protobuf field optional int64 bytes_sent_count = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setBytesSentCount($var) + { + GPBUtil::checkInt64($var); + $this->bytes_sent_count = $var; + + return $this; + } + + /** + * Optional. Start time of the window interval for which these stats are + * aggregated, expressed in epoch milliseconds. + * + * Generated from protobuf field optional int64 window_start_time_epoch_millis = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getWindowStartTimeEpochMillis() + { + return isset($this->window_start_time_epoch_millis) ? $this->window_start_time_epoch_millis : 0; + } + + public function hasWindowStartTimeEpochMillis() + { + return isset($this->window_start_time_epoch_millis); + } + + public function clearWindowStartTimeEpochMillis() + { + unset($this->window_start_time_epoch_millis); + } + + /** + * Optional. Start time of the window interval for which these stats are + * aggregated, expressed in epoch milliseconds. + * + * Generated from protobuf field optional int64 window_start_time_epoch_millis = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setWindowStartTimeEpochMillis($var) + { + GPBUtil::checkInt64($var); + $this->window_start_time_epoch_millis = $var; + + return $this; + } + + /** + * Optional. Duration of the window interval for which these stats are + * aggregated, expressed in milliseconds. + * + * Generated from protobuf field optional int64 window_millis = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getWindowMillis() + { + return isset($this->window_millis) ? $this->window_millis : 0; + } + + public function hasWindowMillis() + { + return isset($this->window_millis); + } + + public function clearWindowMillis() + { + unset($this->window_millis); + } + + /** + * Optional. Duration of the window interval for which these stats are + * aggregated, expressed in milliseconds. + * + * Generated from protobuf field optional int64 window_millis = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setWindowMillis($var) + { + GPBUtil::checkInt64($var); + $this->window_millis = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php new file mode 100644 index 000000000000..9acbf4524904 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php @@ -0,0 +1,267 @@ +google.cloud.bigquery.storage.v1.CreateReadSessionRequest + */ +class CreateReadSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Session to be created. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $read_session = null; + /** + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. + * There is a default system max limit of 1,000. + * This must be greater than or equal to preferred_min_stream_count. + * Typically, clients should either leave this unset to let the system to + * determine an upper bound OR set this a size for the maximum "units of work" + * it can gracefully handle. + * + * Generated from protobuf field int32 max_stream_count = 3; + */ + protected $max_stream_count = 0; + /** + * The minimum preferred stream count. This parameter can be used to inform + * the service that there is a desired lower bound on the number of streams. + * This is typically a target parallelism of the client (e.g. a Spark + * cluster with N-workers would set this to a low multiple of N to ensure + * good cluster utilization). + * The system will make a best effort to provide at least this number of + * streams, but in some cases might provide less. + * + * Generated from protobuf field int32 preferred_min_stream_count = 4; + */ + protected $preferred_min_stream_count = 0; + + /** + * @param string $parent Required. The request project that owns the session, in the form of + * `projects/{project_id}`. Please see + * {@see BigQueryReadClient::projectName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession $readSession Required. Session to be created. + * @param int $maxStreamCount Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. + * There is a default system max limit of 1,000. + * + * This must be greater than or equal to preferred_min_stream_count. + * Typically, clients should either leave this unset to let the system to + * determine an upper bound OR set this a size for the maximum "units of work" + * it can gracefully handle. + * + * @return \Google\Cloud\BigQuery\Storage\V1\CreateReadSessionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\Storage\V1\ReadSession $readSession, int $maxStreamCount): self + { + return (new self()) + ->setParent($parent) + ->setReadSession($readSession) + ->setMaxStreamCount($maxStreamCount); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + * @type \Google\Cloud\BigQuery\Storage\V1\ReadSession $read_session + * Required. Session to be created. + * @type int $max_stream_count + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. + * There is a default system max limit of 1,000. + * This must be greater than or equal to preferred_min_stream_count. + * Typically, clients should either leave this unset to let the system to + * determine an upper bound OR set this a size for the maximum "units of work" + * it can gracefully handle. + * @type int $preferred_min_stream_count + * The minimum preferred stream count. This parameter can be used to inform + * the service that there is a desired lower bound on the number of streams. + * This is typically a target parallelism of the client (e.g. a Spark + * cluster with N-workers would set this to a low multiple of N to ensure + * good cluster utilization). + * The system will make a best effort to provide at least this number of + * streams, but in some cases might provide less. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The request project that owns the session, in the form of + * `projects/{project_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Session to be created. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\Storage\V1\ReadSession|null + */ + public function getReadSession() + { + return $this->read_session; + } + + public function hasReadSession() + { + return isset($this->read_session); + } + + public function clearReadSession() + { + unset($this->read_session); + } + + /** + * Required. Session to be created. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession $var + * @return $this + */ + public function setReadSession($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession::class); + $this->read_session = $var; + + return $this; + } + + /** + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. + * There is a default system max limit of 1,000. + * This must be greater than or equal to preferred_min_stream_count. + * Typically, clients should either leave this unset to let the system to + * determine an upper bound OR set this a size for the maximum "units of work" + * it can gracefully handle. + * + * Generated from protobuf field int32 max_stream_count = 3; + * @return int + */ + public function getMaxStreamCount() + { + return $this->max_stream_count; + } + + /** + * Max initial number of streams. If unset or zero, the server will + * provide a value of streams so as to produce reasonable throughput. Must be + * non-negative. The number of streams may be lower than the requested number, + * depending on the amount parallelism that is reasonable for the table. + * There is a default system max limit of 1,000. + * This must be greater than or equal to preferred_min_stream_count. + * Typically, clients should either leave this unset to let the system to + * determine an upper bound OR set this a size for the maximum "units of work" + * it can gracefully handle. + * + * Generated from protobuf field int32 max_stream_count = 3; + * @param int $var + * @return $this + */ + public function setMaxStreamCount($var) + { + GPBUtil::checkInt32($var); + $this->max_stream_count = $var; + + return $this; + } + + /** + * The minimum preferred stream count. This parameter can be used to inform + * the service that there is a desired lower bound on the number of streams. + * This is typically a target parallelism of the client (e.g. a Spark + * cluster with N-workers would set this to a low multiple of N to ensure + * good cluster utilization). + * The system will make a best effort to provide at least this number of + * streams, but in some cases might provide less. + * + * Generated from protobuf field int32 preferred_min_stream_count = 4; + * @return int + */ + public function getPreferredMinStreamCount() + { + return $this->preferred_min_stream_count; + } + + /** + * The minimum preferred stream count. This parameter can be used to inform + * the service that there is a desired lower bound on the number of streams. + * This is typically a target parallelism of the client (e.g. a Spark + * cluster with N-workers would set this to a low multiple of N to ensure + * good cluster utilization). + * The system will make a best effort to provide at least this number of + * streams, but in some cases might provide less. + * + * Generated from protobuf field int32 preferred_min_stream_count = 4; + * @param int $var + * @return $this + */ + public function setPreferredMinStreamCount($var) + { + GPBUtil::checkInt32($var); + $this->preferred_min_stream_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php new file mode 100644 index 000000000000..7576f9641267 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php @@ -0,0 +1,132 @@ +google.cloud.bigquery.storage.v1.CreateWriteStreamRequest + */ +class CreateWriteStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Reference to the table to which the stream belongs, in the format + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Stream to be created. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream write_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $write_stream = null; + + /** + * @param string $parent Required. Reference to the table to which the stream belongs, in the format + * of `projects/{project}/datasets/{dataset}/tables/{table}`. Please see + * {@see BigQueryWriteClient::tableName()} for help formatting this field. + * @param \Google\Cloud\BigQuery\Storage\V1\WriteStream $writeStream Required. Stream to be created. + * + * @return \Google\Cloud\BigQuery\Storage\V1\CreateWriteStreamRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\BigQuery\Storage\V1\WriteStream $writeStream): self + { + return (new self()) + ->setParent($parent) + ->setWriteStream($writeStream); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Reference to the table to which the stream belongs, in the format + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * @type \Google\Cloud\BigQuery\Storage\V1\WriteStream $write_stream + * Required. Stream to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Reference to the table to which the stream belongs, in the format + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Reference to the table to which the stream belongs, in the format + * of `projects/{project}/datasets/{dataset}/tables/{table}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. Stream to be created. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream write_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\BigQuery\Storage\V1\WriteStream|null + */ + public function getWriteStream() + { + return $this->write_stream; + } + + public function hasWriteStream() + { + return isset($this->write_stream); + } + + public function clearWriteStream() + { + unset($this->write_stream); + } + + /** + * Required. Stream to be created. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream write_stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\BigQuery\Storage\V1\WriteStream $var + * @return $this + */ + public function setWriteStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\WriteStream::class); + $this->write_stream = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php new file mode 100644 index 000000000000..c5e81f0da7a1 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php @@ -0,0 +1,63 @@ +google.cloud.bigquery.storage.v1.DataFormat + */ +class DataFormat +{ + /** + * Data format is unspecified. + * + * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; + */ + const DATA_FORMAT_UNSPECIFIED = 0; + /** + * Avro is a standard open source row based file format. + * See https://avro.apache.org/ for more details. + * + * Generated from protobuf enum AVRO = 1; + */ + const AVRO = 1; + /** + * Arrow is a standard open source column-based message format. + * See https://arrow.apache.org/ for more details. + * + * Generated from protobuf enum ARROW = 2; + */ + const ARROW = 2; + + private static $valueToName = [ + self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', + self::AVRO => 'AVRO', + self::ARROW => 'ARROW', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php new file mode 100644 index 000000000000..5da0ae9c76de --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php @@ -0,0 +1,86 @@ +google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest + */ +class FinalizeWriteStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the stream to finalize, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the stream to finalize, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. Please see + * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Storage\V1\FinalizeWriteStreamRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the stream to finalize, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the stream to finalize, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the stream to finalize, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php new file mode 100644 index 000000000000..0e9572c7bf95 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php @@ -0,0 +1,67 @@ +google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse + */ +class FinalizeWriteStreamResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Number of rows in the finalized stream. + * + * Generated from protobuf field int64 row_count = 1; + */ + protected $row_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $row_count + * Number of rows in the finalized stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Number of rows in the finalized stream. + * + * Generated from protobuf field int64 row_count = 1; + * @return int|string + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * Number of rows in the finalized stream. + * + * Generated from protobuf field int64 row_count = 1; + * @param int|string $var + * @return $this + */ + public function setRowCount($var) + { + GPBUtil::checkInt64($var); + $this->row_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php new file mode 100644 index 000000000000..260f3267b322 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php @@ -0,0 +1,158 @@ +google.cloud.bigquery.storage.v1.FlushRowsRequest + */ +class FlushRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The stream that is the target of the flush operation. + * + * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $write_stream = ''; + /** + * Ending offset of the flush operation. Rows before this offset(including + * this offset) will be flushed. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + */ + protected $offset = null; + + /** + * @param string $writeStream Required. The stream that is the target of the flush operation. Please see + * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Storage\V1\FlushRowsRequest + * + * @experimental + */ + public static function build(string $writeStream): self + { + return (new self()) + ->setWriteStream($writeStream); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $write_stream + * Required. The stream that is the target of the flush operation. + * @type \Google\Protobuf\Int64Value $offset + * Ending offset of the flush operation. Rows before this offset(including + * this offset) will be flushed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. The stream that is the target of the flush operation. + * + * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getWriteStream() + { + return $this->write_stream; + } + + /** + * Required. The stream that is the target of the flush operation. + * + * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setWriteStream($var) + { + GPBUtil::checkString($var, True); + $this->write_stream = $var; + + return $this; + } + + /** + * Ending offset of the flush operation. Rows before this offset(including + * this offset) will be flushed. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @return \Google\Protobuf\Int64Value|null + */ + public function getOffset() + { + return $this->offset; + } + + public function hasOffset() + { + return isset($this->offset); + } + + public function clearOffset() + { + unset($this->offset); + } + + /** + * Returns the unboxed value from getOffset() + + * Ending offset of the flush operation. Rows before this offset(including + * this offset) will be flushed. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @return int|string|null + */ + public function getOffsetUnwrapped() + { + return $this->readWrapperValue("offset"); + } + + /** + * Ending offset of the flush operation. Rows before this offset(including + * this offset) will be flushed. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->offset = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Ending offset of the flush operation. Rows before this offset(including + * this offset) will be flushed. + * + * Generated from protobuf field .google.protobuf.Int64Value offset = 2; + * @param int|string|null $var + * @return $this + */ + public function setOffsetUnwrapped($var) + { + $this->writeWrapperValue("offset", $var); + return $this;} + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php new file mode 100644 index 000000000000..eeb13512e3a5 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php @@ -0,0 +1,67 @@ +google.cloud.bigquery.storage.v1.FlushRowsResponse + */ +class FlushRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The rows before this offset (including this offset) are flushed. + * + * Generated from protobuf field int64 offset = 1; + */ + protected $offset = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $offset + * The rows before this offset (including this offset) are flushed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * The rows before this offset (including this offset) are flushed. + * + * Generated from protobuf field int64 offset = 1; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * The rows before this offset (including this offset) are flushed. + * + * Generated from protobuf field int64 offset = 1; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt64($var); + $this->offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php new file mode 100644 index 000000000000..f15c60c10723 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php @@ -0,0 +1,124 @@ +google.cloud.bigquery.storage.v1.GetWriteStreamRequest + */ +class GetWriteStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the stream to get, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Indicates whether to get full or partial view of the WriteStream. If + * not set, view returned will be basic. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStreamView view = 3; + */ + protected $view = 0; + + /** + * @param string $name Required. Name of the stream to get, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. Please see + * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. + * + * @return \Google\Cloud\BigQuery\Storage\V1\GetWriteStreamRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the stream to get, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * @type int $view + * Indicates whether to get full or partial view of the WriteStream. If + * not set, view returned will be basic. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the stream to get, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the stream to get, in the form of + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Indicates whether to get full or partial view of the WriteStream. If + * not set, view returned will be basic. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStreamView view = 3; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Indicates whether to get full or partial view of the WriteStream. If + * not set, view returned will be basic. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStreamView view = 3; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\WriteStreamView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php new file mode 100644 index 000000000000..59135967461f --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php @@ -0,0 +1,73 @@ +google.cloud.bigquery.storage.v1.ProtoRows + */ +class ProtoRows extends \Google\Protobuf\Internal\Message +{ + /** + * A sequence of rows serialized as a Protocol Buffer. + * See https://developers.google.com/protocol-buffers/docs/overview for more + * information on deserializing this field. + * + * Generated from protobuf field repeated bytes serialized_rows = 1; + */ + private $serialized_rows; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $serialized_rows + * A sequence of rows serialized as a Protocol Buffer. + * See https://developers.google.com/protocol-buffers/docs/overview for more + * information on deserializing this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Protobuf::initOnce(); + parent::__construct($data); + } + + /** + * A sequence of rows serialized as a Protocol Buffer. + * See https://developers.google.com/protocol-buffers/docs/overview for more + * information on deserializing this field. + * + * Generated from protobuf field repeated bytes serialized_rows = 1; + * @return RepeatedField + */ + public function getSerializedRows() + { + return $this->serialized_rows; + } + + /** + * A sequence of rows serialized as a Protocol Buffer. + * See https://developers.google.com/protocol-buffers/docs/overview for more + * information on deserializing this field. + * + * Generated from protobuf field repeated bytes serialized_rows = 1; + * @param string[] $var + * @return $this + */ + public function setSerializedRows($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); + $this->serialized_rows = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php new file mode 100644 index 000000000000..dc21f45f5a56 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php @@ -0,0 +1,105 @@ +google.cloud.bigquery.storage.v1.ProtoSchema + */ +class ProtoSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Descriptor for input message. The provided descriptor must be self + * contained, such that data rows sent can be fully decoded using only the + * single descriptor. For data rows that are compositions of multiple + * independent messages, this means the descriptor may need to be transformed + * to only use nested types: + * https://developers.google.com/protocol-buffers/docs/proto#nested + * For additional information for how proto types and values map onto BigQuery + * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions + * + * Generated from protobuf field .google.protobuf.DescriptorProto proto_descriptor = 1; + */ + protected $proto_descriptor = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\DescriptorProto $proto_descriptor + * Descriptor for input message. The provided descriptor must be self + * contained, such that data rows sent can be fully decoded using only the + * single descriptor. For data rows that are compositions of multiple + * independent messages, this means the descriptor may need to be transformed + * to only use nested types: + * https://developers.google.com/protocol-buffers/docs/proto#nested + * For additional information for how proto types and values map onto BigQuery + * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Protobuf::initOnce(); + parent::__construct($data); + } + + /** + * Descriptor for input message. The provided descriptor must be self + * contained, such that data rows sent can be fully decoded using only the + * single descriptor. For data rows that are compositions of multiple + * independent messages, this means the descriptor may need to be transformed + * to only use nested types: + * https://developers.google.com/protocol-buffers/docs/proto#nested + * For additional information for how proto types and values map onto BigQuery + * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions + * + * Generated from protobuf field .google.protobuf.DescriptorProto proto_descriptor = 1; + * @return \Google\Protobuf\DescriptorProto|null + */ + public function getProtoDescriptor() + { + return $this->proto_descriptor; + } + + public function hasProtoDescriptor() + { + return isset($this->proto_descriptor); + } + + public function clearProtoDescriptor() + { + unset($this->proto_descriptor); + } + + /** + * Descriptor for input message. The provided descriptor must be self + * contained, such that data rows sent can be fully decoded using only the + * single descriptor. For data rows that are compositions of multiple + * independent messages, this means the descriptor may need to be transformed + * to only use nested types: + * https://developers.google.com/protocol-buffers/docs/proto#nested + * For additional information for how proto types and values map onto BigQuery + * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions + * + * Generated from protobuf field .google.protobuf.DescriptorProto proto_descriptor = 1; + * @param \Google\Protobuf\DescriptorProto $var + * @return $this + */ + public function setProtoDescriptor($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DescriptorProto::class); + $this->proto_descriptor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php new file mode 100644 index 000000000000..b3b16c592ed2 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php @@ -0,0 +1,172 @@ +google.cloud.bigquery.storage.v1.ReadRowsRequest + */ +class ReadRowsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Stream to read rows from. + * + * Generated from protobuf field string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $read_stream = ''; + /** + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + * + * Generated from protobuf field int64 offset = 2; + */ + protected $offset = 0; + protected $output_format_serialization_options; + + /** + * @param string $readStream Required. Stream to read rows from. Please see + * {@see BigQueryReadClient::readStreamName()} for help formatting this field. + * @param int $offset The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + * + * @return \Google\Cloud\BigQuery\Storage\V1\ReadRowsRequest + * + * @experimental + */ + public static function build(string $readStream, int $offset): self + { + return (new self()) + ->setReadStream($readStream) + ->setOffset($offset); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $read_stream + * Required. Stream to read rows from. + * @type int|string $offset + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $arrow_serialization_options + * Optional. Options specific to the Apache Arrow output format. + * This feature is not yet available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Stream to read rows from. + * + * Generated from protobuf field string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getReadStream() + { + return $this->read_stream; + } + + /** + * Required. Stream to read rows from. + * + * Generated from protobuf field string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setReadStream($var) + { + GPBUtil::checkString($var, True); + $this->read_stream = $var; + + return $this; + } + + /** + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + * + * Generated from protobuf field int64 offset = 2; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * The offset requested must be less than the last row read from Read. + * Requesting a larger offset is undefined. If not specified, start reading + * from offset zero. + * + * Generated from protobuf field int64 offset = 2; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt64($var); + $this->offset = $var; + + return $this; + } + + /** + * Optional. Options specific to the Apache Arrow output format. + * This feature is not yet available. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions|null + */ + public function getArrowSerializationOptions() + { + return $this->readOneof(5); + } + + public function hasArrowSerializationOptions() + { + return $this->hasOneof(5); + } + + /** + * Optional. Options specific to the Apache Arrow output format. + * This feature is not yet available. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $var + * @return $this + */ + public function setArrowSerializationOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getOutputFormatSerializationOptions() + { + return $this->whichOneof("output_format_serialization_options"); + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php new file mode 100644 index 000000000000..f083aeae6c99 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php @@ -0,0 +1,458 @@ +google.cloud.bigquery.storage.v1.ReadRowsResponse + */ +class ReadRowsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Number of serialized rows in the rows block. + * + * Generated from protobuf field int64 row_count = 6; + */ + protected $row_count = 0; + /** + * Statistics for the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats stats = 2; + */ + protected $stats = null; + /** + * Throttling state. If unset, the latest response still describes + * the current throttling status. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5; + */ + protected $throttle_state = null; + /** + * Optional. If the row data in this ReadRowsResponse is compressed, then + * uncompressed byte size is the original size of the uncompressed row data. + * If it is set to a value greater than 0, then decompress into a buffer of + * size uncompressed_byte_size using the compression codec that was requested + * during session creation time and which is specified in + * TableReadOptions.response_compression_codec in ReadSession. + * This value is not set if no response_compression_codec was not requested + * and it is -1 if the requested compression would not have reduced the size + * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's + * behavior described here https://github.com/apache/arrow/issues/15102 where + * the uncompressed length may be set to -1 to indicate that the data that + * follows is not compressed, which can be useful for cases where compression + * does not yield appreciable savings. When uncompressed_byte_size is not + * greater than 0, the client should skip decompression. + * + * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $uncompressed_byte_size = null; + /** + * Output only. The total estimated number of rows in the query results. + * Only populated when reading data from a BigQuery job. + * This feature is not yet available. + * + * Generated from protobuf field optional int64 total_estimated_row_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $total_estimated_row_count = null; + protected $rows; + protected $schema; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\AvroRows $avro_rows + * Serialized row data in AVRO format. + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $arrow_record_batch + * Serialized row data in Arrow RecordBatch format. + * @type int|string $row_count + * Number of serialized rows in the rows block. + * @type \Google\Cloud\BigQuery\Storage\V1\StreamStats $stats + * Statistics for the stream. + * @type \Google\Cloud\BigQuery\Storage\V1\ThrottleState $throttle_state + * Throttling state. If unset, the latest response still describes + * the current throttling status. + * @type \Google\Cloud\BigQuery\Storage\V1\AvroSchema $avro_schema + * Output only. Avro schema. + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $arrow_schema + * Output only. Arrow schema. + * @type int|string $uncompressed_byte_size + * Optional. If the row data in this ReadRowsResponse is compressed, then + * uncompressed byte size is the original size of the uncompressed row data. + * If it is set to a value greater than 0, then decompress into a buffer of + * size uncompressed_byte_size using the compression codec that was requested + * during session creation time and which is specified in + * TableReadOptions.response_compression_codec in ReadSession. + * This value is not set if no response_compression_codec was not requested + * and it is -1 if the requested compression would not have reduced the size + * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's + * behavior described here https://github.com/apache/arrow/issues/15102 where + * the uncompressed length may be set to -1 to indicate that the data that + * follows is not compressed, which can be useful for cases where compression + * does not yield appreciable savings. When uncompressed_byte_size is not + * greater than 0, the client should skip decompression. + * @type int|string $total_estimated_row_count + * Output only. The total estimated number of rows in the query results. + * Only populated when reading data from a BigQuery job. + * This feature is not yet available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Serialized row data in AVRO format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3; + * @return \Google\Cloud\BigQuery\Storage\V1\AvroRows|null + */ + public function getAvroRows() + { + return $this->readOneof(3); + } + + public function hasAvroRows() + { + return $this->hasOneof(3); + } + + /** + * Serialized row data in AVRO format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3; + * @param \Google\Cloud\BigQuery\Storage\V1\AvroRows $var + * @return $this + */ + public function setAvroRows($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroRows::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Serialized row data in Arrow RecordBatch format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch|null + */ + public function getArrowRecordBatch() + { + return $this->readOneof(4); + } + + public function hasArrowRecordBatch() + { + return $this->hasOneof(4); + } + + /** + * Serialized row data in Arrow RecordBatch format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $var + * @return $this + */ + public function setArrowRecordBatch($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Number of serialized rows in the rows block. + * + * Generated from protobuf field int64 row_count = 6; + * @return int|string + */ + public function getRowCount() + { + return $this->row_count; + } + + /** + * Number of serialized rows in the rows block. + * + * Generated from protobuf field int64 row_count = 6; + * @param int|string $var + * @return $this + */ + public function setRowCount($var) + { + GPBUtil::checkInt64($var); + $this->row_count = $var; + + return $this; + } + + /** + * Statistics for the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats stats = 2; + * @return \Google\Cloud\BigQuery\Storage\V1\StreamStats|null + */ + public function getStats() + { + return $this->stats; + } + + public function hasStats() + { + return isset($this->stats); + } + + public function clearStats() + { + unset($this->stats); + } + + /** + * Statistics for the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats stats = 2; + * @param \Google\Cloud\BigQuery\Storage\V1\StreamStats $var + * @return $this + */ + public function setStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\StreamStats::class); + $this->stats = $var; + + return $this; + } + + /** + * Throttling state. If unset, the latest response still describes + * the current throttling status. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5; + * @return \Google\Cloud\BigQuery\Storage\V1\ThrottleState|null + */ + public function getThrottleState() + { + return $this->throttle_state; + } + + public function hasThrottleState() + { + return isset($this->throttle_state); + } + + public function clearThrottleState() + { + unset($this->throttle_state); + } + + /** + * Throttling state. If unset, the latest response still describes + * the current throttling status. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5; + * @param \Google\Cloud\BigQuery\Storage\V1\ThrottleState $var + * @return $this + */ + public function setThrottleState($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ThrottleState::class); + $this->throttle_state = $var; + + return $this; + } + + /** + * Output only. Avro schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Storage\V1\AvroSchema|null + */ + public function getAvroSchema() + { + return $this->readOneof(7); + } + + public function hasAvroSchema() + { + return $this->hasOneof(7); + } + + /** + * Output only. Avro schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Storage\V1\AvroSchema $var + * @return $this + */ + public function setAvroSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroSchema::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Output only. Arrow schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null + */ + public function getArrowSchema() + { + return $this->readOneof(8); + } + + public function hasArrowSchema() + { + return $this->hasOneof(8); + } + + /** + * Output only. Arrow schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $var + * @return $this + */ + public function setArrowSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSchema::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Optional. If the row data in this ReadRowsResponse is compressed, then + * uncompressed byte size is the original size of the uncompressed row data. + * If it is set to a value greater than 0, then decompress into a buffer of + * size uncompressed_byte_size using the compression codec that was requested + * during session creation time and which is specified in + * TableReadOptions.response_compression_codec in ReadSession. + * This value is not set if no response_compression_codec was not requested + * and it is -1 if the requested compression would not have reduced the size + * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's + * behavior described here https://github.com/apache/arrow/issues/15102 where + * the uncompressed length may be set to -1 to indicate that the data that + * follows is not compressed, which can be useful for cases where compression + * does not yield appreciable savings. When uncompressed_byte_size is not + * greater than 0, the client should skip decompression. + * + * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getUncompressedByteSize() + { + return isset($this->uncompressed_byte_size) ? $this->uncompressed_byte_size : 0; + } + + public function hasUncompressedByteSize() + { + return isset($this->uncompressed_byte_size); + } + + public function clearUncompressedByteSize() + { + unset($this->uncompressed_byte_size); + } + + /** + * Optional. If the row data in this ReadRowsResponse is compressed, then + * uncompressed byte size is the original size of the uncompressed row data. + * If it is set to a value greater than 0, then decompress into a buffer of + * size uncompressed_byte_size using the compression codec that was requested + * during session creation time and which is specified in + * TableReadOptions.response_compression_codec in ReadSession. + * This value is not set if no response_compression_codec was not requested + * and it is -1 if the requested compression would not have reduced the size + * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's + * behavior described here https://github.com/apache/arrow/issues/15102 where + * the uncompressed length may be set to -1 to indicate that the data that + * follows is not compressed, which can be useful for cases where compression + * does not yield appreciable savings. When uncompressed_byte_size is not + * greater than 0, the client should skip decompression. + * + * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setUncompressedByteSize($var) + { + GPBUtil::checkInt64($var); + $this->uncompressed_byte_size = $var; + + return $this; + } + + /** + * Output only. The total estimated number of rows in the query results. + * Only populated when reading data from a BigQuery job. + * This feature is not yet available. + * + * Generated from protobuf field optional int64 total_estimated_row_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTotalEstimatedRowCount() + { + return isset($this->total_estimated_row_count) ? $this->total_estimated_row_count : 0; + } + + public function hasTotalEstimatedRowCount() + { + return isset($this->total_estimated_row_count); + } + + public function clearTotalEstimatedRowCount() + { + unset($this->total_estimated_row_count); + } + + /** + * Output only. The total estimated number of rows in the query results. + * Only populated when reading data from a BigQuery job. + * This feature is not yet available. + * + * Generated from protobuf field optional int64 total_estimated_row_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTotalEstimatedRowCount($var) + { + GPBUtil::checkInt64($var); + $this->total_estimated_row_count = $var; + + return $this; + } + + /** + * @return string + */ + public function getRows() + { + return $this->whichOneof("rows"); + } + + /** + * @return string + */ + public function getSchema() + { + return $this->whichOneof("schema"); + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php new file mode 100644 index 000000000000..b0f585b7874a --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php @@ -0,0 +1,604 @@ +google.cloud.bigquery.storage.v1.ReadSession + */ +class ReadSession extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * 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. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not + * supported. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $data_format = 0; + /** + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` + * + * Generated from protobuf field string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $table = ''; + /** + * Optional. Any modifiers which are applied when reading from the specified + * table. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $table_modifiers = null; + /** + * Optional. Read options for this session (e.g. column selection, filters). + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $read_options = null; + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $streams; + /** + * 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. + * + * Generated from protobuf field int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $estimated_total_bytes_scanned = 0; + /** + * 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. + * + * Generated from protobuf field int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $estimated_total_physical_file_size = 0; + /** + * 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. + * + * Generated from protobuf field int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $estimated_row_count = 0; + /** + * 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. + * + * Generated from protobuf field string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $trace_id = ''; + protected $schema; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + * @type \Google\Protobuf\Timestamp $expire_time + * 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. + * @type int $data_format + * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not + * supported. + * @type \Google\Cloud\BigQuery\Storage\V1\AvroSchema $avro_schema + * Output only. Avro schema. + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $arrow_schema + * Output only. Arrow schema. + * @type string $table + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` + * @type \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers $table_modifiers + * Optional. Any modifiers which are applied when reading from the specified + * table. + * @type \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions $read_options + * Optional. Read options for this session (e.g. column selection, filters). + * @type \Google\Cloud\BigQuery\Storage\V1\ReadStream[] $streams + * 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. + * @type int|string $estimated_total_bytes_scanned + * 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. + * @type int|string $estimated_total_physical_file_size + * 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. + * @type int|string $estimated_row_count + * 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. + * @type string $trace_id + * 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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Unique identifier for the session, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * 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. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not + * supported. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getDataFormat() + { + return $this->data_format; + } + + /** + * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not + * supported. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setDataFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\DataFormat::class); + $this->data_format = $var; + + return $this; + } + + /** + * Output only. Avro schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Storage\V1\AvroSchema|null + */ + public function getAvroSchema() + { + return $this->readOneof(4); + } + + public function hasAvroSchema() + { + return $this->hasOneof(4); + } + + /** + * Output only. Avro schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Storage\V1\AvroSchema $var + * @return $this + */ + public function setAvroSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroSchema::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Output only. Arrow schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null + */ + public function getArrowSchema() + { + return $this->readOneof(5); + } + + public function hasArrowSchema() + { + return $this->hasOneof(5); + } + + /** + * Output only. Arrow schema. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $var + * @return $this + */ + public function setArrowSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSchema::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` + * + * Generated from protobuf field string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * Immutable. Table that this ReadSession is reading from, in the form + * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` + * + * Generated from protobuf field string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkString($var, True); + $this->table = $var; + + return $this; + } + + /** + * Optional. Any modifiers which are applied when reading from the specified + * table. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers|null + */ + public function getTableModifiers() + { + return $this->table_modifiers; + } + + public function hasTableModifiers() + { + return isset($this->table_modifiers); + } + + public function clearTableModifiers() + { + unset($this->table_modifiers); + } + + /** + * Optional. Any modifiers which are applied when reading from the specified + * table. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers $var + * @return $this + */ + public function setTableModifiers($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers::class); + $this->table_modifiers = $var; + + return $this; + } + + /** + * Optional. Read options for this session (e.g. column selection, filters). + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions|null + */ + public function getReadOptions() + { + return $this->read_options; + } + + public function hasReadOptions() + { + return isset($this->read_options); + } + + public function clearReadOptions() + { + unset($this->read_options); + } + + /** + * Optional. Read options for this session (e.g. column selection, filters). + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions $var + * @return $this + */ + public function setReadOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions::class); + $this->read_options = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\BigQuery\Storage\V1\ReadStream> + */ + public function getStreams() + { + return $this->streams; + } + + /** + * 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. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Storage\V1\ReadStream[] $var + * @return $this + */ + public function setStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\ReadStream::class); + $this->streams = $arr; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getEstimatedTotalBytesScanned() + { + return $this->estimated_total_bytes_scanned; + } + + /** + * 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. + * + * Generated from protobuf field int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setEstimatedTotalBytesScanned($var) + { + GPBUtil::checkInt64($var); + $this->estimated_total_bytes_scanned = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getEstimatedTotalPhysicalFileSize() + { + return $this->estimated_total_physical_file_size; + } + + /** + * 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. + * + * Generated from protobuf field int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setEstimatedTotalPhysicalFileSize($var) + { + GPBUtil::checkInt64($var); + $this->estimated_total_physical_file_size = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getEstimatedRowCount() + { + return $this->estimated_row_count; + } + + /** + * 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. + * + * Generated from protobuf field int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setEstimatedRowCount($var) + { + GPBUtil::checkInt64($var); + $this->estimated_row_count = $var; + + return $this; + } + + /** + * 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. + * + * Generated from protobuf field string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTraceId() + { + return $this->trace_id; + } + + /** + * 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. + * + * Generated from protobuf field string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTraceId($var) + { + GPBUtil::checkString($var, True); + $this->trace_id = $var; + + return $this; + } + + /** + * @return string + */ + public function getSchema() + { + return $this->whichOneof("schema"); + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php new file mode 100644 index 000000000000..5e8fe27974c0 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php @@ -0,0 +1,77 @@ +google.cloud.bigquery.storage.v1.ReadSession.TableModifiers + */ +class TableModifiers extends \Google\Protobuf\Internal\Message +{ + /** + * The snapshot time of the table. If not set, interpreted as now. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 1; + */ + protected $snapshot_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $snapshot_time + * The snapshot time of the table. If not set, interpreted as now. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); + parent::__construct($data); + } + + /** + * The snapshot time of the table. If not set, interpreted as now. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSnapshotTime() + { + return $this->snapshot_time; + } + + public function hasSnapshotTime() + { + return isset($this->snapshot_time); + } + + public function clearSnapshotTime() + { + unset($this->snapshot_time); + } + + /** + * The snapshot time of the table. If not set, interpreted as now. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php new file mode 100644 index 000000000000..4f4d0257a3b0 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php @@ -0,0 +1,468 @@ +google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions + */ +class TableReadOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The names of the fields in the table to be returned. If no + * field names are specified, then all fields in the table are returned. + * Nested fields -- the child elements of a STRUCT field -- can be selected + * individually using their fully-qualified names, and will be returned as + * record fields containing only the selected nested fields. If a STRUCT + * field is specified in the selected fields list, all of the child elements + * will be returned. + * As an example, consider a table with the following schema: + * { + * "name": "struct_field", + * "type": "RECORD", + * "mode": "NULLABLE", + * "fields": [ + * { + * "name": "string_field1", + * "type": "STRING", + * . "mode": "NULLABLE" + * }, + * { + * "name": "string_field2", + * "type": "STRING", + * "mode": "NULLABLE" + * } + * ] + * } + * Specifying "struct_field" in the selected fields list will result in a + * read session schema with the following logical structure: + * struct_field { + * string_field1 + * string_field2 + * } + * Specifying "struct_field.string_field1" in the selected fields list will + * result in a read session schema with the following logical structure: + * struct_field { + * string_field1 + * } + * The order of the fields in the read session schema is derived from the + * table schema and does not correspond to the order in which the fields are + * specified in this list. + * + * Generated from protobuf field repeated string selected_fields = 1; + */ + private $selected_fields; + /** + * SQL text filtering statement, similar to a WHERE clause in a query. + * Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + * Restricted to a maximum length for 1 MB. + * + * Generated from protobuf field string row_restriction = 2; + */ + protected $row_restriction = ''; + /** + * Optional. Specifies a table sampling percentage. Specifically, the query + * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The + * sampling percentage is applied at the data block granularity. It will + * randomly choose for each data block whether to read the rows in that data + * block. For more details, see + * https://cloud.google.com/bigquery/docs/table-sampling) + * + * Generated from protobuf field optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $sample_percentage = null; + /** + * Optional. Set response_compression_codec when creating a read session to + * enable application-level compression of ReadRows responses. + * + * Generated from protobuf field optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $response_compression_codec = null; + protected $output_format_serialization_options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $selected_fields + * Optional. The names of the fields in the table to be returned. If no + * field names are specified, then all fields in the table are returned. + * Nested fields -- the child elements of a STRUCT field -- can be selected + * individually using their fully-qualified names, and will be returned as + * record fields containing only the selected nested fields. If a STRUCT + * field is specified in the selected fields list, all of the child elements + * will be returned. + * As an example, consider a table with the following schema: + * { + * "name": "struct_field", + * "type": "RECORD", + * "mode": "NULLABLE", + * "fields": [ + * { + * "name": "string_field1", + * "type": "STRING", + * . "mode": "NULLABLE" + * }, + * { + * "name": "string_field2", + * "type": "STRING", + * "mode": "NULLABLE" + * } + * ] + * } + * Specifying "struct_field" in the selected fields list will result in a + * read session schema with the following logical structure: + * struct_field { + * string_field1 + * string_field2 + * } + * Specifying "struct_field.string_field1" in the selected fields list will + * result in a read session schema with the following logical structure: + * struct_field { + * string_field1 + * } + * The order of the fields in the read session schema is derived from the + * table schema and does not correspond to the order in which the fields are + * specified in this list. + * @type string $row_restriction + * SQL text filtering statement, similar to a WHERE clause in a query. + * Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + * Restricted to a maximum length for 1 MB. + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $arrow_serialization_options + * Optional. Options specific to the Apache Arrow output format. + * @type \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions $avro_serialization_options + * Optional. Options specific to the Apache Avro output format + * @type float $sample_percentage + * Optional. Specifies a table sampling percentage. Specifically, the query + * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The + * sampling percentage is applied at the data block granularity. It will + * randomly choose for each data block whether to read the rows in that data + * block. For more details, see + * https://cloud.google.com/bigquery/docs/table-sampling) + * @type int $response_compression_codec + * Optional. Set response_compression_codec when creating a read session to + * enable application-level compression of ReadRows responses. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The names of the fields in the table to be returned. If no + * field names are specified, then all fields in the table are returned. + * Nested fields -- the child elements of a STRUCT field -- can be selected + * individually using their fully-qualified names, and will be returned as + * record fields containing only the selected nested fields. If a STRUCT + * field is specified in the selected fields list, all of the child elements + * will be returned. + * As an example, consider a table with the following schema: + * { + * "name": "struct_field", + * "type": "RECORD", + * "mode": "NULLABLE", + * "fields": [ + * { + * "name": "string_field1", + * "type": "STRING", + * . "mode": "NULLABLE" + * }, + * { + * "name": "string_field2", + * "type": "STRING", + * "mode": "NULLABLE" + * } + * ] + * } + * Specifying "struct_field" in the selected fields list will result in a + * read session schema with the following logical structure: + * struct_field { + * string_field1 + * string_field2 + * } + * Specifying "struct_field.string_field1" in the selected fields list will + * result in a read session schema with the following logical structure: + * struct_field { + * string_field1 + * } + * The order of the fields in the read session schema is derived from the + * table schema and does not correspond to the order in which the fields are + * specified in this list. + * + * Generated from protobuf field repeated string selected_fields = 1; + * @return RepeatedField + */ + public function getSelectedFields() + { + return $this->selected_fields; + } + + /** + * Optional. The names of the fields in the table to be returned. If no + * field names are specified, then all fields in the table are returned. + * Nested fields -- the child elements of a STRUCT field -- can be selected + * individually using their fully-qualified names, and will be returned as + * record fields containing only the selected nested fields. If a STRUCT + * field is specified in the selected fields list, all of the child elements + * will be returned. + * As an example, consider a table with the following schema: + * { + * "name": "struct_field", + * "type": "RECORD", + * "mode": "NULLABLE", + * "fields": [ + * { + * "name": "string_field1", + * "type": "STRING", + * . "mode": "NULLABLE" + * }, + * { + * "name": "string_field2", + * "type": "STRING", + * "mode": "NULLABLE" + * } + * ] + * } + * Specifying "struct_field" in the selected fields list will result in a + * read session schema with the following logical structure: + * struct_field { + * string_field1 + * string_field2 + * } + * Specifying "struct_field.string_field1" in the selected fields list will + * result in a read session schema with the following logical structure: + * struct_field { + * string_field1 + * } + * The order of the fields in the read session schema is derived from the + * table schema and does not correspond to the order in which the fields are + * specified in this list. + * + * Generated from protobuf field repeated string selected_fields = 1; + * @param string[] $var + * @return $this + */ + public function setSelectedFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->selected_fields = $arr; + + return $this; + } + + /** + * SQL text filtering statement, similar to a WHERE clause in a query. + * Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + * Restricted to a maximum length for 1 MB. + * + * Generated from protobuf field string row_restriction = 2; + * @return string + */ + public function getRowRestriction() + { + return $this->row_restriction; + } + + /** + * SQL text filtering statement, similar to a WHERE clause in a query. + * Aggregates are not supported. + * Examples: "int_field > 5" + * "date_field = CAST('2014-9-27' as DATE)" + * "nullable_field is not NULL" + * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" + * "numeric_field BETWEEN 1.0 AND 5.0" + * Restricted to a maximum length for 1 MB. + * + * Generated from protobuf field string row_restriction = 2; + * @param string $var + * @return $this + */ + public function setRowRestriction($var) + { + GPBUtil::checkString($var, True); + $this->row_restriction = $var; + + return $this; + } + + /** + * Optional. Options specific to the Apache Arrow output format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions|null + */ + public function getArrowSerializationOptions() + { + return $this->readOneof(3); + } + + public function hasArrowSerializationOptions() + { + return $this->hasOneof(3); + } + + /** + * Optional. Options specific to the Apache Arrow output format. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $var + * @return $this + */ + public function setArrowSerializationOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Options specific to the Apache Avro output format + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions|null + */ + public function getAvroSerializationOptions() + { + return $this->readOneof(4); + } + + public function hasAvroSerializationOptions() + { + return $this->hasOneof(4); + } + + /** + * Optional. Options specific to the Apache Avro output format + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions $var + * @return $this + */ + public function setAvroSerializationOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Optional. Specifies a table sampling percentage. Specifically, the query + * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The + * sampling percentage is applied at the data block granularity. It will + * randomly choose for each data block whether to read the rows in that data + * block. For more details, see + * https://cloud.google.com/bigquery/docs/table-sampling) + * + * Generated from protobuf field optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return float + */ + public function getSamplePercentage() + { + return isset($this->sample_percentage) ? $this->sample_percentage : 0.0; + } + + public function hasSamplePercentage() + { + return isset($this->sample_percentage); + } + + public function clearSamplePercentage() + { + unset($this->sample_percentage); + } + + /** + * Optional. Specifies a table sampling percentage. Specifically, the query + * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The + * sampling percentage is applied at the data block granularity. It will + * randomly choose for each data block whether to read the rows in that data + * block. For more details, see + * https://cloud.google.com/bigquery/docs/table-sampling) + * + * Generated from protobuf field optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param float $var + * @return $this + */ + public function setSamplePercentage($var) + { + GPBUtil::checkDouble($var); + $this->sample_percentage = $var; + + return $this; + } + + /** + * Optional. Set response_compression_codec when creating a read session to + * enable application-level compression of ReadRows responses. + * + * Generated from protobuf field optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getResponseCompressionCodec() + { + return isset($this->response_compression_codec) ? $this->response_compression_codec : 0; + } + + public function hasResponseCompressionCodec() + { + return isset($this->response_compression_codec); + } + + public function clearResponseCompressionCodec() + { + unset($this->response_compression_codec); + } + + /** + * Optional. Set response_compression_codec when creating a read session to + * enable application-level compression of ReadRows responses. + * + * Generated from protobuf field optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setResponseCompressionCodec($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions\ResponseCompressionCodec::class); + $this->response_compression_codec = $var; + + return $this; + } + + /** + * @return string + */ + public function getOutputFormatSerializationOptions() + { + return $this->whichOneof("output_format_serialization_options"); + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php new file mode 100644 index 000000000000..1859e5878b39 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php @@ -0,0 +1,60 @@ +google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec + */ +class ResponseCompressionCodec +{ + /** + * Default is no compression. + * + * Generated from protobuf enum RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0; + */ + const RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0; + /** + * Use raw LZ4 compression. + * + * Generated from protobuf enum RESPONSE_COMPRESSION_CODEC_LZ4 = 2; + */ + const RESPONSE_COMPRESSION_CODEC_LZ4 = 2; + + private static $valueToName = [ + self::RESPONSE_COMPRESSION_CODEC_UNSPECIFIED => 'RESPONSE_COMPRESSION_CODEC_UNSPECIFIED', + self::RESPONSE_COMPRESSION_CODEC_LZ4 => 'RESPONSE_COMPRESSION_CODEC_LZ4', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php new file mode 100644 index 000000000000..c8fc31bb6496 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php @@ -0,0 +1,73 @@ +google.cloud.bigquery.storage.v1.ReadStream + */ +class ReadStream extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of the stream, in the form + * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php new file mode 100644 index 000000000000..955953ea2ffa --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php @@ -0,0 +1,135 @@ +google.cloud.bigquery.storage.v1.RowError + */ +class RowError extends \Google\Protobuf\Internal\Message +{ + /** + * Index of the malformed row in the request. + * + * Generated from protobuf field int64 index = 1; + */ + protected $index = 0; + /** + * Structured error reason for a row error. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.RowError.RowErrorCode code = 2; + */ + protected $code = 0; + /** + * Description of the issue encountered when processing the row. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $index + * Index of the malformed row in the request. + * @type int $code + * Structured error reason for a row error. + * @type string $message + * Description of the issue encountered when processing the row. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Index of the malformed row in the request. + * + * Generated from protobuf field int64 index = 1; + * @return int|string + */ + public function getIndex() + { + return $this->index; + } + + /** + * Index of the malformed row in the request. + * + * Generated from protobuf field int64 index = 1; + * @param int|string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt64($var); + $this->index = $var; + + return $this; + } + + /** + * Structured error reason for a row error. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.RowError.RowErrorCode code = 2; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * Structured error reason for a row error. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.RowError.RowErrorCode code = 2; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\RowError\RowErrorCode::class); + $this->code = $var; + + return $this; + } + + /** + * Description of the issue encountered when processing the row. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Description of the issue encountered when processing the row. + * + * Generated from protobuf field string message = 3; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php new file mode 100644 index 000000000000..ff92a25fe952 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php @@ -0,0 +1,54 @@ +google.cloud.bigquery.storage.v1.RowError.RowErrorCode + */ +class RowErrorCode +{ + /** + * Default error. + * + * Generated from protobuf enum ROW_ERROR_CODE_UNSPECIFIED = 0; + */ + const ROW_ERROR_CODE_UNSPECIFIED = 0; + /** + * One or more fields in the row has errors. + * + * Generated from protobuf enum FIELDS_ERROR = 1; + */ + const FIELDS_ERROR = 1; + + private static $valueToName = [ + self::ROW_ERROR_CODE_UNSPECIFIED => 'ROW_ERROR_CODE_UNSPECIFIED', + self::FIELDS_ERROR => 'FIELDS_ERROR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php new file mode 100644 index 000000000000..01ab892a64b7 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php @@ -0,0 +1,125 @@ +google.cloud.bigquery.storage.v1.SplitReadStreamRequest + */ +class SplitReadStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the stream to split. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + * + * Generated from protobuf field double fraction = 2; + */ + protected $fraction = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the stream to split. + * @type float $fraction + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the stream to split. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the stream to split. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + * + * Generated from protobuf field double fraction = 2; + * @return float + */ + public function getFraction() + { + return $this->fraction; + } + + /** + * A value in the range (0.0, 1.0) that specifies the fractional point at + * which the original stream should be split. The actual split point is + * evaluated on pre-filtered rows, so if a filter is provided, then there is + * no guarantee that the division of the rows between the new child streams + * will be proportional to this fractional value. Additionally, because the + * server-side unit for assigning data is collections of rows, this fraction + * will always map to a data storage boundary on the server side. + * + * Generated from protobuf field double fraction = 2; + * @param float $var + * @return $this + */ + public function setFraction($var) + { + GPBUtil::checkDouble($var); + $this->fraction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php new file mode 100644 index 000000000000..c50e2e479971 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php @@ -0,0 +1,133 @@ +google.cloud.bigquery.storage.v1.SplitReadStreamResponse + */ +class SplitReadStreamResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1; + */ + protected $primary_stream = null; + /** + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2; + */ + protected $remainder_stream = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\ReadStream $primary_stream + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + * @type \Google\Cloud\BigQuery\Storage\V1\ReadStream $remainder_stream + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1; + * @return \Google\Cloud\BigQuery\Storage\V1\ReadStream|null + */ + public function getPrimaryStream() + { + return $this->primary_stream; + } + + public function hasPrimaryStream() + { + return isset($this->primary_stream); + } + + public function clearPrimaryStream() + { + unset($this->primary_stream); + } + + /** + * Primary stream, which contains the beginning portion of + * |original_stream|. An empty value indicates that the original stream can no + * longer be split. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1; + * @param \Google\Cloud\BigQuery\Storage\V1\ReadStream $var + * @return $this + */ + public function setPrimaryStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadStream::class); + $this->primary_stream = $var; + + return $this; + } + + /** + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2; + * @return \Google\Cloud\BigQuery\Storage\V1\ReadStream|null + */ + public function getRemainderStream() + { + return $this->remainder_stream; + } + + public function hasRemainderStream() + { + return isset($this->remainder_stream); + } + + public function clearRemainderStream() + { + unset($this->remainder_stream); + } + + /** + * Remainder stream, which contains the tail of |original_stream|. An empty + * value indicates that the original stream can no longer be split. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2; + * @param \Google\Cloud\BigQuery\Storage\V1\ReadStream $var + * @return $this + */ + public function setRemainderStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadStream::class); + $this->remainder_stream = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php new file mode 100644 index 000000000000..f9a706a3fc96 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php @@ -0,0 +1,138 @@ +google.cloud.bigquery.storage.v1.StorageError + */ +class StorageError extends \Google\Protobuf\Internal\Message +{ + /** + * BigQuery Storage specific error code. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1; + */ + protected $code = 0; + /** + * Name of the failed entity. + * + * Generated from protobuf field string entity = 2; + */ + protected $entity = ''; + /** + * Message that describes the error. + * + * Generated from protobuf field string error_message = 3; + */ + protected $error_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * BigQuery Storage specific error code. + * @type string $entity + * Name of the failed entity. + * @type string $error_message + * Message that describes the error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * BigQuery Storage specific error code. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * BigQuery Storage specific error code. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\StorageError\StorageErrorCode::class); + $this->code = $var; + + return $this; + } + + /** + * Name of the failed entity. + * + * Generated from protobuf field string entity = 2; + * @return string + */ + public function getEntity() + { + return $this->entity; + } + + /** + * Name of the failed entity. + * + * Generated from protobuf field string entity = 2; + * @param string $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkString($var, True); + $this->entity = $var; + + return $this; + } + + /** + * Message that describes the error. + * + * Generated from protobuf field string error_message = 3; + * @return string + */ + public function getErrorMessage() + { + return $this->error_message; + } + + /** + * Message that describes the error. + * + * Generated from protobuf field string error_message = 3; + * @param string $var + * @return $this + */ + public function setErrorMessage($var) + { + GPBUtil::checkString($var, True); + $this->error_message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php new file mode 100644 index 000000000000..345644145ca7 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php @@ -0,0 +1,151 @@ +google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode + */ +class StorageErrorCode +{ + /** + * Default error. + * + * Generated from protobuf enum STORAGE_ERROR_CODE_UNSPECIFIED = 0; + */ + const STORAGE_ERROR_CODE_UNSPECIFIED = 0; + /** + * Table is not found in the system. + * + * Generated from protobuf enum TABLE_NOT_FOUND = 1; + */ + const TABLE_NOT_FOUND = 1; + /** + * Stream is already committed. + * + * Generated from protobuf enum STREAM_ALREADY_COMMITTED = 2; + */ + const STREAM_ALREADY_COMMITTED = 2; + /** + * Stream is not found. + * + * Generated from protobuf enum STREAM_NOT_FOUND = 3; + */ + const STREAM_NOT_FOUND = 3; + /** + * Invalid Stream type. + * For example, you try to commit a stream that is not pending. + * + * Generated from protobuf enum INVALID_STREAM_TYPE = 4; + */ + const INVALID_STREAM_TYPE = 4; + /** + * Invalid Stream state. + * For example, you try to commit a stream that is not finalized or is + * garbaged. + * + * Generated from protobuf enum INVALID_STREAM_STATE = 5; + */ + const INVALID_STREAM_STATE = 5; + /** + * Stream is finalized. + * + * Generated from protobuf enum STREAM_FINALIZED = 6; + */ + const STREAM_FINALIZED = 6; + /** + * There is a schema mismatch and it is caused by user schema has extra + * field than bigquery schema. + * + * Generated from protobuf enum SCHEMA_MISMATCH_EXTRA_FIELDS = 7; + */ + const SCHEMA_MISMATCH_EXTRA_FIELDS = 7; + /** + * Offset already exists. + * + * Generated from protobuf enum OFFSET_ALREADY_EXISTS = 8; + */ + const OFFSET_ALREADY_EXISTS = 8; + /** + * Offset out of range. + * + * Generated from protobuf enum OFFSET_OUT_OF_RANGE = 9; + */ + const OFFSET_OUT_OF_RANGE = 9; + /** + * Customer-managed encryption key (CMEK) not provided for CMEK-enabled + * data. + * + * Generated from protobuf enum CMEK_NOT_PROVIDED = 10; + */ + const CMEK_NOT_PROVIDED = 10; + /** + * Customer-managed encryption key (CMEK) was incorrectly provided. + * + * Generated from protobuf enum INVALID_CMEK_PROVIDED = 11; + */ + const INVALID_CMEK_PROVIDED = 11; + /** + * There is an encryption error while using customer-managed encryption key. + * + * Generated from protobuf enum CMEK_ENCRYPTION_ERROR = 12; + */ + const CMEK_ENCRYPTION_ERROR = 12; + /** + * Key Management Service (KMS) service returned an error, which can be + * retried. + * + * Generated from protobuf enum KMS_SERVICE_ERROR = 13; + */ + const KMS_SERVICE_ERROR = 13; + /** + * Permission denied while using customer-managed encryption key. + * + * Generated from protobuf enum KMS_PERMISSION_DENIED = 14; + */ + const KMS_PERMISSION_DENIED = 14; + + private static $valueToName = [ + self::STORAGE_ERROR_CODE_UNSPECIFIED => 'STORAGE_ERROR_CODE_UNSPECIFIED', + self::TABLE_NOT_FOUND => 'TABLE_NOT_FOUND', + self::STREAM_ALREADY_COMMITTED => 'STREAM_ALREADY_COMMITTED', + self::STREAM_NOT_FOUND => 'STREAM_NOT_FOUND', + self::INVALID_STREAM_TYPE => 'INVALID_STREAM_TYPE', + self::INVALID_STREAM_STATE => 'INVALID_STREAM_STATE', + self::STREAM_FINALIZED => 'STREAM_FINALIZED', + self::SCHEMA_MISMATCH_EXTRA_FIELDS => 'SCHEMA_MISMATCH_EXTRA_FIELDS', + self::OFFSET_ALREADY_EXISTS => 'OFFSET_ALREADY_EXISTS', + self::OFFSET_OUT_OF_RANGE => 'OFFSET_OUT_OF_RANGE', + self::CMEK_NOT_PROVIDED => 'CMEK_NOT_PROVIDED', + self::INVALID_CMEK_PROVIDED => 'INVALID_CMEK_PROVIDED', + self::CMEK_ENCRYPTION_ERROR => 'CMEK_ENCRYPTION_ERROR', + self::KMS_SERVICE_ERROR => 'KMS_SERVICE_ERROR', + self::KMS_PERMISSION_DENIED => 'KMS_PERMISSION_DENIED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php new file mode 100644 index 000000000000..e6bad4c17a87 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php @@ -0,0 +1,77 @@ +google.cloud.bigquery.storage.v1.StreamStats + */ +class StreamStats extends \Google\Protobuf\Internal\Message +{ + /** + * Represents the progress of the current stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats.Progress progress = 2; + */ + protected $progress = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress $progress + * Represents the progress of the current stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * Represents the progress of the current stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats.Progress progress = 2; + * @return \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress|null + */ + public function getProgress() + { + return $this->progress; + } + + public function hasProgress() + { + return isset($this->progress); + } + + public function clearProgress() + { + unset($this->progress); + } + + /** + * Represents the progress of the current stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats.Progress progress = 2; + * @param \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress $var + * @return $this + */ + public function setProgress($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress::class); + $this->progress = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php new file mode 100644 index 000000000000..b51dc198fc26 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php @@ -0,0 +1,139 @@ +google.cloud.bigquery.storage.v1.StreamStats.Progress + */ +class Progress extends \Google\Protobuf\Internal\Message +{ + /** + * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + * + * Generated from protobuf field double at_response_start = 1; + */ + protected $at_response_start = 0.0; + /** + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + * + * Generated from protobuf field double at_response_end = 2; + */ + protected $at_response_end = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $at_response_start + * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + * @type float $at_response_end + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + * + * Generated from protobuf field double at_response_start = 1; + * @return float + */ + public function getAtResponseStart() + { + return $this->at_response_start; + } + + /** + * The fraction of rows assigned to the stream that have been processed by + * the server so far, not including the rows in the current response + * message. + * This value, along with `at_response_end`, can be used to interpolate + * the progress made as the rows in the message are being processed using + * the following formula: `at_response_start + (at_response_end - + * at_response_start) * rows_processed_from_response / rows_in_response`. + * Note that if a filter is provided, the `at_response_end` value of the + * previous response may not necessarily be equal to the + * `at_response_start` value of the current response. + * + * Generated from protobuf field double at_response_start = 1; + * @param float $var + * @return $this + */ + public function setAtResponseStart($var) + { + GPBUtil::checkDouble($var); + $this->at_response_start = $var; + + return $this; + } + + /** + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + * + * Generated from protobuf field double at_response_end = 2; + * @return float + */ + public function getAtResponseEnd() + { + return $this->at_response_end; + } + + /** + * Similar to `at_response_start`, except that this value includes the + * rows in the current response. + * + * Generated from protobuf field double at_response_end = 2; + * @param float $var + * @return $this + */ + public function setAtResponseEnd($var) + { + GPBUtil::checkDouble($var); + $this->at_response_end = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php new file mode 100644 index 000000000000..350a1c329842 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php @@ -0,0 +1,630 @@ +google.cloud.bigquery.storage.v1.TableFieldSchema + */ +class TableFieldSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The field name. The name must contain only letters (a-z, A-Z), + * numbers (0-9), or underscores (_), and must start with a letter or + * underscore. The maximum length is 128 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The field data type. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Optional. The field mode. The default value is NULLABLE. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Mode mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mode = 0; + /** + * Optional. Describes the nested schema fields if the type property is set to + * STRUCT. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $fields; + /** + * Optional. The field description. The maximum length is 1,024 characters. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Maximum length of values of this field for STRINGS or BYTES. + * If max_length is not specified, no maximum length constraint is imposed + * on this field. + * If type = "STRING", then max_length represents the maximum UTF-8 + * length of strings in this field. + * If type = "BYTES", then max_length represents the maximum number of + * bytes in this field. + * It is invalid to set this field if type is not "STRING" or "BYTES". + * + * Generated from protobuf field int64 max_length = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $max_length = 0; + /** + * Optional. Precision (maximum number of total digits in base 10) and scale + * (maximum number of digits in the fractional part in base 10) constraints + * for values of this field for NUMERIC or BIGNUMERIC. + * It is invalid to set precision or scale if type is not "NUMERIC" or + * "BIGNUMERIC". + * If precision and scale are not specified, no value range constraint is + * imposed on this field insofar as values are permitted by the type. + * Values of this NUMERIC or BIGNUMERIC field must be in this range when: + * * Precision (P) and scale (S) are specified: + * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] + * * Precision (P) is specified but not scale (and thus scale is + * interpreted to be equal to zero): + * [-10^P + 1, 10^P - 1]. + * Acceptable values for precision and scale if both are specified: + * * If type = "NUMERIC": + * 1 <= precision - scale <= 29 and 0 <= scale <= 9. + * * If type = "BIGNUMERIC": + * 1 <= precision - scale <= 38 and 0 <= scale <= 38. + * Acceptable values for precision if only precision is specified but not + * scale (and thus scale is interpreted to be equal to zero): + * * If type = "NUMERIC": 1 <= precision <= 29. + * * If type = "BIGNUMERIC": 1 <= precision <= 38. + * If scale is specified but not precision, then it is invalid. + * + * Generated from protobuf field int64 precision = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $precision = 0; + /** + * Optional. See documentation for precision. + * + * Generated from protobuf field int64 scale = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $scale = 0; + /** + * Optional. A SQL expression to specify the [default value] + * (https://cloud.google.com/bigquery/docs/default-values) for this field. + * + * Generated from protobuf field string default_value_expression = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_value_expression = ''; + /** + * Optional. Precision (maximum number of total digits in base 10) for seconds + * of TIMESTAMP type. + * Possible values include: + * * 6 (Default, for TIMESTAMP type with microsecond precision) + * * 12 (For TIMESTAMP type with picosecond precision) + * + * Generated from protobuf field .google.protobuf.Int64Value timestamp_precision = 27 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $timestamp_precision = null; + /** + * Optional. The subtype of the RANGE, if the type of this field is RANGE. If + * the type is RANGE, this field is required. Possible values for the field + * element type of a RANGE include: + * * DATE + * * DATETIME + * * TIMESTAMP + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType range_element_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $range_element_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The field name. The name must contain only letters (a-z, A-Z), + * numbers (0-9), or underscores (_), and must start with a letter or + * underscore. The maximum length is 128 characters. + * @type int $type + * Required. The field data type. + * @type int $mode + * Optional. The field mode. The default value is NULLABLE. + * @type \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema[] $fields + * Optional. Describes the nested schema fields if the type property is set to + * STRUCT. + * @type string $description + * Optional. The field description. The maximum length is 1,024 characters. + * @type int|string $max_length + * Optional. Maximum length of values of this field for STRINGS or BYTES. + * If max_length is not specified, no maximum length constraint is imposed + * on this field. + * If type = "STRING", then max_length represents the maximum UTF-8 + * length of strings in this field. + * If type = "BYTES", then max_length represents the maximum number of + * bytes in this field. + * It is invalid to set this field if type is not "STRING" or "BYTES". + * @type int|string $precision + * Optional. Precision (maximum number of total digits in base 10) and scale + * (maximum number of digits in the fractional part in base 10) constraints + * for values of this field for NUMERIC or BIGNUMERIC. + * It is invalid to set precision or scale if type is not "NUMERIC" or + * "BIGNUMERIC". + * If precision and scale are not specified, no value range constraint is + * imposed on this field insofar as values are permitted by the type. + * Values of this NUMERIC or BIGNUMERIC field must be in this range when: + * * Precision (P) and scale (S) are specified: + * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] + * * Precision (P) is specified but not scale (and thus scale is + * interpreted to be equal to zero): + * [-10^P + 1, 10^P - 1]. + * Acceptable values for precision and scale if both are specified: + * * If type = "NUMERIC": + * 1 <= precision - scale <= 29 and 0 <= scale <= 9. + * * If type = "BIGNUMERIC": + * 1 <= precision - scale <= 38 and 0 <= scale <= 38. + * Acceptable values for precision if only precision is specified but not + * scale (and thus scale is interpreted to be equal to zero): + * * If type = "NUMERIC": 1 <= precision <= 29. + * * If type = "BIGNUMERIC": 1 <= precision <= 38. + * If scale is specified but not precision, then it is invalid. + * @type int|string $scale + * Optional. See documentation for precision. + * @type string $default_value_expression + * Optional. A SQL expression to specify the [default value] + * (https://cloud.google.com/bigquery/docs/default-values) for this field. + * @type \Google\Protobuf\Int64Value $timestamp_precision + * Optional. Precision (maximum number of total digits in base 10) for seconds + * of TIMESTAMP type. + * Possible values include: + * * 6 (Default, for TIMESTAMP type with microsecond precision) + * * 12 (For TIMESTAMP type with picosecond precision) + * @type \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType $range_element_type + * Optional. The subtype of the RANGE, if the type of this field is RANGE. If + * the type is RANGE, this field is required. Possible values for the field + * element type of a RANGE include: + * * DATE + * * DATETIME + * * TIMESTAMP + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce(); + parent::__construct($data); + } + + /** + * Required. The field name. The name must contain only letters (a-z, A-Z), + * numbers (0-9), or underscores (_), and must start with a letter or + * underscore. The maximum length is 128 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The field name. The name must contain only letters (a-z, A-Z), + * numbers (0-9), or underscores (_), and must start with a letter or + * underscore. The maximum length is 128 characters. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The field data type. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The field data type. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. The field mode. The default value is NULLABLE. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Mode mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Optional. The field mode. The default value is NULLABLE. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Mode mode = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Mode::class); + $this->mode = $var; + + return $this; + } + + /** + * Optional. Describes the nested schema fields if the type property is set to + * STRUCT. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\BigQuery\Storage\V1\TableFieldSchema> + */ + public function getFields() + { + return $this->fields; + } + + /** + * Optional. Describes the nested schema fields if the type property is set to + * STRUCT. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema[] $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema::class); + $this->fields = $arr; + + return $this; + } + + /** + * Optional. The field description. The maximum length is 1,024 characters. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. The field description. The maximum length is 1,024 characters. + * + * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. Maximum length of values of this field for STRINGS or BYTES. + * If max_length is not specified, no maximum length constraint is imposed + * on this field. + * If type = "STRING", then max_length represents the maximum UTF-8 + * length of strings in this field. + * If type = "BYTES", then max_length represents the maximum number of + * bytes in this field. + * It is invalid to set this field if type is not "STRING" or "BYTES". + * + * Generated from protobuf field int64 max_length = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getMaxLength() + { + return $this->max_length; + } + + /** + * Optional. Maximum length of values of this field for STRINGS or BYTES. + * If max_length is not specified, no maximum length constraint is imposed + * on this field. + * If type = "STRING", then max_length represents the maximum UTF-8 + * length of strings in this field. + * If type = "BYTES", then max_length represents the maximum number of + * bytes in this field. + * It is invalid to set this field if type is not "STRING" or "BYTES". + * + * Generated from protobuf field int64 max_length = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setMaxLength($var) + { + GPBUtil::checkInt64($var); + $this->max_length = $var; + + return $this; + } + + /** + * Optional. Precision (maximum number of total digits in base 10) and scale + * (maximum number of digits in the fractional part in base 10) constraints + * for values of this field for NUMERIC or BIGNUMERIC. + * It is invalid to set precision or scale if type is not "NUMERIC" or + * "BIGNUMERIC". + * If precision and scale are not specified, no value range constraint is + * imposed on this field insofar as values are permitted by the type. + * Values of this NUMERIC or BIGNUMERIC field must be in this range when: + * * Precision (P) and scale (S) are specified: + * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] + * * Precision (P) is specified but not scale (and thus scale is + * interpreted to be equal to zero): + * [-10^P + 1, 10^P - 1]. + * Acceptable values for precision and scale if both are specified: + * * If type = "NUMERIC": + * 1 <= precision - scale <= 29 and 0 <= scale <= 9. + * * If type = "BIGNUMERIC": + * 1 <= precision - scale <= 38 and 0 <= scale <= 38. + * Acceptable values for precision if only precision is specified but not + * scale (and thus scale is interpreted to be equal to zero): + * * If type = "NUMERIC": 1 <= precision <= 29. + * * If type = "BIGNUMERIC": 1 <= precision <= 38. + * If scale is specified but not precision, then it is invalid. + * + * Generated from protobuf field int64 precision = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getPrecision() + { + return $this->precision; + } + + /** + * Optional. Precision (maximum number of total digits in base 10) and scale + * (maximum number of digits in the fractional part in base 10) constraints + * for values of this field for NUMERIC or BIGNUMERIC. + * It is invalid to set precision or scale if type is not "NUMERIC" or + * "BIGNUMERIC". + * If precision and scale are not specified, no value range constraint is + * imposed on this field insofar as values are permitted by the type. + * Values of this NUMERIC or BIGNUMERIC field must be in this range when: + * * Precision (P) and scale (S) are specified: + * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] + * * Precision (P) is specified but not scale (and thus scale is + * interpreted to be equal to zero): + * [-10^P + 1, 10^P - 1]. + * Acceptable values for precision and scale if both are specified: + * * If type = "NUMERIC": + * 1 <= precision - scale <= 29 and 0 <= scale <= 9. + * * If type = "BIGNUMERIC": + * 1 <= precision - scale <= 38 and 0 <= scale <= 38. + * Acceptable values for precision if only precision is specified but not + * scale (and thus scale is interpreted to be equal to zero): + * * If type = "NUMERIC": 1 <= precision <= 29. + * * If type = "BIGNUMERIC": 1 <= precision <= 38. + * If scale is specified but not precision, then it is invalid. + * + * Generated from protobuf field int64 precision = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setPrecision($var) + { + GPBUtil::checkInt64($var); + $this->precision = $var; + + return $this; + } + + /** + * Optional. See documentation for precision. + * + * Generated from protobuf field int64 scale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getScale() + { + return $this->scale; + } + + /** + * Optional. See documentation for precision. + * + * Generated from protobuf field int64 scale = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setScale($var) + { + GPBUtil::checkInt64($var); + $this->scale = $var; + + return $this; + } + + /** + * Optional. A SQL expression to specify the [default value] + * (https://cloud.google.com/bigquery/docs/default-values) for this field. + * + * Generated from protobuf field string default_value_expression = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDefaultValueExpression() + { + return $this->default_value_expression; + } + + /** + * Optional. A SQL expression to specify the [default value] + * (https://cloud.google.com/bigquery/docs/default-values) for this field. + * + * Generated from protobuf field string default_value_expression = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDefaultValueExpression($var) + { + GPBUtil::checkString($var, True); + $this->default_value_expression = $var; + + return $this; + } + + /** + * Optional. Precision (maximum number of total digits in base 10) for seconds + * of TIMESTAMP type. + * Possible values include: + * * 6 (Default, for TIMESTAMP type with microsecond precision) + * * 12 (For TIMESTAMP type with picosecond precision) + * + * Generated from protobuf field .google.protobuf.Int64Value timestamp_precision = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getTimestampPrecision() + { + return $this->timestamp_precision; + } + + public function hasTimestampPrecision() + { + return isset($this->timestamp_precision); + } + + public function clearTimestampPrecision() + { + unset($this->timestamp_precision); + } + + /** + * Returns the unboxed value from getTimestampPrecision() + + * Optional. Precision (maximum number of total digits in base 10) for seconds + * of TIMESTAMP type. + * Possible values include: + * * 6 (Default, for TIMESTAMP type with microsecond precision) + * * 12 (For TIMESTAMP type with picosecond precision) + * + * Generated from protobuf field .google.protobuf.Int64Value timestamp_precision = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getTimestampPrecisionUnwrapped() + { + return $this->readWrapperValue("timestamp_precision"); + } + + /** + * Optional. Precision (maximum number of total digits in base 10) for seconds + * of TIMESTAMP type. + * Possible values include: + * * 6 (Default, for TIMESTAMP type with microsecond precision) + * * 12 (For TIMESTAMP type with picosecond precision) + * + * Generated from protobuf field .google.protobuf.Int64Value timestamp_precision = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setTimestampPrecision($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->timestamp_precision = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. Precision (maximum number of total digits in base 10) for seconds + * of TIMESTAMP type. + * Possible values include: + * * 6 (Default, for TIMESTAMP type with microsecond precision) + * * 12 (For TIMESTAMP type with picosecond precision) + * + * Generated from protobuf field .google.protobuf.Int64Value timestamp_precision = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setTimestampPrecisionUnwrapped($var) + { + $this->writeWrapperValue("timestamp_precision", $var); + return $this;} + + /** + * Optional. The subtype of the RANGE, if the type of this field is RANGE. If + * the type is RANGE, this field is required. Possible values for the field + * element type of a RANGE include: + * * DATE + * * DATETIME + * * TIMESTAMP + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType range_element_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType|null + */ + public function getRangeElementType() + { + return $this->range_element_type; + } + + public function hasRangeElementType() + { + return isset($this->range_element_type); + } + + public function clearRangeElementType() + { + unset($this->range_element_type); + } + + /** + * Optional. The subtype of the RANGE, if the type of this field is RANGE. If + * the type is RANGE, this field is required. Possible values for the field + * element type of a RANGE include: + * * DATE + * * DATETIME + * * TIMESTAMP + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType range_element_type = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType $var + * @return $this + */ + public function setRangeElementType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType::class); + $this->range_element_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php new file mode 100644 index 000000000000..809b1016dfb5 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php @@ -0,0 +1,67 @@ +google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType + */ +class FieldElementType extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The type of a field element. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Required. The type of a field element. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce(); + parent::__construct($data); + } + + /** + * Required. The type of a field element. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of a field element. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Type::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php new file mode 100644 index 000000000000..63488bd93973 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php @@ -0,0 +1,60 @@ +google.cloud.bigquery.storage.v1.TableFieldSchema.Mode + */ +class Mode +{ + /** + * Illegal value + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * Generated from protobuf enum NULLABLE = 1; + */ + const NULLABLE = 1; + /** + * Generated from protobuf enum REQUIRED = 2; + */ + const REQUIRED = 2; + /** + * Generated from protobuf enum REPEATED = 3; + */ + const REPEATED = 3; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::NULLABLE => 'NULLABLE', + self::REQUIRED => 'REQUIRED', + self::REPEATED => 'REPEATED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php new file mode 100644 index 000000000000..bf05cfc40023 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php @@ -0,0 +1,157 @@ +google.cloud.bigquery.storage.v1.TableFieldSchema.Type + */ +class Type +{ + /** + * Illegal value + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * 64K, UTF8 + * + * Generated from protobuf enum STRING = 1; + */ + const STRING = 1; + /** + * 64-bit signed + * + * Generated from protobuf enum INT64 = 2; + */ + const INT64 = 2; + /** + * 64-bit IEEE floating point + * + * Generated from protobuf enum DOUBLE = 3; + */ + const DOUBLE = 3; + /** + * Aggregate type + * + * Generated from protobuf enum STRUCT = 4; + */ + const STRUCT = 4; + /** + * 64K, Binary + * + * Generated from protobuf enum BYTES = 5; + */ + const BYTES = 5; + /** + * 2-valued + * + * Generated from protobuf enum BOOL = 6; + */ + const BOOL = 6; + /** + * 64-bit signed usec since UTC epoch + * + * Generated from protobuf enum TIMESTAMP = 7; + */ + const TIMESTAMP = 7; + /** + * Civil date - Year, Month, Day + * + * Generated from protobuf enum DATE = 8; + */ + const DATE = 8; + /** + * Civil time - Hour, Minute, Second, Microseconds + * + * Generated from protobuf enum TIME = 9; + */ + const TIME = 9; + /** + * Combination of civil date and civil time + * + * Generated from protobuf enum DATETIME = 10; + */ + const DATETIME = 10; + /** + * Geography object + * + * Generated from protobuf enum GEOGRAPHY = 11; + */ + const GEOGRAPHY = 11; + /** + * Numeric value + * + * Generated from protobuf enum NUMERIC = 12; + */ + const NUMERIC = 12; + /** + * BigNumeric value + * + * Generated from protobuf enum BIGNUMERIC = 13; + */ + const BIGNUMERIC = 13; + /** + * Interval + * + * Generated from protobuf enum INTERVAL = 14; + */ + const INTERVAL = 14; + /** + * JSON, String + * + * Generated from protobuf enum JSON = 15; + */ + const JSON = 15; + /** + * RANGE + * + * Generated from protobuf enum RANGE = 16; + */ + const RANGE = 16; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::STRING => 'STRING', + self::INT64 => 'INT64', + self::DOUBLE => 'DOUBLE', + self::STRUCT => 'STRUCT', + self::BYTES => 'BYTES', + self::BOOL => 'BOOL', + self::TIMESTAMP => 'TIMESTAMP', + self::DATE => 'DATE', + self::TIME => 'TIME', + self::DATETIME => 'DATETIME', + self::GEOGRAPHY => 'GEOGRAPHY', + self::NUMERIC => 'NUMERIC', + self::BIGNUMERIC => 'BIGNUMERIC', + self::INTERVAL => 'INTERVAL', + self::JSON => 'JSON', + self::RANGE => 'RANGE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php new file mode 100644 index 000000000000..015763ccaee8 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php @@ -0,0 +1,69 @@ +google.cloud.bigquery.storage.v1.TableSchema + */ +class TableSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Describes the fields in a table. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 1; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema[] $fields + * Describes the fields in a table. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce(); + parent::__construct($data); + } + + /** + * Describes the fields in a table. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 1; + * @return RepeatedField<\Google\Cloud\BigQuery\Storage\V1\TableFieldSchema> + */ + public function getFields() + { + return $this->fields; + } + + /** + * Describes the fields in a table. + * + * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 1; + * @param \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema[] $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema::class); + $this->fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php new file mode 100644 index 000000000000..415b26639acb --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php @@ -0,0 +1,71 @@ +google.cloud.bigquery.storage.v1.ThrottleState + */ +class ThrottleState extends \Google\Protobuf\Internal\Message +{ + /** + * How much this connection is being throttled. Zero means no throttling, + * 100 means fully throttled. + * + * Generated from protobuf field int32 throttle_percent = 1; + */ + protected $throttle_percent = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $throttle_percent + * How much this connection is being throttled. Zero means no throttling, + * 100 means fully throttled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); + parent::__construct($data); + } + + /** + * How much this connection is being throttled. Zero means no throttling, + * 100 means fully throttled. + * + * Generated from protobuf field int32 throttle_percent = 1; + * @return int + */ + public function getThrottlePercent() + { + return $this->throttle_percent; + } + + /** + * How much this connection is being throttled. Zero means no throttling, + * 100 means fully throttled. + * + * Generated from protobuf field int32 throttle_percent = 1; + * @param int $var + * @return $this + */ + public function setThrottlePercent($var) + { + GPBUtil::checkInt32($var); + $this->throttle_percent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php new file mode 100644 index 000000000000..520d82efd76a --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php @@ -0,0 +1,341 @@ +google.cloud.bigquery.storage.v1.WriteStream + */ +class WriteStream extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the stream, in the form + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Immutable. Type of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = 0; + /** + * Output only. Create time of the stream. For the _default stream, this is + * the creation_time of the table. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Commit time of the stream. + * If a stream is of `COMMITTED` type, then it will have a commit_time same as + * `create_time`. If the stream is of `PENDING` type, empty commit_time + * means it is not committed. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $commit_time = null; + /** + * Output only. The schema of the destination table. It is only returned in + * `CreateWriteStream` response. Caller should generate data that's + * compatible with this schema to send in initial `AppendRowsRequest`. + * The table schema could go out of date during the life time of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $table_schema = null; + /** + * Immutable. Mode of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $write_mode = 0; + /** + * Output only. The geographic location where the stream's dataset resides. + * See https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $location = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of the stream, in the form + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * @type int $type + * Immutable. Type of the stream. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create time of the stream. For the _default stream, this is + * the creation_time of the table. + * @type \Google\Protobuf\Timestamp $commit_time + * Output only. Commit time of the stream. + * If a stream is of `COMMITTED` type, then it will have a commit_time same as + * `create_time`. If the stream is of `PENDING` type, empty commit_time + * means it is not committed. + * @type \Google\Cloud\BigQuery\Storage\V1\TableSchema $table_schema + * Output only. The schema of the destination table. It is only returned in + * `CreateWriteStream` response. Caller should generate data that's + * compatible with this schema to send in initial `AppendRowsRequest`. + * The table schema could go out of date during the life time of the stream. + * @type int $write_mode + * Immutable. Mode of the stream. + * @type string $location + * Output only. The geographic location where the stream's dataset resides. + * See https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the stream, in the form + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of the stream, in the form + * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Immutable. Type of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Immutable. Type of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\WriteStream\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. Create time of the stream. For the _default stream, this is + * the creation_time of the table. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. Create time of the stream. For the _default stream, this is + * the creation_time of the table. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Commit time of the stream. + * If a stream is of `COMMITTED` type, then it will have a commit_time same as + * `create_time`. If the stream is of `PENDING` type, empty commit_time + * means it is not committed. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitTime() + { + return $this->commit_time; + } + + public function hasCommitTime() + { + return isset($this->commit_time); + } + + public function clearCommitTime() + { + unset($this->commit_time); + } + + /** + * Output only. Commit time of the stream. + * If a stream is of `COMMITTED` type, then it will have a commit_time same as + * `create_time`. If the stream is of `PENDING` type, empty commit_time + * means it is not committed. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commit_time = $var; + + return $this; + } + + /** + * Output only. The schema of the destination table. It is only returned in + * `CreateWriteStream` response. Caller should generate data that's + * compatible with this schema to send in initial `AppendRowsRequest`. + * The table schema could go out of date during the life time of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\BigQuery\Storage\V1\TableSchema|null + */ + public function getTableSchema() + { + return $this->table_schema; + } + + public function hasTableSchema() + { + return isset($this->table_schema); + } + + public function clearTableSchema() + { + unset($this->table_schema); + } + + /** + * Output only. The schema of the destination table. It is only returned in + * `CreateWriteStream` response. Caller should generate data that's + * compatible with this schema to send in initial `AppendRowsRequest`. + * The table schema could go out of date during the life time of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\BigQuery\Storage\V1\TableSchema $var + * @return $this + */ + public function setTableSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableSchema::class); + $this->table_schema = $var; + + return $this; + } + + /** + * Immutable. Mode of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getWriteMode() + { + return $this->write_mode; + } + + /** + * Immutable. Mode of the stream. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setWriteMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\WriteStream\WriteMode::class); + $this->write_mode = $var; + + return $this; + } + + /** + * Output only. The geographic location where the stream's dataset resides. + * See https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLocation() + { + return $this->location; + } + + /** + * Output only. The geographic location where the stream's dataset resides. + * See https://cloud.google.com/bigquery/docs/locations for supported + * locations. + * + * Generated from protobuf field string location = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLocation($var) + { + GPBUtil::checkString($var, True); + $this->location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php new file mode 100644 index 000000000000..180141b213cb --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php @@ -0,0 +1,69 @@ +google.cloud.bigquery.storage.v1.WriteStream.Type + */ +class Type +{ + /** + * Unknown type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Data will commit automatically and appear as soon as the write is + * acknowledged. + * + * Generated from protobuf enum COMMITTED = 1; + */ + const COMMITTED = 1; + /** + * Data is invisible until the stream is committed. + * + * Generated from protobuf enum PENDING = 2; + */ + const PENDING = 2; + /** + * Data is only visible up to the offset to which it was flushed. + * + * Generated from protobuf enum BUFFERED = 3; + */ + const BUFFERED = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::COMMITTED => 'COMMITTED', + self::PENDING => 'PENDING', + self::BUFFERED => 'BUFFERED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php new file mode 100644 index 000000000000..2a3355379e36 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php @@ -0,0 +1,55 @@ +google.cloud.bigquery.storage.v1.WriteStream.WriteMode + */ +class WriteMode +{ + /** + * Unknown type. + * + * Generated from protobuf enum WRITE_MODE_UNSPECIFIED = 0; + */ + const WRITE_MODE_UNSPECIFIED = 0; + /** + * Insert new records into the table. + * It is the default value if customers do not specify it. + * + * Generated from protobuf enum INSERT = 1; + */ + const INSERT = 1; + + private static $valueToName = [ + self::WRITE_MODE_UNSPECIFIED => 'WRITE_MODE_UNSPECIFIED', + self::INSERT => 'INSERT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php new file mode 100644 index 000000000000..5d008746e9fe --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php @@ -0,0 +1,66 @@ +google.cloud.bigquery.storage.v1.WriteStreamView + */ +class WriteStreamView +{ + /** + * The default / unset value. + * + * Generated from protobuf enum WRITE_STREAM_VIEW_UNSPECIFIED = 0; + */ + const WRITE_STREAM_VIEW_UNSPECIFIED = 0; + /** + * The BASIC projection returns basic metadata about a write stream. The + * basic view does not include schema information. This is the default view + * returned by GetWriteStream. + * + * Generated from protobuf enum BASIC = 1; + */ + const BASIC = 1; + /** + * The FULL projection returns all available write stream metadata, including + * the schema. CreateWriteStream returns the full projection of write stream + * metadata. + * + * Generated from protobuf enum FULL = 2; + */ + const FULL = 2; + + private static $valueToName = [ + self::WRITE_STREAM_VIEW_UNSPECIFIED => 'WRITE_STREAM_VIEW_UNSPECIFIED', + self::BASIC => 'BASIC', + self::FULL => 'FULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php new file mode 100644 index 000000000000..a8efedea68f9 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php @@ -0,0 +1,92 @@ +setParent($formattedParent) + ->setReadSession($readSession); + + // Call the API and handle any network failures. + try { + /** @var ReadSession $response */ + $response = $bigQueryReadClient->createReadSession($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = BigQueryReadClient::projectName('[PROJECT]'); + + create_read_session_sample($formattedParent); +} +// [END bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php new file mode 100644 index 000000000000..234f4b4851f8 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php @@ -0,0 +1,87 @@ +setReadStream($formattedReadStream); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $bigQueryReadClient->readRows($request); + + /** @var ReadRowsResponse $element */ + foreach ($stream->readAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedReadStream = BigQueryReadClient::readStreamName( + '[PROJECT]', + '[LOCATION]', + '[SESSION]', + '[STREAM]' + ); + + read_rows_sample($formattedReadStream); +} +// [END bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php new file mode 100644 index 000000000000..952a9adda480 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SplitReadStreamResponse $response */ + $response = $bigQueryReadClient->splitReadStream($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BigQueryReadClient::readStreamName( + '[PROJECT]', + '[LOCATION]', + '[SESSION]', + '[STREAM]' + ); + + split_read_stream_sample($formattedName); +} +// [END bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php new file mode 100644 index 000000000000..42bdbfc9dfe5 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php @@ -0,0 +1,143 @@ +setWriteStream($formattedWriteStream); + + // Call the API and handle any network failures. + try { + /** @var BidiStream $stream */ + $stream = $bigQueryWriteClient->appendRows(); + $stream->writeAll([$request,]); + + /** @var AppendRowsResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedWriteStream = BigQueryWriteClient::writeStreamName( + '[PROJECT]', + '[DATASET]', + '[TABLE]', + '[STREAM]' + ); + + append_rows_sample($formattedWriteStream); +} +// [END bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php new file mode 100644 index 000000000000..4f7ed2110b86 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php @@ -0,0 +1,83 @@ +setParent($formattedParent) + ->setWriteStreams($writeStreams); + + // Call the API and handle any network failures. + try { + /** @var BatchCommitWriteStreamsResponse $response */ + $response = $bigQueryWriteClient->batchCommitWriteStreams($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = BigQueryWriteClient::tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + $writeStreamsElement = '[WRITE_STREAMS]'; + + batch_commit_write_streams_sample($formattedParent, $writeStreamsElement); +} +// [END bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php new file mode 100644 index 000000000000..8485c13171ca --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php @@ -0,0 +1,79 @@ +setParent($formattedParent) + ->setWriteStream($writeStream); + + // Call the API and handle any network failures. + try { + /** @var WriteStream $response */ + $response = $bigQueryWriteClient->createWriteStream($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = BigQueryWriteClient::tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + + create_write_stream_sample($formattedParent); +} +// [END bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php new file mode 100644 index 000000000000..54d32331246f --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var FinalizeWriteStreamResponse $response */ + $response = $bigQueryWriteClient->finalizeWriteStream($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BigQueryWriteClient::writeStreamName( + '[PROJECT]', + '[DATASET]', + '[TABLE]', + '[STREAM]' + ); + + finalize_write_stream_sample($formattedName); +} +// [END bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php new file mode 100644 index 000000000000..749dee2871b1 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php @@ -0,0 +1,83 @@ +setWriteStream($formattedWriteStream); + + // Call the API and handle any network failures. + try { + /** @var FlushRowsResponse $response */ + $response = $bigQueryWriteClient->flushRows($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedWriteStream = BigQueryWriteClient::writeStreamName( + '[PROJECT]', + '[DATASET]', + '[TABLE]', + '[STREAM]' + ); + + flush_rows_sample($formattedWriteStream); +} +// [END bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php new file mode 100644 index 000000000000..5533b0097fae --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var WriteStream $response */ + $response = $bigQueryWriteClient->getWriteStream($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = BigQueryWriteClient::writeStreamName( + '[PROJECT]', + '[DATASET]', + '[TABLE]', + '[STREAM]' + ); + + get_write_stream_sample($formattedName); +} +// [END bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php new file mode 100644 index 000000000000..91624fb2bc17 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php @@ -0,0 +1,409 @@ + createReadSessionAsync(CreateReadSessionRequest $request, array $optionalArgs = []) + * @method PromiseInterface splitReadStreamAsync(SplitReadStreamRequest $request, array $optionalArgs = []) + */ +final class BigQueryReadClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.bigquery.storage.v1.BigQueryRead'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'bigquerystorage.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'bigquerystorage.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + * + * @internal + */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigquery', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/big_query_read_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/big_query_read_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/big_query_read_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/big_query_read_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a read_session + * resource. + * + * @param string $project + * @param string $location + * @param string $session + * + * @return string The formatted read_session resource. + */ + public static function readSessionName(string $project, string $location, string $session): string + { + return self::getPathTemplate('readSession')->render([ + 'project' => $project, + 'location' => $location, + 'session' => $session, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a read_stream + * resource. + * + * @param string $project + * @param string $location + * @param string $session + * @param string $stream + * + * @return string The formatted read_stream resource. + */ + public static function readStreamName(string $project, string $location, string $session, string $stream): string + { + return self::getPathTemplate('readStream')->render([ + 'project' => $project, + 'location' => $location, + 'session' => $session, + 'stream' => $stream, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a table + * resource. + * + * @param string $project + * @param string $dataset + * @param string $table + * + * @return string The formatted table resource. + */ + public static function tableName(string $project, string $dataset, string $table): string + { + return self::getPathTemplate('table')->render([ + 'project' => $project, + 'dataset' => $dataset, + 'table' => $table, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - project: projects/{project} + * - readSession: projects/{project}/locations/{location}/sessions/{session} + * - readStream: projects/{project}/locations/{location}/sessions/{session}/streams/{stream} + * - table: projects/{project}/datasets/{dataset}/tables/{table} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'bigquerystorage.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\BigQuery\Storage\V1\BigQueryReadClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new BigQueryReadClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new read session. A read session divides the contents of a + * BigQuery table into one or more streams, which can then be used to read + * data from the table. The read session also specifies properties of the + * data to be read, such as a list of columns or a push-down filter describing + * the rows to be returned. + * + * A particular row can be read by at most one stream. When the caller has + * reached the end of each stream in the session, then all the data in the + * table has been read. + * + * Data is assigned to each stream such that roughly the same number of + * rows can be read from each stream. Because the server-side unit for + * assigning data is collections of rows, the API does not guarantee that + * each stream will return the same number or rows. Additionally, the + * limits are enforced based on the number of pre-filtered rows, so some + * filters can lead to lopsided assignments. + * + * Read sessions automatically expire 6 hours after they are created and do + * not require manual clean-up by the caller. + * + * The async variant is {@see BigQueryReadClient::createReadSessionAsync()} . + * + * @example samples/V1/BigQueryReadClient/create_read_session.php + * + * @param CreateReadSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ReadSession + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReadSession(CreateReadSessionRequest $request, array $callOptions = []): ReadSession + { + return $this->startApiCall('CreateReadSession', $request, $callOptions)->wait(); + } + + /** + * Reads rows from the stream in the format prescribed by the ReadSession. + * Each response contains one or more table rows, up to a maximum of 128 MB + * per response; read requests which attempt to read individual rows larger + * than 128 MB will fail. + * + * Each request also returns a set of stream statistics reflecting the current + * state of the stream. + * + * @example samples/V1/BigQueryReadClient/read_rows.php + * + * @param ReadRowsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function readRows(ReadRowsRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('ReadRows', $request, $callOptions); + } + + /** + * Splits a given `ReadStream` into two `ReadStream` objects. These + * `ReadStream` objects are referred to as the primary and the residual + * streams of the split. The original `ReadStream` can still be read from in + * the same manner as before. Both of the returned `ReadStream` objects can + * also be read from, and the rows returned by both child streams will be + * the same as the rows read from the original stream. + * + * Moreover, the two child streams will be allocated back-to-back in the + * original `ReadStream`. Concretely, it is guaranteed that for streams + * original, primary, and residual, that original[0-j] = primary[0-j] and + * original[j-n] = residual[0-m] once the streams have been read to + * completion. + * + * The async variant is {@see BigQueryReadClient::splitReadStreamAsync()} . + * + * @example samples/V1/BigQueryReadClient/split_read_stream.php + * + * @param SplitReadStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SplitReadStreamResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function splitReadStream(SplitReadStreamRequest $request, array $callOptions = []): SplitReadStreamResponse + { + return $this->startApiCall('SplitReadStream', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php new file mode 100644 index 000000000000..4bd2b8fbe07f --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php @@ -0,0 +1,474 @@ + batchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest $request, array $optionalArgs = []) + * @method PromiseInterface createWriteStreamAsync(CreateWriteStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface finalizeWriteStreamAsync(FinalizeWriteStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface flushRowsAsync(FlushRowsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getWriteStreamAsync(GetWriteStreamRequest $request, array $optionalArgs = []) + */ +final class BigQueryWriteClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.bigquery.storage.v1.BigQueryWrite'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'bigquerystorage.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'bigquerystorage.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** + * The default scopes required by the service. + * + * @internal + */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/bigquery', + 'https://www.googleapis.com/auth/bigquery.insertdata', + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/big_query_write_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/big_query_write_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/big_query_write_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/big_query_write_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a table + * resource. + * + * @param string $project + * @param string $dataset + * @param string $table + * + * @return string The formatted table resource. + */ + public static function tableName(string $project, string $dataset, string $table): string + { + return self::getPathTemplate('table')->render([ + 'project' => $project, + 'dataset' => $dataset, + 'table' => $table, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a write_stream + * resource. + * + * @param string $project + * @param string $dataset + * @param string $table + * @param string $stream + * + * @return string The formatted write_stream resource. + */ + public static function writeStreamName(string $project, string $dataset, string $table, string $stream): string + { + return self::getPathTemplate('writeStream')->render([ + 'project' => $project, + 'dataset' => $dataset, + 'table' => $table, + 'stream' => $stream, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - table: projects/{project}/datasets/{dataset}/tables/{table} + * - writeStream: projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'bigquerystorage.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\BigQuery\Storage\V1\BigQueryWriteClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new BigQueryWriteClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Appends data to the given stream. + * + * If `offset` is specified, the `offset` is checked against the end of + * stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an + * attempt is made to append to an offset beyond the current end of the stream + * or `ALREADY_EXISTS` if user provides an `offset` that has already been + * written to. User can retry with adjusted offset within the same RPC + * connection. If `offset` is not specified, append happens at the end of the + * stream. + * + * The response contains an optional offset at which the append + * happened. No offset information will be returned for appends to a + * default stream. + * + * Responses are received in the same order in which requests are sent. + * There will be one response for each successful inserted request. Responses + * may optionally embed error information if the originating AppendRequest was + * not successfully processed. + * + * The specifics of when successfully appended data is made visible to the + * table are governed by the type of stream: + * + * * For COMMITTED streams (which includes the default stream), data is + * visible immediately upon successful append. + * + * * For BUFFERED streams, data is made visible via a subsequent `FlushRows` + * rpc which advances a cursor to a newer offset in the stream. + * + * * For PENDING streams, data is not made visible until the stream itself is + * finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly + * committed via the `BatchCommitWriteStreams` rpc. + * + * @example samples/V1/BigQueryWriteClient/append_rows.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function appendRows(array $callOptions = []): BidiStream + { + return $this->startApiCall('AppendRows', null, $callOptions); + } + + /** + * Atomically commits a group of `PENDING` streams that belong to the same + * `parent` table. + * + * Streams must be finalized before commit and cannot be committed multiple + * times. Once a stream is committed, data in the stream becomes available + * for read operations. + * + * The async variant is {@see BigQueryWriteClient::batchCommitWriteStreamsAsync()} + * . + * + * @example samples/V1/BigQueryWriteClient/batch_commit_write_streams.php + * + * @param BatchCommitWriteStreamsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchCommitWriteStreamsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchCommitWriteStreams(BatchCommitWriteStreamsRequest $request, array $callOptions = []): BatchCommitWriteStreamsResponse + { + return $this->startApiCall('BatchCommitWriteStreams', $request, $callOptions)->wait(); + } + + /** + * Creates a write stream to the given table. + * Additionally, every table has a special stream named '_default' + * to which data can be written. This stream doesn't need to be created using + * CreateWriteStream. It is a stream that can be used simultaneously by any + * number of clients. Data written to this stream is considered committed as + * soon as an acknowledgement is received. + * + * The async variant is {@see BigQueryWriteClient::createWriteStreamAsync()} . + * + * @example samples/V1/BigQueryWriteClient/create_write_stream.php + * + * @param CreateWriteStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return WriteStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function createWriteStream(CreateWriteStreamRequest $request, array $callOptions = []): WriteStream + { + return $this->startApiCall('CreateWriteStream', $request, $callOptions)->wait(); + } + + /** + * Finalize a write stream so that no new data can be appended to the + * stream. Finalize is not supported on the '_default' stream. + * + * The async variant is {@see BigQueryWriteClient::finalizeWriteStreamAsync()} . + * + * @example samples/V1/BigQueryWriteClient/finalize_write_stream.php + * + * @param FinalizeWriteStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FinalizeWriteStreamResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function finalizeWriteStream(FinalizeWriteStreamRequest $request, array $callOptions = []): FinalizeWriteStreamResponse + { + return $this->startApiCall('FinalizeWriteStream', $request, $callOptions)->wait(); + } + + /** + * Flushes rows to a BUFFERED stream. + * + * If users are appending rows to BUFFERED stream, flush operation is + * required in order for the rows to become available for reading. A + * Flush operation flushes up to any previously flushed offset in a BUFFERED + * stream, to the offset specified in the request. + * + * Flush is not supported on the _default stream, since it is not BUFFERED. + * + * The async variant is {@see BigQueryWriteClient::flushRowsAsync()} . + * + * @example samples/V1/BigQueryWriteClient/flush_rows.php + * + * @param FlushRowsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return FlushRowsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function flushRows(FlushRowsRequest $request, array $callOptions = []): FlushRowsResponse + { + return $this->startApiCall('FlushRows', $request, $callOptions)->wait(); + } + + /** + * Gets information about a write stream. + * + * The async variant is {@see BigQueryWriteClient::getWriteStreamAsync()} . + * + * @example samples/V1/BigQueryWriteClient/get_write_stream.php + * + * @param GetWriteStreamRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return WriteStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function getWriteStream(GetWriteStreamRequest $request, array $callOptions = []): WriteStream + { + return $this->startApiCall('GetWriteStream', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..a8328787a007 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json @@ -0,0 +1,72 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.bigquery.storage.v1", + "libraryPackage": "Google\\Cloud\\BigQuery\\Storage\\V1", + "services": { + "BigQueryRead": { + "clients": { + "grpc": { + "libraryClient": "BigQueryReadClient", + "rpcs": { + "CreateReadSession": { + "methods": [ + "createReadSession" + ] + }, + "ReadRows": { + "methods": [ + "readRows" + ] + }, + "SplitReadStream": { + "methods": [ + "splitReadStream" + ] + } + } + } + } + }, + "BigQueryWrite": { + "clients": { + "grpc": { + "libraryClient": "BigQueryWriteClient", + "rpcs": { + "AppendRows": { + "methods": [ + "appendRows" + ] + }, + "BatchCommitWriteStreams": { + "methods": [ + "batchCommitWriteStreams" + ] + }, + "CreateWriteStream": { + "methods": [ + "createWriteStream" + ] + }, + "FinalizeWriteStream": { + "methods": [ + "finalizeWriteStream" + ] + }, + "FlushRows": { + "methods": [ + "flushRows" + ] + }, + "GetWriteStream": { + "methods": [ + "getWriteStream" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json new file mode 100644 index 000000000000..780af364091c --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json @@ -0,0 +1,73 @@ +{ + "interfaces": { + "google.cloud.bigquery.storage.v1.BigQueryRead": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ], + "retry_policy_3_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 86400000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 86400000, + "total_timeout_millis": 86400000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateReadSession": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ReadRows": { + "timeout_millis": 86400000 + }, + "SplitReadStream": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + } + } + } + } +} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php new file mode 100644 index 000000000000..01c38330b540 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php @@ -0,0 +1,74 @@ + [ + 'google.cloud.bigquery.storage.v1.BigQueryRead' => [ + 'CreateReadSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\ReadSession', + 'headerParams' => [ + [ + 'keyName' => 'read_session.table', + 'fieldAccessors' => [ + 'getReadSession', + 'getTable', + ], + ], + ], + ], + 'ReadRows' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\ReadRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'read_stream', + 'fieldAccessors' => [ + 'getReadStream', + ], + ], + ], + ], + 'SplitReadStream' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\SplitReadStreamResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'project' => 'projects/{project}', + 'readSession' => 'projects/{project}/locations/{location}/sessions/{session}', + 'readStream' => 'projects/{project}/locations/{location}/sessions/{session}/streams/{stream}', + 'table' => 'projects/{project}/datasets/{dataset}/tables/{table}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php new file mode 100644 index 000000000000..6e2ce40e48a1 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php @@ -0,0 +1,63 @@ + [ + 'google.cloud.bigquery.storage.v1.BigQueryRead' => [ + 'CreateReadSession' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{read_session.table=projects/*/datasets/*/tables/*}', + 'body' => '*', + 'placeholders' => [ + 'read_session.table' => [ + 'getters' => [ + 'getReadSession', + 'getTable', + ], + ], + ], + ], + 'ReadRows' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}', + 'placeholders' => [ + 'read_stream' => [ + 'getters' => [ + 'getReadStream', + ], + ], + ], + ], + 'SplitReadStream' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessions/*/streams/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json new file mode 100644 index 000000000000..c24690087513 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json @@ -0,0 +1,90 @@ +{ + "interfaces": { + "google.cloud.bigquery.storage.v1.BigQueryWrite": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_4_codes": [ + "UNAVAILABLE" + ], + "retry_policy_5_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE", + "RESOURCE_EXHAUSTED" + ], + "retry_policy_6_codes": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE", + "RESOURCE_EXHAUSTED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_4_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 86400000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 86400000, + "total_timeout_millis": 86400000 + }, + "retry_policy_5_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + }, + "retry_policy_6_params": { + "initial_retry_delay_millis": 10000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 120000, + "initial_rpc_timeout_millis": 1200000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 1200000, + "total_timeout_millis": 1200000 + } + }, + "methods": { + "AppendRows": { + "timeout_millis": 86400000 + }, + "BatchCommitWriteStreams": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "CreateWriteStream": { + "timeout_millis": 1200000, + "retry_codes_name": "retry_policy_6_codes", + "retry_params_name": "retry_policy_6_params" + }, + "FinalizeWriteStream": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "FlushRows": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "GetWriteStream": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + } + } + } + } +} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php new file mode 100644 index 000000000000..4eae283ee5d5 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php @@ -0,0 +1,107 @@ + [ + 'google.cloud.bigquery.storage.v1.BigQueryWrite' => [ + 'AppendRows' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'write_stream', + 'fieldAccessors' => [ + 'getWriteStream', + ], + ], + ], + ], + 'BatchCommitWriteStreams' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\BatchCommitWriteStreamsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateWriteStream' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\WriteStream', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'FinalizeWriteStream' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\FinalizeWriteStreamResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'FlushRows' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\FlushRowsResponse', + 'headerParams' => [ + [ + 'keyName' => 'write_stream', + 'fieldAccessors' => [ + 'getWriteStream', + ], + ], + ], + ], + 'GetWriteStream' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\WriteStream', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'table' => 'projects/{project}/datasets/{dataset}/tables/{table}', + 'writeStream' => 'projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}', + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php new file mode 100644 index 000000000000..6ca0a3005f58 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php @@ -0,0 +1,90 @@ + [ + 'google.cloud.bigquery.storage.v1.BigQueryWrite' => [ + 'BatchCommitWriteStreams' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/datasets/*/tables/*}', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'write_streams', + ], + ], + 'CreateWriteStream' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/datasets/*/tables/*}', + 'body' => 'write_stream', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'FinalizeWriteStream' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/datasets/*/tables/*/streams/*}', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'FlushRows' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}', + 'body' => '*', + 'placeholders' => [ + 'write_stream' => [ + 'getters' => [ + 'getWriteStream', + ], + ], + ], + ], + 'GetWriteStream' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/datasets/*/tables/*/streams/*}', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php b/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php new file mode 100644 index 000000000000..80aa6257e7d4 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php @@ -0,0 +1,344 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BigQueryReadClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BigQueryReadClient($options); + } + + /** @test */ + public function createReadSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $table = 'table110115790'; + $estimatedTotalBytesScanned = 452788190; + $estimatedTotalPhysicalFileSize = 938325754; + $estimatedRowCount = 1745583577; + $traceId = 'traceId1270300245'; + $expectedResponse = new ReadSession(); + $expectedResponse->setName($name); + $expectedResponse->setTable($table); + $expectedResponse->setEstimatedTotalBytesScanned($estimatedTotalBytesScanned); + $expectedResponse->setEstimatedTotalPhysicalFileSize($estimatedTotalPhysicalFileSize); + $expectedResponse->setEstimatedRowCount($estimatedRowCount); + $expectedResponse->setTraceId($traceId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $readSession = new ReadSession(); + $request = (new CreateReadSessionRequest()) + ->setParent($formattedParent) + ->setReadSession($readSession); + $response = $gapicClient->createReadSession($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryRead/CreateReadSession', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReadSession(); + $this->assertProtobufEquals($readSession, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReadSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $readSession = new ReadSession(); + $request = (new CreateReadSessionRequest()) + ->setParent($formattedParent) + ->setReadSession($readSession); + try { + $gapicClient->createReadSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function readRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $rowCount = 1340416618; + $uncompressedByteSize = 2094376525; + $totalEstimatedRowCount = 1623220052; + $expectedResponse = new ReadRowsResponse(); + $expectedResponse->setRowCount($rowCount); + $expectedResponse->setUncompressedByteSize($uncompressedByteSize); + $expectedResponse->setTotalEstimatedRowCount($totalEstimatedRowCount); + $transport->addResponse($expectedResponse); + $rowCount2 = 349815907; + $uncompressedByteSize2 = 1643824294; + $totalEstimatedRowCount2 = 841338529; + $expectedResponse2 = new ReadRowsResponse(); + $expectedResponse2->setRowCount($rowCount2); + $expectedResponse2->setUncompressedByteSize($uncompressedByteSize2); + $expectedResponse2->setTotalEstimatedRowCount($totalEstimatedRowCount2); + $transport->addResponse($expectedResponse2); + $rowCount3 = 349815906; + $uncompressedByteSize3 = 1643824295; + $totalEstimatedRowCount3 = 841338528; + $expectedResponse3 = new ReadRowsResponse(); + $expectedResponse3->setRowCount($rowCount3); + $expectedResponse3->setUncompressedByteSize($uncompressedByteSize3); + $expectedResponse3->setTotalEstimatedRowCount($totalEstimatedRowCount3); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedReadStream = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); + $request = (new ReadRowsRequest()) + ->setReadStream($formattedReadStream); + $serverStream = $gapicClient->readRows($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryRead/ReadRows', $actualFuncCall); + $actualValue = $actualRequestObject->getReadStream(); + $this->assertProtobufEquals($formattedReadStream, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function readRowsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $formattedReadStream = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); + $request = (new ReadRowsRequest()) + ->setReadStream($formattedReadStream); + $serverStream = $gapicClient->readRows($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function splitReadStreamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SplitReadStreamResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); + $request = (new SplitReadStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->splitReadStream($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryRead/SplitReadStream', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function splitReadStreamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); + $request = (new SplitReadStreamRequest()) + ->setName($formattedName); + try { + $gapicClient->splitReadStream($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReadSessionAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $table = 'table110115790'; + $estimatedTotalBytesScanned = 452788190; + $estimatedTotalPhysicalFileSize = 938325754; + $estimatedRowCount = 1745583577; + $traceId = 'traceId1270300245'; + $expectedResponse = new ReadSession(); + $expectedResponse->setName($name); + $expectedResponse->setTable($table); + $expectedResponse->setEstimatedTotalBytesScanned($estimatedTotalBytesScanned); + $expectedResponse->setEstimatedTotalPhysicalFileSize($estimatedTotalPhysicalFileSize); + $expectedResponse->setEstimatedRowCount($estimatedRowCount); + $expectedResponse->setTraceId($traceId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $readSession = new ReadSession(); + $request = (new CreateReadSessionRequest()) + ->setParent($formattedParent) + ->setReadSession($readSession); + $response = $gapicClient->createReadSessionAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryRead/CreateReadSession', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReadSession(); + $this->assertProtobufEquals($readSession, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php b/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php new file mode 100644 index 000000000000..749bd3347b29 --- /dev/null +++ b/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php @@ -0,0 +1,537 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return BigQueryWriteClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new BigQueryWriteClient($options); + } + + /** @test */ + public function appendRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $writeStream = 'writeStream-1431753760'; + $expectedResponse = new AppendRowsResponse(); + $expectedResponse->setWriteStream($writeStream); + $transport->addResponse($expectedResponse); + $writeStream2 = 'writeStream2-1525825645'; + $expectedResponse2 = new AppendRowsResponse(); + $expectedResponse2->setWriteStream($writeStream2); + $transport->addResponse($expectedResponse2); + $writeStream3 = 'writeStream3-1525825644'; + $expectedResponse3 = new AppendRowsResponse(); + $expectedResponse3->setWriteStream($writeStream3); + $transport->addResponse($expectedResponse3); + // Mock request + $formattedWriteStream4 = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = new AppendRowsRequest(); + $request->setWriteStream($formattedWriteStream4); + $formattedWriteStream5 = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request2 = new AppendRowsRequest(); + $request2->setWriteStream($formattedWriteStream5); + $formattedWriteStream6 = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request3 = new AppendRowsRequest(); + $request3->setWriteStream($formattedWriteStream6); + $bidi = $gapicClient->appendRows(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/AppendRows', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function appendRowsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->appendRows(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCommitWriteStreamsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCommitWriteStreamsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + $writeStreams = []; + $request = (new BatchCommitWriteStreamsRequest()) + ->setParent($formattedParent) + ->setWriteStreams($writeStreams); + $response = $gapicClient->batchCommitWriteStreams($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/BatchCommitWriteStreams', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getWriteStreams(); + $this->assertProtobufEquals($writeStreams, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCommitWriteStreamsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + $writeStreams = []; + $request = (new BatchCommitWriteStreamsRequest()) + ->setParent($formattedParent) + ->setWriteStreams($writeStreams); + try { + $gapicClient->batchCommitWriteStreams($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createWriteStreamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $location = 'location1901043637'; + $expectedResponse = new WriteStream(); + $expectedResponse->setName($name); + $expectedResponse->setLocation($location); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + $writeStream = new WriteStream(); + $request = (new CreateWriteStreamRequest()) + ->setParent($formattedParent) + ->setWriteStream($writeStream); + $response = $gapicClient->createWriteStream($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/CreateWriteStream', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getWriteStream(); + $this->assertProtobufEquals($writeStream, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createWriteStreamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + $writeStream = new WriteStream(); + $request = (new CreateWriteStreamRequest()) + ->setParent($formattedParent) + ->setWriteStream($writeStream); + try { + $gapicClient->createWriteStream($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function finalizeWriteStreamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $rowCount = 1340416618; + $expectedResponse = new FinalizeWriteStreamResponse(); + $expectedResponse->setRowCount($rowCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = (new FinalizeWriteStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->finalizeWriteStream($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/FinalizeWriteStream', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function finalizeWriteStreamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = (new FinalizeWriteStreamRequest()) + ->setName($formattedName); + try { + $gapicClient->finalizeWriteStream($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function flushRowsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $offset2 = 755984506; + $expectedResponse = new FlushRowsResponse(); + $expectedResponse->setOffset($offset2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedWriteStream = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = (new FlushRowsRequest()) + ->setWriteStream($formattedWriteStream); + $response = $gapicClient->flushRows($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/FlushRows', $actualFuncCall); + $actualValue = $actualRequestObject->getWriteStream(); + $this->assertProtobufEquals($formattedWriteStream, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function flushRowsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedWriteStream = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = (new FlushRowsRequest()) + ->setWriteStream($formattedWriteStream); + try { + $gapicClient->flushRows($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getWriteStreamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $location = 'location1901043637'; + $expectedResponse = new WriteStream(); + $expectedResponse->setName($name2); + $expectedResponse->setLocation($location); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = (new GetWriteStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->getWriteStream($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/GetWriteStream', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getWriteStreamExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); + $request = (new GetWriteStreamRequest()) + ->setName($formattedName); + try { + $gapicClient->getWriteStream($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchCommitWriteStreamsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchCommitWriteStreamsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); + $writeStreams = []; + $request = (new BatchCommitWriteStreamsRequest()) + ->setParent($formattedParent) + ->setWriteStreams($writeStreams); + $response = $gapicClient->batchCommitWriteStreamsAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/BatchCommitWriteStreams', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getWriteStreams(); + $this->assertProtobufEquals($writeStreams, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From ba06c026abce8bdda99a998aa5f5c0fe481ec5f3 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 14 Aug 2026 00:04:10 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- BigQueryStorage/metadata/V1/Storage.php | 2 +- BigQueryStorage/src/V1/AppendRowsRequest.php | 46 +- .../src}/V1/ClientStats.php | 0 .../src}/V1/ClientStats/RequestStats.php | 0 .../src}/V1/ClientStats/WindowStats.php | 0 BigQueryStorage/src/V1/ReadRowsRequest.php | 45 ++ BigQueryStorage/src/V1/ReadRowsResponse.php | 52 ++ .../Unit/V1/Client/BigQueryReadClientTest.php | 6 + .../Cloud/Bigquery/Storage/V1/Annotations.php | 24 - .../Cloud/Bigquery/Storage/V1/Arrow.php | 24 - .../Google/Cloud/Bigquery/Storage/V1/Avro.php | 24 - .../Cloud/Bigquery/Storage/V1/Protobuf.php | 24 - .../Cloud/Bigquery/Storage/V1/Storage.php | 36 - .../Cloud/Bigquery/Storage/V1/Stream.php | 30 - .../Cloud/Bigquery/Storage/V1/Table.php | 26 - .../BigQuery/Storage/V1/AppendRowsRequest.php | 588 ---------------- .../V1/AppendRowsRequest/ArrowData.php | 121 ---- .../MissingValueInterpretation.php | 65 -- .../V1/AppendRowsRequest/ProtoData.php | 150 ----- .../Storage/V1/AppendRowsResponse.php | 279 -------- .../V1/AppendRowsResponse/AppendResult.php | 110 --- .../BigQuery/Storage/V1/ArrowRecordBatch.php | 112 ---- .../Cloud/BigQuery/Storage/V1/ArrowSchema.php | 71 -- .../Storage/V1/ArrowSerializationOptions.php | 109 --- .../CompressionCodec.php | 61 -- .../PicosTimestampPrecision.php | 74 -- .../Cloud/BigQuery/Storage/V1/AvroRows.php | 112 ---- .../Cloud/BigQuery/Storage/V1/AvroSchema.php | 71 -- .../Storage/V1/AvroSerializationOptions.php | 133 ---- .../PicosTimestampPrecision.php | 74 -- .../V1/BatchCommitWriteStreamsRequest.php | 120 ---- .../V1/BatchCommitWriteStreamsResponse.php | 135 ---- .../Storage/V1/CreateReadSessionRequest.php | 267 -------- .../Storage/V1/CreateWriteStreamRequest.php | 132 ---- .../Cloud/BigQuery/Storage/V1/DataFormat.php | 63 -- .../Storage/V1/FinalizeWriteStreamRequest.php | 86 --- .../V1/FinalizeWriteStreamResponse.php | 67 -- .../BigQuery/Storage/V1/FlushRowsRequest.php | 158 ----- .../BigQuery/Storage/V1/FlushRowsResponse.php | 67 -- .../Storage/V1/GetWriteStreamRequest.php | 124 ---- .../Cloud/BigQuery/Storage/V1/ProtoRows.php | 73 -- .../Cloud/BigQuery/Storage/V1/ProtoSchema.php | 105 --- .../BigQuery/Storage/V1/ReadRowsRequest.php | 172 ----- .../BigQuery/Storage/V1/ReadRowsResponse.php | 458 ------------- .../Cloud/BigQuery/Storage/V1/ReadSession.php | 604 ----------------- .../Storage/V1/ReadSession/TableModifiers.php | 77 --- .../V1/ReadSession/TableReadOptions.php | 468 ------------- .../ResponseCompressionCodec.php | 60 -- .../Cloud/BigQuery/Storage/V1/ReadStream.php | 73 -- .../Cloud/BigQuery/Storage/V1/RowError.php | 135 ---- .../Storage/V1/RowError/RowErrorCode.php | 54 -- .../Storage/V1/SplitReadStreamRequest.php | 125 ---- .../Storage/V1/SplitReadStreamResponse.php | 133 ---- .../BigQuery/Storage/V1/StorageError.php | 138 ---- .../V1/StorageError/StorageErrorCode.php | 151 ----- .../Cloud/BigQuery/Storage/V1/StreamStats.php | 77 --- .../Storage/V1/StreamStats/Progress.php | 139 ---- .../BigQuery/Storage/V1/TableFieldSchema.php | 630 ------------------ .../V1/TableFieldSchema/FieldElementType.php | 67 -- .../Storage/V1/TableFieldSchema/Mode.php | 60 -- .../Storage/V1/TableFieldSchema/Type.php | 157 ----- .../Cloud/BigQuery/Storage/V1/TableSchema.php | 69 -- .../BigQuery/Storage/V1/ThrottleState.php | 71 -- .../Cloud/BigQuery/Storage/V1/WriteStream.php | 341 ---------- .../BigQuery/Storage/V1/WriteStream/Type.php | 69 -- .../Storage/V1/WriteStream/WriteMode.php | 55 -- .../BigQuery/Storage/V1/WriteStreamView.php | 66 -- .../create_read_session.php | 92 --- .../V1/BigQueryReadClient/read_rows.php | 87 --- .../BigQueryReadClient/split_read_stream.php | 87 --- .../V1/BigQueryWriteClient/append_rows.php | 143 ---- .../batch_commit_write_streams.php | 83 --- .../create_write_stream.php | 79 --- .../finalize_write_stream.php | 78 --- .../V1/BigQueryWriteClient/flush_rows.php | 83 --- .../BigQueryWriteClient/get_write_stream.php | 77 --- .../v1/src/V1/Client/BigQueryReadClient.php | 409 ------------ .../v1/src/V1/Client/BigQueryWriteClient.php | 474 ------------- .../v1/src/V1/gapic_metadata.json | 72 -- .../big_query_read_client_config.json | 73 -- .../big_query_read_descriptor_config.php | 74 -- .../big_query_read_rest_client_config.php | 63 -- .../big_query_write_client_config.json | 90 --- .../big_query_write_descriptor_config.php | 107 --- .../big_query_write_rest_client_config.php | 90 --- .../Unit/V1/Client/BigQueryReadClientTest.php | 344 ---------- .../V1/Client/BigQueryWriteClientTest.php | 537 --------------- 87 files changed, 149 insertions(+), 11308 deletions(-) rename {owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage => BigQueryStorage/src}/V1/ClientStats.php (100%) rename {owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage => BigQueryStorage/src}/V1/ClientStats/RequestStats.php (100%) rename {owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage => BigQueryStorage/src}/V1/ClientStats/WindowStats.php (100%) delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Avro.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Stream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/PicosTimestampPrecision.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions/PicosTimestampPrecision.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php delete mode 100644 owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php diff --git a/BigQueryStorage/metadata/V1/Storage.php b/BigQueryStorage/metadata/V1/Storage.php index 53329d9258c3..b4a2d096c920 100644 --- a/BigQueryStorage/metadata/V1/Storage.php +++ b/BigQueryStorage/metadata/V1/Storage.php @@ -27,7 +27,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\Wrappers::initOnce(); \GPBMetadata\Google\Rpc\Status::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xA2;\x0A.google/cloud/bigquery/storage/v1/storage.proto\x12 google.cloud.bigquery.storage.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/bigquery/storage/v1/arrow.proto\x1A+google/cloud/bigquery/storage/v1/avro.proto\x1A/google/cloud/bigquery/storage/v1/protobuf.proto\x1A-google/cloud/bigquery/storage/v1/stream.proto\x1A,google/cloud/bigquery/storage/v1/table.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/protobuf/wrappers.proto\x1A\x17google/rpc/status.proto\"\xE7\x01\x0A\x18CreateReadSessionRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x12H\x0A\x0Cread_session\x18\x02 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ReadSessionB\x03\xE0A\x02\x12\x18\x0A\x10max_stream_count\x18\x03 \x01(\x05\x12\"\x0A\x1Apreferred_min_stream_count\x18\x04 \x01(\x05\"i\x0A\x0FReadRowsRequest\x12F\x0A\x0Bread_stream\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)bigquerystorage.googleapis.com/ReadStream\x12\x0E\x0A\x06offset\x18\x02 \x01(\x03\")\x0A\x0DThrottleState\x12\x18\x0A\x10throttle_percent\x18\x01 \x01(\x05\"\x97\x01\x0A\x0BStreamStats\x12H\x0A\x08progress\x18\x02 \x01(\x0B26.google.cloud.bigquery.storage.v1.StreamStats.Progress\x1A>\x0A\x08Progress\x12\x19\x0A\x11at_response_start\x18\x01 \x01(\x01\x12\x17\x0A\x0Fat_response_end\x18\x02 \x01(\x01\"\xAC\x04\x0A\x10ReadRowsResponse\x12?\x0A\x09avro_rows\x18\x03 \x01(\x0B2*.google.cloud.bigquery.storage.v1.AvroRowsH\x00\x12P\x0A\x12arrow_record_batch\x18\x04 \x01(\x0B22.google.cloud.bigquery.storage.v1.ArrowRecordBatchH\x00\x12\x11\x0A\x09row_count\x18\x06 \x01(\x03\x12<\x0A\x05stats\x18\x02 \x01(\x0B2-.google.cloud.bigquery.storage.v1.StreamStats\x12G\x0A\x0Ethrottle_state\x18\x05 \x01(\x0B2/.google.cloud.bigquery.storage.v1.ThrottleState\x12H\x0A\x0Bavro_schema\x18\x07 \x01(\x0B2,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xE0A\x03H\x01\x12J\x0A\x0Carrow_schema\x18\x08 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xE0A\x03H\x01\x12(\x0A\x16uncompressed_byte_size\x18\x09 \x01(\x03B\x03\xE0A\x01H\x02\x88\x01\x01B\x06\x0A\x04rowsB\x08\x0A\x06schemaB\x19\x0A\x17_uncompressed_byte_size\"k\x0A\x16SplitReadStreamRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)bigquerystorage.googleapis.com/ReadStream\x12\x10\x0A\x08fraction\x18\x02 \x01(\x01\"\xA7\x01\x0A\x17SplitReadStreamResponse\x12D\x0A\x0Eprimary_stream\x18\x01 \x01(\x0B2,.google.cloud.bigquery.storage.v1.ReadStream\x12F\x0A\x10remainder_stream\x18\x02 \x01(\x0B2,.google.cloud.bigquery.storage.v1.ReadStream\"\x9B\x01\x0A\x18CreateWriteStreamRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dbigquery.googleapis.com/Table\x12H\x0A\x0Cwrite_stream\x18\x02 \x01(\x0B2-.google.cloud.bigquery.storage.v1.WriteStreamB\x03\xE0A\x02\"\xF8\x08\x0A\x11AppendRowsRequest\x12H\x0A\x0Cwrite_stream\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\x12+\x0A\x06offset\x18\x02 \x01(\x0B2\x1B.google.protobuf.Int64Value\x12S\x0A\x0Aproto_rows\x18\x04 \x01(\x0B2=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoDataH\x00\x12S\x0A\x0Aarrow_rows\x18\x05 \x01(\x0B2=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataH\x00\x12\x10\x0A\x08trace_id\x18\x06 \x01(\x09\x12{\x0A\x1Dmissing_value_interpretations\x18\x07 \x03(\x0B2T.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationsEntry\x12\x81\x01\x0A\$default_missing_value_interpretation\x18\x08 \x01(\x0E2N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationB\x03\xE0A\x01\x1A\x93\x01\x0A\x09ArrowData\x12D\x0A\x0Dwriter_schema\x18\x01 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ArrowSchema\x12@\x0A\x04rows\x18\x02 \x01(\x0B22.google.cloud.bigquery.storage.v1.ArrowRecordBatch\x1A\x8C\x01\x0A\x09ProtoData\x12D\x0A\x0Dwriter_schema\x18\x01 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ProtoSchema\x129\x0A\x04rows\x18\x02 \x01(\x0B2+.google.cloud.bigquery.storage.v1.ProtoRows\x1A\x92\x01\x0A MissingValueInterpretationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12]\x0A\x05value\x18\x02 \x01(\x0E2N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation:\x028\x01\"m\x0A\x1AMissingValueInterpretation\x12,\x0A(MISSING_VALUE_INTERPRETATION_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ANULL_VALUE\x10\x01\x12\x11\x0A\x0DDEFAULT_VALUE\x10\x02B\x06\x0A\x04rows\"\xFB\x02\x0A\x12AppendRowsResponse\x12Z\x0A\x0Dappend_result\x18\x01 \x01(\x0B2A.google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResultH\x00\x12#\x0A\x05error\x18\x02 \x01(\x0B2\x12.google.rpc.StatusH\x00\x12E\x0A\x0Eupdated_schema\x18\x03 \x01(\x0B2-.google.cloud.bigquery.storage.v1.TableSchema\x12>\x0A\x0Arow_errors\x18\x04 \x03(\x0B2*.google.cloud.bigquery.storage.v1.RowError\x12\x14\x0A\x0Cwrite_stream\x18\x05 \x01(\x09\x1A;\x0A\x0CAppendResult\x12+\x0A\x06offset\x18\x01 \x01(\x0B2\x1B.google.protobuf.Int64ValueB\x0A\x0A\x08response\"\x9A\x01\x0A\x15GetWriteStreamRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\x12?\x0A\x04view\x18\x03 \x01(\x0E21.google.cloud.bigquery.storage.v1.WriteStreamView\"s\x0A\x1EBatchCommitWriteStreamsRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dbigquery.googleapis.com/Table\x12\x1A\x0A\x0Dwrite_streams\x18\x02 \x03(\x09B\x03\xE0A\x02\"\x99\x01\x0A\x1FBatchCommitWriteStreamsResponse\x12/\x0A\x0Bcommit_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12E\x0A\x0Dstream_errors\x18\x02 \x03(\x0B2..google.cloud.bigquery.storage.v1.StorageError\"^\x0A\x1AFinalizeWriteStreamRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\"0\x0A\x1BFinalizeWriteStreamResponse\x12\x11\x0A\x09row_count\x18\x01 \x01(\x03\"\x89\x01\x0A\x10FlushRowsRequest\x12H\x0A\x0Cwrite_stream\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\x12+\x0A\x06offset\x18\x02 \x01(\x0B2\x1B.google.protobuf.Int64Value\"#\x0A\x11FlushRowsResponse\x12\x0E\x0A\x06offset\x18\x01 \x01(\x03\"\xA4\x04\x0A\x0CStorageError\x12M\x0A\x04code\x18\x01 \x01(\x0E2?.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode\x12\x0E\x0A\x06entity\x18\x02 \x01(\x09\x12\x15\x0A\x0Derror_message\x18\x03 \x01(\x09\"\x9D\x03\x0A\x10StorageErrorCode\x12\"\x0A\x1ESTORAGE_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FTABLE_NOT_FOUND\x10\x01\x12\x1C\x0A\x18STREAM_ALREADY_COMMITTED\x10\x02\x12\x14\x0A\x10STREAM_NOT_FOUND\x10\x03\x12\x17\x0A\x13INVALID_STREAM_TYPE\x10\x04\x12\x18\x0A\x14INVALID_STREAM_STATE\x10\x05\x12\x14\x0A\x10STREAM_FINALIZED\x10\x06\x12 \x0A\x1CSCHEMA_MISMATCH_EXTRA_FIELDS\x10\x07\x12\x19\x0A\x15OFFSET_ALREADY_EXISTS\x10\x08\x12\x17\x0A\x13OFFSET_OUT_OF_RANGE\x10\x09\x12\x15\x0A\x11CMEK_NOT_PROVIDED\x10\x0A\x12\x19\x0A\x15INVALID_CMEK_PROVIDED\x10\x0B\x12\x19\x0A\x15CMEK_ENCRYPTION_ERROR\x10\x0C\x12\x15\x0A\x11KMS_SERVICE_ERROR\x10\x0D\x12\x19\x0A\x15KMS_PERMISSION_DENIED\x10\x0E\"\xB3\x01\x0A\x08RowError\x12\x0D\x0A\x05index\x18\x01 \x01(\x03\x12E\x0A\x04code\x18\x02 \x01(\x0E27.google.cloud.bigquery.storage.v1.RowError.RowErrorCode\x12\x0F\x0A\x07message\x18\x03 \x01(\x09\"@\x0A\x0CRowErrorCode\x12\x1E\x0A\x1AROW_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CFIELDS_ERROR\x10\x012\x92\x06\x0A\x0CBigQueryRead\x12\xE9\x01\x0A\x11CreateReadSession\x12:.google.cloud.bigquery.storage.v1.CreateReadSessionRequest\x1A-.google.cloud.bigquery.storage.v1.ReadSession\"i\xDAA\$parent,read_session,max_stream_count\x82\xD3\xE4\x93\x02<\"7/v1/{read_session.table=projects/*/datasets/*/tables/*}:\x01*\x12\xCF\x01\x0A\x08ReadRows\x121.google.cloud.bigquery.storage.v1.ReadRowsRequest\x1A2.google.cloud.bigquery.storage.v1.ReadRowsResponse\"Z\xDAA\x12read_stream,offset\x82\xD3\xE4\x93\x02?\x12=/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}0\x01\x12\xC6\x01\x0A\x0FSplitReadStream\x128.google.cloud.bigquery.storage.v1.SplitReadStreamRequest\x1A9.google.cloud.bigquery.storage.v1.SplitReadStreamResponse\">\x82\xD3\xE4\x93\x028\x126/v1/{name=projects/*/locations/*/sessions/*/streams/*}\x1A{\xCAA\x1Ebigquerystorage.googleapis.com\xD2AWhttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platform2\xBC\x0B\x0A\x0DBigQueryWrite\x12\xD7\x01\x0A\x11CreateWriteStream\x12:.google.cloud.bigquery.storage.v1.CreateWriteStreamRequest\x1A-.google.cloud.bigquery.storage.v1.WriteStream\"W\xDAA\x13parent,write_stream\x82\xD3\xE4\x93\x02;\"+/v1/{parent=projects/*/datasets/*/tables/*}:\x0Cwrite_stream\x12\xD2\x01\x0A\x0AAppendRows\x123.google.cloud.bigquery.storage.v1.AppendRowsRequest\x1A4.google.cloud.bigquery.storage.v1.AppendRowsResponse\"U\xDAA\x0Cwrite_stream\x82\xD3\xE4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*(\x010\x01\x12\xBF\x01\x0A\x0EGetWriteStream\x127.google.cloud.bigquery.storage.v1.GetWriteStreamRequest\x1A-.google.cloud.bigquery.storage.v1.WriteStream\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xD9\x01\x0A\x13FinalizeWriteStream\x12<.google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest\x1A=.google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xDC\x01\x0A\x17BatchCommitWriteStreams\x12@.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest\x1AA.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse\"<\xDAA\x06parent\x82\xD3\xE4\x93\x02-\x12+/v1/{parent=projects/*/datasets/*/tables/*}\x12\xCB\x01\x0A\x09FlushRows\x122.google.cloud.bigquery.storage.v1.FlushRowsRequest\x1A3.google.cloud.bigquery.storage.v1.FlushRowsResponse\"U\xDAA\x0Cwrite_stream\x82\xD3\xE4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*\x1A\xB0\x01\xCAA\x1Ebigquerystorage.googleapis.com\xD2A\x8B\x01https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/bigquery.insertdata,https://www.googleapis.com/auth/cloud-platformB\x94\x02\x0A\$com.google.cloud.bigquery.storage.v1B\x0CStorageProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1\xEAAU\x0A\x1Dbigquery.googleapis.com/Table\x124projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" + "\x0A\xE1D\x0A.google/cloud/bigquery/storage/v1/storage.proto\x12 google.cloud.bigquery.storage.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/bigquery/storage/v1/arrow.proto\x1A+google/cloud/bigquery/storage/v1/avro.proto\x1A/google/cloud/bigquery/storage/v1/protobuf.proto\x1A-google/cloud/bigquery/storage/v1/stream.proto\x1A,google/cloud/bigquery/storage/v1/table.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/protobuf/wrappers.proto\x1A\x17google/rpc/status.proto\"\xE7\x01\x0A\x18CreateReadSessionRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x12H\x0A\x0Cread_session\x18\x02 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ReadSessionB\x03\xE0A\x02\x12\x18\x0A\x10max_stream_count\x18\x03 \x01(\x05\x12\"\x0A\x1Apreferred_min_stream_count\x18\x04 \x01(\x05\"\xF9\x01\x0A\x0FReadRowsRequest\x12F\x0A\x0Bread_stream\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)bigquerystorage.googleapis.com/ReadStream\x12\x0E\x0A\x06offset\x18\x02 \x01(\x03\x12g\x0A\x1Barrow_serialization_options\x18\x05 \x01(\x0B2;.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsB\x03\xE0A\x01H\x00B%\x0A#output_format_serialization_options\")\x0A\x0DThrottleState\x12\x18\x0A\x10throttle_percent\x18\x01 \x01(\x05\"\x97\x01\x0A\x0BStreamStats\x12H\x0A\x08progress\x18\x02 \x01(\x0B26.google.cloud.bigquery.storage.v1.StreamStats.Progress\x1A>\x0A\x08Progress\x12\x19\x0A\x11at_response_start\x18\x01 \x01(\x01\x12\x17\x0A\x0Fat_response_end\x18\x02 \x01(\x01\"\xF7\x04\x0A\x10ReadRowsResponse\x12?\x0A\x09avro_rows\x18\x03 \x01(\x0B2*.google.cloud.bigquery.storage.v1.AvroRowsH\x00\x12P\x0A\x12arrow_record_batch\x18\x04 \x01(\x0B22.google.cloud.bigquery.storage.v1.ArrowRecordBatchH\x00\x12\x11\x0A\x09row_count\x18\x06 \x01(\x03\x12<\x0A\x05stats\x18\x02 \x01(\x0B2-.google.cloud.bigquery.storage.v1.StreamStats\x12G\x0A\x0Ethrottle_state\x18\x05 \x01(\x0B2/.google.cloud.bigquery.storage.v1.ThrottleState\x12H\x0A\x0Bavro_schema\x18\x07 \x01(\x0B2,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xE0A\x03H\x01\x12J\x0A\x0Carrow_schema\x18\x08 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xE0A\x03H\x01\x12(\x0A\x16uncompressed_byte_size\x18\x09 \x01(\x03B\x03\xE0A\x01H\x02\x88\x01\x01\x12+\x0A\x19total_estimated_row_count\x18\x0A \x01(\x03B\x03\xE0A\x03H\x03\x88\x01\x01B\x06\x0A\x04rowsB\x08\x0A\x06schemaB\x19\x0A\x17_uncompressed_byte_sizeB\x1C\x0A\x1A_total_estimated_row_count\"k\x0A\x16SplitReadStreamRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)bigquerystorage.googleapis.com/ReadStream\x12\x10\x0A\x08fraction\x18\x02 \x01(\x01\"\xA7\x01\x0A\x17SplitReadStreamResponse\x12D\x0A\x0Eprimary_stream\x18\x01 \x01(\x0B2,.google.cloud.bigquery.storage.v1.ReadStream\x12F\x0A\x10remainder_stream\x18\x02 \x01(\x0B2,.google.cloud.bigquery.storage.v1.ReadStream\"\x9B\x01\x0A\x18CreateWriteStreamRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dbigquery.googleapis.com/Table\x12H\x0A\x0Cwrite_stream\x18\x02 \x01(\x0B2-.google.cloud.bigquery.storage.v1.WriteStreamB\x03\xE0A\x02\"\xC2\x09\x0A\x11AppendRowsRequest\x12H\x0A\x0Cwrite_stream\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\x12+\x0A\x06offset\x18\x02 \x01(\x0B2\x1B.google.protobuf.Int64Value\x12S\x0A\x0Aproto_rows\x18\x04 \x01(\x0B2=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoDataH\x00\x12S\x0A\x0Aarrow_rows\x18\x05 \x01(\x0B2=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataH\x00\x12\x10\x0A\x08trace_id\x18\x06 \x01(\x09\x12{\x0A\x1Dmissing_value_interpretations\x18\x07 \x03(\x0B2T.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationsEntry\x12\x81\x01\x0A\$default_missing_value_interpretation\x18\x08 \x01(\x0E2N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationB\x03\xE0A\x01\x12H\x0A\x0Cclient_stats\x18\x09 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ClientStatsB\x03\xE0A\x01\x1A\x93\x01\x0A\x09ArrowData\x12D\x0A\x0Dwriter_schema\x18\x01 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ArrowSchema\x12@\x0A\x04rows\x18\x02 \x01(\x0B22.google.cloud.bigquery.storage.v1.ArrowRecordBatch\x1A\x8C\x01\x0A\x09ProtoData\x12D\x0A\x0Dwriter_schema\x18\x01 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ProtoSchema\x129\x0A\x04rows\x18\x02 \x01(\x0B2+.google.cloud.bigquery.storage.v1.ProtoRows\x1A\x92\x01\x0A MissingValueInterpretationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12]\x0A\x05value\x18\x02 \x01(\x0E2N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation:\x028\x01\"m\x0A\x1AMissingValueInterpretation\x12,\x0A(MISSING_VALUE_INTERPRETATION_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ANULL_VALUE\x10\x01\x12\x11\x0A\x0DDEFAULT_VALUE\x10\x02B\x06\x0A\x04rows\"\xFB\x02\x0A\x12AppendRowsResponse\x12Z\x0A\x0Dappend_result\x18\x01 \x01(\x0B2A.google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResultH\x00\x12#\x0A\x05error\x18\x02 \x01(\x0B2\x12.google.rpc.StatusH\x00\x12E\x0A\x0Eupdated_schema\x18\x03 \x01(\x0B2-.google.cloud.bigquery.storage.v1.TableSchema\x12>\x0A\x0Arow_errors\x18\x04 \x03(\x0B2*.google.cloud.bigquery.storage.v1.RowError\x12\x14\x0A\x0Cwrite_stream\x18\x05 \x01(\x09\x1A;\x0A\x0CAppendResult\x12+\x0A\x06offset\x18\x01 \x01(\x0B2\x1B.google.protobuf.Int64ValueB\x0A\x0A\x08response\"\x9A\x01\x0A\x15GetWriteStreamRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\x12?\x0A\x04view\x18\x03 \x01(\x0E21.google.cloud.bigquery.storage.v1.WriteStreamView\"s\x0A\x1EBatchCommitWriteStreamsRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dbigquery.googleapis.com/Table\x12\x1A\x0A\x0Dwrite_streams\x18\x02 \x03(\x09B\x03\xE0A\x02\"\x99\x01\x0A\x1FBatchCommitWriteStreamsResponse\x12/\x0A\x0Bcommit_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12E\x0A\x0Dstream_errors\x18\x02 \x03(\x0B2..google.cloud.bigquery.storage.v1.StorageError\"^\x0A\x1AFinalizeWriteStreamRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\"0\x0A\x1BFinalizeWriteStreamResponse\x12\x11\x0A\x09row_count\x18\x01 \x01(\x03\"\x89\x01\x0A\x10FlushRowsRequest\x12H\x0A\x0Cwrite_stream\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\x12+\x0A\x06offset\x18\x02 \x01(\x0B2\x1B.google.protobuf.Int64Value\"#\x0A\x11FlushRowsResponse\x12\x0E\x0A\x06offset\x18\x01 \x01(\x03\"\xA4\x04\x0A\x0CStorageError\x12M\x0A\x04code\x18\x01 \x01(\x0E2?.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode\x12\x0E\x0A\x06entity\x18\x02 \x01(\x09\x12\x15\x0A\x0Derror_message\x18\x03 \x01(\x09\"\x9D\x03\x0A\x10StorageErrorCode\x12\"\x0A\x1ESTORAGE_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FTABLE_NOT_FOUND\x10\x01\x12\x1C\x0A\x18STREAM_ALREADY_COMMITTED\x10\x02\x12\x14\x0A\x10STREAM_NOT_FOUND\x10\x03\x12\x17\x0A\x13INVALID_STREAM_TYPE\x10\x04\x12\x18\x0A\x14INVALID_STREAM_STATE\x10\x05\x12\x14\x0A\x10STREAM_FINALIZED\x10\x06\x12 \x0A\x1CSCHEMA_MISMATCH_EXTRA_FIELDS\x10\x07\x12\x19\x0A\x15OFFSET_ALREADY_EXISTS\x10\x08\x12\x17\x0A\x13OFFSET_OUT_OF_RANGE\x10\x09\x12\x15\x0A\x11CMEK_NOT_PROVIDED\x10\x0A\x12\x19\x0A\x15INVALID_CMEK_PROVIDED\x10\x0B\x12\x19\x0A\x15CMEK_ENCRYPTION_ERROR\x10\x0C\x12\x15\x0A\x11KMS_SERVICE_ERROR\x10\x0D\x12\x19\x0A\x15KMS_PERMISSION_DENIED\x10\x0E\"\xB3\x01\x0A\x08RowError\x12\x0D\x0A\x05index\x18\x01 \x01(\x03\x12E\x0A\x04code\x18\x02 \x01(\x0E27.google.cloud.bigquery.storage.v1.RowError.RowErrorCode\x12\x0F\x0A\x07message\x18\x03 \x01(\x09\"@\x0A\x0CRowErrorCode\x12\x1E\x0A\x1AROW_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CFIELDS_ERROR\x10\x01\"\x96\x07\x0A\x0BClientStats\x12V\x0A\x0Drequest_stats\x18\x01 \x01(\x0B2:.google.cloud.bigquery.storage.v1.ClientStats.RequestStatsB\x03\xE0A\x01\x12T\x0A\x0Cwindow_stats\x18\x02 \x01(\x0B29.google.cloud.bigquery.storage.v1.ClientStats.WindowStatsB\x03\xE0A\x01\x1A\x8A\x01\x0A\x0CRequestStats\x12\"\x0A\x10send_time_millis\x18\x01 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12'\x0A\x15queued_requests_count\x18\x02 \x01(\x03B\x03\xE0A\x01H\x01\x88\x01\x01B\x13\x0A\x11_send_time_millisB\x18\x0A\x16_queued_requests_count\x1A\xCB\x04\x0A\x0BWindowStats\x12-\x0A\x1Bmax_response_latency_millis\x18\x01 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12-\x0A\x1Bavg_response_latency_millis\x18\x02 \x01(\x03B\x03\xE0A\x01H\x01\x88\x01\x01\x121\x0A\x1Flongest_wait_no_response_millis\x18\x03 \x01(\x03B\x03\xE0A\x01H\x02\x88\x01\x01\x12%\x0A\x13requests_sent_count\x18\x04 \x01(\x03B\x03\xE0A\x01H\x03\x88\x01\x01\x12*\x0A\x18responses_received_count\x18\x05 \x01(\x03B\x03\xE0A\x01H\x04\x88\x01\x01\x12\"\x0A\x10bytes_sent_count\x18\x06 \x01(\x03B\x03\xE0A\x01H\x05\x88\x01\x01\x120\x0A\x1Ewindow_start_time_epoch_millis\x18\x07 \x01(\x03B\x03\xE0A\x01H\x06\x88\x01\x01\x12\x1F\x0A\x0Dwindow_millis\x18\x08 \x01(\x03B\x03\xE0A\x01H\x07\x88\x01\x01B\x1E\x0A\x1C_max_response_latency_millisB\x1E\x0A\x1C_avg_response_latency_millisB\"\x0A _longest_wait_no_response_millisB\x16\x0A\x14_requests_sent_countB\x1B\x0A\x19_responses_received_countB\x13\x0A\x11_bytes_sent_countB!\x0A\x1F_window_start_time_epoch_millisB\x10\x0A\x0E_window_millis2\x92\x06\x0A\x0CBigQueryRead\x12\xE9\x01\x0A\x11CreateReadSession\x12:.google.cloud.bigquery.storage.v1.CreateReadSessionRequest\x1A-.google.cloud.bigquery.storage.v1.ReadSession\"i\xDAA\$parent,read_session,max_stream_count\x82\xD3\xE4\x93\x02<\"7/v1/{read_session.table=projects/*/datasets/*/tables/*}:\x01*\x12\xCF\x01\x0A\x08ReadRows\x121.google.cloud.bigquery.storage.v1.ReadRowsRequest\x1A2.google.cloud.bigquery.storage.v1.ReadRowsResponse\"Z\xDAA\x12read_stream,offset\x82\xD3\xE4\x93\x02?\x12=/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}0\x01\x12\xC6\x01\x0A\x0FSplitReadStream\x128.google.cloud.bigquery.storage.v1.SplitReadStreamRequest\x1A9.google.cloud.bigquery.storage.v1.SplitReadStreamResponse\">\x82\xD3\xE4\x93\x028\x126/v1/{name=projects/*/locations/*/sessions/*/streams/*}\x1A{\xCAA\x1Ebigquerystorage.googleapis.com\xD2AWhttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platform2\xBC\x0B\x0A\x0DBigQueryWrite\x12\xD7\x01\x0A\x11CreateWriteStream\x12:.google.cloud.bigquery.storage.v1.CreateWriteStreamRequest\x1A-.google.cloud.bigquery.storage.v1.WriteStream\"W\xDAA\x13parent,write_stream\x82\xD3\xE4\x93\x02;\"+/v1/{parent=projects/*/datasets/*/tables/*}:\x0Cwrite_stream\x12\xD2\x01\x0A\x0AAppendRows\x123.google.cloud.bigquery.storage.v1.AppendRowsRequest\x1A4.google.cloud.bigquery.storage.v1.AppendRowsResponse\"U\xDAA\x0Cwrite_stream\x82\xD3\xE4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*(\x010\x01\x12\xBF\x01\x0A\x0EGetWriteStream\x127.google.cloud.bigquery.storage.v1.GetWriteStreamRequest\x1A-.google.cloud.bigquery.storage.v1.WriteStream\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xD9\x01\x0A\x13FinalizeWriteStream\x12<.google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest\x1A=.google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xDC\x01\x0A\x17BatchCommitWriteStreams\x12@.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest\x1AA.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse\"<\xDAA\x06parent\x82\xD3\xE4\x93\x02-\x12+/v1/{parent=projects/*/datasets/*/tables/*}\x12\xCB\x01\x0A\x09FlushRows\x122.google.cloud.bigquery.storage.v1.FlushRowsRequest\x1A3.google.cloud.bigquery.storage.v1.FlushRowsResponse\"U\xDAA\x0Cwrite_stream\x82\xD3\xE4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*\x1A\xB0\x01\xCAA\x1Ebigquerystorage.googleapis.com\xD2A\x8B\x01https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/bigquery.insertdata,https://www.googleapis.com/auth/cloud-platformB\x94\x02\x0A\$com.google.cloud.bigquery.storage.v1B\x0CStorageProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1\xEAAU\x0A\x1Dbigquery.googleapis.com/Table\x124projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" , true); static::$is_initialized = true; diff --git a/BigQueryStorage/src/V1/AppendRowsRequest.php b/BigQueryStorage/src/V1/AppendRowsRequest.php index 06309ad6dcbf..56de7ef223a0 100644 --- a/BigQueryStorage/src/V1/AppendRowsRequest.php +++ b/BigQueryStorage/src/V1/AppendRowsRequest.php @@ -14,7 +14,7 @@ * AppendRowsRequest need only be specified for the first request before * switching table destinations. You can also switch table destinations within * the same connection for the default stream. - * The size of a single AppendRowsRequest must be less than 10 MB in size. + * The size of a single AppendRowsRequest must be less than 20 MB in size. * Requests larger than this return an error, typically `INVALID_ARGUMENT`. * * Generated from protobuf message google.cloud.bigquery.storage.v1.AppendRowsRequest @@ -94,6 +94,12 @@ class AppendRowsRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; */ protected $default_missing_value_interpretation = 0; + /** + * Optional. Stats and telemetry data gathered on the client side. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats client_stats = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $client_stats = null; protected $rows; /** @@ -204,6 +210,8 @@ public static function build(string $writeStream): self * `NULL` instead of using default values for some columns, you can set * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. + * @type \Google\Cloud\BigQuery\Storage\V1\ClientStats $client_stats + * Optional. Stats and telemetry data gathered on the client side. * } */ public function __construct($data = NULL) { @@ -532,6 +540,42 @@ public function setDefaultMissingValueInterpretation($var) return $this; } + /** + * Optional. Stats and telemetry data gathered on the client side. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats client_stats = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\ClientStats|null + */ + public function getClientStats() + { + return $this->client_stats; + } + + public function hasClientStats() + { + return isset($this->client_stats); + } + + public function clearClientStats() + { + unset($this->client_stats); + } + + /** + * Optional. Stats and telemetry data gathered on the client side. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats client_stats = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\ClientStats $var + * @return $this + */ + public function setClientStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ClientStats::class); + $this->client_stats = $var; + + return $this; + } + /** * @return string */ diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats.php b/BigQueryStorage/src/V1/ClientStats.php similarity index 100% rename from owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats.php rename to BigQueryStorage/src/V1/ClientStats.php diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats/RequestStats.php b/BigQueryStorage/src/V1/ClientStats/RequestStats.php similarity index 100% rename from owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats/RequestStats.php rename to BigQueryStorage/src/V1/ClientStats/RequestStats.php diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats/WindowStats.php b/BigQueryStorage/src/V1/ClientStats/WindowStats.php similarity index 100% rename from owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ClientStats/WindowStats.php rename to BigQueryStorage/src/V1/ClientStats/WindowStats.php diff --git a/BigQueryStorage/src/V1/ReadRowsRequest.php b/BigQueryStorage/src/V1/ReadRowsRequest.php index d36c96d41b71..b3b16c592ed2 100644 --- a/BigQueryStorage/src/V1/ReadRowsRequest.php +++ b/BigQueryStorage/src/V1/ReadRowsRequest.php @@ -29,6 +29,7 @@ class ReadRowsRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field int64 offset = 2; */ protected $offset = 0; + protected $output_format_serialization_options; /** * @param string $readStream Required. Stream to read rows from. Please see @@ -60,6 +61,9 @@ public static function build(string $readStream, int $offset): self * The offset requested must be less than the last row read from Read. * Requesting a larger offset is undefined. If not specified, start reading * from offset zero. + * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $arrow_serialization_options + * Optional. Options specific to the Apache Arrow output format. + * This feature is not yet available. * } */ public function __construct($data = NULL) { @@ -123,5 +127,46 @@ public function setOffset($var) return $this; } + /** + * Optional. Options specific to the Apache Arrow output format. + * This feature is not yet available. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions|null + */ + public function getArrowSerializationOptions() + { + return $this->readOneof(5); + } + + public function hasArrowSerializationOptions() + { + return $this->hasOneof(5); + } + + /** + * Optional. Options specific to the Apache Arrow output format. + * This feature is not yet available. + * + * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $var + * @return $this + */ + public function setArrowSerializationOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getOutputFormatSerializationOptions() + { + return $this->whichOneof("output_format_serialization_options"); + } + } diff --git a/BigQueryStorage/src/V1/ReadRowsResponse.php b/BigQueryStorage/src/V1/ReadRowsResponse.php index f49fe2c2d7fd..f083aeae6c99 100644 --- a/BigQueryStorage/src/V1/ReadRowsResponse.php +++ b/BigQueryStorage/src/V1/ReadRowsResponse.php @@ -54,6 +54,14 @@ class ReadRowsResponse extends \Google\Protobuf\Internal\Message * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; */ protected $uncompressed_byte_size = null; + /** + * Output only. The total estimated number of rows in the query results. + * Only populated when reading data from a BigQuery job. + * This feature is not yet available. + * + * Generated from protobuf field optional int64 total_estimated_row_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $total_estimated_row_count = null; protected $rows; protected $schema; @@ -93,6 +101,10 @@ class ReadRowsResponse extends \Google\Protobuf\Internal\Message * follows is not compressed, which can be useful for cases where compression * does not yield appreciable savings. When uncompressed_byte_size is not * greater than 0, the client should skip decompression. + * @type int|string $total_estimated_row_count + * Output only. The total estimated number of rows in the query results. + * Only populated when reading data from a BigQuery job. + * This feature is not yet available. * } */ public function __construct($data = NULL) { @@ -386,6 +398,46 @@ public function setUncompressedByteSize($var) return $this; } + /** + * Output only. The total estimated number of rows in the query results. + * Only populated when reading data from a BigQuery job. + * This feature is not yet available. + * + * Generated from protobuf field optional int64 total_estimated_row_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTotalEstimatedRowCount() + { + return isset($this->total_estimated_row_count) ? $this->total_estimated_row_count : 0; + } + + public function hasTotalEstimatedRowCount() + { + return isset($this->total_estimated_row_count); + } + + public function clearTotalEstimatedRowCount() + { + unset($this->total_estimated_row_count); + } + + /** + * Output only. The total estimated number of rows in the query results. + * Only populated when reading data from a BigQuery job. + * This feature is not yet available. + * + * Generated from protobuf field optional int64 total_estimated_row_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTotalEstimatedRowCount($var) + { + GPBUtil::checkInt64($var); + $this->total_estimated_row_count = $var; + + return $this; + } + /** * @return string */ diff --git a/BigQueryStorage/tests/Unit/V1/Client/BigQueryReadClientTest.php b/BigQueryStorage/tests/Unit/V1/Client/BigQueryReadClientTest.php index 31f0f0b58ae0..70c3c9d5c4dd 100644 --- a/BigQueryStorage/tests/Unit/V1/Client/BigQueryReadClientTest.php +++ b/BigQueryStorage/tests/Unit/V1/Client/BigQueryReadClientTest.php @@ -157,21 +157,27 @@ public function readRowsTest() // Mock response $rowCount = 1340416618; $uncompressedByteSize = 2094376525; + $totalEstimatedRowCount = 1623220052; $expectedResponse = new ReadRowsResponse(); $expectedResponse->setRowCount($rowCount); $expectedResponse->setUncompressedByteSize($uncompressedByteSize); + $expectedResponse->setTotalEstimatedRowCount($totalEstimatedRowCount); $transport->addResponse($expectedResponse); $rowCount2 = 349815907; $uncompressedByteSize2 = 1643824294; + $totalEstimatedRowCount2 = 841338529; $expectedResponse2 = new ReadRowsResponse(); $expectedResponse2->setRowCount($rowCount2); $expectedResponse2->setUncompressedByteSize($uncompressedByteSize2); + $expectedResponse2->setTotalEstimatedRowCount($totalEstimatedRowCount2); $transport->addResponse($expectedResponse2); $rowCount3 = 349815906; $uncompressedByteSize3 = 1643824295; + $totalEstimatedRowCount3 = 841338528; $expectedResponse3 = new ReadRowsResponse(); $expectedResponse3->setRowCount($rowCount3); $expectedResponse3->setUncompressedByteSize($uncompressedByteSize3); + $expectedResponse3->setTotalEstimatedRowCount($totalEstimatedRowCount3); $transport->addResponse($expectedResponse3); // Mock request $formattedReadStream = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php deleted file mode 100644 index 1201e2f28fdf..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Annotations.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC3\x02\x0A2google/cloud/bigquery/storage/v1/annotations.proto\x12 google.cloud.bigquery.storage.v1\x1A google/protobuf/descriptor.protoB\xC0\x01\x0A\$com.google.cloud.bigquery.storage.v1B\x10AnnotationsProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php deleted file mode 100644 index b3f36d333f99..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Arrow.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xFA\x06\x0A,google/cloud/bigquery/storage/v1/arrow.proto\x12 google.cloud.bigquery.storage.v1\"(\x0A\x0BArrowSchema\x12\x19\x0A\x11serialized_schema\x18\x01 \x01(\x0C\"J\x0A\x10ArrowRecordBatch\x12\x1F\x0A\x17serialized_record_batch\x18\x01 \x01(\x0C\x12\x15\x0A\x09row_count\x18\x02 \x01(\x03B\x02\x18\x01\"\xEC\x03\x0A\x19ArrowSerializationOptions\x12h\x0A\x12buffer_compression\x18\x02 \x01(\x0E2L.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec\x12v\x0A\x19picos_timestamp_precision\x18\x03 \x01(\x0E2S.google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision\"H\x0A\x10CompressionCodec\x12\x1B\x0A\x17COMPRESSION_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09LZ4_FRAME\x10\x01\x12\x08\x0A\x04ZSTD\x10\x02\"\xA2\x01\x0A\x17PicosTimestampPrecision\x12)\x0A%PICOS_TIMESTAMP_PRECISION_UNSPECIFIED\x10\x00\x12\x1E\x0A\x1ATIMESTAMP_PRECISION_MICROS\x10\x01\x12\x1D\x0A\x19TIMESTAMP_PRECISION_NANOS\x10\x02\x12\x1D\x0A\x19TIMESTAMP_PRECISION_PICOS\x10\x03B\xBA\x01\x0A\$com.google.cloud.bigquery.storage.v1B\x0AArrowProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Avro.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Avro.php deleted file mode 100644 index ae9403c293b3..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Avro.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xD4\x05\x0A+google/cloud/bigquery/storage/v1/avro.proto\x12 google.cloud.bigquery.storage.v1\"\x1C\x0A\x0AAvroSchema\x12\x0E\x0A\x06schema\x18\x01 \x01(\x09\"A\x0A\x08AvroRows\x12\x1E\x0A\x16serialized_binary_rows\x18\x01 \x01(\x0C\x12\x15\x0A\x09row_count\x18\x02 \x01(\x03B\x02\x18\x01\"\xDD\x02\x0A\x18AvroSerializationOptions\x12%\x0A\x1Denable_display_name_attribute\x18\x01 \x01(\x08\x12u\x0A\x19picos_timestamp_precision\x18\x02 \x01(\x0E2R.google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision\"\xA2\x01\x0A\x17PicosTimestampPrecision\x12)\x0A%PICOS_TIMESTAMP_PRECISION_UNSPECIFIED\x10\x00\x12\x1E\x0A\x1ATIMESTAMP_PRECISION_MICROS\x10\x01\x12\x1D\x0A\x19TIMESTAMP_PRECISION_NANOS\x10\x02\x12\x1D\x0A\x19TIMESTAMP_PRECISION_PICOS\x10\x03B\xB9\x01\x0A\$com.google.cloud.bigquery.storage.v1B\x09AvroProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php deleted file mode 100644 index 655e16fcf808..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Protobuf.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xAE\x03\x0A/google/cloud/bigquery/storage/v1/protobuf.proto\x12 google.cloud.bigquery.storage.v1\x1A google/protobuf/descriptor.proto\"I\x0A\x0BProtoSchema\x12:\x0A\x10proto_descriptor\x18\x01 \x01(\x0B2 .google.protobuf.DescriptorProto\"\$\x0A\x09ProtoRows\x12\x17\x0A\x0Fserialized_rows\x18\x01 \x03(\x0CB\xBD\x01\x0A\$com.google.cloud.bigquery.storage.v1B\x0DProtoBufProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php deleted file mode 100644 index b4a2d096c920..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Storage.php +++ /dev/null @@ -1,36 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xE1D\x0A.google/cloud/bigquery/storage/v1/storage.proto\x12 google.cloud.bigquery.storage.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/bigquery/storage/v1/arrow.proto\x1A+google/cloud/bigquery/storage/v1/avro.proto\x1A/google/cloud/bigquery/storage/v1/protobuf.proto\x1A-google/cloud/bigquery/storage/v1/stream.proto\x1A,google/cloud/bigquery/storage/v1/table.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/protobuf/wrappers.proto\x1A\x17google/rpc/status.proto\"\xE7\x01\x0A\x18CreateReadSessionRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x12H\x0A\x0Cread_session\x18\x02 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ReadSessionB\x03\xE0A\x02\x12\x18\x0A\x10max_stream_count\x18\x03 \x01(\x05\x12\"\x0A\x1Apreferred_min_stream_count\x18\x04 \x01(\x05\"\xF9\x01\x0A\x0FReadRowsRequest\x12F\x0A\x0Bread_stream\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)bigquerystorage.googleapis.com/ReadStream\x12\x0E\x0A\x06offset\x18\x02 \x01(\x03\x12g\x0A\x1Barrow_serialization_options\x18\x05 \x01(\x0B2;.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsB\x03\xE0A\x01H\x00B%\x0A#output_format_serialization_options\")\x0A\x0DThrottleState\x12\x18\x0A\x10throttle_percent\x18\x01 \x01(\x05\"\x97\x01\x0A\x0BStreamStats\x12H\x0A\x08progress\x18\x02 \x01(\x0B26.google.cloud.bigquery.storage.v1.StreamStats.Progress\x1A>\x0A\x08Progress\x12\x19\x0A\x11at_response_start\x18\x01 \x01(\x01\x12\x17\x0A\x0Fat_response_end\x18\x02 \x01(\x01\"\xF7\x04\x0A\x10ReadRowsResponse\x12?\x0A\x09avro_rows\x18\x03 \x01(\x0B2*.google.cloud.bigquery.storage.v1.AvroRowsH\x00\x12P\x0A\x12arrow_record_batch\x18\x04 \x01(\x0B22.google.cloud.bigquery.storage.v1.ArrowRecordBatchH\x00\x12\x11\x0A\x09row_count\x18\x06 \x01(\x03\x12<\x0A\x05stats\x18\x02 \x01(\x0B2-.google.cloud.bigquery.storage.v1.StreamStats\x12G\x0A\x0Ethrottle_state\x18\x05 \x01(\x0B2/.google.cloud.bigquery.storage.v1.ThrottleState\x12H\x0A\x0Bavro_schema\x18\x07 \x01(\x0B2,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xE0A\x03H\x01\x12J\x0A\x0Carrow_schema\x18\x08 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xE0A\x03H\x01\x12(\x0A\x16uncompressed_byte_size\x18\x09 \x01(\x03B\x03\xE0A\x01H\x02\x88\x01\x01\x12+\x0A\x19total_estimated_row_count\x18\x0A \x01(\x03B\x03\xE0A\x03H\x03\x88\x01\x01B\x06\x0A\x04rowsB\x08\x0A\x06schemaB\x19\x0A\x17_uncompressed_byte_sizeB\x1C\x0A\x1A_total_estimated_row_count\"k\x0A\x16SplitReadStreamRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)bigquerystorage.googleapis.com/ReadStream\x12\x10\x0A\x08fraction\x18\x02 \x01(\x01\"\xA7\x01\x0A\x17SplitReadStreamResponse\x12D\x0A\x0Eprimary_stream\x18\x01 \x01(\x0B2,.google.cloud.bigquery.storage.v1.ReadStream\x12F\x0A\x10remainder_stream\x18\x02 \x01(\x0B2,.google.cloud.bigquery.storage.v1.ReadStream\"\x9B\x01\x0A\x18CreateWriteStreamRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dbigquery.googleapis.com/Table\x12H\x0A\x0Cwrite_stream\x18\x02 \x01(\x0B2-.google.cloud.bigquery.storage.v1.WriteStreamB\x03\xE0A\x02\"\xC2\x09\x0A\x11AppendRowsRequest\x12H\x0A\x0Cwrite_stream\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\x12+\x0A\x06offset\x18\x02 \x01(\x0B2\x1B.google.protobuf.Int64Value\x12S\x0A\x0Aproto_rows\x18\x04 \x01(\x0B2=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoDataH\x00\x12S\x0A\x0Aarrow_rows\x18\x05 \x01(\x0B2=.google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowDataH\x00\x12\x10\x0A\x08trace_id\x18\x06 \x01(\x09\x12{\x0A\x1Dmissing_value_interpretations\x18\x07 \x03(\x0B2T.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationsEntry\x12\x81\x01\x0A\$default_missing_value_interpretation\x18\x08 \x01(\x0E2N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretationB\x03\xE0A\x01\x12H\x0A\x0Cclient_stats\x18\x09 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ClientStatsB\x03\xE0A\x01\x1A\x93\x01\x0A\x09ArrowData\x12D\x0A\x0Dwriter_schema\x18\x01 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ArrowSchema\x12@\x0A\x04rows\x18\x02 \x01(\x0B22.google.cloud.bigquery.storage.v1.ArrowRecordBatch\x1A\x8C\x01\x0A\x09ProtoData\x12D\x0A\x0Dwriter_schema\x18\x01 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ProtoSchema\x129\x0A\x04rows\x18\x02 \x01(\x0B2+.google.cloud.bigquery.storage.v1.ProtoRows\x1A\x92\x01\x0A MissingValueInterpretationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12]\x0A\x05value\x18\x02 \x01(\x0E2N.google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation:\x028\x01\"m\x0A\x1AMissingValueInterpretation\x12,\x0A(MISSING_VALUE_INTERPRETATION_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ANULL_VALUE\x10\x01\x12\x11\x0A\x0DDEFAULT_VALUE\x10\x02B\x06\x0A\x04rows\"\xFB\x02\x0A\x12AppendRowsResponse\x12Z\x0A\x0Dappend_result\x18\x01 \x01(\x0B2A.google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResultH\x00\x12#\x0A\x05error\x18\x02 \x01(\x0B2\x12.google.rpc.StatusH\x00\x12E\x0A\x0Eupdated_schema\x18\x03 \x01(\x0B2-.google.cloud.bigquery.storage.v1.TableSchema\x12>\x0A\x0Arow_errors\x18\x04 \x03(\x0B2*.google.cloud.bigquery.storage.v1.RowError\x12\x14\x0A\x0Cwrite_stream\x18\x05 \x01(\x09\x1A;\x0A\x0CAppendResult\x12+\x0A\x06offset\x18\x01 \x01(\x0B2\x1B.google.protobuf.Int64ValueB\x0A\x0A\x08response\"\x9A\x01\x0A\x15GetWriteStreamRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\x12?\x0A\x04view\x18\x03 \x01(\x0E21.google.cloud.bigquery.storage.v1.WriteStreamView\"s\x0A\x1EBatchCommitWriteStreamsRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dbigquery.googleapis.com/Table\x12\x1A\x0A\x0Dwrite_streams\x18\x02 \x03(\x09B\x03\xE0A\x02\"\x99\x01\x0A\x1FBatchCommitWriteStreamsResponse\x12/\x0A\x0Bcommit_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12E\x0A\x0Dstream_errors\x18\x02 \x03(\x0B2..google.cloud.bigquery.storage.v1.StorageError\"^\x0A\x1AFinalizeWriteStreamRequest\x12@\x0A\x04name\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\"0\x0A\x1BFinalizeWriteStreamResponse\x12\x11\x0A\x09row_count\x18\x01 \x01(\x03\"\x89\x01\x0A\x10FlushRowsRequest\x12H\x0A\x0Cwrite_stream\x18\x01 \x01(\x09B2\xE0A\x02\xFAA,\x0A*bigquerystorage.googleapis.com/WriteStream\x12+\x0A\x06offset\x18\x02 \x01(\x0B2\x1B.google.protobuf.Int64Value\"#\x0A\x11FlushRowsResponse\x12\x0E\x0A\x06offset\x18\x01 \x01(\x03\"\xA4\x04\x0A\x0CStorageError\x12M\x0A\x04code\x18\x01 \x01(\x0E2?.google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode\x12\x0E\x0A\x06entity\x18\x02 \x01(\x09\x12\x15\x0A\x0Derror_message\x18\x03 \x01(\x09\"\x9D\x03\x0A\x10StorageErrorCode\x12\"\x0A\x1ESTORAGE_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FTABLE_NOT_FOUND\x10\x01\x12\x1C\x0A\x18STREAM_ALREADY_COMMITTED\x10\x02\x12\x14\x0A\x10STREAM_NOT_FOUND\x10\x03\x12\x17\x0A\x13INVALID_STREAM_TYPE\x10\x04\x12\x18\x0A\x14INVALID_STREAM_STATE\x10\x05\x12\x14\x0A\x10STREAM_FINALIZED\x10\x06\x12 \x0A\x1CSCHEMA_MISMATCH_EXTRA_FIELDS\x10\x07\x12\x19\x0A\x15OFFSET_ALREADY_EXISTS\x10\x08\x12\x17\x0A\x13OFFSET_OUT_OF_RANGE\x10\x09\x12\x15\x0A\x11CMEK_NOT_PROVIDED\x10\x0A\x12\x19\x0A\x15INVALID_CMEK_PROVIDED\x10\x0B\x12\x19\x0A\x15CMEK_ENCRYPTION_ERROR\x10\x0C\x12\x15\x0A\x11KMS_SERVICE_ERROR\x10\x0D\x12\x19\x0A\x15KMS_PERMISSION_DENIED\x10\x0E\"\xB3\x01\x0A\x08RowError\x12\x0D\x0A\x05index\x18\x01 \x01(\x03\x12E\x0A\x04code\x18\x02 \x01(\x0E27.google.cloud.bigquery.storage.v1.RowError.RowErrorCode\x12\x0F\x0A\x07message\x18\x03 \x01(\x09\"@\x0A\x0CRowErrorCode\x12\x1E\x0A\x1AROW_ERROR_CODE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CFIELDS_ERROR\x10\x01\"\x96\x07\x0A\x0BClientStats\x12V\x0A\x0Drequest_stats\x18\x01 \x01(\x0B2:.google.cloud.bigquery.storage.v1.ClientStats.RequestStatsB\x03\xE0A\x01\x12T\x0A\x0Cwindow_stats\x18\x02 \x01(\x0B29.google.cloud.bigquery.storage.v1.ClientStats.WindowStatsB\x03\xE0A\x01\x1A\x8A\x01\x0A\x0CRequestStats\x12\"\x0A\x10send_time_millis\x18\x01 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12'\x0A\x15queued_requests_count\x18\x02 \x01(\x03B\x03\xE0A\x01H\x01\x88\x01\x01B\x13\x0A\x11_send_time_millisB\x18\x0A\x16_queued_requests_count\x1A\xCB\x04\x0A\x0BWindowStats\x12-\x0A\x1Bmax_response_latency_millis\x18\x01 \x01(\x03B\x03\xE0A\x01H\x00\x88\x01\x01\x12-\x0A\x1Bavg_response_latency_millis\x18\x02 \x01(\x03B\x03\xE0A\x01H\x01\x88\x01\x01\x121\x0A\x1Flongest_wait_no_response_millis\x18\x03 \x01(\x03B\x03\xE0A\x01H\x02\x88\x01\x01\x12%\x0A\x13requests_sent_count\x18\x04 \x01(\x03B\x03\xE0A\x01H\x03\x88\x01\x01\x12*\x0A\x18responses_received_count\x18\x05 \x01(\x03B\x03\xE0A\x01H\x04\x88\x01\x01\x12\"\x0A\x10bytes_sent_count\x18\x06 \x01(\x03B\x03\xE0A\x01H\x05\x88\x01\x01\x120\x0A\x1Ewindow_start_time_epoch_millis\x18\x07 \x01(\x03B\x03\xE0A\x01H\x06\x88\x01\x01\x12\x1F\x0A\x0Dwindow_millis\x18\x08 \x01(\x03B\x03\xE0A\x01H\x07\x88\x01\x01B\x1E\x0A\x1C_max_response_latency_millisB\x1E\x0A\x1C_avg_response_latency_millisB\"\x0A _longest_wait_no_response_millisB\x16\x0A\x14_requests_sent_countB\x1B\x0A\x19_responses_received_countB\x13\x0A\x11_bytes_sent_countB!\x0A\x1F_window_start_time_epoch_millisB\x10\x0A\x0E_window_millis2\x92\x06\x0A\x0CBigQueryRead\x12\xE9\x01\x0A\x11CreateReadSession\x12:.google.cloud.bigquery.storage.v1.CreateReadSessionRequest\x1A-.google.cloud.bigquery.storage.v1.ReadSession\"i\xDAA\$parent,read_session,max_stream_count\x82\xD3\xE4\x93\x02<\"7/v1/{read_session.table=projects/*/datasets/*/tables/*}:\x01*\x12\xCF\x01\x0A\x08ReadRows\x121.google.cloud.bigquery.storage.v1.ReadRowsRequest\x1A2.google.cloud.bigquery.storage.v1.ReadRowsResponse\"Z\xDAA\x12read_stream,offset\x82\xD3\xE4\x93\x02?\x12=/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}0\x01\x12\xC6\x01\x0A\x0FSplitReadStream\x128.google.cloud.bigquery.storage.v1.SplitReadStreamRequest\x1A9.google.cloud.bigquery.storage.v1.SplitReadStreamResponse\">\x82\xD3\xE4\x93\x028\x126/v1/{name=projects/*/locations/*/sessions/*/streams/*}\x1A{\xCAA\x1Ebigquerystorage.googleapis.com\xD2AWhttps://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platform2\xBC\x0B\x0A\x0DBigQueryWrite\x12\xD7\x01\x0A\x11CreateWriteStream\x12:.google.cloud.bigquery.storage.v1.CreateWriteStreamRequest\x1A-.google.cloud.bigquery.storage.v1.WriteStream\"W\xDAA\x13parent,write_stream\x82\xD3\xE4\x93\x02;\"+/v1/{parent=projects/*/datasets/*/tables/*}:\x0Cwrite_stream\x12\xD2\x01\x0A\x0AAppendRows\x123.google.cloud.bigquery.storage.v1.AppendRowsRequest\x1A4.google.cloud.bigquery.storage.v1.AppendRowsResponse\"U\xDAA\x0Cwrite_stream\x82\xD3\xE4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*(\x010\x01\x12\xBF\x01\x0A\x0EGetWriteStream\x127.google.cloud.bigquery.storage.v1.GetWriteStreamRequest\x1A-.google.cloud.bigquery.storage.v1.WriteStream\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xD9\x01\x0A\x13FinalizeWriteStream\x12<.google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest\x1A=.google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/datasets/*/tables/*/streams/*}:\x01*\x12\xDC\x01\x0A\x17BatchCommitWriteStreams\x12@.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest\x1AA.google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse\"<\xDAA\x06parent\x82\xD3\xE4\x93\x02-\x12+/v1/{parent=projects/*/datasets/*/tables/*}\x12\xCB\x01\x0A\x09FlushRows\x122.google.cloud.bigquery.storage.v1.FlushRowsRequest\x1A3.google.cloud.bigquery.storage.v1.FlushRowsResponse\"U\xDAA\x0Cwrite_stream\x82\xD3\xE4\x93\x02@\";/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}:\x01*\x1A\xB0\x01\xCAA\x1Ebigquerystorage.googleapis.com\xD2A\x8B\x01https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/bigquery.insertdata,https://www.googleapis.com/auth/cloud-platformB\x94\x02\x0A\$com.google.cloud.bigquery.storage.v1B\x0CStorageProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1\xEAAU\x0A\x1Dbigquery.googleapis.com/Table\x124projects/{project}/datasets/{dataset}/tables/{table}b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Stream.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Stream.php deleted file mode 100644 index 35a5cd3299b6..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Stream.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xCA\x17\x0A-google/cloud/bigquery/storage/v1/stream.proto\x12 google.cloud.bigquery.storage.v1\x1A\x19google/api/resource.proto\x1A,google/cloud/bigquery/storage/v1/arrow.proto\x1A+google/cloud/bigquery/storage/v1/avro.proto\x1A,google/cloud/bigquery/storage/v1/table.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xC3\x0C\x0A\x0BReadSession\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bexpire_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12F\x0A\x0Bdata_format\x18\x03 \x01(\x0E2,.google.cloud.bigquery.storage.v1.DataFormatB\x03\xE0A\x05\x12H\x0A\x0Bavro_schema\x18\x04 \x01(\x0B2,.google.cloud.bigquery.storage.v1.AvroSchemaB\x03\xE0A\x03H\x00\x12J\x0A\x0Carrow_schema\x18\x05 \x01(\x0B2-.google.cloud.bigquery.storage.v1.ArrowSchemaB\x03\xE0A\x03H\x00\x124\x0A\x05table\x18\x06 \x01(\x09B%\xE0A\x05\xFAA\x1F\x0A\x1Dbigquery.googleapis.com/Table\x12Z\x0A\x0Ftable_modifiers\x18\x07 \x01(\x0B2<.google.cloud.bigquery.storage.v1.ReadSession.TableModifiersB\x03\xE0A\x01\x12Y\x0A\x0Cread_options\x18\x08 \x01(\x0B2>.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptionsB\x03\xE0A\x01\x12B\x0A\x07streams\x18\x0A \x03(\x0B2,.google.cloud.bigquery.storage.v1.ReadStreamB\x03\xE0A\x03\x12*\x0A\x1Destimated_total_bytes_scanned\x18\x0C \x01(\x03B\x03\xE0A\x03\x12/\x0A\"estimated_total_physical_file_size\x18\x0F \x01(\x03B\x03\xE0A\x03\x12 \x0A\x13estimated_row_count\x18\x0E \x01(\x03B\x03\xE0A\x03\x12\x15\x0A\x08trace_id\x18\x0D \x01(\x09B\x03\xE0A\x01\x1AC\x0A\x0ETableModifiers\x121\x0A\x0Dsnapshot_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1A\x89\x05\x0A\x10TableReadOptions\x12\x17\x0A\x0Fselected_fields\x18\x01 \x03(\x09\x12\x17\x0A\x0Frow_restriction\x18\x02 \x01(\x09\x12g\x0A\x1Barrow_serialization_options\x18\x03 \x01(\x0B2;.google.cloud.bigquery.storage.v1.ArrowSerializationOptionsB\x03\xE0A\x01H\x00\x12e\x0A\x1Aavro_serialization_options\x18\x04 \x01(\x0B2:.google.cloud.bigquery.storage.v1.AvroSerializationOptionsB\x03\xE0A\x01H\x00\x12#\x0A\x11sample_percentage\x18\x05 \x01(\x01B\x03\xE0A\x01H\x01\x88\x01\x01\x12\x85\x01\x0A\x1Aresponse_compression_codec\x18\x06 \x01(\x0E2W.google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodecB\x03\xE0A\x01H\x02\x88\x01\x01\"j\x0A\x18ResponseCompressionCodec\x12*\x0A&RESPONSE_COMPRESSION_CODEC_UNSPECIFIED\x10\x00\x12\"\x0A\x1ERESPONSE_COMPRESSION_CODEC_LZ4\x10\x02B%\x0A#output_format_serialization_optionsB\x14\x0A\x12_sample_percentageB\x1D\x0A\x1B_response_compression_codec:k\xEAAh\x0A*bigquerystorage.googleapis.com/ReadSession\x12:projects/{project}/locations/{location}/sessions/{session}B\x08\x0A\x06schema\"\x9C\x01\x0A\x0AReadStream\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03:{\xEAAx\x0A)bigquerystorage.googleapis.com/ReadStream\x12Kprojects/{project}/locations/{location}/sessions/{session}/streams/{stream}\"\xFB\x04\x0A\x0BWriteStream\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12E\x0A\x04type\x18\x02 \x01(\x0E22.google.cloud.bigquery.storage.v1.WriteStream.TypeB\x03\xE0A\x05\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bcommit_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12H\x0A\x0Ctable_schema\x18\x05 \x01(\x0B2-.google.cloud.bigquery.storage.v1.TableSchemaB\x03\xE0A\x03\x12P\x0A\x0Awrite_mode\x18\x07 \x01(\x0E27.google.cloud.bigquery.storage.v1.WriteStream.WriteModeB\x03\xE0A\x05\x12\x15\x0A\x08location\x18\x08 \x01(\x09B\x03\xE0A\x03\"F\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09COMMITTED\x10\x01\x12\x0B\x0A\x07PENDING\x10\x02\x12\x0C\x0A\x08BUFFERED\x10\x03\"3\x0A\x09WriteMode\x12\x1A\x0A\x16WRITE_MODE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06INSERT\x10\x01:v\xEAAs\x0A*bigquerystorage.googleapis.com/WriteStream\x12Eprojects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}*>\x0A\x0ADataFormat\x12\x1B\x0A\x17DATA_FORMAT_UNSPECIFIED\x10\x00\x12\x08\x0A\x04AVRO\x10\x01\x12\x09\x0A\x05ARROW\x10\x02*I\x0A\x0FWriteStreamView\x12!\x0A\x1DWRITE_STREAM_VIEW_UNSPECIFIED\x10\x00\x12\x09\x0A\x05BASIC\x10\x01\x12\x08\x0A\x04FULL\x10\x02B\xBB\x01\x0A\$com.google.cloud.bigquery.storage.v1B\x0BStreamProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php deleted file mode 100644 index 35eca1cfedcb..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/GPBMetadata/Google/Cloud/Bigquery/Storage/V1/Table.php +++ /dev/null @@ -1,26 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC7\x0A\x0A,google/cloud/bigquery/storage/v1/table.proto\x12 google.cloud.bigquery.storage.v1\x1A\x1Egoogle/protobuf/wrappers.proto\"Q\x0A\x0BTableSchema\x12B\x0A\x06fields\x18\x01 \x03(\x0B22.google.cloud.bigquery.storage.v1.TableFieldSchema\"\xBC\x07\x0A\x10TableFieldSchema\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12J\x0A\x04type\x18\x02 \x01(\x0E27.google.cloud.bigquery.storage.v1.TableFieldSchema.TypeB\x03\xE0A\x02\x12J\x0A\x04mode\x18\x03 \x01(\x0E27.google.cloud.bigquery.storage.v1.TableFieldSchema.ModeB\x03\xE0A\x01\x12G\x0A\x06fields\x18\x04 \x03(\x0B22.google.cloud.bigquery.storage.v1.TableFieldSchemaB\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x06 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Amax_length\x18\x07 \x01(\x03B\x03\xE0A\x01\x12\x16\x0A\x09precision\x18\x08 \x01(\x03B\x03\xE0A\x01\x12\x12\x0A\x05scale\x18\x09 \x01(\x03B\x03\xE0A\x01\x12%\x0A\x18default_value_expression\x18\x0A \x01(\x09B\x03\xE0A\x01\x12=\x0A\x13timestamp_precision\x18\x1B \x01(\x0B2\x1B.google.protobuf.Int64ValueB\x03\xE0A\x01\x12d\x0A\x12range_element_type\x18\x0B \x01(\x0B2C.google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementTypeB\x03\xE0A\x01\x1A^\x0A\x10FieldElementType\x12J\x0A\x04type\x18\x01 \x01(\x0E27.google.cloud.bigquery.storage.v1.TableFieldSchema.TypeB\x03\xE0A\x02\"\xE0\x01\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06STRING\x10\x01\x12\x09\x0A\x05INT64\x10\x02\x12\x0A\x0A\x06DOUBLE\x10\x03\x12\x0A\x0A\x06STRUCT\x10\x04\x12\x09\x0A\x05BYTES\x10\x05\x12\x08\x0A\x04BOOL\x10\x06\x12\x0D\x0A\x09TIMESTAMP\x10\x07\x12\x08\x0A\x04DATE\x10\x08\x12\x08\x0A\x04TIME\x10\x09\x12\x0C\x0A\x08DATETIME\x10\x0A\x12\x0D\x0A\x09GEOGRAPHY\x10\x0B\x12\x0B\x0A\x07NUMERIC\x10\x0C\x12\x0E\x0A\x0ABIGNUMERIC\x10\x0D\x12\x0C\x0A\x08INTERVAL\x10\x0E\x12\x08\x0A\x04JSON\x10\x0F\x12\x09\x0A\x05RANGE\x10\x10\"F\x0A\x04Mode\x12\x14\x0A\x10MODE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08NULLABLE\x10\x01\x12\x0C\x0A\x08REQUIRED\x10\x02\x12\x0C\x0A\x08REPEATED\x10\x03B\xBA\x01\x0A\$com.google.cloud.bigquery.storage.v1B\x0ATableProtoP\x01Z>cloud.google.com/go/bigquery/storage/apiv1/storagepb;storagepb\xAA\x02 Google.Cloud.BigQuery.Storage.V1\xCA\x02 Google\\Cloud\\BigQuery\\Storage\\V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php deleted file mode 100644 index 56de7ef223a0..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest.php +++ /dev/null @@ -1,588 +0,0 @@ -google.cloud.bigquery.storage.v1.AppendRowsRequest - */ -class AppendRowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The write_stream identifies the append operation. It must be - * provided in the following scenarios: - * * In the first request to an AppendRows connection. - * * In all subsequent requests to an AppendRows connection, if you use the - * same connection to write to multiple tables or change the input schema for - * default streams. - * For explicitly created write streams, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` - * For the special default stream, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. - * An example of a possible sequence of requests with write_stream fields - * within a single connection: - * * r1: {write_stream: stream_name_1} - * * r2: {write_stream: /*omit{@*}} - * * r3: {write_stream: /*omit{@*}} - * * r4: {write_stream: stream_name_2} - * * r5: {write_stream: stream_name_2} - * The destination changed in request_4, so the write_stream field must be - * populated in all subsequent requests in this stream. - * - * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $write_stream = ''; - /** - * If present, the write is only performed if the next append offset is same - * as the provided value. If not present, the write is performed at the - * current end of stream. Specifying a value for this field is not allowed - * when calling AppendRows for the '_default' stream. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - */ - protected $offset = null; - /** - * Id set by client to annotate its identity. Only initial request setting is - * respected. - * - * Generated from protobuf field string trace_id = 6; - */ - protected $trace_id = ''; - /** - * A map to indicate how to interpret missing value for some fields. Missing - * values are fields present in user schema but missing in rows. The key is - * the field name. The value is the interpretation of missing values for the - * field. - * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all - * missing values in field foo are interpreted as NULL, all missing values in - * field bar are interpreted as the default value of field bar in table - * schema. - * If a field is not in this map and has missing values, the missing values - * in this field are interpreted as NULL. - * This field only applies to the current request, it won't affect other - * requests on the connection. - * Currently, field name can only be top-level column name, can't be a struct - * field path like 'foo.bar'. - * - * Generated from protobuf field map missing_value_interpretations = 7; - */ - private $missing_value_interpretations; - /** - * Optional. Default missing value interpretation for all columns in the - * table. When a value is specified on an `AppendRowsRequest`, it is applied - * to all requests from that point forward, until a subsequent - * `AppendRowsRequest` sets it to a different value. - * `missing_value_interpretation` can override - * `default_missing_value_interpretation`. For example, if you want to write - * `NULL` instead of using default values for some columns, you can set - * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same - * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $default_missing_value_interpretation = 0; - /** - * Optional. Stats and telemetry data gathered on the client side. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats client_stats = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $client_stats = null; - protected $rows; - - /** - * @param string $writeStream Required. The write_stream identifies the append operation. It must be - * provided in the following scenarios: - * - * * In the first request to an AppendRows connection. - * - * * In all subsequent requests to an AppendRows connection, if you use the - * same connection to write to multiple tables or change the input schema for - * default streams. - * - * For explicitly created write streams, the format is: - * - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` - * - * For the special default stream, the format is: - * - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. - * - * An example of a possible sequence of requests with write_stream fields - * within a single connection: - * - * * r1: {write_stream: stream_name_1} - * - * * r2: {write_stream: /*omit*/} - * - * * r3: {write_stream: /*omit*/} - * - * * r4: {write_stream: stream_name_2} - * - * * r5: {write_stream: stream_name_2} - * - * The destination changed in request_4, so the write_stream field must be - * populated in all subsequent requests in this stream. Please see - * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest - * - * @experimental - */ - public static function build(string $writeStream): self - { - return (new self()) - ->setWriteStream($writeStream); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $write_stream - * Required. The write_stream identifies the append operation. It must be - * provided in the following scenarios: - * * In the first request to an AppendRows connection. - * * In all subsequent requests to an AppendRows connection, if you use the - * same connection to write to multiple tables or change the input schema for - * default streams. - * For explicitly created write streams, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` - * For the special default stream, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. - * An example of a possible sequence of requests with write_stream fields - * within a single connection: - * * r1: {write_stream: stream_name_1} - * * r2: {write_stream: /*omit{@*}} - * * r3: {write_stream: /*omit{@*}} - * * r4: {write_stream: stream_name_2} - * * r5: {write_stream: stream_name_2} - * The destination changed in request_4, so the write_stream field must be - * populated in all subsequent requests in this stream. - * @type \Google\Protobuf\Int64Value $offset - * If present, the write is only performed if the next append offset is same - * as the provided value. If not present, the write is performed at the - * current end of stream. Specifying a value for this field is not allowed - * when calling AppendRows for the '_default' stream. - * @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData $proto_rows - * Rows in proto format. - * @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData $arrow_rows - * Rows in arrow format. - * @type string $trace_id - * Id set by client to annotate its identity. Only initial request setting is - * respected. - * @type array|\Google\Protobuf\Internal\MapField $missing_value_interpretations - * A map to indicate how to interpret missing value for some fields. Missing - * values are fields present in user schema but missing in rows. The key is - * the field name. The value is the interpretation of missing values for the - * field. - * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all - * missing values in field foo are interpreted as NULL, all missing values in - * field bar are interpreted as the default value of field bar in table - * schema. - * If a field is not in this map and has missing values, the missing values - * in this field are interpreted as NULL. - * This field only applies to the current request, it won't affect other - * requests on the connection. - * Currently, field name can only be top-level column name, can't be a struct - * field path like 'foo.bar'. - * @type int $default_missing_value_interpretation - * Optional. Default missing value interpretation for all columns in the - * table. When a value is specified on an `AppendRowsRequest`, it is applied - * to all requests from that point forward, until a subsequent - * `AppendRowsRequest` sets it to a different value. - * `missing_value_interpretation` can override - * `default_missing_value_interpretation`. For example, if you want to write - * `NULL` instead of using default values for some columns, you can set - * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same - * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. - * @type \Google\Cloud\BigQuery\Storage\V1\ClientStats $client_stats - * Optional. Stats and telemetry data gathered on the client side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. The write_stream identifies the append operation. It must be - * provided in the following scenarios: - * * In the first request to an AppendRows connection. - * * In all subsequent requests to an AppendRows connection, if you use the - * same connection to write to multiple tables or change the input schema for - * default streams. - * For explicitly created write streams, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` - * For the special default stream, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. - * An example of a possible sequence of requests with write_stream fields - * within a single connection: - * * r1: {write_stream: stream_name_1} - * * r2: {write_stream: /*omit{@*}} - * * r3: {write_stream: /*omit{@*}} - * * r4: {write_stream: stream_name_2} - * * r5: {write_stream: stream_name_2} - * The destination changed in request_4, so the write_stream field must be - * populated in all subsequent requests in this stream. - * - * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getWriteStream() - { - return $this->write_stream; - } - - /** - * Required. The write_stream identifies the append operation. It must be - * provided in the following scenarios: - * * In the first request to an AppendRows connection. - * * In all subsequent requests to an AppendRows connection, if you use the - * same connection to write to multiple tables or change the input schema for - * default streams. - * For explicitly created write streams, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{id}` - * For the special default stream, the format is: - * * `projects/{project}/datasets/{dataset}/tables/{table}/streams/_default`. - * An example of a possible sequence of requests with write_stream fields - * within a single connection: - * * r1: {write_stream: stream_name_1} - * * r2: {write_stream: /*omit{@*}} - * * r3: {write_stream: /*omit{@*}} - * * r4: {write_stream: stream_name_2} - * * r5: {write_stream: stream_name_2} - * The destination changed in request_4, so the write_stream field must be - * populated in all subsequent requests in this stream. - * - * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWriteStream($var) - { - GPBUtil::checkString($var, True); - $this->write_stream = $var; - - return $this; - } - - /** - * If present, the write is only performed if the next append offset is same - * as the provided value. If not present, the write is performed at the - * current end of stream. Specifying a value for this field is not allowed - * when calling AppendRows for the '_default' stream. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @return \Google\Protobuf\Int64Value|null - */ - public function getOffset() - { - return $this->offset; - } - - public function hasOffset() - { - return isset($this->offset); - } - - public function clearOffset() - { - unset($this->offset); - } - - /** - * Returns the unboxed value from getOffset() - - * If present, the write is only performed if the next append offset is same - * as the provided value. If not present, the write is performed at the - * current end of stream. Specifying a value for this field is not allowed - * when calling AppendRows for the '_default' stream. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @return int|string|null - */ - public function getOffsetUnwrapped() - { - return $this->readWrapperValue("offset"); - } - - /** - * If present, the write is only performed if the next append offset is same - * as the provided value. If not present, the write is performed at the - * current end of stream. Specifying a value for this field is not allowed - * when calling AppendRows for the '_default' stream. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->offset = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * If present, the write is only performed if the next append offset is same - * as the provided value. If not present, the write is performed at the - * current end of stream. Specifying a value for this field is not allowed - * when calling AppendRows for the '_default' stream. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @param int|string|null $var - * @return $this - */ - public function setOffsetUnwrapped($var) - { - $this->writeWrapperValue("offset", $var); - return $this;} - - /** - * Rows in proto format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData proto_rows = 4; - * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData|null - */ - public function getProtoRows() - { - return $this->readOneof(4); - } - - public function hasProtoRows() - { - return $this->hasOneof(4); - } - - /** - * Rows in proto format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData proto_rows = 4; - * @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData $var - * @return $this - */ - public function setProtoRows($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ProtoData::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Rows in arrow format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; - * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData|null - */ - public function getArrowRows() - { - return $this->readOneof(5); - } - - public function hasArrowRows() - { - return $this->hasOneof(5); - } - - /** - * Rows in arrow format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData arrow_rows = 5; - * @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData $var - * @return $this - */ - public function setArrowRows($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\ArrowData::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Id set by client to annotate its identity. Only initial request setting is - * respected. - * - * Generated from protobuf field string trace_id = 6; - * @return string - */ - public function getTraceId() - { - return $this->trace_id; - } - - /** - * Id set by client to annotate its identity. Only initial request setting is - * respected. - * - * Generated from protobuf field string trace_id = 6; - * @param string $var - * @return $this - */ - public function setTraceId($var) - { - GPBUtil::checkString($var, True); - $this->trace_id = $var; - - return $this; - } - - /** - * A map to indicate how to interpret missing value for some fields. Missing - * values are fields present in user schema but missing in rows. The key is - * the field name. The value is the interpretation of missing values for the - * field. - * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all - * missing values in field foo are interpreted as NULL, all missing values in - * field bar are interpreted as the default value of field bar in table - * schema. - * If a field is not in this map and has missing values, the missing values - * in this field are interpreted as NULL. - * This field only applies to the current request, it won't affect other - * requests on the connection. - * Currently, field name can only be top-level column name, can't be a struct - * field path like 'foo.bar'. - * - * Generated from protobuf field map missing_value_interpretations = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getMissingValueInterpretations() - { - return $this->missing_value_interpretations; - } - - /** - * A map to indicate how to interpret missing value for some fields. Missing - * values are fields present in user schema but missing in rows. The key is - * the field name. The value is the interpretation of missing values for the - * field. - * For example, a map {'foo': NULL_VALUE, 'bar': DEFAULT_VALUE} means all - * missing values in field foo are interpreted as NULL, all missing values in - * field bar are interpreted as the default value of field bar in table - * schema. - * If a field is not in this map and has missing values, the missing values - * in this field are interpreted as NULL. - * This field only applies to the current request, it won't affect other - * requests on the connection. - * Currently, field name can only be top-level column name, can't be a struct - * field path like 'foo.bar'. - * - * Generated from protobuf field map missing_value_interpretations = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setMissingValueInterpretations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\MissingValueInterpretation::class); - $this->missing_value_interpretations = $arr; - - return $this; - } - - /** - * Optional. Default missing value interpretation for all columns in the - * table. When a value is specified on an `AppendRowsRequest`, it is applied - * to all requests from that point forward, until a subsequent - * `AppendRowsRequest` sets it to a different value. - * `missing_value_interpretation` can override - * `default_missing_value_interpretation`. For example, if you want to write - * `NULL` instead of using default values for some columns, you can set - * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same - * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDefaultMissingValueInterpretation() - { - return $this->default_missing_value_interpretation; - } - - /** - * Optional. Default missing value interpretation for all columns in the - * table. When a value is specified on an `AppendRowsRequest`, it is applied - * to all requests from that point forward, until a subsequent - * `AppendRowsRequest` sets it to a different value. - * `missing_value_interpretation` can override - * `default_missing_value_interpretation`. For example, if you want to write - * `NULL` instead of using default values for some columns, you can set - * `default_missing_value_interpretation` to `DEFAULT_VALUE` and at the same - * time, set `missing_value_interpretations` to `NULL_VALUE` on those columns. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation default_missing_value_interpretation = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDefaultMissingValueInterpretation($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsRequest\MissingValueInterpretation::class); - $this->default_missing_value_interpretation = $var; - - return $this; - } - - /** - * Optional. Stats and telemetry data gathered on the client side. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats client_stats = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Storage\V1\ClientStats|null - */ - public function getClientStats() - { - return $this->client_stats; - } - - public function hasClientStats() - { - return isset($this->client_stats); - } - - public function clearClientStats() - { - unset($this->client_stats); - } - - /** - * Optional. Stats and telemetry data gathered on the client side. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ClientStats client_stats = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\ClientStats $var - * @return $this - */ - public function setClientStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ClientStats::class); - $this->client_stats = $var; - - return $this; - } - - /** - * @return string - */ - public function getRows() - { - return $this->whichOneof("rows"); - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php deleted file mode 100644 index 8569f74e00c1..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ArrowData.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.bigquery.storage.v1.AppendRowsRequest.ArrowData - */ -class ArrowData extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Arrow Schema used to serialize the data. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; - */ - protected $writer_schema = null; - /** - * Required. Serialized row data in Arrow format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; - */ - protected $rows = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $writer_schema - * Optional. Arrow Schema used to serialize the data. - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $rows - * Required. Serialized row data in Arrow format. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Arrow Schema used to serialize the data. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null - */ - public function getWriterSchema() - { - return $this->writer_schema; - } - - public function hasWriterSchema() - { - return isset($this->writer_schema); - } - - public function clearWriterSchema() - { - unset($this->writer_schema); - } - - /** - * Optional. Arrow Schema used to serialize the data. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema writer_schema = 1; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $var - * @return $this - */ - public function setWriterSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSchema::class); - $this->writer_schema = $var; - - return $this; - } - - /** - * Required. Serialized row data in Arrow format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch|null - */ - public function getRows() - { - return $this->rows; - } - - public function hasRows() - { - return isset($this->rows); - } - - public function clearRows() - { - unset($this->rows); - } - - /** - * Required. Serialized row data in Arrow format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch rows = 2; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $var - * @return $this - */ - public function setRows($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch::class); - $this->rows = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php deleted file mode 100644 index 402c780095b4..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/MissingValueInterpretation.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.bigquery.storage.v1.AppendRowsRequest.MissingValueInterpretation - */ -class MissingValueInterpretation -{ - /** - * Invalid missing value interpretation. Requests with this value will be - * rejected. - * - * Generated from protobuf enum MISSING_VALUE_INTERPRETATION_UNSPECIFIED = 0; - */ - const MISSING_VALUE_INTERPRETATION_UNSPECIFIED = 0; - /** - * Missing value is interpreted as NULL. - * - * Generated from protobuf enum NULL_VALUE = 1; - */ - const NULL_VALUE = 1; - /** - * Missing value is interpreted as column default value if declared in the - * table schema, NULL otherwise. - * - * Generated from protobuf enum DEFAULT_VALUE = 2; - */ - const DEFAULT_VALUE = 2; - - private static $valueToName = [ - self::MISSING_VALUE_INTERPRETATION_UNSPECIFIED => 'MISSING_VALUE_INTERPRETATION_UNSPECIFIED', - self::NULL_VALUE => 'NULL_VALUE', - self::DEFAULT_VALUE => 'DEFAULT_VALUE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php deleted file mode 100644 index 0be07e61683c..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsRequest/ProtoData.php +++ /dev/null @@ -1,150 +0,0 @@ -google.cloud.bigquery.storage.v1.AppendRowsRequest.ProtoData - */ -class ProtoData extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The protocol buffer schema used to serialize the data. Provide - * this value whenever: - * * You send the first request of an RPC connection. - * * You change the input schema. - * * You specify a new destination table. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoSchema writer_schema = 1; - */ - protected $writer_schema = null; - /** - * Required. Serialized row data in protobuf message format. - * Currently, the backend expects the serialized rows to adhere to - * proto2 semantics when appending rows, particularly with respect to - * how default values are encoded. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoRows rows = 2; - */ - protected $rows = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\ProtoSchema $writer_schema - * Optional. The protocol buffer schema used to serialize the data. Provide - * this value whenever: - * * You send the first request of an RPC connection. - * * You change the input schema. - * * You specify a new destination table. - * @type \Google\Cloud\BigQuery\Storage\V1\ProtoRows $rows - * Required. Serialized row data in protobuf message format. - * Currently, the backend expects the serialized rows to adhere to - * proto2 semantics when appending rows, particularly with respect to - * how default values are encoded. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The protocol buffer schema used to serialize the data. Provide - * this value whenever: - * * You send the first request of an RPC connection. - * * You change the input schema. - * * You specify a new destination table. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoSchema writer_schema = 1; - * @return \Google\Cloud\BigQuery\Storage\V1\ProtoSchema|null - */ - public function getWriterSchema() - { - return $this->writer_schema; - } - - public function hasWriterSchema() - { - return isset($this->writer_schema); - } - - public function clearWriterSchema() - { - unset($this->writer_schema); - } - - /** - * Optional. The protocol buffer schema used to serialize the data. Provide - * this value whenever: - * * You send the first request of an RPC connection. - * * You change the input schema. - * * You specify a new destination table. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoSchema writer_schema = 1; - * @param \Google\Cloud\BigQuery\Storage\V1\ProtoSchema $var - * @return $this - */ - public function setWriterSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ProtoSchema::class); - $this->writer_schema = $var; - - return $this; - } - - /** - * Required. Serialized row data in protobuf message format. - * Currently, the backend expects the serialized rows to adhere to - * proto2 semantics when appending rows, particularly with respect to - * how default values are encoded. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoRows rows = 2; - * @return \Google\Cloud\BigQuery\Storage\V1\ProtoRows|null - */ - public function getRows() - { - return $this->rows; - } - - public function hasRows() - { - return isset($this->rows); - } - - public function clearRows() - { - unset($this->rows); - } - - /** - * Required. Serialized row data in protobuf message format. - * Currently, the backend expects the serialized rows to adhere to - * proto2 semantics when appending rows, particularly with respect to - * how default values are encoded. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ProtoRows rows = 2; - * @param \Google\Cloud\BigQuery\Storage\V1\ProtoRows $var - * @return $this - */ - public function setRows($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ProtoRows::class); - $this->rows = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php deleted file mode 100644 index 21eb7c1a4efc..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse.php +++ /dev/null @@ -1,279 +0,0 @@ -google.cloud.bigquery.storage.v1.AppendRowsResponse - */ -class AppendRowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * If backend detects a schema update, pass it to user so that user can - * use it to input new type of message. It will be empty when no schema - * updates have occurred. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3; - */ - protected $updated_schema = null; - /** - * If a request failed due to corrupted rows, no rows in the batch will be - * appended. The API will return row level error info, so that the caller can - * remove the bad rows and retry the request. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4; - */ - private $row_errors; - /** - * The target of the append operation. Matches the write_stream in the - * corresponding request. - * - * Generated from protobuf field string write_stream = 5; - */ - protected $write_stream = ''; - protected $response; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult $append_result - * Result if the append is successful. - * @type \Google\Rpc\Status $error - * Error returned when problems were encountered. If present, - * it indicates rows were not accepted into the system. - * Users can retry or continue with other append requests within the - * same connection. - * Additional information about error signalling: - * ALREADY_EXISTS: Happens when an append specified an offset, and the - * backend already has received data at this offset. Typically encountered - * in retry scenarios, and can be ignored. - * OUT_OF_RANGE: Returned when the specified offset in the stream is beyond - * the current end of the stream. - * INVALID_ARGUMENT: Indicates a malformed request or data. - * ABORTED: Request processing is aborted because of prior failures. The - * request can be retried if previous failure is addressed. - * INTERNAL: Indicates server side error(s) that can be retried. - * @type \Google\Cloud\BigQuery\Storage\V1\TableSchema $updated_schema - * If backend detects a schema update, pass it to user so that user can - * use it to input new type of message. It will be empty when no schema - * updates have occurred. - * @type \Google\Cloud\BigQuery\Storage\V1\RowError[] $row_errors - * If a request failed due to corrupted rows, no rows in the batch will be - * appended. The API will return row level error info, so that the caller can - * remove the bad rows and retry the request. - * @type string $write_stream - * The target of the append operation. Matches the write_stream in the - * corresponding request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Result if the append is successful. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult append_result = 1; - * @return \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult|null - */ - public function getAppendResult() - { - return $this->readOneof(1); - } - - public function hasAppendResult() - { - return $this->hasOneof(1); - } - - /** - * Result if the append is successful. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult append_result = 1; - * @param \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult $var - * @return $this - */ - public function setAppendResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse\AppendResult::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Error returned when problems were encountered. If present, - * it indicates rows were not accepted into the system. - * Users can retry or continue with other append requests within the - * same connection. - * Additional information about error signalling: - * ALREADY_EXISTS: Happens when an append specified an offset, and the - * backend already has received data at this offset. Typically encountered - * in retry scenarios, and can be ignored. - * OUT_OF_RANGE: Returned when the specified offset in the stream is beyond - * the current end of the stream. - * INVALID_ARGUMENT: Indicates a malformed request or data. - * ABORTED: Request processing is aborted because of prior failures. The - * request can be retried if previous failure is addressed. - * INTERNAL: Indicates server side error(s) that can be retried. - * - * Generated from protobuf field .google.rpc.Status error = 2; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->readOneof(2); - } - - public function hasError() - { - return $this->hasOneof(2); - } - - /** - * Error returned when problems were encountered. If present, - * it indicates rows were not accepted into the system. - * Users can retry or continue with other append requests within the - * same connection. - * Additional information about error signalling: - * ALREADY_EXISTS: Happens when an append specified an offset, and the - * backend already has received data at this offset. Typically encountered - * in retry scenarios, and can be ignored. - * OUT_OF_RANGE: Returned when the specified offset in the stream is beyond - * the current end of the stream. - * INVALID_ARGUMENT: Indicates a malformed request or data. - * ABORTED: Request processing is aborted because of prior failures. The - * request can be retried if previous failure is addressed. - * INTERNAL: Indicates server side error(s) that can be retried. - * - * Generated from protobuf field .google.rpc.Status error = 2; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * If backend detects a schema update, pass it to user so that user can - * use it to input new type of message. It will be empty when no schema - * updates have occurred. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3; - * @return \Google\Cloud\BigQuery\Storage\V1\TableSchema|null - */ - public function getUpdatedSchema() - { - return $this->updated_schema; - } - - public function hasUpdatedSchema() - { - return isset($this->updated_schema); - } - - public function clearUpdatedSchema() - { - unset($this->updated_schema); - } - - /** - * If backend detects a schema update, pass it to user so that user can - * use it to input new type of message. It will be empty when no schema - * updates have occurred. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema updated_schema = 3; - * @param \Google\Cloud\BigQuery\Storage\V1\TableSchema $var - * @return $this - */ - public function setUpdatedSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableSchema::class); - $this->updated_schema = $var; - - return $this; - } - - /** - * If a request failed due to corrupted rows, no rows in the batch will be - * appended. The API will return row level error info, so that the caller can - * remove the bad rows and retry the request. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4; - * @return RepeatedField<\Google\Cloud\BigQuery\Storage\V1\RowError> - */ - public function getRowErrors() - { - return $this->row_errors; - } - - /** - * If a request failed due to corrupted rows, no rows in the batch will be - * appended. The API will return row level error info, so that the caller can - * remove the bad rows and retry the request. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.RowError row_errors = 4; - * @param \Google\Cloud\BigQuery\Storage\V1\RowError[] $var - * @return $this - */ - public function setRowErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\RowError::class); - $this->row_errors = $arr; - - return $this; - } - - /** - * The target of the append operation. Matches the write_stream in the - * corresponding request. - * - * Generated from protobuf field string write_stream = 5; - * @return string - */ - public function getWriteStream() - { - return $this->write_stream; - } - - /** - * The target of the append operation. Matches the write_stream in the - * corresponding request. - * - * Generated from protobuf field string write_stream = 5; - * @param string $var - * @return $this - */ - public function setWriteStream($var) - { - GPBUtil::checkString($var, True); - $this->write_stream = $var; - - return $this; - } - - /** - * @return string - */ - public function getResponse() - { - return $this->whichOneof("response"); - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php deleted file mode 100644 index 7ff2509cb36a..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AppendRowsResponse/AppendResult.php +++ /dev/null @@ -1,110 +0,0 @@ -google.cloud.bigquery.storage.v1.AppendRowsResponse.AppendResult - */ -class AppendResult extends \Google\Protobuf\Internal\Message -{ - /** - * The row offset at which the last append occurred. The offset will not be - * set if appending using default streams. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 1; - */ - protected $offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Int64Value $offset - * The row offset at which the last append occurred. The offset will not be - * set if appending using default streams. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * The row offset at which the last append occurred. The offset will not be - * set if appending using default streams. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 1; - * @return \Google\Protobuf\Int64Value|null - */ - public function getOffset() - { - return $this->offset; - } - - public function hasOffset() - { - return isset($this->offset); - } - - public function clearOffset() - { - unset($this->offset); - } - - /** - * Returns the unboxed value from getOffset() - - * The row offset at which the last append occurred. The offset will not be - * set if appending using default streams. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 1; - * @return int|string|null - */ - public function getOffsetUnwrapped() - { - return $this->readWrapperValue("offset"); - } - - /** - * The row offset at which the last append occurred. The offset will not be - * set if appending using default streams. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 1; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->offset = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * The row offset at which the last append occurred. The offset will not be - * set if appending using default streams. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 1; - * @param int|string|null $var - * @return $this - */ - public function setOffsetUnwrapped($var) - { - $this->writeWrapperValue("offset", $var); - return $this;} - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php deleted file mode 100644 index 792e714a6bf9..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowRecordBatch.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.bigquery.storage.v1.ArrowRecordBatch - */ -class ArrowRecordBatch extends \Google\Protobuf\Internal\Message -{ - /** - * IPC-serialized Arrow RecordBatch. - * - * Generated from protobuf field bytes serialized_record_batch = 1; - */ - protected $serialized_record_batch = ''; - /** - * [Deprecated] The count of rows in `serialized_record_batch`. - * Please use the format-independent ReadRowsResponse.row_count instead. - * - * Generated from protobuf field int64 row_count = 2 [deprecated = true]; - * @deprecated - */ - protected $row_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $serialized_record_batch - * IPC-serialized Arrow RecordBatch. - * @type int|string $row_count - * [Deprecated] The count of rows in `serialized_record_batch`. - * Please use the format-independent ReadRowsResponse.row_count instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Arrow::initOnce(); - parent::__construct($data); - } - - /** - * IPC-serialized Arrow RecordBatch. - * - * Generated from protobuf field bytes serialized_record_batch = 1; - * @return string - */ - public function getSerializedRecordBatch() - { - return $this->serialized_record_batch; - } - - /** - * IPC-serialized Arrow RecordBatch. - * - * Generated from protobuf field bytes serialized_record_batch = 1; - * @param string $var - * @return $this - */ - public function setSerializedRecordBatch($var) - { - GPBUtil::checkString($var, False); - $this->serialized_record_batch = $var; - - return $this; - } - - /** - * [Deprecated] The count of rows in `serialized_record_batch`. - * Please use the format-independent ReadRowsResponse.row_count instead. - * - * Generated from protobuf field int64 row_count = 2 [deprecated = true]; - * @return int|string - * @deprecated - */ - public function getRowCount() - { - if ($this->row_count !== 0) { - @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); - } - return $this->row_count; - } - - /** - * [Deprecated] The count of rows in `serialized_record_batch`. - * Please use the format-independent ReadRowsResponse.row_count instead. - * - * Generated from protobuf field int64 row_count = 2 [deprecated = true]; - * @param int|string $var - * @return $this - * @deprecated - */ - public function setRowCount($var) - { - @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php deleted file mode 100644 index 6f5f9866a54f..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSchema.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.bigquery.storage.v1.ArrowSchema - */ -class ArrowSchema extends \Google\Protobuf\Internal\Message -{ - /** - * IPC serialized Arrow schema. - * - * Generated from protobuf field bytes serialized_schema = 1; - */ - protected $serialized_schema = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $serialized_schema - * IPC serialized Arrow schema. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Arrow::initOnce(); - parent::__construct($data); - } - - /** - * IPC serialized Arrow schema. - * - * Generated from protobuf field bytes serialized_schema = 1; - * @return string - */ - public function getSerializedSchema() - { - return $this->serialized_schema; - } - - /** - * IPC serialized Arrow schema. - * - * Generated from protobuf field bytes serialized_schema = 1; - * @param string $var - * @return $this - */ - public function setSerializedSchema($var) - { - GPBUtil::checkString($var, False); - $this->serialized_schema = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php deleted file mode 100644 index 25ce3c41cd6c..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.bigquery.storage.v1.ArrowSerializationOptions - */ -class ArrowSerializationOptions extends \Google\Protobuf\Internal\Message -{ - /** - * The compression codec to use for Arrow buffers in serialized record - * batches. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec buffer_compression = 2; - */ - protected $buffer_compression = 0; - /** - * Optional. Set timestamp precision option. If not set, the default precision - * is microseconds. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision picos_timestamp_precision = 3; - */ - protected $picos_timestamp_precision = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $buffer_compression - * The compression codec to use for Arrow buffers in serialized record - * batches. - * @type int $picos_timestamp_precision - * Optional. Set timestamp precision option. If not set, the default precision - * is microseconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Arrow::initOnce(); - parent::__construct($data); - } - - /** - * The compression codec to use for Arrow buffers in serialized record - * batches. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec buffer_compression = 2; - * @return int - */ - public function getBufferCompression() - { - return $this->buffer_compression; - } - - /** - * The compression codec to use for Arrow buffers in serialized record - * batches. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec buffer_compression = 2; - * @param int $var - * @return $this - */ - public function setBufferCompression($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions\CompressionCodec::class); - $this->buffer_compression = $var; - - return $this; - } - - /** - * Optional. Set timestamp precision option. If not set, the default precision - * is microseconds. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision picos_timestamp_precision = 3; - * @return int - */ - public function getPicosTimestampPrecision() - { - return $this->picos_timestamp_precision; - } - - /** - * Optional. Set timestamp precision option. If not set, the default precision - * is microseconds. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision picos_timestamp_precision = 3; - * @param int $var - * @return $this - */ - public function setPicosTimestampPrecision($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions\PicosTimestampPrecision::class); - $this->picos_timestamp_precision = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php deleted file mode 100644 index b32b64cba715..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/CompressionCodec.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.bigquery.storage.v1.ArrowSerializationOptions.CompressionCodec - */ -class CompressionCodec -{ - /** - * If unspecified no compression will be used. - * - * Generated from protobuf enum COMPRESSION_UNSPECIFIED = 0; - */ - const COMPRESSION_UNSPECIFIED = 0; - /** - * LZ4 Frame (https://github.com/lz4/lz4/blob/dev/doc/lz4_Frame_format.md) - * - * Generated from protobuf enum LZ4_FRAME = 1; - */ - const LZ4_FRAME = 1; - /** - * Zstandard compression. - * - * Generated from protobuf enum ZSTD = 2; - */ - const ZSTD = 2; - - private static $valueToName = [ - self::COMPRESSION_UNSPECIFIED => 'COMPRESSION_UNSPECIFIED', - self::LZ4_FRAME => 'LZ4_FRAME', - self::ZSTD => 'ZSTD', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/PicosTimestampPrecision.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/PicosTimestampPrecision.php deleted file mode 100644 index 29a0e80ab9a7..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ArrowSerializationOptions/PicosTimestampPrecision.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.bigquery.storage.v1.ArrowSerializationOptions.PicosTimestampPrecision - */ -class PicosTimestampPrecision -{ - /** - * Unspecified timestamp precision. The default precision is microseconds. - * - * Generated from protobuf enum PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0; - */ - const PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0; - /** - * Timestamp values returned by Read API will be truncated to microsecond - * level precision. The value will be encoded as Arrow TIMESTAMP type in a - * 64 bit integer. - * - * Generated from protobuf enum TIMESTAMP_PRECISION_MICROS = 1; - */ - const TIMESTAMP_PRECISION_MICROS = 1; - /** - * Timestamp values returned by Read API will be truncated to nanosecond - * level precision. The value will be encoded as Arrow TIMESTAMP type in a - * 64 bit integer. - * - * Generated from protobuf enum TIMESTAMP_PRECISION_NANOS = 2; - */ - const TIMESTAMP_PRECISION_NANOS = 2; - /** - * Read API will return full precision picosecond value. The value will be - * encoded as a string which conforms to ISO 8601 format. - * - * Generated from protobuf enum TIMESTAMP_PRECISION_PICOS = 3; - */ - const TIMESTAMP_PRECISION_PICOS = 3; - - private static $valueToName = [ - self::PICOS_TIMESTAMP_PRECISION_UNSPECIFIED => 'PICOS_TIMESTAMP_PRECISION_UNSPECIFIED', - self::TIMESTAMP_PRECISION_MICROS => 'TIMESTAMP_PRECISION_MICROS', - self::TIMESTAMP_PRECISION_NANOS => 'TIMESTAMP_PRECISION_NANOS', - self::TIMESTAMP_PRECISION_PICOS => 'TIMESTAMP_PRECISION_PICOS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php deleted file mode 100644 index 3f4259a47315..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroRows.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.bigquery.storage.v1.AvroRows - */ -class AvroRows extends \Google\Protobuf\Internal\Message -{ - /** - * Binary serialized rows in a block. - * - * Generated from protobuf field bytes serialized_binary_rows = 1; - */ - protected $serialized_binary_rows = ''; - /** - * [Deprecated] The count of rows in the returning block. - * Please use the format-independent ReadRowsResponse.row_count instead. - * - * Generated from protobuf field int64 row_count = 2 [deprecated = true]; - * @deprecated - */ - protected $row_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $serialized_binary_rows - * Binary serialized rows in a block. - * @type int|string $row_count - * [Deprecated] The count of rows in the returning block. - * Please use the format-independent ReadRowsResponse.row_count instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Avro::initOnce(); - parent::__construct($data); - } - - /** - * Binary serialized rows in a block. - * - * Generated from protobuf field bytes serialized_binary_rows = 1; - * @return string - */ - public function getSerializedBinaryRows() - { - return $this->serialized_binary_rows; - } - - /** - * Binary serialized rows in a block. - * - * Generated from protobuf field bytes serialized_binary_rows = 1; - * @param string $var - * @return $this - */ - public function setSerializedBinaryRows($var) - { - GPBUtil::checkString($var, False); - $this->serialized_binary_rows = $var; - - return $this; - } - - /** - * [Deprecated] The count of rows in the returning block. - * Please use the format-independent ReadRowsResponse.row_count instead. - * - * Generated from protobuf field int64 row_count = 2 [deprecated = true]; - * @return int|string - * @deprecated - */ - public function getRowCount() - { - if ($this->row_count !== 0) { - @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); - } - return $this->row_count; - } - - /** - * [Deprecated] The count of rows in the returning block. - * Please use the format-independent ReadRowsResponse.row_count instead. - * - * Generated from protobuf field int64 row_count = 2 [deprecated = true]; - * @param int|string $var - * @return $this - * @deprecated - */ - public function setRowCount($var) - { - @trigger_error('row_count is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php deleted file mode 100644 index 46229d3779e8..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSchema.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.bigquery.storage.v1.AvroSchema - */ -class AvroSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Json serialized schema, as described at - * https://avro.apache.org/docs/1.8.1/spec.html. - * - * Generated from protobuf field string schema = 1; - */ - protected $schema = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $schema - * Json serialized schema, as described at - * https://avro.apache.org/docs/1.8.1/spec.html. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Avro::initOnce(); - parent::__construct($data); - } - - /** - * Json serialized schema, as described at - * https://avro.apache.org/docs/1.8.1/spec.html. - * - * Generated from protobuf field string schema = 1; - * @return string - */ - public function getSchema() - { - return $this->schema; - } - - /** - * Json serialized schema, as described at - * https://avro.apache.org/docs/1.8.1/spec.html. - * - * Generated from protobuf field string schema = 1; - * @param string $var - * @return $this - */ - public function setSchema($var) - { - GPBUtil::checkString($var, True); - $this->schema = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php deleted file mode 100644 index a5d87ce8dd53..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.bigquery.storage.v1.AvroSerializationOptions - */ -class AvroSerializationOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Enable displayName attribute in Avro schema. - * The Avro specification requires field names to be alphanumeric. By - * default, in cases when column names do not conform to these requirements - * (e.g. non-ascii unicode codepoints) and Avro is requested as an output - * format, the CreateReadSession call will fail. - * Setting this field to true, populates avro field names with a placeholder - * value and populates a "displayName" attribute for every avro field with the - * original column name. - * - * Generated from protobuf field bool enable_display_name_attribute = 1; - */ - protected $enable_display_name_attribute = false; - /** - * Optional. Set timestamp precision option. If not set, the default precision - * is microseconds. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision picos_timestamp_precision = 2; - */ - protected $picos_timestamp_precision = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_display_name_attribute - * Enable displayName attribute in Avro schema. - * The Avro specification requires field names to be alphanumeric. By - * default, in cases when column names do not conform to these requirements - * (e.g. non-ascii unicode codepoints) and Avro is requested as an output - * format, the CreateReadSession call will fail. - * Setting this field to true, populates avro field names with a placeholder - * value and populates a "displayName" attribute for every avro field with the - * original column name. - * @type int $picos_timestamp_precision - * Optional. Set timestamp precision option. If not set, the default precision - * is microseconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Avro::initOnce(); - parent::__construct($data); - } - - /** - * Enable displayName attribute in Avro schema. - * The Avro specification requires field names to be alphanumeric. By - * default, in cases when column names do not conform to these requirements - * (e.g. non-ascii unicode codepoints) and Avro is requested as an output - * format, the CreateReadSession call will fail. - * Setting this field to true, populates avro field names with a placeholder - * value and populates a "displayName" attribute for every avro field with the - * original column name. - * - * Generated from protobuf field bool enable_display_name_attribute = 1; - * @return bool - */ - public function getEnableDisplayNameAttribute() - { - return $this->enable_display_name_attribute; - } - - /** - * Enable displayName attribute in Avro schema. - * The Avro specification requires field names to be alphanumeric. By - * default, in cases when column names do not conform to these requirements - * (e.g. non-ascii unicode codepoints) and Avro is requested as an output - * format, the CreateReadSession call will fail. - * Setting this field to true, populates avro field names with a placeholder - * value and populates a "displayName" attribute for every avro field with the - * original column name. - * - * Generated from protobuf field bool enable_display_name_attribute = 1; - * @param bool $var - * @return $this - */ - public function setEnableDisplayNameAttribute($var) - { - GPBUtil::checkBool($var); - $this->enable_display_name_attribute = $var; - - return $this; - } - - /** - * Optional. Set timestamp precision option. If not set, the default precision - * is microseconds. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision picos_timestamp_precision = 2; - * @return int - */ - public function getPicosTimestampPrecision() - { - return $this->picos_timestamp_precision; - } - - /** - * Optional. Set timestamp precision option. If not set, the default precision - * is microseconds. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision picos_timestamp_precision = 2; - * @param int $var - * @return $this - */ - public function setPicosTimestampPrecision($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions\PicosTimestampPrecision::class); - $this->picos_timestamp_precision = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions/PicosTimestampPrecision.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions/PicosTimestampPrecision.php deleted file mode 100644 index 852bc808c1ff..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/AvroSerializationOptions/PicosTimestampPrecision.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.bigquery.storage.v1.AvroSerializationOptions.PicosTimestampPrecision - */ -class PicosTimestampPrecision -{ - /** - * Unspecified timestamp precision. The default precision is microseconds. - * - * Generated from protobuf enum PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0; - */ - const PICOS_TIMESTAMP_PRECISION_UNSPECIFIED = 0; - /** - * Timestamp values returned by Read API will be truncated to microsecond - * level precision. The value will be encoded as Avro TIMESTAMP type in a - * 64 bit integer. - * - * Generated from protobuf enum TIMESTAMP_PRECISION_MICROS = 1; - */ - const TIMESTAMP_PRECISION_MICROS = 1; - /** - * Timestamp values returned by Read API will be truncated to nanosecond - * level precision. The value will be encoded as Avro TIMESTAMP type in a - * 64 bit integer. - * - * Generated from protobuf enum TIMESTAMP_PRECISION_NANOS = 2; - */ - const TIMESTAMP_PRECISION_NANOS = 2; - /** - * Read API will return full precision picosecond value. The value will be - * encoded as a string which conforms to ISO 8601 format. - * - * Generated from protobuf enum TIMESTAMP_PRECISION_PICOS = 3; - */ - const TIMESTAMP_PRECISION_PICOS = 3; - - private static $valueToName = [ - self::PICOS_TIMESTAMP_PRECISION_UNSPECIFIED => 'PICOS_TIMESTAMP_PRECISION_UNSPECIFIED', - self::TIMESTAMP_PRECISION_MICROS => 'TIMESTAMP_PRECISION_MICROS', - self::TIMESTAMP_PRECISION_NANOS => 'TIMESTAMP_PRECISION_NANOS', - self::TIMESTAMP_PRECISION_PICOS => 'TIMESTAMP_PRECISION_PICOS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php deleted file mode 100644 index 0e92d0d05a9d..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsRequest - */ -class BatchCommitWriteStreamsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent table that all the streams should belong to, in the form - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The group of streams that will be committed atomically. - * - * Generated from protobuf field repeated string write_streams = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $write_streams; - - /** - * @param string $parent Required. Parent table that all the streams should belong to, in the form - * of `projects/{project}/datasets/{dataset}/tables/{table}`. Please see - * {@see BigQueryWriteClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Storage\V1\BatchCommitWriteStreamsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent table that all the streams should belong to, in the form - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * @type string[] $write_streams - * Required. The group of streams that will be committed atomically. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent table that all the streams should belong to, in the form - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent table that all the streams should belong to, in the form - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The group of streams that will be committed atomically. - * - * Generated from protobuf field repeated string write_streams = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField - */ - public function getWriteStreams() - { - return $this->write_streams; - } - - /** - * Required. The group of streams that will be committed atomically. - * - * Generated from protobuf field repeated string write_streams = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string[] $var - * @return $this - */ - public function setWriteStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->write_streams = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php deleted file mode 100644 index 01cfeb6ae5ae..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/BatchCommitWriteStreamsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.bigquery.storage.v1.BatchCommitWriteStreamsResponse - */ -class BatchCommitWriteStreamsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The time at which streams were committed in microseconds granularity. - * This field will only exist when there are no stream errors. - * **Note** if this field is not set, it means the commit was not successful. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 1; - */ - protected $commit_time = null; - /** - * Stream level error if commit failed. Only streams with error will be in - * the list. - * If empty, there is no error and all streams are committed successfully. - * If non empty, certain streams have errors and ZERO stream is committed due - * to atomicity guarantee. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.StorageError stream_errors = 2; - */ - private $stream_errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $commit_time - * The time at which streams were committed in microseconds granularity. - * This field will only exist when there are no stream errors. - * **Note** if this field is not set, it means the commit was not successful. - * @type \Google\Cloud\BigQuery\Storage\V1\StorageError[] $stream_errors - * Stream level error if commit failed. Only streams with error will be in - * the list. - * If empty, there is no error and all streams are committed successfully. - * If non empty, certain streams have errors and ZERO stream is committed due - * to atomicity guarantee. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * The time at which streams were committed in microseconds granularity. - * This field will only exist when there are no stream errors. - * **Note** if this field is not set, it means the commit was not successful. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTime() - { - return $this->commit_time; - } - - public function hasCommitTime() - { - return isset($this->commit_time); - } - - public function clearCommitTime() - { - unset($this->commit_time); - } - - /** - * The time at which streams were committed in microseconds granularity. - * This field will only exist when there are no stream errors. - * **Note** if this field is not set, it means the commit was not successful. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_time = $var; - - return $this; - } - - /** - * Stream level error if commit failed. Only streams with error will be in - * the list. - * If empty, there is no error and all streams are committed successfully. - * If non empty, certain streams have errors and ZERO stream is committed due - * to atomicity guarantee. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.StorageError stream_errors = 2; - * @return RepeatedField<\Google\Cloud\BigQuery\Storage\V1\StorageError> - */ - public function getStreamErrors() - { - return $this->stream_errors; - } - - /** - * Stream level error if commit failed. Only streams with error will be in - * the list. - * If empty, there is no error and all streams are committed successfully. - * If non empty, certain streams have errors and ZERO stream is committed due - * to atomicity guarantee. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.StorageError stream_errors = 2; - * @param \Google\Cloud\BigQuery\Storage\V1\StorageError[] $var - * @return $this - */ - public function setStreamErrors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\StorageError::class); - $this->stream_errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php deleted file mode 100644 index 9acbf4524904..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateReadSessionRequest.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.bigquery.storage.v1.CreateReadSessionRequest - */ -class CreateReadSessionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The request project that owns the session, in the form of - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Session to be created. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $read_session = null; - /** - * Max initial number of streams. If unset or zero, the server will - * provide a value of streams so as to produce reasonable throughput. Must be - * non-negative. The number of streams may be lower than the requested number, - * depending on the amount parallelism that is reasonable for the table. - * There is a default system max limit of 1,000. - * This must be greater than or equal to preferred_min_stream_count. - * Typically, clients should either leave this unset to let the system to - * determine an upper bound OR set this a size for the maximum "units of work" - * it can gracefully handle. - * - * Generated from protobuf field int32 max_stream_count = 3; - */ - protected $max_stream_count = 0; - /** - * The minimum preferred stream count. This parameter can be used to inform - * the service that there is a desired lower bound on the number of streams. - * This is typically a target parallelism of the client (e.g. a Spark - * cluster with N-workers would set this to a low multiple of N to ensure - * good cluster utilization). - * The system will make a best effort to provide at least this number of - * streams, but in some cases might provide less. - * - * Generated from protobuf field int32 preferred_min_stream_count = 4; - */ - protected $preferred_min_stream_count = 0; - - /** - * @param string $parent Required. The request project that owns the session, in the form of - * `projects/{project_id}`. Please see - * {@see BigQueryReadClient::projectName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession $readSession Required. Session to be created. - * @param int $maxStreamCount Max initial number of streams. If unset or zero, the server will - * provide a value of streams so as to produce reasonable throughput. Must be - * non-negative. The number of streams may be lower than the requested number, - * depending on the amount parallelism that is reasonable for the table. - * There is a default system max limit of 1,000. - * - * This must be greater than or equal to preferred_min_stream_count. - * Typically, clients should either leave this unset to let the system to - * determine an upper bound OR set this a size for the maximum "units of work" - * it can gracefully handle. - * - * @return \Google\Cloud\BigQuery\Storage\V1\CreateReadSessionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\Storage\V1\ReadSession $readSession, int $maxStreamCount): self - { - return (new self()) - ->setParent($parent) - ->setReadSession($readSession) - ->setMaxStreamCount($maxStreamCount); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The request project that owns the session, in the form of - * `projects/{project_id}`. - * @type \Google\Cloud\BigQuery\Storage\V1\ReadSession $read_session - * Required. Session to be created. - * @type int $max_stream_count - * Max initial number of streams. If unset or zero, the server will - * provide a value of streams so as to produce reasonable throughput. Must be - * non-negative. The number of streams may be lower than the requested number, - * depending on the amount parallelism that is reasonable for the table. - * There is a default system max limit of 1,000. - * This must be greater than or equal to preferred_min_stream_count. - * Typically, clients should either leave this unset to let the system to - * determine an upper bound OR set this a size for the maximum "units of work" - * it can gracefully handle. - * @type int $preferred_min_stream_count - * The minimum preferred stream count. This parameter can be used to inform - * the service that there is a desired lower bound on the number of streams. - * This is typically a target parallelism of the client (e.g. a Spark - * cluster with N-workers would set this to a low multiple of N to ensure - * good cluster utilization). - * The system will make a best effort to provide at least this number of - * streams, but in some cases might provide less. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. The request project that owns the session, in the form of - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The request project that owns the session, in the form of - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Session to be created. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\Storage\V1\ReadSession|null - */ - public function getReadSession() - { - return $this->read_session; - } - - public function hasReadSession() - { - return isset($this->read_session); - } - - public function clearReadSession() - { - unset($this->read_session); - } - - /** - * Required. Session to be created. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession read_session = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession $var - * @return $this - */ - public function setReadSession($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession::class); - $this->read_session = $var; - - return $this; - } - - /** - * Max initial number of streams. If unset or zero, the server will - * provide a value of streams so as to produce reasonable throughput. Must be - * non-negative. The number of streams may be lower than the requested number, - * depending on the amount parallelism that is reasonable for the table. - * There is a default system max limit of 1,000. - * This must be greater than or equal to preferred_min_stream_count. - * Typically, clients should either leave this unset to let the system to - * determine an upper bound OR set this a size for the maximum "units of work" - * it can gracefully handle. - * - * Generated from protobuf field int32 max_stream_count = 3; - * @return int - */ - public function getMaxStreamCount() - { - return $this->max_stream_count; - } - - /** - * Max initial number of streams. If unset or zero, the server will - * provide a value of streams so as to produce reasonable throughput. Must be - * non-negative. The number of streams may be lower than the requested number, - * depending on the amount parallelism that is reasonable for the table. - * There is a default system max limit of 1,000. - * This must be greater than or equal to preferred_min_stream_count. - * Typically, clients should either leave this unset to let the system to - * determine an upper bound OR set this a size for the maximum "units of work" - * it can gracefully handle. - * - * Generated from protobuf field int32 max_stream_count = 3; - * @param int $var - * @return $this - */ - public function setMaxStreamCount($var) - { - GPBUtil::checkInt32($var); - $this->max_stream_count = $var; - - return $this; - } - - /** - * The minimum preferred stream count. This parameter can be used to inform - * the service that there is a desired lower bound on the number of streams. - * This is typically a target parallelism of the client (e.g. a Spark - * cluster with N-workers would set this to a low multiple of N to ensure - * good cluster utilization). - * The system will make a best effort to provide at least this number of - * streams, but in some cases might provide less. - * - * Generated from protobuf field int32 preferred_min_stream_count = 4; - * @return int - */ - public function getPreferredMinStreamCount() - { - return $this->preferred_min_stream_count; - } - - /** - * The minimum preferred stream count. This parameter can be used to inform - * the service that there is a desired lower bound on the number of streams. - * This is typically a target parallelism of the client (e.g. a Spark - * cluster with N-workers would set this to a low multiple of N to ensure - * good cluster utilization). - * The system will make a best effort to provide at least this number of - * streams, but in some cases might provide less. - * - * Generated from protobuf field int32 preferred_min_stream_count = 4; - * @param int $var - * @return $this - */ - public function setPreferredMinStreamCount($var) - { - GPBUtil::checkInt32($var); - $this->preferred_min_stream_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php deleted file mode 100644 index 7576f9641267..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/CreateWriteStreamRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.bigquery.storage.v1.CreateWriteStreamRequest - */ -class CreateWriteStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Reference to the table to which the stream belongs, in the format - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Stream to be created. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream write_stream = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $write_stream = null; - - /** - * @param string $parent Required. Reference to the table to which the stream belongs, in the format - * of `projects/{project}/datasets/{dataset}/tables/{table}`. Please see - * {@see BigQueryWriteClient::tableName()} for help formatting this field. - * @param \Google\Cloud\BigQuery\Storage\V1\WriteStream $writeStream Required. Stream to be created. - * - * @return \Google\Cloud\BigQuery\Storage\V1\CreateWriteStreamRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\BigQuery\Storage\V1\WriteStream $writeStream): self - { - return (new self()) - ->setParent($parent) - ->setWriteStream($writeStream); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Reference to the table to which the stream belongs, in the format - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * @type \Google\Cloud\BigQuery\Storage\V1\WriteStream $write_stream - * Required. Stream to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Reference to the table to which the stream belongs, in the format - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Reference to the table to which the stream belongs, in the format - * of `projects/{project}/datasets/{dataset}/tables/{table}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. Stream to be created. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream write_stream = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\BigQuery\Storage\V1\WriteStream|null - */ - public function getWriteStream() - { - return $this->write_stream; - } - - public function hasWriteStream() - { - return isset($this->write_stream); - } - - public function clearWriteStream() - { - unset($this->write_stream); - } - - /** - * Required. Stream to be created. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream write_stream = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\BigQuery\Storage\V1\WriteStream $var - * @return $this - */ - public function setWriteStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\WriteStream::class); - $this->write_stream = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php deleted file mode 100644 index c5e81f0da7a1..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/DataFormat.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.bigquery.storage.v1.DataFormat - */ -class DataFormat -{ - /** - * Data format is unspecified. - * - * Generated from protobuf enum DATA_FORMAT_UNSPECIFIED = 0; - */ - const DATA_FORMAT_UNSPECIFIED = 0; - /** - * Avro is a standard open source row based file format. - * See https://avro.apache.org/ for more details. - * - * Generated from protobuf enum AVRO = 1; - */ - const AVRO = 1; - /** - * Arrow is a standard open source column-based message format. - * See https://arrow.apache.org/ for more details. - * - * Generated from protobuf enum ARROW = 2; - */ - const ARROW = 2; - - private static $valueToName = [ - self::DATA_FORMAT_UNSPECIFIED => 'DATA_FORMAT_UNSPECIFIED', - self::AVRO => 'AVRO', - self::ARROW => 'ARROW', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php deleted file mode 100644 index 5da0ae9c76de..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.bigquery.storage.v1.FinalizeWriteStreamRequest - */ -class FinalizeWriteStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the stream to finalize, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the stream to finalize, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. Please see - * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Storage\V1\FinalizeWriteStreamRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the stream to finalize, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the stream to finalize, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the stream to finalize, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php deleted file mode 100644 index 0e9572c7bf95..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FinalizeWriteStreamResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.bigquery.storage.v1.FinalizeWriteStreamResponse - */ -class FinalizeWriteStreamResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Number of rows in the finalized stream. - * - * Generated from protobuf field int64 row_count = 1; - */ - protected $row_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $row_count - * Number of rows in the finalized stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Number of rows in the finalized stream. - * - * Generated from protobuf field int64 row_count = 1; - * @return int|string - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * Number of rows in the finalized stream. - * - * Generated from protobuf field int64 row_count = 1; - * @param int|string $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php deleted file mode 100644 index 260f3267b322..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsRequest.php +++ /dev/null @@ -1,158 +0,0 @@ -google.cloud.bigquery.storage.v1.FlushRowsRequest - */ -class FlushRowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The stream that is the target of the flush operation. - * - * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $write_stream = ''; - /** - * Ending offset of the flush operation. Rows before this offset(including - * this offset) will be flushed. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - */ - protected $offset = null; - - /** - * @param string $writeStream Required. The stream that is the target of the flush operation. Please see - * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Storage\V1\FlushRowsRequest - * - * @experimental - */ - public static function build(string $writeStream): self - { - return (new self()) - ->setWriteStream($writeStream); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $write_stream - * Required. The stream that is the target of the flush operation. - * @type \Google\Protobuf\Int64Value $offset - * Ending offset of the flush operation. Rows before this offset(including - * this offset) will be flushed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. The stream that is the target of the flush operation. - * - * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getWriteStream() - { - return $this->write_stream; - } - - /** - * Required. The stream that is the target of the flush operation. - * - * Generated from protobuf field string write_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setWriteStream($var) - { - GPBUtil::checkString($var, True); - $this->write_stream = $var; - - return $this; - } - - /** - * Ending offset of the flush operation. Rows before this offset(including - * this offset) will be flushed. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @return \Google\Protobuf\Int64Value|null - */ - public function getOffset() - { - return $this->offset; - } - - public function hasOffset() - { - return isset($this->offset); - } - - public function clearOffset() - { - unset($this->offset); - } - - /** - * Returns the unboxed value from getOffset() - - * Ending offset of the flush operation. Rows before this offset(including - * this offset) will be flushed. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @return int|string|null - */ - public function getOffsetUnwrapped() - { - return $this->readWrapperValue("offset"); - } - - /** - * Ending offset of the flush operation. Rows before this offset(including - * this offset) will be flushed. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->offset = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Ending offset of the flush operation. Rows before this offset(including - * this offset) will be flushed. - * - * Generated from protobuf field .google.protobuf.Int64Value offset = 2; - * @param int|string|null $var - * @return $this - */ - public function setOffsetUnwrapped($var) - { - $this->writeWrapperValue("offset", $var); - return $this;} - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php deleted file mode 100644 index eeb13512e3a5..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/FlushRowsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.bigquery.storage.v1.FlushRowsResponse - */ -class FlushRowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The rows before this offset (including this offset) are flushed. - * - * Generated from protobuf field int64 offset = 1; - */ - protected $offset = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $offset - * The rows before this offset (including this offset) are flushed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * The rows before this offset (including this offset) are flushed. - * - * Generated from protobuf field int64 offset = 1; - * @return int|string - */ - public function getOffset() - { - return $this->offset; - } - - /** - * The rows before this offset (including this offset) are flushed. - * - * Generated from protobuf field int64 offset = 1; - * @param int|string $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt64($var); - $this->offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php deleted file mode 100644 index f15c60c10723..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/GetWriteStreamRequest.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.bigquery.storage.v1.GetWriteStreamRequest - */ -class GetWriteStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the stream to get, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Indicates whether to get full or partial view of the WriteStream. If - * not set, view returned will be basic. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStreamView view = 3; - */ - protected $view = 0; - - /** - * @param string $name Required. Name of the stream to get, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. Please see - * {@see BigQueryWriteClient::writeStreamName()} for help formatting this field. - * - * @return \Google\Cloud\BigQuery\Storage\V1\GetWriteStreamRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the stream to get, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * @type int $view - * Indicates whether to get full or partial view of the WriteStream. If - * not set, view returned will be basic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the stream to get, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the stream to get, in the form of - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Indicates whether to get full or partial view of the WriteStream. If - * not set, view returned will be basic. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStreamView view = 3; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Indicates whether to get full or partial view of the WriteStream. If - * not set, view returned will be basic. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStreamView view = 3; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\WriteStreamView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php deleted file mode 100644 index 59135967461f..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoRows.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.bigquery.storage.v1.ProtoRows - */ -class ProtoRows extends \Google\Protobuf\Internal\Message -{ - /** - * A sequence of rows serialized as a Protocol Buffer. - * See https://developers.google.com/protocol-buffers/docs/overview for more - * information on deserializing this field. - * - * Generated from protobuf field repeated bytes serialized_rows = 1; - */ - private $serialized_rows; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $serialized_rows - * A sequence of rows serialized as a Protocol Buffer. - * See https://developers.google.com/protocol-buffers/docs/overview for more - * information on deserializing this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Protobuf::initOnce(); - parent::__construct($data); - } - - /** - * A sequence of rows serialized as a Protocol Buffer. - * See https://developers.google.com/protocol-buffers/docs/overview for more - * information on deserializing this field. - * - * Generated from protobuf field repeated bytes serialized_rows = 1; - * @return RepeatedField - */ - public function getSerializedRows() - { - return $this->serialized_rows; - } - - /** - * A sequence of rows serialized as a Protocol Buffer. - * See https://developers.google.com/protocol-buffers/docs/overview for more - * information on deserializing this field. - * - * Generated from protobuf field repeated bytes serialized_rows = 1; - * @param string[] $var - * @return $this - */ - public function setSerializedRows($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); - $this->serialized_rows = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php deleted file mode 100644 index dc21f45f5a56..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ProtoSchema.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.bigquery.storage.v1.ProtoSchema - */ -class ProtoSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Descriptor for input message. The provided descriptor must be self - * contained, such that data rows sent can be fully decoded using only the - * single descriptor. For data rows that are compositions of multiple - * independent messages, this means the descriptor may need to be transformed - * to only use nested types: - * https://developers.google.com/protocol-buffers/docs/proto#nested - * For additional information for how proto types and values map onto BigQuery - * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions - * - * Generated from protobuf field .google.protobuf.DescriptorProto proto_descriptor = 1; - */ - protected $proto_descriptor = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\DescriptorProto $proto_descriptor - * Descriptor for input message. The provided descriptor must be self - * contained, such that data rows sent can be fully decoded using only the - * single descriptor. For data rows that are compositions of multiple - * independent messages, this means the descriptor may need to be transformed - * to only use nested types: - * https://developers.google.com/protocol-buffers/docs/proto#nested - * For additional information for how proto types and values map onto BigQuery - * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Protobuf::initOnce(); - parent::__construct($data); - } - - /** - * Descriptor for input message. The provided descriptor must be self - * contained, such that data rows sent can be fully decoded using only the - * single descriptor. For data rows that are compositions of multiple - * independent messages, this means the descriptor may need to be transformed - * to only use nested types: - * https://developers.google.com/protocol-buffers/docs/proto#nested - * For additional information for how proto types and values map onto BigQuery - * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions - * - * Generated from protobuf field .google.protobuf.DescriptorProto proto_descriptor = 1; - * @return \Google\Protobuf\DescriptorProto|null - */ - public function getProtoDescriptor() - { - return $this->proto_descriptor; - } - - public function hasProtoDescriptor() - { - return isset($this->proto_descriptor); - } - - public function clearProtoDescriptor() - { - unset($this->proto_descriptor); - } - - /** - * Descriptor for input message. The provided descriptor must be self - * contained, such that data rows sent can be fully decoded using only the - * single descriptor. For data rows that are compositions of multiple - * independent messages, this means the descriptor may need to be transformed - * to only use nested types: - * https://developers.google.com/protocol-buffers/docs/proto#nested - * For additional information for how proto types and values map onto BigQuery - * see: https://cloud.google.com/bigquery/docs/write-api#data_type_conversions - * - * Generated from protobuf field .google.protobuf.DescriptorProto proto_descriptor = 1; - * @param \Google\Protobuf\DescriptorProto $var - * @return $this - */ - public function setProtoDescriptor($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DescriptorProto::class); - $this->proto_descriptor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php deleted file mode 100644 index b3b16c592ed2..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsRequest.php +++ /dev/null @@ -1,172 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadRowsRequest - */ -class ReadRowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Stream to read rows from. - * - * Generated from protobuf field string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $read_stream = ''; - /** - * The offset requested must be less than the last row read from Read. - * Requesting a larger offset is undefined. If not specified, start reading - * from offset zero. - * - * Generated from protobuf field int64 offset = 2; - */ - protected $offset = 0; - protected $output_format_serialization_options; - - /** - * @param string $readStream Required. Stream to read rows from. Please see - * {@see BigQueryReadClient::readStreamName()} for help formatting this field. - * @param int $offset The offset requested must be less than the last row read from Read. - * Requesting a larger offset is undefined. If not specified, start reading - * from offset zero. - * - * @return \Google\Cloud\BigQuery\Storage\V1\ReadRowsRequest - * - * @experimental - */ - public static function build(string $readStream, int $offset): self - { - return (new self()) - ->setReadStream($readStream) - ->setOffset($offset); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $read_stream - * Required. Stream to read rows from. - * @type int|string $offset - * The offset requested must be less than the last row read from Read. - * Requesting a larger offset is undefined. If not specified, start reading - * from offset zero. - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $arrow_serialization_options - * Optional. Options specific to the Apache Arrow output format. - * This feature is not yet available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Stream to read rows from. - * - * Generated from protobuf field string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getReadStream() - { - return $this->read_stream; - } - - /** - * Required. Stream to read rows from. - * - * Generated from protobuf field string read_stream = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setReadStream($var) - { - GPBUtil::checkString($var, True); - $this->read_stream = $var; - - return $this; - } - - /** - * The offset requested must be less than the last row read from Read. - * Requesting a larger offset is undefined. If not specified, start reading - * from offset zero. - * - * Generated from protobuf field int64 offset = 2; - * @return int|string - */ - public function getOffset() - { - return $this->offset; - } - - /** - * The offset requested must be less than the last row read from Read. - * Requesting a larger offset is undefined. If not specified, start reading - * from offset zero. - * - * Generated from protobuf field int64 offset = 2; - * @param int|string $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt64($var); - $this->offset = $var; - - return $this; - } - - /** - * Optional. Options specific to the Apache Arrow output format. - * This feature is not yet available. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions|null - */ - public function getArrowSerializationOptions() - { - return $this->readOneof(5); - } - - public function hasArrowSerializationOptions() - { - return $this->hasOneof(5); - } - - /** - * Optional. Options specific to the Apache Arrow output format. - * This feature is not yet available. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $var - * @return $this - */ - public function setArrowSerializationOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getOutputFormatSerializationOptions() - { - return $this->whichOneof("output_format_serialization_options"); - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php deleted file mode 100644 index f083aeae6c99..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadRowsResponse.php +++ /dev/null @@ -1,458 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadRowsResponse - */ -class ReadRowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Number of serialized rows in the rows block. - * - * Generated from protobuf field int64 row_count = 6; - */ - protected $row_count = 0; - /** - * Statistics for the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats stats = 2; - */ - protected $stats = null; - /** - * Throttling state. If unset, the latest response still describes - * the current throttling status. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5; - */ - protected $throttle_state = null; - /** - * Optional. If the row data in this ReadRowsResponse is compressed, then - * uncompressed byte size is the original size of the uncompressed row data. - * If it is set to a value greater than 0, then decompress into a buffer of - * size uncompressed_byte_size using the compression codec that was requested - * during session creation time and which is specified in - * TableReadOptions.response_compression_codec in ReadSession. - * This value is not set if no response_compression_codec was not requested - * and it is -1 if the requested compression would not have reduced the size - * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's - * behavior described here https://github.com/apache/arrow/issues/15102 where - * the uncompressed length may be set to -1 to indicate that the data that - * follows is not compressed, which can be useful for cases where compression - * does not yield appreciable savings. When uncompressed_byte_size is not - * greater than 0, the client should skip decompression. - * - * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $uncompressed_byte_size = null; - /** - * Output only. The total estimated number of rows in the query results. - * Only populated when reading data from a BigQuery job. - * This feature is not yet available. - * - * Generated from protobuf field optional int64 total_estimated_row_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $total_estimated_row_count = null; - protected $rows; - protected $schema; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\AvroRows $avro_rows - * Serialized row data in AVRO format. - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $arrow_record_batch - * Serialized row data in Arrow RecordBatch format. - * @type int|string $row_count - * Number of serialized rows in the rows block. - * @type \Google\Cloud\BigQuery\Storage\V1\StreamStats $stats - * Statistics for the stream. - * @type \Google\Cloud\BigQuery\Storage\V1\ThrottleState $throttle_state - * Throttling state. If unset, the latest response still describes - * the current throttling status. - * @type \Google\Cloud\BigQuery\Storage\V1\AvroSchema $avro_schema - * Output only. Avro schema. - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $arrow_schema - * Output only. Arrow schema. - * @type int|string $uncompressed_byte_size - * Optional. If the row data in this ReadRowsResponse is compressed, then - * uncompressed byte size is the original size of the uncompressed row data. - * If it is set to a value greater than 0, then decompress into a buffer of - * size uncompressed_byte_size using the compression codec that was requested - * during session creation time and which is specified in - * TableReadOptions.response_compression_codec in ReadSession. - * This value is not set if no response_compression_codec was not requested - * and it is -1 if the requested compression would not have reduced the size - * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's - * behavior described here https://github.com/apache/arrow/issues/15102 where - * the uncompressed length may be set to -1 to indicate that the data that - * follows is not compressed, which can be useful for cases where compression - * does not yield appreciable savings. When uncompressed_byte_size is not - * greater than 0, the client should skip decompression. - * @type int|string $total_estimated_row_count - * Output only. The total estimated number of rows in the query results. - * Only populated when reading data from a BigQuery job. - * This feature is not yet available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Serialized row data in AVRO format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3; - * @return \Google\Cloud\BigQuery\Storage\V1\AvroRows|null - */ - public function getAvroRows() - { - return $this->readOneof(3); - } - - public function hasAvroRows() - { - return $this->hasOneof(3); - } - - /** - * Serialized row data in AVRO format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroRows avro_rows = 3; - * @param \Google\Cloud\BigQuery\Storage\V1\AvroRows $var - * @return $this - */ - public function setAvroRows($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroRows::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Serialized row data in Arrow RecordBatch format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch|null - */ - public function getArrowRecordBatch() - { - return $this->readOneof(4); - } - - public function hasArrowRecordBatch() - { - return $this->hasOneof(4); - } - - /** - * Serialized row data in Arrow RecordBatch format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowRecordBatch arrow_record_batch = 4; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch $var - * @return $this - */ - public function setArrowRecordBatch($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowRecordBatch::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Number of serialized rows in the rows block. - * - * Generated from protobuf field int64 row_count = 6; - * @return int|string - */ - public function getRowCount() - { - return $this->row_count; - } - - /** - * Number of serialized rows in the rows block. - * - * Generated from protobuf field int64 row_count = 6; - * @param int|string $var - * @return $this - */ - public function setRowCount($var) - { - GPBUtil::checkInt64($var); - $this->row_count = $var; - - return $this; - } - - /** - * Statistics for the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats stats = 2; - * @return \Google\Cloud\BigQuery\Storage\V1\StreamStats|null - */ - public function getStats() - { - return $this->stats; - } - - public function hasStats() - { - return isset($this->stats); - } - - public function clearStats() - { - unset($this->stats); - } - - /** - * Statistics for the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats stats = 2; - * @param \Google\Cloud\BigQuery\Storage\V1\StreamStats $var - * @return $this - */ - public function setStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\StreamStats::class); - $this->stats = $var; - - return $this; - } - - /** - * Throttling state. If unset, the latest response still describes - * the current throttling status. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5; - * @return \Google\Cloud\BigQuery\Storage\V1\ThrottleState|null - */ - public function getThrottleState() - { - return $this->throttle_state; - } - - public function hasThrottleState() - { - return isset($this->throttle_state); - } - - public function clearThrottleState() - { - unset($this->throttle_state); - } - - /** - * Throttling state. If unset, the latest response still describes - * the current throttling status. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ThrottleState throttle_state = 5; - * @param \Google\Cloud\BigQuery\Storage\V1\ThrottleState $var - * @return $this - */ - public function setThrottleState($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ThrottleState::class); - $this->throttle_state = $var; - - return $this; - } - - /** - * Output only. Avro schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Storage\V1\AvroSchema|null - */ - public function getAvroSchema() - { - return $this->readOneof(7); - } - - public function hasAvroSchema() - { - return $this->hasOneof(7); - } - - /** - * Output only. Avro schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Storage\V1\AvroSchema $var - * @return $this - */ - public function setAvroSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroSchema::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Output only. Arrow schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null - */ - public function getArrowSchema() - { - return $this->readOneof(8); - } - - public function hasArrowSchema() - { - return $this->hasOneof(8); - } - - /** - * Output only. Arrow schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $var - * @return $this - */ - public function setArrowSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSchema::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Optional. If the row data in this ReadRowsResponse is compressed, then - * uncompressed byte size is the original size of the uncompressed row data. - * If it is set to a value greater than 0, then decompress into a buffer of - * size uncompressed_byte_size using the compression codec that was requested - * during session creation time and which is specified in - * TableReadOptions.response_compression_codec in ReadSession. - * This value is not set if no response_compression_codec was not requested - * and it is -1 if the requested compression would not have reduced the size - * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's - * behavior described here https://github.com/apache/arrow/issues/15102 where - * the uncompressed length may be set to -1 to indicate that the data that - * follows is not compressed, which can be useful for cases where compression - * does not yield appreciable savings. When uncompressed_byte_size is not - * greater than 0, the client should skip decompression. - * - * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getUncompressedByteSize() - { - return isset($this->uncompressed_byte_size) ? $this->uncompressed_byte_size : 0; - } - - public function hasUncompressedByteSize() - { - return isset($this->uncompressed_byte_size); - } - - public function clearUncompressedByteSize() - { - unset($this->uncompressed_byte_size); - } - - /** - * Optional. If the row data in this ReadRowsResponse is compressed, then - * uncompressed byte size is the original size of the uncompressed row data. - * If it is set to a value greater than 0, then decompress into a buffer of - * size uncompressed_byte_size using the compression codec that was requested - * during session creation time and which is specified in - * TableReadOptions.response_compression_codec in ReadSession. - * This value is not set if no response_compression_codec was not requested - * and it is -1 if the requested compression would not have reduced the size - * of this ReadRowsResponse's row data. This attempts to match Apache Arrow's - * behavior described here https://github.com/apache/arrow/issues/15102 where - * the uncompressed length may be set to -1 to indicate that the data that - * follows is not compressed, which can be useful for cases where compression - * does not yield appreciable savings. When uncompressed_byte_size is not - * greater than 0, the client should skip decompression. - * - * Generated from protobuf field optional int64 uncompressed_byte_size = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setUncompressedByteSize($var) - { - GPBUtil::checkInt64($var); - $this->uncompressed_byte_size = $var; - - return $this; - } - - /** - * Output only. The total estimated number of rows in the query results. - * Only populated when reading data from a BigQuery job. - * This feature is not yet available. - * - * Generated from protobuf field optional int64 total_estimated_row_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getTotalEstimatedRowCount() - { - return isset($this->total_estimated_row_count) ? $this->total_estimated_row_count : 0; - } - - public function hasTotalEstimatedRowCount() - { - return isset($this->total_estimated_row_count); - } - - public function clearTotalEstimatedRowCount() - { - unset($this->total_estimated_row_count); - } - - /** - * Output only. The total estimated number of rows in the query results. - * Only populated when reading data from a BigQuery job. - * This feature is not yet available. - * - * Generated from protobuf field optional int64 total_estimated_row_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setTotalEstimatedRowCount($var) - { - GPBUtil::checkInt64($var); - $this->total_estimated_row_count = $var; - - return $this; - } - - /** - * @return string - */ - public function getRows() - { - return $this->whichOneof("rows"); - } - - /** - * @return string - */ - public function getSchema() - { - return $this->whichOneof("schema"); - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php deleted file mode 100644 index b0f585b7874a..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession.php +++ /dev/null @@ -1,604 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadSession - */ -class ReadSession extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Unique identifier for the session, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * 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. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not - * supported. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $data_format = 0; - /** - * Immutable. Table that this ReadSession is reading from, in the form - * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` - * - * Generated from protobuf field string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $table = ''; - /** - * Optional. Any modifiers which are applied when reading from the specified - * table. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $table_modifiers = null; - /** - * Optional. Read options for this session (e.g. column selection, filters). - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $read_options = null; - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $streams; - /** - * 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. - * - * Generated from protobuf field int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $estimated_total_bytes_scanned = 0; - /** - * 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. - * - * Generated from protobuf field int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $estimated_total_physical_file_size = 0; - /** - * 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. - * - * Generated from protobuf field int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $estimated_row_count = 0; - /** - * 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. - * - * Generated from protobuf field string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $trace_id = ''; - protected $schema; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Unique identifier for the session, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}`. - * @type \Google\Protobuf\Timestamp $expire_time - * 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. - * @type int $data_format - * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not - * supported. - * @type \Google\Cloud\BigQuery\Storage\V1\AvroSchema $avro_schema - * Output only. Avro schema. - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $arrow_schema - * Output only. Arrow schema. - * @type string $table - * Immutable. Table that this ReadSession is reading from, in the form - * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` - * @type \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers $table_modifiers - * Optional. Any modifiers which are applied when reading from the specified - * table. - * @type \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions $read_options - * Optional. Read options for this session (e.g. column selection, filters). - * @type \Google\Cloud\BigQuery\Storage\V1\ReadStream[] $streams - * 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. - * @type int|string $estimated_total_bytes_scanned - * 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. - * @type int|string $estimated_total_physical_file_size - * 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. - * @type int|string $estimated_row_count - * 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. - * @type string $trace_id - * 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. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Unique identifier for the session, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Unique identifier for the session, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * 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. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not - * supported. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getDataFormat() - { - return $this->data_format; - } - - /** - * Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not - * supported. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.DataFormat data_format = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setDataFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\DataFormat::class); - $this->data_format = $var; - - return $this; - } - - /** - * Output only. Avro schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Storage\V1\AvroSchema|null - */ - public function getAvroSchema() - { - return $this->readOneof(4); - } - - public function hasAvroSchema() - { - return $this->hasOneof(4); - } - - /** - * Output only. Avro schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSchema avro_schema = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Storage\V1\AvroSchema $var - * @return $this - */ - public function setAvroSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroSchema::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Output only. Arrow schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null - */ - public function getArrowSchema() - { - return $this->readOneof(5); - } - - public function hasArrowSchema() - { - return $this->hasOneof(5); - } - - /** - * Output only. Arrow schema. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSchema arrow_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSchema $var - * @return $this - */ - public function setArrowSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSchema::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Immutable. Table that this ReadSession is reading from, in the form - * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` - * - * Generated from protobuf field string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * Immutable. Table that this ReadSession is reading from, in the form - * `projects/{project_id}/datasets/{dataset_id}/tables/{table_id}` - * - * Generated from protobuf field string table = 6 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkString($var, True); - $this->table = $var; - - return $this; - } - - /** - * Optional. Any modifiers which are applied when reading from the specified - * table. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers|null - */ - public function getTableModifiers() - { - return $this->table_modifiers; - } - - public function hasTableModifiers() - { - return isset($this->table_modifiers); - } - - public function clearTableModifiers() - { - unset($this->table_modifiers); - } - - /** - * Optional. Any modifiers which are applied when reading from the specified - * table. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableModifiers table_modifiers = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers $var - * @return $this - */ - public function setTableModifiers($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers::class); - $this->table_modifiers = $var; - - return $this; - } - - /** - * Optional. Read options for this session (e.g. column selection, filters). - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions|null - */ - public function getReadOptions() - { - return $this->read_options; - } - - public function hasReadOptions() - { - return isset($this->read_options); - } - - public function clearReadOptions() - { - unset($this->read_options); - } - - /** - * Optional. Read options for this session (e.g. column selection, filters). - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions read_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions $var - * @return $this - */ - public function setReadOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions::class); - $this->read_options = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\BigQuery\Storage\V1\ReadStream> - */ - public function getStreams() - { - return $this->streams; - } - - /** - * 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. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.ReadStream streams = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Storage\V1\ReadStream[] $var - * @return $this - */ - public function setStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\ReadStream::class); - $this->streams = $arr; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getEstimatedTotalBytesScanned() - { - return $this->estimated_total_bytes_scanned; - } - - /** - * 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. - * - * Generated from protobuf field int64 estimated_total_bytes_scanned = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setEstimatedTotalBytesScanned($var) - { - GPBUtil::checkInt64($var); - $this->estimated_total_bytes_scanned = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getEstimatedTotalPhysicalFileSize() - { - return $this->estimated_total_physical_file_size; - } - - /** - * 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. - * - * Generated from protobuf field int64 estimated_total_physical_file_size = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setEstimatedTotalPhysicalFileSize($var) - { - GPBUtil::checkInt64($var); - $this->estimated_total_physical_file_size = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getEstimatedRowCount() - { - return $this->estimated_row_count; - } - - /** - * 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. - * - * Generated from protobuf field int64 estimated_row_count = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setEstimatedRowCount($var) - { - GPBUtil::checkInt64($var); - $this->estimated_row_count = $var; - - return $this; - } - - /** - * 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. - * - * Generated from protobuf field string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTraceId() - { - return $this->trace_id; - } - - /** - * 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. - * - * Generated from protobuf field string trace_id = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTraceId($var) - { - GPBUtil::checkString($var, True); - $this->trace_id = $var; - - return $this; - } - - /** - * @return string - */ - public function getSchema() - { - return $this->whichOneof("schema"); - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php deleted file mode 100644 index 5e8fe27974c0..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableModifiers.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadSession.TableModifiers - */ -class TableModifiers extends \Google\Protobuf\Internal\Message -{ - /** - * The snapshot time of the table. If not set, interpreted as now. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 1; - */ - protected $snapshot_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $snapshot_time - * The snapshot time of the table. If not set, interpreted as now. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); - parent::__construct($data); - } - - /** - * The snapshot time of the table. If not set, interpreted as now. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * The snapshot time of the table. If not set, interpreted as now. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php deleted file mode 100644 index 4f4d0257a3b0..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions.php +++ /dev/null @@ -1,468 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions - */ -class TableReadOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The names of the fields in the table to be returned. If no - * field names are specified, then all fields in the table are returned. - * Nested fields -- the child elements of a STRUCT field -- can be selected - * individually using their fully-qualified names, and will be returned as - * record fields containing only the selected nested fields. If a STRUCT - * field is specified in the selected fields list, all of the child elements - * will be returned. - * As an example, consider a table with the following schema: - * { - * "name": "struct_field", - * "type": "RECORD", - * "mode": "NULLABLE", - * "fields": [ - * { - * "name": "string_field1", - * "type": "STRING", - * . "mode": "NULLABLE" - * }, - * { - * "name": "string_field2", - * "type": "STRING", - * "mode": "NULLABLE" - * } - * ] - * } - * Specifying "struct_field" in the selected fields list will result in a - * read session schema with the following logical structure: - * struct_field { - * string_field1 - * string_field2 - * } - * Specifying "struct_field.string_field1" in the selected fields list will - * result in a read session schema with the following logical structure: - * struct_field { - * string_field1 - * } - * The order of the fields in the read session schema is derived from the - * table schema and does not correspond to the order in which the fields are - * specified in this list. - * - * Generated from protobuf field repeated string selected_fields = 1; - */ - private $selected_fields; - /** - * SQL text filtering statement, similar to a WHERE clause in a query. - * Aggregates are not supported. - * Examples: "int_field > 5" - * "date_field = CAST('2014-9-27' as DATE)" - * "nullable_field is not NULL" - * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" - * "numeric_field BETWEEN 1.0 AND 5.0" - * Restricted to a maximum length for 1 MB. - * - * Generated from protobuf field string row_restriction = 2; - */ - protected $row_restriction = ''; - /** - * Optional. Specifies a table sampling percentage. Specifically, the query - * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The - * sampling percentage is applied at the data block granularity. It will - * randomly choose for each data block whether to read the rows in that data - * block. For more details, see - * https://cloud.google.com/bigquery/docs/table-sampling) - * - * Generated from protobuf field optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $sample_percentage = null; - /** - * Optional. Set response_compression_codec when creating a read session to - * enable application-level compression of ReadRows responses. - * - * Generated from protobuf field optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $response_compression_codec = null; - protected $output_format_serialization_options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $selected_fields - * Optional. The names of the fields in the table to be returned. If no - * field names are specified, then all fields in the table are returned. - * Nested fields -- the child elements of a STRUCT field -- can be selected - * individually using their fully-qualified names, and will be returned as - * record fields containing only the selected nested fields. If a STRUCT - * field is specified in the selected fields list, all of the child elements - * will be returned. - * As an example, consider a table with the following schema: - * { - * "name": "struct_field", - * "type": "RECORD", - * "mode": "NULLABLE", - * "fields": [ - * { - * "name": "string_field1", - * "type": "STRING", - * . "mode": "NULLABLE" - * }, - * { - * "name": "string_field2", - * "type": "STRING", - * "mode": "NULLABLE" - * } - * ] - * } - * Specifying "struct_field" in the selected fields list will result in a - * read session schema with the following logical structure: - * struct_field { - * string_field1 - * string_field2 - * } - * Specifying "struct_field.string_field1" in the selected fields list will - * result in a read session schema with the following logical structure: - * struct_field { - * string_field1 - * } - * The order of the fields in the read session schema is derived from the - * table schema and does not correspond to the order in which the fields are - * specified in this list. - * @type string $row_restriction - * SQL text filtering statement, similar to a WHERE clause in a query. - * Aggregates are not supported. - * Examples: "int_field > 5" - * "date_field = CAST('2014-9-27' as DATE)" - * "nullable_field is not NULL" - * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" - * "numeric_field BETWEEN 1.0 AND 5.0" - * Restricted to a maximum length for 1 MB. - * @type \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $arrow_serialization_options - * Optional. Options specific to the Apache Arrow output format. - * @type \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions $avro_serialization_options - * Optional. Options specific to the Apache Avro output format - * @type float $sample_percentage - * Optional. Specifies a table sampling percentage. Specifically, the query - * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The - * sampling percentage is applied at the data block granularity. It will - * randomly choose for each data block whether to read the rows in that data - * block. For more details, see - * https://cloud.google.com/bigquery/docs/table-sampling) - * @type int $response_compression_codec - * Optional. Set response_compression_codec when creating a read session to - * enable application-level compression of ReadRows responses. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The names of the fields in the table to be returned. If no - * field names are specified, then all fields in the table are returned. - * Nested fields -- the child elements of a STRUCT field -- can be selected - * individually using their fully-qualified names, and will be returned as - * record fields containing only the selected nested fields. If a STRUCT - * field is specified in the selected fields list, all of the child elements - * will be returned. - * As an example, consider a table with the following schema: - * { - * "name": "struct_field", - * "type": "RECORD", - * "mode": "NULLABLE", - * "fields": [ - * { - * "name": "string_field1", - * "type": "STRING", - * . "mode": "NULLABLE" - * }, - * { - * "name": "string_field2", - * "type": "STRING", - * "mode": "NULLABLE" - * } - * ] - * } - * Specifying "struct_field" in the selected fields list will result in a - * read session schema with the following logical structure: - * struct_field { - * string_field1 - * string_field2 - * } - * Specifying "struct_field.string_field1" in the selected fields list will - * result in a read session schema with the following logical structure: - * struct_field { - * string_field1 - * } - * The order of the fields in the read session schema is derived from the - * table schema and does not correspond to the order in which the fields are - * specified in this list. - * - * Generated from protobuf field repeated string selected_fields = 1; - * @return RepeatedField - */ - public function getSelectedFields() - { - return $this->selected_fields; - } - - /** - * Optional. The names of the fields in the table to be returned. If no - * field names are specified, then all fields in the table are returned. - * Nested fields -- the child elements of a STRUCT field -- can be selected - * individually using their fully-qualified names, and will be returned as - * record fields containing only the selected nested fields. If a STRUCT - * field is specified in the selected fields list, all of the child elements - * will be returned. - * As an example, consider a table with the following schema: - * { - * "name": "struct_field", - * "type": "RECORD", - * "mode": "NULLABLE", - * "fields": [ - * { - * "name": "string_field1", - * "type": "STRING", - * . "mode": "NULLABLE" - * }, - * { - * "name": "string_field2", - * "type": "STRING", - * "mode": "NULLABLE" - * } - * ] - * } - * Specifying "struct_field" in the selected fields list will result in a - * read session schema with the following logical structure: - * struct_field { - * string_field1 - * string_field2 - * } - * Specifying "struct_field.string_field1" in the selected fields list will - * result in a read session schema with the following logical structure: - * struct_field { - * string_field1 - * } - * The order of the fields in the read session schema is derived from the - * table schema and does not correspond to the order in which the fields are - * specified in this list. - * - * Generated from protobuf field repeated string selected_fields = 1; - * @param string[] $var - * @return $this - */ - public function setSelectedFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->selected_fields = $arr; - - return $this; - } - - /** - * SQL text filtering statement, similar to a WHERE clause in a query. - * Aggregates are not supported. - * Examples: "int_field > 5" - * "date_field = CAST('2014-9-27' as DATE)" - * "nullable_field is not NULL" - * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" - * "numeric_field BETWEEN 1.0 AND 5.0" - * Restricted to a maximum length for 1 MB. - * - * Generated from protobuf field string row_restriction = 2; - * @return string - */ - public function getRowRestriction() - { - return $this->row_restriction; - } - - /** - * SQL text filtering statement, similar to a WHERE clause in a query. - * Aggregates are not supported. - * Examples: "int_field > 5" - * "date_field = CAST('2014-9-27' as DATE)" - * "nullable_field is not NULL" - * "st_equals(geo_field, st_geofromtext("POINT(2, 2)"))" - * "numeric_field BETWEEN 1.0 AND 5.0" - * Restricted to a maximum length for 1 MB. - * - * Generated from protobuf field string row_restriction = 2; - * @param string $var - * @return $this - */ - public function setRowRestriction($var) - { - GPBUtil::checkString($var, True); - $this->row_restriction = $var; - - return $this; - } - - /** - * Optional. Options specific to the Apache Arrow output format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions|null - */ - public function getArrowSerializationOptions() - { - return $this->readOneof(3); - } - - public function hasArrowSerializationOptions() - { - return $this->hasOneof(3); - } - - /** - * Optional. Options specific to the Apache Arrow output format. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ArrowSerializationOptions arrow_serialization_options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions $var - * @return $this - */ - public function setArrowSerializationOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ArrowSerializationOptions::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Options specific to the Apache Avro output format - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions|null - */ - public function getAvroSerializationOptions() - { - return $this->readOneof(4); - } - - public function hasAvroSerializationOptions() - { - return $this->hasOneof(4); - } - - /** - * Optional. Options specific to the Apache Avro output format - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.AvroSerializationOptions avro_serialization_options = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions $var - * @return $this - */ - public function setAvroSerializationOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\AvroSerializationOptions::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Optional. Specifies a table sampling percentage. Specifically, the query - * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The - * sampling percentage is applied at the data block granularity. It will - * randomly choose for each data block whether to read the rows in that data - * block. For more details, see - * https://cloud.google.com/bigquery/docs/table-sampling) - * - * Generated from protobuf field optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return float - */ - public function getSamplePercentage() - { - return isset($this->sample_percentage) ? $this->sample_percentage : 0.0; - } - - public function hasSamplePercentage() - { - return isset($this->sample_percentage); - } - - public function clearSamplePercentage() - { - unset($this->sample_percentage); - } - - /** - * Optional. Specifies a table sampling percentage. Specifically, the query - * planner will use TABLESAMPLE SYSTEM (sample_percentage PERCENT). The - * sampling percentage is applied at the data block granularity. It will - * randomly choose for each data block whether to read the rows in that data - * block. For more details, see - * https://cloud.google.com/bigquery/docs/table-sampling) - * - * Generated from protobuf field optional double sample_percentage = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param float $var - * @return $this - */ - public function setSamplePercentage($var) - { - GPBUtil::checkDouble($var); - $this->sample_percentage = $var; - - return $this; - } - - /** - * Optional. Set response_compression_codec when creating a read session to - * enable application-level compression of ReadRows responses. - * - * Generated from protobuf field optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getResponseCompressionCodec() - { - return isset($this->response_compression_codec) ? $this->response_compression_codec : 0; - } - - public function hasResponseCompressionCodec() - { - return isset($this->response_compression_codec); - } - - public function clearResponseCompressionCodec() - { - unset($this->response_compression_codec); - } - - /** - * Optional. Set response_compression_codec when creating a read session to - * enable application-level compression of ReadRows responses. - * - * Generated from protobuf field optional .google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec response_compression_codec = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setResponseCompressionCodec($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions\ResponseCompressionCodec::class); - $this->response_compression_codec = $var; - - return $this; - } - - /** - * @return string - */ - public function getOutputFormatSerializationOptions() - { - return $this->whichOneof("output_format_serialization_options"); - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php deleted file mode 100644 index 1859e5878b39..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadSession/TableReadOptions/ResponseCompressionCodec.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadSession.TableReadOptions.ResponseCompressionCodec - */ -class ResponseCompressionCodec -{ - /** - * Default is no compression. - * - * Generated from protobuf enum RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0; - */ - const RESPONSE_COMPRESSION_CODEC_UNSPECIFIED = 0; - /** - * Use raw LZ4 compression. - * - * Generated from protobuf enum RESPONSE_COMPRESSION_CODEC_LZ4 = 2; - */ - const RESPONSE_COMPRESSION_CODEC_LZ4 = 2; - - private static $valueToName = [ - self::RESPONSE_COMPRESSION_CODEC_UNSPECIFIED => 'RESPONSE_COMPRESSION_CODEC_UNSPECIFIED', - self::RESPONSE_COMPRESSION_CODEC_LZ4 => 'RESPONSE_COMPRESSION_CODEC_LZ4', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php deleted file mode 100644 index c8fc31bb6496..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ReadStream.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.bigquery.storage.v1.ReadStream - */ -class ReadStream extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the stream, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Name of the stream, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the stream, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Name of the stream, in the form - * `projects/{project_id}/locations/{location}/sessions/{session_id}/streams/{stream_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php deleted file mode 100644 index 955953ea2ffa..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.bigquery.storage.v1.RowError - */ -class RowError extends \Google\Protobuf\Internal\Message -{ - /** - * Index of the malformed row in the request. - * - * Generated from protobuf field int64 index = 1; - */ - protected $index = 0; - /** - * Structured error reason for a row error. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.RowError.RowErrorCode code = 2; - */ - protected $code = 0; - /** - * Description of the issue encountered when processing the row. - * - * Generated from protobuf field string message = 3; - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $index - * Index of the malformed row in the request. - * @type int $code - * Structured error reason for a row error. - * @type string $message - * Description of the issue encountered when processing the row. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Index of the malformed row in the request. - * - * Generated from protobuf field int64 index = 1; - * @return int|string - */ - public function getIndex() - { - return $this->index; - } - - /** - * Index of the malformed row in the request. - * - * Generated from protobuf field int64 index = 1; - * @param int|string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt64($var); - $this->index = $var; - - return $this; - } - - /** - * Structured error reason for a row error. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.RowError.RowErrorCode code = 2; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * Structured error reason for a row error. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.RowError.RowErrorCode code = 2; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\RowError\RowErrorCode::class); - $this->code = $var; - - return $this; - } - - /** - * Description of the issue encountered when processing the row. - * - * Generated from protobuf field string message = 3; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Description of the issue encountered when processing the row. - * - * Generated from protobuf field string message = 3; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php deleted file mode 100644 index ff92a25fe952..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/RowError/RowErrorCode.php +++ /dev/null @@ -1,54 +0,0 @@ -google.cloud.bigquery.storage.v1.RowError.RowErrorCode - */ -class RowErrorCode -{ - /** - * Default error. - * - * Generated from protobuf enum ROW_ERROR_CODE_UNSPECIFIED = 0; - */ - const ROW_ERROR_CODE_UNSPECIFIED = 0; - /** - * One or more fields in the row has errors. - * - * Generated from protobuf enum FIELDS_ERROR = 1; - */ - const FIELDS_ERROR = 1; - - private static $valueToName = [ - self::ROW_ERROR_CODE_UNSPECIFIED => 'ROW_ERROR_CODE_UNSPECIFIED', - self::FIELDS_ERROR => 'FIELDS_ERROR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php deleted file mode 100644 index 01ab892a64b7..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.bigquery.storage.v1.SplitReadStreamRequest - */ -class SplitReadStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the stream to split. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * A value in the range (0.0, 1.0) that specifies the fractional point at - * which the original stream should be split. The actual split point is - * evaluated on pre-filtered rows, so if a filter is provided, then there is - * no guarantee that the division of the rows between the new child streams - * will be proportional to this fractional value. Additionally, because the - * server-side unit for assigning data is collections of rows, this fraction - * will always map to a data storage boundary on the server side. - * - * Generated from protobuf field double fraction = 2; - */ - protected $fraction = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the stream to split. - * @type float $fraction - * A value in the range (0.0, 1.0) that specifies the fractional point at - * which the original stream should be split. The actual split point is - * evaluated on pre-filtered rows, so if a filter is provided, then there is - * no guarantee that the division of the rows between the new child streams - * will be proportional to this fractional value. Additionally, because the - * server-side unit for assigning data is collections of rows, this fraction - * will always map to a data storage boundary on the server side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the stream to split. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the stream to split. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A value in the range (0.0, 1.0) that specifies the fractional point at - * which the original stream should be split. The actual split point is - * evaluated on pre-filtered rows, so if a filter is provided, then there is - * no guarantee that the division of the rows between the new child streams - * will be proportional to this fractional value. Additionally, because the - * server-side unit for assigning data is collections of rows, this fraction - * will always map to a data storage boundary on the server side. - * - * Generated from protobuf field double fraction = 2; - * @return float - */ - public function getFraction() - { - return $this->fraction; - } - - /** - * A value in the range (0.0, 1.0) that specifies the fractional point at - * which the original stream should be split. The actual split point is - * evaluated on pre-filtered rows, so if a filter is provided, then there is - * no guarantee that the division of the rows between the new child streams - * will be proportional to this fractional value. Additionally, because the - * server-side unit for assigning data is collections of rows, this fraction - * will always map to a data storage boundary on the server side. - * - * Generated from protobuf field double fraction = 2; - * @param float $var - * @return $this - */ - public function setFraction($var) - { - GPBUtil::checkDouble($var); - $this->fraction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php deleted file mode 100644 index c50e2e479971..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/SplitReadStreamResponse.php +++ /dev/null @@ -1,133 +0,0 @@ -google.cloud.bigquery.storage.v1.SplitReadStreamResponse - */ -class SplitReadStreamResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Primary stream, which contains the beginning portion of - * |original_stream|. An empty value indicates that the original stream can no - * longer be split. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1; - */ - protected $primary_stream = null; - /** - * Remainder stream, which contains the tail of |original_stream|. An empty - * value indicates that the original stream can no longer be split. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2; - */ - protected $remainder_stream = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\ReadStream $primary_stream - * Primary stream, which contains the beginning portion of - * |original_stream|. An empty value indicates that the original stream can no - * longer be split. - * @type \Google\Cloud\BigQuery\Storage\V1\ReadStream $remainder_stream - * Remainder stream, which contains the tail of |original_stream|. An empty - * value indicates that the original stream can no longer be split. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Primary stream, which contains the beginning portion of - * |original_stream|. An empty value indicates that the original stream can no - * longer be split. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1; - * @return \Google\Cloud\BigQuery\Storage\V1\ReadStream|null - */ - public function getPrimaryStream() - { - return $this->primary_stream; - } - - public function hasPrimaryStream() - { - return isset($this->primary_stream); - } - - public function clearPrimaryStream() - { - unset($this->primary_stream); - } - - /** - * Primary stream, which contains the beginning portion of - * |original_stream|. An empty value indicates that the original stream can no - * longer be split. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream primary_stream = 1; - * @param \Google\Cloud\BigQuery\Storage\V1\ReadStream $var - * @return $this - */ - public function setPrimaryStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadStream::class); - $this->primary_stream = $var; - - return $this; - } - - /** - * Remainder stream, which contains the tail of |original_stream|. An empty - * value indicates that the original stream can no longer be split. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2; - * @return \Google\Cloud\BigQuery\Storage\V1\ReadStream|null - */ - public function getRemainderStream() - { - return $this->remainder_stream; - } - - public function hasRemainderStream() - { - return isset($this->remainder_stream); - } - - public function clearRemainderStream() - { - unset($this->remainder_stream); - } - - /** - * Remainder stream, which contains the tail of |original_stream|. An empty - * value indicates that the original stream can no longer be split. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.ReadStream remainder_stream = 2; - * @param \Google\Cloud\BigQuery\Storage\V1\ReadStream $var - * @return $this - */ - public function setRemainderStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\ReadStream::class); - $this->remainder_stream = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php deleted file mode 100644 index f9a706a3fc96..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError.php +++ /dev/null @@ -1,138 +0,0 @@ -google.cloud.bigquery.storage.v1.StorageError - */ -class StorageError extends \Google\Protobuf\Internal\Message -{ - /** - * BigQuery Storage specific error code. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1; - */ - protected $code = 0; - /** - * Name of the failed entity. - * - * Generated from protobuf field string entity = 2; - */ - protected $entity = ''; - /** - * Message that describes the error. - * - * Generated from protobuf field string error_message = 3; - */ - protected $error_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $code - * BigQuery Storage specific error code. - * @type string $entity - * Name of the failed entity. - * @type string $error_message - * Message that describes the error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * BigQuery Storage specific error code. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1; - * @return int - */ - public function getCode() - { - return $this->code; - } - - /** - * BigQuery Storage specific error code. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode code = 1; - * @param int $var - * @return $this - */ - public function setCode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\StorageError\StorageErrorCode::class); - $this->code = $var; - - return $this; - } - - /** - * Name of the failed entity. - * - * Generated from protobuf field string entity = 2; - * @return string - */ - public function getEntity() - { - return $this->entity; - } - - /** - * Name of the failed entity. - * - * Generated from protobuf field string entity = 2; - * @param string $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkString($var, True); - $this->entity = $var; - - return $this; - } - - /** - * Message that describes the error. - * - * Generated from protobuf field string error_message = 3; - * @return string - */ - public function getErrorMessage() - { - return $this->error_message; - } - - /** - * Message that describes the error. - * - * Generated from protobuf field string error_message = 3; - * @param string $var - * @return $this - */ - public function setErrorMessage($var) - { - GPBUtil::checkString($var, True); - $this->error_message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php deleted file mode 100644 index 345644145ca7..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StorageError/StorageErrorCode.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.bigquery.storage.v1.StorageError.StorageErrorCode - */ -class StorageErrorCode -{ - /** - * Default error. - * - * Generated from protobuf enum STORAGE_ERROR_CODE_UNSPECIFIED = 0; - */ - const STORAGE_ERROR_CODE_UNSPECIFIED = 0; - /** - * Table is not found in the system. - * - * Generated from protobuf enum TABLE_NOT_FOUND = 1; - */ - const TABLE_NOT_FOUND = 1; - /** - * Stream is already committed. - * - * Generated from protobuf enum STREAM_ALREADY_COMMITTED = 2; - */ - const STREAM_ALREADY_COMMITTED = 2; - /** - * Stream is not found. - * - * Generated from protobuf enum STREAM_NOT_FOUND = 3; - */ - const STREAM_NOT_FOUND = 3; - /** - * Invalid Stream type. - * For example, you try to commit a stream that is not pending. - * - * Generated from protobuf enum INVALID_STREAM_TYPE = 4; - */ - const INVALID_STREAM_TYPE = 4; - /** - * Invalid Stream state. - * For example, you try to commit a stream that is not finalized or is - * garbaged. - * - * Generated from protobuf enum INVALID_STREAM_STATE = 5; - */ - const INVALID_STREAM_STATE = 5; - /** - * Stream is finalized. - * - * Generated from protobuf enum STREAM_FINALIZED = 6; - */ - const STREAM_FINALIZED = 6; - /** - * There is a schema mismatch and it is caused by user schema has extra - * field than bigquery schema. - * - * Generated from protobuf enum SCHEMA_MISMATCH_EXTRA_FIELDS = 7; - */ - const SCHEMA_MISMATCH_EXTRA_FIELDS = 7; - /** - * Offset already exists. - * - * Generated from protobuf enum OFFSET_ALREADY_EXISTS = 8; - */ - const OFFSET_ALREADY_EXISTS = 8; - /** - * Offset out of range. - * - * Generated from protobuf enum OFFSET_OUT_OF_RANGE = 9; - */ - const OFFSET_OUT_OF_RANGE = 9; - /** - * Customer-managed encryption key (CMEK) not provided for CMEK-enabled - * data. - * - * Generated from protobuf enum CMEK_NOT_PROVIDED = 10; - */ - const CMEK_NOT_PROVIDED = 10; - /** - * Customer-managed encryption key (CMEK) was incorrectly provided. - * - * Generated from protobuf enum INVALID_CMEK_PROVIDED = 11; - */ - const INVALID_CMEK_PROVIDED = 11; - /** - * There is an encryption error while using customer-managed encryption key. - * - * Generated from protobuf enum CMEK_ENCRYPTION_ERROR = 12; - */ - const CMEK_ENCRYPTION_ERROR = 12; - /** - * Key Management Service (KMS) service returned an error, which can be - * retried. - * - * Generated from protobuf enum KMS_SERVICE_ERROR = 13; - */ - const KMS_SERVICE_ERROR = 13; - /** - * Permission denied while using customer-managed encryption key. - * - * Generated from protobuf enum KMS_PERMISSION_DENIED = 14; - */ - const KMS_PERMISSION_DENIED = 14; - - private static $valueToName = [ - self::STORAGE_ERROR_CODE_UNSPECIFIED => 'STORAGE_ERROR_CODE_UNSPECIFIED', - self::TABLE_NOT_FOUND => 'TABLE_NOT_FOUND', - self::STREAM_ALREADY_COMMITTED => 'STREAM_ALREADY_COMMITTED', - self::STREAM_NOT_FOUND => 'STREAM_NOT_FOUND', - self::INVALID_STREAM_TYPE => 'INVALID_STREAM_TYPE', - self::INVALID_STREAM_STATE => 'INVALID_STREAM_STATE', - self::STREAM_FINALIZED => 'STREAM_FINALIZED', - self::SCHEMA_MISMATCH_EXTRA_FIELDS => 'SCHEMA_MISMATCH_EXTRA_FIELDS', - self::OFFSET_ALREADY_EXISTS => 'OFFSET_ALREADY_EXISTS', - self::OFFSET_OUT_OF_RANGE => 'OFFSET_OUT_OF_RANGE', - self::CMEK_NOT_PROVIDED => 'CMEK_NOT_PROVIDED', - self::INVALID_CMEK_PROVIDED => 'INVALID_CMEK_PROVIDED', - self::CMEK_ENCRYPTION_ERROR => 'CMEK_ENCRYPTION_ERROR', - self::KMS_SERVICE_ERROR => 'KMS_SERVICE_ERROR', - self::KMS_PERMISSION_DENIED => 'KMS_PERMISSION_DENIED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php deleted file mode 100644 index e6bad4c17a87..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.bigquery.storage.v1.StreamStats - */ -class StreamStats extends \Google\Protobuf\Internal\Message -{ - /** - * Represents the progress of the current stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats.Progress progress = 2; - */ - protected $progress = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress $progress - * Represents the progress of the current stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * Represents the progress of the current stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats.Progress progress = 2; - * @return \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress|null - */ - public function getProgress() - { - return $this->progress; - } - - public function hasProgress() - { - return isset($this->progress); - } - - public function clearProgress() - { - unset($this->progress); - } - - /** - * Represents the progress of the current stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.StreamStats.Progress progress = 2; - * @param \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress $var - * @return $this - */ - public function setProgress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\StreamStats\Progress::class); - $this->progress = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php deleted file mode 100644 index b51dc198fc26..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/StreamStats/Progress.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.bigquery.storage.v1.StreamStats.Progress - */ -class Progress extends \Google\Protobuf\Internal\Message -{ - /** - * The fraction of rows assigned to the stream that have been processed by - * the server so far, not including the rows in the current response - * message. - * This value, along with `at_response_end`, can be used to interpolate - * the progress made as the rows in the message are being processed using - * the following formula: `at_response_start + (at_response_end - - * at_response_start) * rows_processed_from_response / rows_in_response`. - * Note that if a filter is provided, the `at_response_end` value of the - * previous response may not necessarily be equal to the - * `at_response_start` value of the current response. - * - * Generated from protobuf field double at_response_start = 1; - */ - protected $at_response_start = 0.0; - /** - * Similar to `at_response_start`, except that this value includes the - * rows in the current response. - * - * Generated from protobuf field double at_response_end = 2; - */ - protected $at_response_end = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $at_response_start - * The fraction of rows assigned to the stream that have been processed by - * the server so far, not including the rows in the current response - * message. - * This value, along with `at_response_end`, can be used to interpolate - * the progress made as the rows in the message are being processed using - * the following formula: `at_response_start + (at_response_end - - * at_response_start) * rows_processed_from_response / rows_in_response`. - * Note that if a filter is provided, the `at_response_end` value of the - * previous response may not necessarily be equal to the - * `at_response_start` value of the current response. - * @type float $at_response_end - * Similar to `at_response_start`, except that this value includes the - * rows in the current response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * The fraction of rows assigned to the stream that have been processed by - * the server so far, not including the rows in the current response - * message. - * This value, along with `at_response_end`, can be used to interpolate - * the progress made as the rows in the message are being processed using - * the following formula: `at_response_start + (at_response_end - - * at_response_start) * rows_processed_from_response / rows_in_response`. - * Note that if a filter is provided, the `at_response_end` value of the - * previous response may not necessarily be equal to the - * `at_response_start` value of the current response. - * - * Generated from protobuf field double at_response_start = 1; - * @return float - */ - public function getAtResponseStart() - { - return $this->at_response_start; - } - - /** - * The fraction of rows assigned to the stream that have been processed by - * the server so far, not including the rows in the current response - * message. - * This value, along with `at_response_end`, can be used to interpolate - * the progress made as the rows in the message are being processed using - * the following formula: `at_response_start + (at_response_end - - * at_response_start) * rows_processed_from_response / rows_in_response`. - * Note that if a filter is provided, the `at_response_end` value of the - * previous response may not necessarily be equal to the - * `at_response_start` value of the current response. - * - * Generated from protobuf field double at_response_start = 1; - * @param float $var - * @return $this - */ - public function setAtResponseStart($var) - { - GPBUtil::checkDouble($var); - $this->at_response_start = $var; - - return $this; - } - - /** - * Similar to `at_response_start`, except that this value includes the - * rows in the current response. - * - * Generated from protobuf field double at_response_end = 2; - * @return float - */ - public function getAtResponseEnd() - { - return $this->at_response_end; - } - - /** - * Similar to `at_response_start`, except that this value includes the - * rows in the current response. - * - * Generated from protobuf field double at_response_end = 2; - * @param float $var - * @return $this - */ - public function setAtResponseEnd($var) - { - GPBUtil::checkDouble($var); - $this->at_response_end = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php deleted file mode 100644 index 350a1c329842..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema.php +++ /dev/null @@ -1,630 +0,0 @@ -google.cloud.bigquery.storage.v1.TableFieldSchema - */ -class TableFieldSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The field name. The name must contain only letters (a-z, A-Z), - * numbers (0-9), or underscores (_), and must start with a letter or - * underscore. The maximum length is 128 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The field data type. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Optional. The field mode. The default value is NULLABLE. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Mode mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mode = 0; - /** - * Optional. Describes the nested schema fields if the type property is set to - * STRUCT. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $fields; - /** - * Optional. The field description. The maximum length is 1,024 characters. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. Maximum length of values of this field for STRINGS or BYTES. - * If max_length is not specified, no maximum length constraint is imposed - * on this field. - * If type = "STRING", then max_length represents the maximum UTF-8 - * length of strings in this field. - * If type = "BYTES", then max_length represents the maximum number of - * bytes in this field. - * It is invalid to set this field if type is not "STRING" or "BYTES". - * - * Generated from protobuf field int64 max_length = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $max_length = 0; - /** - * Optional. Precision (maximum number of total digits in base 10) and scale - * (maximum number of digits in the fractional part in base 10) constraints - * for values of this field for NUMERIC or BIGNUMERIC. - * It is invalid to set precision or scale if type is not "NUMERIC" or - * "BIGNUMERIC". - * If precision and scale are not specified, no value range constraint is - * imposed on this field insofar as values are permitted by the type. - * Values of this NUMERIC or BIGNUMERIC field must be in this range when: - * * Precision (P) and scale (S) are specified: - * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] - * * Precision (P) is specified but not scale (and thus scale is - * interpreted to be equal to zero): - * [-10^P + 1, 10^P - 1]. - * Acceptable values for precision and scale if both are specified: - * * If type = "NUMERIC": - * 1 <= precision - scale <= 29 and 0 <= scale <= 9. - * * If type = "BIGNUMERIC": - * 1 <= precision - scale <= 38 and 0 <= scale <= 38. - * Acceptable values for precision if only precision is specified but not - * scale (and thus scale is interpreted to be equal to zero): - * * If type = "NUMERIC": 1 <= precision <= 29. - * * If type = "BIGNUMERIC": 1 <= precision <= 38. - * If scale is specified but not precision, then it is invalid. - * - * Generated from protobuf field int64 precision = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $precision = 0; - /** - * Optional. See documentation for precision. - * - * Generated from protobuf field int64 scale = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $scale = 0; - /** - * Optional. A SQL expression to specify the [default value] - * (https://cloud.google.com/bigquery/docs/default-values) for this field. - * - * Generated from protobuf field string default_value_expression = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $default_value_expression = ''; - /** - * Optional. Precision (maximum number of total digits in base 10) for seconds - * of TIMESTAMP type. - * Possible values include: - * * 6 (Default, for TIMESTAMP type with microsecond precision) - * * 12 (For TIMESTAMP type with picosecond precision) - * - * Generated from protobuf field .google.protobuf.Int64Value timestamp_precision = 27 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $timestamp_precision = null; - /** - * Optional. The subtype of the RANGE, if the type of this field is RANGE. If - * the type is RANGE, this field is required. Possible values for the field - * element type of a RANGE include: - * * DATE - * * DATETIME - * * TIMESTAMP - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType range_element_type = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $range_element_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The field name. The name must contain only letters (a-z, A-Z), - * numbers (0-9), or underscores (_), and must start with a letter or - * underscore. The maximum length is 128 characters. - * @type int $type - * Required. The field data type. - * @type int $mode - * Optional. The field mode. The default value is NULLABLE. - * @type \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema[] $fields - * Optional. Describes the nested schema fields if the type property is set to - * STRUCT. - * @type string $description - * Optional. The field description. The maximum length is 1,024 characters. - * @type int|string $max_length - * Optional. Maximum length of values of this field for STRINGS or BYTES. - * If max_length is not specified, no maximum length constraint is imposed - * on this field. - * If type = "STRING", then max_length represents the maximum UTF-8 - * length of strings in this field. - * If type = "BYTES", then max_length represents the maximum number of - * bytes in this field. - * It is invalid to set this field if type is not "STRING" or "BYTES". - * @type int|string $precision - * Optional. Precision (maximum number of total digits in base 10) and scale - * (maximum number of digits in the fractional part in base 10) constraints - * for values of this field for NUMERIC or BIGNUMERIC. - * It is invalid to set precision or scale if type is not "NUMERIC" or - * "BIGNUMERIC". - * If precision and scale are not specified, no value range constraint is - * imposed on this field insofar as values are permitted by the type. - * Values of this NUMERIC or BIGNUMERIC field must be in this range when: - * * Precision (P) and scale (S) are specified: - * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] - * * Precision (P) is specified but not scale (and thus scale is - * interpreted to be equal to zero): - * [-10^P + 1, 10^P - 1]. - * Acceptable values for precision and scale if both are specified: - * * If type = "NUMERIC": - * 1 <= precision - scale <= 29 and 0 <= scale <= 9. - * * If type = "BIGNUMERIC": - * 1 <= precision - scale <= 38 and 0 <= scale <= 38. - * Acceptable values for precision if only precision is specified but not - * scale (and thus scale is interpreted to be equal to zero): - * * If type = "NUMERIC": 1 <= precision <= 29. - * * If type = "BIGNUMERIC": 1 <= precision <= 38. - * If scale is specified but not precision, then it is invalid. - * @type int|string $scale - * Optional. See documentation for precision. - * @type string $default_value_expression - * Optional. A SQL expression to specify the [default value] - * (https://cloud.google.com/bigquery/docs/default-values) for this field. - * @type \Google\Protobuf\Int64Value $timestamp_precision - * Optional. Precision (maximum number of total digits in base 10) for seconds - * of TIMESTAMP type. - * Possible values include: - * * 6 (Default, for TIMESTAMP type with microsecond precision) - * * 12 (For TIMESTAMP type with picosecond precision) - * @type \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType $range_element_type - * Optional. The subtype of the RANGE, if the type of this field is RANGE. If - * the type is RANGE, this field is required. Possible values for the field - * element type of a RANGE include: - * * DATE - * * DATETIME - * * TIMESTAMP - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce(); - parent::__construct($data); - } - - /** - * Required. The field name. The name must contain only letters (a-z, A-Z), - * numbers (0-9), or underscores (_), and must start with a letter or - * underscore. The maximum length is 128 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The field name. The name must contain only letters (a-z, A-Z), - * numbers (0-9), or underscores (_), and must start with a letter or - * underscore. The maximum length is 128 characters. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The field data type. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The field data type. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Optional. The field mode. The default value is NULLABLE. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Mode mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Optional. The field mode. The default value is NULLABLE. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Mode mode = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * Optional. Describes the nested schema fields if the type property is set to - * STRUCT. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\BigQuery\Storage\V1\TableFieldSchema> - */ - public function getFields() - { - return $this->fields; - } - - /** - * Optional. Describes the nested schema fields if the type property is set to - * STRUCT. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema[] $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema::class); - $this->fields = $arr; - - return $this; - } - - /** - * Optional. The field description. The maximum length is 1,024 characters. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. The field description. The maximum length is 1,024 characters. - * - * Generated from protobuf field string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. Maximum length of values of this field for STRINGS or BYTES. - * If max_length is not specified, no maximum length constraint is imposed - * on this field. - * If type = "STRING", then max_length represents the maximum UTF-8 - * length of strings in this field. - * If type = "BYTES", then max_length represents the maximum number of - * bytes in this field. - * It is invalid to set this field if type is not "STRING" or "BYTES". - * - * Generated from protobuf field int64 max_length = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getMaxLength() - { - return $this->max_length; - } - - /** - * Optional. Maximum length of values of this field for STRINGS or BYTES. - * If max_length is not specified, no maximum length constraint is imposed - * on this field. - * If type = "STRING", then max_length represents the maximum UTF-8 - * length of strings in this field. - * If type = "BYTES", then max_length represents the maximum number of - * bytes in this field. - * It is invalid to set this field if type is not "STRING" or "BYTES". - * - * Generated from protobuf field int64 max_length = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setMaxLength($var) - { - GPBUtil::checkInt64($var); - $this->max_length = $var; - - return $this; - } - - /** - * Optional. Precision (maximum number of total digits in base 10) and scale - * (maximum number of digits in the fractional part in base 10) constraints - * for values of this field for NUMERIC or BIGNUMERIC. - * It is invalid to set precision or scale if type is not "NUMERIC" or - * "BIGNUMERIC". - * If precision and scale are not specified, no value range constraint is - * imposed on this field insofar as values are permitted by the type. - * Values of this NUMERIC or BIGNUMERIC field must be in this range when: - * * Precision (P) and scale (S) are specified: - * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] - * * Precision (P) is specified but not scale (and thus scale is - * interpreted to be equal to zero): - * [-10^P + 1, 10^P - 1]. - * Acceptable values for precision and scale if both are specified: - * * If type = "NUMERIC": - * 1 <= precision - scale <= 29 and 0 <= scale <= 9. - * * If type = "BIGNUMERIC": - * 1 <= precision - scale <= 38 and 0 <= scale <= 38. - * Acceptable values for precision if only precision is specified but not - * scale (and thus scale is interpreted to be equal to zero): - * * If type = "NUMERIC": 1 <= precision <= 29. - * * If type = "BIGNUMERIC": 1 <= precision <= 38. - * If scale is specified but not precision, then it is invalid. - * - * Generated from protobuf field int64 precision = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getPrecision() - { - return $this->precision; - } - - /** - * Optional. Precision (maximum number of total digits in base 10) and scale - * (maximum number of digits in the fractional part in base 10) constraints - * for values of this field for NUMERIC or BIGNUMERIC. - * It is invalid to set precision or scale if type is not "NUMERIC" or - * "BIGNUMERIC". - * If precision and scale are not specified, no value range constraint is - * imposed on this field insofar as values are permitted by the type. - * Values of this NUMERIC or BIGNUMERIC field must be in this range when: - * * Precision (P) and scale (S) are specified: - * [-10^(P-S) + 10^(-S), 10^(P-S) - 10^(-S)] - * * Precision (P) is specified but not scale (and thus scale is - * interpreted to be equal to zero): - * [-10^P + 1, 10^P - 1]. - * Acceptable values for precision and scale if both are specified: - * * If type = "NUMERIC": - * 1 <= precision - scale <= 29 and 0 <= scale <= 9. - * * If type = "BIGNUMERIC": - * 1 <= precision - scale <= 38 and 0 <= scale <= 38. - * Acceptable values for precision if only precision is specified but not - * scale (and thus scale is interpreted to be equal to zero): - * * If type = "NUMERIC": 1 <= precision <= 29. - * * If type = "BIGNUMERIC": 1 <= precision <= 38. - * If scale is specified but not precision, then it is invalid. - * - * Generated from protobuf field int64 precision = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setPrecision($var) - { - GPBUtil::checkInt64($var); - $this->precision = $var; - - return $this; - } - - /** - * Optional. See documentation for precision. - * - * Generated from protobuf field int64 scale = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getScale() - { - return $this->scale; - } - - /** - * Optional. See documentation for precision. - * - * Generated from protobuf field int64 scale = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setScale($var) - { - GPBUtil::checkInt64($var); - $this->scale = $var; - - return $this; - } - - /** - * Optional. A SQL expression to specify the [default value] - * (https://cloud.google.com/bigquery/docs/default-values) for this field. - * - * Generated from protobuf field string default_value_expression = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDefaultValueExpression() - { - return $this->default_value_expression; - } - - /** - * Optional. A SQL expression to specify the [default value] - * (https://cloud.google.com/bigquery/docs/default-values) for this field. - * - * Generated from protobuf field string default_value_expression = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDefaultValueExpression($var) - { - GPBUtil::checkString($var, True); - $this->default_value_expression = $var; - - return $this; - } - - /** - * Optional. Precision (maximum number of total digits in base 10) for seconds - * of TIMESTAMP type. - * Possible values include: - * * 6 (Default, for TIMESTAMP type with microsecond precision) - * * 12 (For TIMESTAMP type with picosecond precision) - * - * Generated from protobuf field .google.protobuf.Int64Value timestamp_precision = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getTimestampPrecision() - { - return $this->timestamp_precision; - } - - public function hasTimestampPrecision() - { - return isset($this->timestamp_precision); - } - - public function clearTimestampPrecision() - { - unset($this->timestamp_precision); - } - - /** - * Returns the unboxed value from getTimestampPrecision() - - * Optional. Precision (maximum number of total digits in base 10) for seconds - * of TIMESTAMP type. - * Possible values include: - * * 6 (Default, for TIMESTAMP type with microsecond precision) - * * 12 (For TIMESTAMP type with picosecond precision) - * - * Generated from protobuf field .google.protobuf.Int64Value timestamp_precision = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getTimestampPrecisionUnwrapped() - { - return $this->readWrapperValue("timestamp_precision"); - } - - /** - * Optional. Precision (maximum number of total digits in base 10) for seconds - * of TIMESTAMP type. - * Possible values include: - * * 6 (Default, for TIMESTAMP type with microsecond precision) - * * 12 (For TIMESTAMP type with picosecond precision) - * - * Generated from protobuf field .google.protobuf.Int64Value timestamp_precision = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setTimestampPrecision($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->timestamp_precision = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. Precision (maximum number of total digits in base 10) for seconds - * of TIMESTAMP type. - * Possible values include: - * * 6 (Default, for TIMESTAMP type with microsecond precision) - * * 12 (For TIMESTAMP type with picosecond precision) - * - * Generated from protobuf field .google.protobuf.Int64Value timestamp_precision = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setTimestampPrecisionUnwrapped($var) - { - $this->writeWrapperValue("timestamp_precision", $var); - return $this;} - - /** - * Optional. The subtype of the RANGE, if the type of this field is RANGE. If - * the type is RANGE, this field is required. Possible values for the field - * element type of a RANGE include: - * * DATE - * * DATETIME - * * TIMESTAMP - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType range_element_type = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType|null - */ - public function getRangeElementType() - { - return $this->range_element_type; - } - - public function hasRangeElementType() - { - return isset($this->range_element_type); - } - - public function clearRangeElementType() - { - unset($this->range_element_type); - } - - /** - * Optional. The subtype of the RANGE, if the type of this field is RANGE. If - * the type is RANGE, this field is required. Possible values for the field - * element type of a RANGE include: - * * DATE - * * DATETIME - * * TIMESTAMP - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType range_element_type = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType $var - * @return $this - */ - public function setRangeElementType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\FieldElementType::class); - $this->range_element_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php deleted file mode 100644 index 809b1016dfb5..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/FieldElementType.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.bigquery.storage.v1.TableFieldSchema.FieldElementType - */ -class FieldElementType extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The type of a field element. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Required. The type of a field element. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce(); - parent::__construct($data); - } - - /** - * Required. The type of a field element. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of a field element. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableFieldSchema.Type type = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema\Type::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php deleted file mode 100644 index 63488bd93973..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Mode.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.bigquery.storage.v1.TableFieldSchema.Mode - */ -class Mode -{ - /** - * Illegal value - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * Generated from protobuf enum NULLABLE = 1; - */ - const NULLABLE = 1; - /** - * Generated from protobuf enum REQUIRED = 2; - */ - const REQUIRED = 2; - /** - * Generated from protobuf enum REPEATED = 3; - */ - const REPEATED = 3; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::NULLABLE => 'NULLABLE', - self::REQUIRED => 'REQUIRED', - self::REPEATED => 'REPEATED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php deleted file mode 100644 index bf05cfc40023..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableFieldSchema/Type.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.bigquery.storage.v1.TableFieldSchema.Type - */ -class Type -{ - /** - * Illegal value - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * 64K, UTF8 - * - * Generated from protobuf enum STRING = 1; - */ - const STRING = 1; - /** - * 64-bit signed - * - * Generated from protobuf enum INT64 = 2; - */ - const INT64 = 2; - /** - * 64-bit IEEE floating point - * - * Generated from protobuf enum DOUBLE = 3; - */ - const DOUBLE = 3; - /** - * Aggregate type - * - * Generated from protobuf enum STRUCT = 4; - */ - const STRUCT = 4; - /** - * 64K, Binary - * - * Generated from protobuf enum BYTES = 5; - */ - const BYTES = 5; - /** - * 2-valued - * - * Generated from protobuf enum BOOL = 6; - */ - const BOOL = 6; - /** - * 64-bit signed usec since UTC epoch - * - * Generated from protobuf enum TIMESTAMP = 7; - */ - const TIMESTAMP = 7; - /** - * Civil date - Year, Month, Day - * - * Generated from protobuf enum DATE = 8; - */ - const DATE = 8; - /** - * Civil time - Hour, Minute, Second, Microseconds - * - * Generated from protobuf enum TIME = 9; - */ - const TIME = 9; - /** - * Combination of civil date and civil time - * - * Generated from protobuf enum DATETIME = 10; - */ - const DATETIME = 10; - /** - * Geography object - * - * Generated from protobuf enum GEOGRAPHY = 11; - */ - const GEOGRAPHY = 11; - /** - * Numeric value - * - * Generated from protobuf enum NUMERIC = 12; - */ - const NUMERIC = 12; - /** - * BigNumeric value - * - * Generated from protobuf enum BIGNUMERIC = 13; - */ - const BIGNUMERIC = 13; - /** - * Interval - * - * Generated from protobuf enum INTERVAL = 14; - */ - const INTERVAL = 14; - /** - * JSON, String - * - * Generated from protobuf enum JSON = 15; - */ - const JSON = 15; - /** - * RANGE - * - * Generated from protobuf enum RANGE = 16; - */ - const RANGE = 16; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::STRING => 'STRING', - self::INT64 => 'INT64', - self::DOUBLE => 'DOUBLE', - self::STRUCT => 'STRUCT', - self::BYTES => 'BYTES', - self::BOOL => 'BOOL', - self::TIMESTAMP => 'TIMESTAMP', - self::DATE => 'DATE', - self::TIME => 'TIME', - self::DATETIME => 'DATETIME', - self::GEOGRAPHY => 'GEOGRAPHY', - self::NUMERIC => 'NUMERIC', - self::BIGNUMERIC => 'BIGNUMERIC', - self::INTERVAL => 'INTERVAL', - self::JSON => 'JSON', - self::RANGE => 'RANGE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php deleted file mode 100644 index 015763ccaee8..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/TableSchema.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.bigquery.storage.v1.TableSchema - */ -class TableSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Describes the fields in a table. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 1; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema[] $fields - * Describes the fields in a table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Table::initOnce(); - parent::__construct($data); - } - - /** - * Describes the fields in a table. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 1; - * @return RepeatedField<\Google\Cloud\BigQuery\Storage\V1\TableFieldSchema> - */ - public function getFields() - { - return $this->fields; - } - - /** - * Describes the fields in a table. - * - * Generated from protobuf field repeated .google.cloud.bigquery.storage.v1.TableFieldSchema fields = 1; - * @param \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema[] $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Storage\V1\TableFieldSchema::class); - $this->fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php deleted file mode 100644 index 415b26639acb..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/ThrottleState.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.bigquery.storage.v1.ThrottleState - */ -class ThrottleState extends \Google\Protobuf\Internal\Message -{ - /** - * How much this connection is being throttled. Zero means no throttling, - * 100 means fully throttled. - * - * Generated from protobuf field int32 throttle_percent = 1; - */ - protected $throttle_percent = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $throttle_percent - * How much this connection is being throttled. Zero means no throttling, - * 100 means fully throttled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Storage::initOnce(); - parent::__construct($data); - } - - /** - * How much this connection is being throttled. Zero means no throttling, - * 100 means fully throttled. - * - * Generated from protobuf field int32 throttle_percent = 1; - * @return int - */ - public function getThrottlePercent() - { - return $this->throttle_percent; - } - - /** - * How much this connection is being throttled. Zero means no throttling, - * 100 means fully throttled. - * - * Generated from protobuf field int32 throttle_percent = 1; - * @param int $var - * @return $this - */ - public function setThrottlePercent($var) - { - GPBUtil::checkInt32($var); - $this->throttle_percent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php deleted file mode 100644 index 520d82efd76a..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream.php +++ /dev/null @@ -1,341 +0,0 @@ -google.cloud.bigquery.storage.v1.WriteStream - */ -class WriteStream extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the stream, in the form - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Immutable. Type of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = 0; - /** - * Output only. Create time of the stream. For the _default stream, this is - * the creation_time of the table. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Commit time of the stream. - * If a stream is of `COMMITTED` type, then it will have a commit_time same as - * `create_time`. If the stream is of `PENDING` type, empty commit_time - * means it is not committed. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $commit_time = null; - /** - * Output only. The schema of the destination table. It is only returned in - * `CreateWriteStream` response. Caller should generate data that's - * compatible with this schema to send in initial `AppendRowsRequest`. - * The table schema could go out of date during the life time of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $table_schema = null; - /** - * Immutable. Mode of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $write_mode = 0; - /** - * Output only. The geographic location where the stream's dataset resides. - * See https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $location = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Name of the stream, in the form - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * @type int $type - * Immutable. Type of the stream. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create time of the stream. For the _default stream, this is - * the creation_time of the table. - * @type \Google\Protobuf\Timestamp $commit_time - * Output only. Commit time of the stream. - * If a stream is of `COMMITTED` type, then it will have a commit_time same as - * `create_time`. If the stream is of `PENDING` type, empty commit_time - * means it is not committed. - * @type \Google\Cloud\BigQuery\Storage\V1\TableSchema $table_schema - * Output only. The schema of the destination table. It is only returned in - * `CreateWriteStream` response. Caller should generate data that's - * compatible with this schema to send in initial `AppendRowsRequest`. - * The table schema could go out of date during the life time of the stream. - * @type int $write_mode - * Immutable. Mode of the stream. - * @type string $location - * Output only. The geographic location where the stream's dataset resides. - * See https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Bigquery\Storage\V1\Stream::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the stream, in the form - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Name of the stream, in the form - * `projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Immutable. Type of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Immutable. Type of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.Type type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\WriteStream\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. Create time of the stream. For the _default stream, this is - * the creation_time of the table. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. Create time of the stream. For the _default stream, this is - * the creation_time of the table. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Commit time of the stream. - * If a stream is of `COMMITTED` type, then it will have a commit_time same as - * `create_time`. If the stream is of `PENDING` type, empty commit_time - * means it is not committed. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTime() - { - return $this->commit_time; - } - - public function hasCommitTime() - { - return isset($this->commit_time); - } - - public function clearCommitTime() - { - unset($this->commit_time); - } - - /** - * Output only. Commit time of the stream. - * If a stream is of `COMMITTED` type, then it will have a commit_time same as - * `create_time`. If the stream is of `PENDING` type, empty commit_time - * means it is not committed. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_time = $var; - - return $this; - } - - /** - * Output only. The schema of the destination table. It is only returned in - * `CreateWriteStream` response. Caller should generate data that's - * compatible with this schema to send in initial `AppendRowsRequest`. - * The table schema could go out of date during the life time of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\BigQuery\Storage\V1\TableSchema|null - */ - public function getTableSchema() - { - return $this->table_schema; - } - - public function hasTableSchema() - { - return isset($this->table_schema); - } - - public function clearTableSchema() - { - unset($this->table_schema); - } - - /** - * Output only. The schema of the destination table. It is only returned in - * `CreateWriteStream` response. Caller should generate data that's - * compatible with this schema to send in initial `AppendRowsRequest`. - * The table schema could go out of date during the life time of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.TableSchema table_schema = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\BigQuery\Storage\V1\TableSchema $var - * @return $this - */ - public function setTableSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Storage\V1\TableSchema::class); - $this->table_schema = $var; - - return $this; - } - - /** - * Immutable. Mode of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getWriteMode() - { - return $this->write_mode; - } - - /** - * Immutable. Mode of the stream. - * - * Generated from protobuf field .google.cloud.bigquery.storage.v1.WriteStream.WriteMode write_mode = 7 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setWriteMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Storage\V1\WriteStream\WriteMode::class); - $this->write_mode = $var; - - return $this; - } - - /** - * Output only. The geographic location where the stream's dataset resides. - * See https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Output only. The geographic location where the stream's dataset resides. - * See https://cloud.google.com/bigquery/docs/locations for supported - * locations. - * - * Generated from protobuf field string location = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php deleted file mode 100644 index 180141b213cb..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/Type.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.bigquery.storage.v1.WriteStream.Type - */ -class Type -{ - /** - * Unknown type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Data will commit automatically and appear as soon as the write is - * acknowledged. - * - * Generated from protobuf enum COMMITTED = 1; - */ - const COMMITTED = 1; - /** - * Data is invisible until the stream is committed. - * - * Generated from protobuf enum PENDING = 2; - */ - const PENDING = 2; - /** - * Data is only visible up to the offset to which it was flushed. - * - * Generated from protobuf enum BUFFERED = 3; - */ - const BUFFERED = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::COMMITTED => 'COMMITTED', - self::PENDING => 'PENDING', - self::BUFFERED => 'BUFFERED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php deleted file mode 100644 index 2a3355379e36..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStream/WriteMode.php +++ /dev/null @@ -1,55 +0,0 @@ -google.cloud.bigquery.storage.v1.WriteStream.WriteMode - */ -class WriteMode -{ - /** - * Unknown type. - * - * Generated from protobuf enum WRITE_MODE_UNSPECIFIED = 0; - */ - const WRITE_MODE_UNSPECIFIED = 0; - /** - * Insert new records into the table. - * It is the default value if customers do not specify it. - * - * Generated from protobuf enum INSERT = 1; - */ - const INSERT = 1; - - private static $valueToName = [ - self::WRITE_MODE_UNSPECIFIED => 'WRITE_MODE_UNSPECIFIED', - self::INSERT => 'INSERT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php b/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php deleted file mode 100644 index 5d008746e9fe..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/proto/src/Google/Cloud/BigQuery/Storage/V1/WriteStreamView.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.bigquery.storage.v1.WriteStreamView - */ -class WriteStreamView -{ - /** - * The default / unset value. - * - * Generated from protobuf enum WRITE_STREAM_VIEW_UNSPECIFIED = 0; - */ - const WRITE_STREAM_VIEW_UNSPECIFIED = 0; - /** - * The BASIC projection returns basic metadata about a write stream. The - * basic view does not include schema information. This is the default view - * returned by GetWriteStream. - * - * Generated from protobuf enum BASIC = 1; - */ - const BASIC = 1; - /** - * The FULL projection returns all available write stream metadata, including - * the schema. CreateWriteStream returns the full projection of write stream - * metadata. - * - * Generated from protobuf enum FULL = 2; - */ - const FULL = 2; - - private static $valueToName = [ - self::WRITE_STREAM_VIEW_UNSPECIFIED => 'WRITE_STREAM_VIEW_UNSPECIFIED', - self::BASIC => 'BASIC', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php deleted file mode 100644 index a8efedea68f9..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/create_read_session.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($formattedParent) - ->setReadSession($readSession); - - // Call the API and handle any network failures. - try { - /** @var ReadSession $response */ - $response = $bigQueryReadClient->createReadSession($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = BigQueryReadClient::projectName('[PROJECT]'); - - create_read_session_sample($formattedParent); -} -// [END bigquerystorage_v1_generated_BigQueryRead_CreateReadSession_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php deleted file mode 100644 index 234f4b4851f8..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/read_rows.php +++ /dev/null @@ -1,87 +0,0 @@ -setReadStream($formattedReadStream); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigQueryReadClient->readRows($request); - - /** @var ReadRowsResponse $element */ - foreach ($stream->readAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedReadStream = BigQueryReadClient::readStreamName( - '[PROJECT]', - '[LOCATION]', - '[SESSION]', - '[STREAM]' - ); - - read_rows_sample($formattedReadStream); -} -// [END bigquerystorage_v1_generated_BigQueryRead_ReadRows_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php deleted file mode 100644 index 952a9adda480..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryReadClient/split_read_stream.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SplitReadStreamResponse $response */ - $response = $bigQueryReadClient->splitReadStream($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BigQueryReadClient::readStreamName( - '[PROJECT]', - '[LOCATION]', - '[SESSION]', - '[STREAM]' - ); - - split_read_stream_sample($formattedName); -} -// [END bigquerystorage_v1_generated_BigQueryRead_SplitReadStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php deleted file mode 100644 index 42bdbfc9dfe5..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/append_rows.php +++ /dev/null @@ -1,143 +0,0 @@ -setWriteStream($formattedWriteStream); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $bigQueryWriteClient->appendRows(); - $stream->writeAll([$request,]); - - /** @var AppendRowsResponse $element */ - foreach ($stream->closeWriteAndReadAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedWriteStream = BigQueryWriteClient::writeStreamName( - '[PROJECT]', - '[DATASET]', - '[TABLE]', - '[STREAM]' - ); - - append_rows_sample($formattedWriteStream); -} -// [END bigquerystorage_v1_generated_BigQueryWrite_AppendRows_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php deleted file mode 100644 index 4f7ed2110b86..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/batch_commit_write_streams.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent) - ->setWriteStreams($writeStreams); - - // Call the API and handle any network failures. - try { - /** @var BatchCommitWriteStreamsResponse $response */ - $response = $bigQueryWriteClient->batchCommitWriteStreams($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = BigQueryWriteClient::tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - $writeStreamsElement = '[WRITE_STREAMS]'; - - batch_commit_write_streams_sample($formattedParent, $writeStreamsElement); -} -// [END bigquerystorage_v1_generated_BigQueryWrite_BatchCommitWriteStreams_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php deleted file mode 100644 index 8485c13171ca..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/create_write_stream.php +++ /dev/null @@ -1,79 +0,0 @@ -setParent($formattedParent) - ->setWriteStream($writeStream); - - // Call the API and handle any network failures. - try { - /** @var WriteStream $response */ - $response = $bigQueryWriteClient->createWriteStream($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = BigQueryWriteClient::tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - - create_write_stream_sample($formattedParent); -} -// [END bigquerystorage_v1_generated_BigQueryWrite_CreateWriteStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php deleted file mode 100644 index 54d32331246f..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/finalize_write_stream.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var FinalizeWriteStreamResponse $response */ - $response = $bigQueryWriteClient->finalizeWriteStream($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BigQueryWriteClient::writeStreamName( - '[PROJECT]', - '[DATASET]', - '[TABLE]', - '[STREAM]' - ); - - finalize_write_stream_sample($formattedName); -} -// [END bigquerystorage_v1_generated_BigQueryWrite_FinalizeWriteStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php deleted file mode 100644 index 749dee2871b1..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/flush_rows.php +++ /dev/null @@ -1,83 +0,0 @@ -setWriteStream($formattedWriteStream); - - // Call the API and handle any network failures. - try { - /** @var FlushRowsResponse $response */ - $response = $bigQueryWriteClient->flushRows($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedWriteStream = BigQueryWriteClient::writeStreamName( - '[PROJECT]', - '[DATASET]', - '[TABLE]', - '[STREAM]' - ); - - flush_rows_sample($formattedWriteStream); -} -// [END bigquerystorage_v1_generated_BigQueryWrite_FlushRows_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php b/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php deleted file mode 100644 index 5533b0097fae..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/samples/V1/BigQueryWriteClient/get_write_stream.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var WriteStream $response */ - $response = $bigQueryWriteClient->getWriteStream($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = BigQueryWriteClient::writeStreamName( - '[PROJECT]', - '[DATASET]', - '[TABLE]', - '[STREAM]' - ); - - get_write_stream_sample($formattedName); -} -// [END bigquerystorage_v1_generated_BigQueryWrite_GetWriteStream_sync] diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php deleted file mode 100644 index 91624fb2bc17..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryReadClient.php +++ /dev/null @@ -1,409 +0,0 @@ - createReadSessionAsync(CreateReadSessionRequest $request, array $optionalArgs = []) - * @method PromiseInterface splitReadStreamAsync(SplitReadStreamRequest $request, array $optionalArgs = []) - */ -final class BigQueryReadClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.bigquery.storage.v1.BigQueryRead'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'bigquerystorage.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'bigquerystorage.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** - * The default scopes required by the service. - * - * @internal - */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigquery', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/big_query_read_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/big_query_read_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/big_query_read_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/big_query_read_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a read_session - * resource. - * - * @param string $project - * @param string $location - * @param string $session - * - * @return string The formatted read_session resource. - */ - public static function readSessionName(string $project, string $location, string $session): string - { - return self::getPathTemplate('readSession')->render([ - 'project' => $project, - 'location' => $location, - 'session' => $session, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a read_stream - * resource. - * - * @param string $project - * @param string $location - * @param string $session - * @param string $stream - * - * @return string The formatted read_stream resource. - */ - public static function readStreamName(string $project, string $location, string $session, string $stream): string - { - return self::getPathTemplate('readStream')->render([ - 'project' => $project, - 'location' => $location, - 'session' => $session, - 'stream' => $stream, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a table - * resource. - * - * @param string $project - * @param string $dataset - * @param string $table - * - * @return string The formatted table resource. - */ - public static function tableName(string $project, string $dataset, string $table): string - { - return self::getPathTemplate('table')->render([ - 'project' => $project, - 'dataset' => $dataset, - 'table' => $table, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - project: projects/{project} - * - readSession: projects/{project}/locations/{location}/sessions/{session} - * - readStream: projects/{project}/locations/{location}/sessions/{session}/streams/{stream} - * - table: projects/{project}/datasets/{dataset}/tables/{table} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'bigquerystorage.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\BigQuery\Storage\V1\BigQueryReadClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new BigQueryReadClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new read session. A read session divides the contents of a - * BigQuery table into one or more streams, which can then be used to read - * data from the table. The read session also specifies properties of the - * data to be read, such as a list of columns or a push-down filter describing - * the rows to be returned. - * - * A particular row can be read by at most one stream. When the caller has - * reached the end of each stream in the session, then all the data in the - * table has been read. - * - * Data is assigned to each stream such that roughly the same number of - * rows can be read from each stream. Because the server-side unit for - * assigning data is collections of rows, the API does not guarantee that - * each stream will return the same number or rows. Additionally, the - * limits are enforced based on the number of pre-filtered rows, so some - * filters can lead to lopsided assignments. - * - * Read sessions automatically expire 6 hours after they are created and do - * not require manual clean-up by the caller. - * - * The async variant is {@see BigQueryReadClient::createReadSessionAsync()} . - * - * @example samples/V1/BigQueryReadClient/create_read_session.php - * - * @param CreateReadSessionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ReadSession - * - * @throws ApiException Thrown if the API call fails. - */ - public function createReadSession(CreateReadSessionRequest $request, array $callOptions = []): ReadSession - { - return $this->startApiCall('CreateReadSession', $request, $callOptions)->wait(); - } - - /** - * Reads rows from the stream in the format prescribed by the ReadSession. - * Each response contains one or more table rows, up to a maximum of 128 MB - * per response; read requests which attempt to read individual rows larger - * than 128 MB will fail. - * - * Each request also returns a set of stream statistics reflecting the current - * state of the stream. - * - * @example samples/V1/BigQueryReadClient/read_rows.php - * - * @param ReadRowsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function readRows(ReadRowsRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('ReadRows', $request, $callOptions); - } - - /** - * Splits a given `ReadStream` into two `ReadStream` objects. These - * `ReadStream` objects are referred to as the primary and the residual - * streams of the split. The original `ReadStream` can still be read from in - * the same manner as before. Both of the returned `ReadStream` objects can - * also be read from, and the rows returned by both child streams will be - * the same as the rows read from the original stream. - * - * Moreover, the two child streams will be allocated back-to-back in the - * original `ReadStream`. Concretely, it is guaranteed that for streams - * original, primary, and residual, that original[0-j] = primary[0-j] and - * original[j-n] = residual[0-m] once the streams have been read to - * completion. - * - * The async variant is {@see BigQueryReadClient::splitReadStreamAsync()} . - * - * @example samples/V1/BigQueryReadClient/split_read_stream.php - * - * @param SplitReadStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SplitReadStreamResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function splitReadStream(SplitReadStreamRequest $request, array $callOptions = []): SplitReadStreamResponse - { - return $this->startApiCall('SplitReadStream', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php deleted file mode 100644 index 4bd2b8fbe07f..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/Client/BigQueryWriteClient.php +++ /dev/null @@ -1,474 +0,0 @@ - batchCommitWriteStreamsAsync(BatchCommitWriteStreamsRequest $request, array $optionalArgs = []) - * @method PromiseInterface createWriteStreamAsync(CreateWriteStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface finalizeWriteStreamAsync(FinalizeWriteStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface flushRowsAsync(FlushRowsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getWriteStreamAsync(GetWriteStreamRequest $request, array $optionalArgs = []) - */ -final class BigQueryWriteClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.bigquery.storage.v1.BigQueryWrite'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'bigquerystorage.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'bigquerystorage.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** - * The default scopes required by the service. - * - * @internal - */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigquery', - 'https://www.googleapis.com/auth/bigquery.insertdata', - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/big_query_write_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/big_query_write_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/big_query_write_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/big_query_write_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a table - * resource. - * - * @param string $project - * @param string $dataset - * @param string $table - * - * @return string The formatted table resource. - */ - public static function tableName(string $project, string $dataset, string $table): string - { - return self::getPathTemplate('table')->render([ - 'project' => $project, - 'dataset' => $dataset, - 'table' => $table, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a write_stream - * resource. - * - * @param string $project - * @param string $dataset - * @param string $table - * @param string $stream - * - * @return string The formatted write_stream resource. - */ - public static function writeStreamName(string $project, string $dataset, string $table, string $stream): string - { - return self::getPathTemplate('writeStream')->render([ - 'project' => $project, - 'dataset' => $dataset, - 'table' => $table, - 'stream' => $stream, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - table: projects/{project}/datasets/{dataset}/tables/{table} - * - writeStream: projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'bigquerystorage.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\BigQuery\Storage\V1\BigQueryWriteClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new BigQueryWriteClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Appends data to the given stream. - * - * If `offset` is specified, the `offset` is checked against the end of - * stream. The server returns `OUT_OF_RANGE` in `AppendRowsResponse` if an - * attempt is made to append to an offset beyond the current end of the stream - * or `ALREADY_EXISTS` if user provides an `offset` that has already been - * written to. User can retry with adjusted offset within the same RPC - * connection. If `offset` is not specified, append happens at the end of the - * stream. - * - * The response contains an optional offset at which the append - * happened. No offset information will be returned for appends to a - * default stream. - * - * Responses are received in the same order in which requests are sent. - * There will be one response for each successful inserted request. Responses - * may optionally embed error information if the originating AppendRequest was - * not successfully processed. - * - * The specifics of when successfully appended data is made visible to the - * table are governed by the type of stream: - * - * * For COMMITTED streams (which includes the default stream), data is - * visible immediately upon successful append. - * - * * For BUFFERED streams, data is made visible via a subsequent `FlushRows` - * rpc which advances a cursor to a newer offset in the stream. - * - * * For PENDING streams, data is not made visible until the stream itself is - * finalized (via the `FinalizeWriteStream` rpc), and the stream is explicitly - * committed via the `BatchCommitWriteStreams` rpc. - * - * @example samples/V1/BigQueryWriteClient/append_rows.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function appendRows(array $callOptions = []): BidiStream - { - return $this->startApiCall('AppendRows', null, $callOptions); - } - - /** - * Atomically commits a group of `PENDING` streams that belong to the same - * `parent` table. - * - * Streams must be finalized before commit and cannot be committed multiple - * times. Once a stream is committed, data in the stream becomes available - * for read operations. - * - * The async variant is {@see BigQueryWriteClient::batchCommitWriteStreamsAsync()} - * . - * - * @example samples/V1/BigQueryWriteClient/batch_commit_write_streams.php - * - * @param BatchCommitWriteStreamsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BatchCommitWriteStreamsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchCommitWriteStreams(BatchCommitWriteStreamsRequest $request, array $callOptions = []): BatchCommitWriteStreamsResponse - { - return $this->startApiCall('BatchCommitWriteStreams', $request, $callOptions)->wait(); - } - - /** - * Creates a write stream to the given table. - * Additionally, every table has a special stream named '_default' - * to which data can be written. This stream doesn't need to be created using - * CreateWriteStream. It is a stream that can be used simultaneously by any - * number of clients. Data written to this stream is considered committed as - * soon as an acknowledgement is received. - * - * The async variant is {@see BigQueryWriteClient::createWriteStreamAsync()} . - * - * @example samples/V1/BigQueryWriteClient/create_write_stream.php - * - * @param CreateWriteStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return WriteStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function createWriteStream(CreateWriteStreamRequest $request, array $callOptions = []): WriteStream - { - return $this->startApiCall('CreateWriteStream', $request, $callOptions)->wait(); - } - - /** - * Finalize a write stream so that no new data can be appended to the - * stream. Finalize is not supported on the '_default' stream. - * - * The async variant is {@see BigQueryWriteClient::finalizeWriteStreamAsync()} . - * - * @example samples/V1/BigQueryWriteClient/finalize_write_stream.php - * - * @param FinalizeWriteStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FinalizeWriteStreamResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function finalizeWriteStream(FinalizeWriteStreamRequest $request, array $callOptions = []): FinalizeWriteStreamResponse - { - return $this->startApiCall('FinalizeWriteStream', $request, $callOptions)->wait(); - } - - /** - * Flushes rows to a BUFFERED stream. - * - * If users are appending rows to BUFFERED stream, flush operation is - * required in order for the rows to become available for reading. A - * Flush operation flushes up to any previously flushed offset in a BUFFERED - * stream, to the offset specified in the request. - * - * Flush is not supported on the _default stream, since it is not BUFFERED. - * - * The async variant is {@see BigQueryWriteClient::flushRowsAsync()} . - * - * @example samples/V1/BigQueryWriteClient/flush_rows.php - * - * @param FlushRowsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return FlushRowsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function flushRows(FlushRowsRequest $request, array $callOptions = []): FlushRowsResponse - { - return $this->startApiCall('FlushRows', $request, $callOptions)->wait(); - } - - /** - * Gets information about a write stream. - * - * The async variant is {@see BigQueryWriteClient::getWriteStreamAsync()} . - * - * @example samples/V1/BigQueryWriteClient/get_write_stream.php - * - * @param GetWriteStreamRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return WriteStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function getWriteStream(GetWriteStreamRequest $request, array $callOptions = []): WriteStream - { - return $this->startApiCall('GetWriteStream', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json b/owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json deleted file mode 100644 index a8328787a007..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.bigquery.storage.v1", - "libraryPackage": "Google\\Cloud\\BigQuery\\Storage\\V1", - "services": { - "BigQueryRead": { - "clients": { - "grpc": { - "libraryClient": "BigQueryReadClient", - "rpcs": { - "CreateReadSession": { - "methods": [ - "createReadSession" - ] - }, - "ReadRows": { - "methods": [ - "readRows" - ] - }, - "SplitReadStream": { - "methods": [ - "splitReadStream" - ] - } - } - } - } - }, - "BigQueryWrite": { - "clients": { - "grpc": { - "libraryClient": "BigQueryWriteClient", - "rpcs": { - "AppendRows": { - "methods": [ - "appendRows" - ] - }, - "BatchCommitWriteStreams": { - "methods": [ - "batchCommitWriteStreams" - ] - }, - "CreateWriteStream": { - "methods": [ - "createWriteStream" - ] - }, - "FinalizeWriteStream": { - "methods": [ - "finalizeWriteStream" - ] - }, - "FlushRows": { - "methods": [ - "flushRows" - ] - }, - "GetWriteStream": { - "methods": [ - "getWriteStream" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json deleted file mode 100644 index 780af364091c..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_client_config.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.storage.v1.BigQueryRead": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ], - "retry_policy_3_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 86400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 86400000, - "total_timeout_millis": 86400000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateReadSession": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ReadRows": { - "timeout_millis": 86400000 - }, - "SplitReadStream": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - } - } - } - } -} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php deleted file mode 100644 index 01c38330b540..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_descriptor_config.php +++ /dev/null @@ -1,74 +0,0 @@ - [ - 'google.cloud.bigquery.storage.v1.BigQueryRead' => [ - 'CreateReadSession' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\ReadSession', - 'headerParams' => [ - [ - 'keyName' => 'read_session.table', - 'fieldAccessors' => [ - 'getReadSession', - 'getTable', - ], - ], - ], - ], - 'ReadRows' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\ReadRowsResponse', - 'headerParams' => [ - [ - 'keyName' => 'read_stream', - 'fieldAccessors' => [ - 'getReadStream', - ], - ], - ], - ], - 'SplitReadStream' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\SplitReadStreamResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'project' => 'projects/{project}', - 'readSession' => 'projects/{project}/locations/{location}/sessions/{session}', - 'readStream' => 'projects/{project}/locations/{location}/sessions/{session}/streams/{stream}', - 'table' => 'projects/{project}/datasets/{dataset}/tables/{table}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php deleted file mode 100644 index 6e2ce40e48a1..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_read_rest_client_config.php +++ /dev/null @@ -1,63 +0,0 @@ - [ - 'google.cloud.bigquery.storage.v1.BigQueryRead' => [ - 'CreateReadSession' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{read_session.table=projects/*/datasets/*/tables/*}', - 'body' => '*', - 'placeholders' => [ - 'read_session.table' => [ - 'getters' => [ - 'getReadSession', - 'getTable', - ], - ], - ], - ], - 'ReadRows' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{read_stream=projects/*/locations/*/sessions/*/streams/*}', - 'placeholders' => [ - 'read_stream' => [ - 'getters' => [ - 'getReadStream', - ], - ], - ], - ], - 'SplitReadStream' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sessions/*/streams/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json deleted file mode 100644 index c24690087513..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_client_config.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.storage.v1.BigQueryWrite": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_4_codes": [ - "UNAVAILABLE" - ], - "retry_policy_5_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE", - "RESOURCE_EXHAUSTED" - ], - "retry_policy_6_codes": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE", - "RESOURCE_EXHAUSTED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_4_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 86400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 86400000, - "total_timeout_millis": 86400000 - }, - "retry_policy_5_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - }, - "retry_policy_6_params": { - "initial_retry_delay_millis": 10000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 120000, - "initial_rpc_timeout_millis": 1200000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 1200000, - "total_timeout_millis": 1200000 - } - }, - "methods": { - "AppendRows": { - "timeout_millis": 86400000 - }, - "BatchCommitWriteStreams": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "CreateWriteStream": { - "timeout_millis": 1200000, - "retry_codes_name": "retry_policy_6_codes", - "retry_params_name": "retry_policy_6_params" - }, - "FinalizeWriteStream": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "FlushRows": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "GetWriteStream": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - } - } - } - } -} diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php deleted file mode 100644 index 4eae283ee5d5..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_descriptor_config.php +++ /dev/null @@ -1,107 +0,0 @@ - [ - 'google.cloud.bigquery.storage.v1.BigQueryWrite' => [ - 'AppendRows' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\AppendRowsResponse', - 'headerParams' => [ - [ - 'keyName' => 'write_stream', - 'fieldAccessors' => [ - 'getWriteStream', - ], - ], - ], - ], - 'BatchCommitWriteStreams' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\BatchCommitWriteStreamsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateWriteStream' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\WriteStream', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'FinalizeWriteStream' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\FinalizeWriteStreamResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'FlushRows' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\FlushRowsResponse', - 'headerParams' => [ - [ - 'keyName' => 'write_stream', - 'fieldAccessors' => [ - 'getWriteStream', - ], - ], - ], - ], - 'GetWriteStream' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\BigQuery\Storage\V1\WriteStream', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'table' => 'projects/{project}/datasets/{dataset}/tables/{table}', - 'writeStream' => 'projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}', - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php b/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php deleted file mode 100644 index 6ca0a3005f58..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/src/V1/resources/big_query_write_rest_client_config.php +++ /dev/null @@ -1,90 +0,0 @@ - [ - 'google.cloud.bigquery.storage.v1.BigQueryWrite' => [ - 'BatchCommitWriteStreams' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/datasets/*/tables/*}', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'write_streams', - ], - ], - 'CreateWriteStream' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/datasets/*/tables/*}', - 'body' => 'write_stream', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'FinalizeWriteStream' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/datasets/*/tables/*/streams/*}', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'FlushRows' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{write_stream=projects/*/datasets/*/tables/*/streams/*}', - 'body' => '*', - 'placeholders' => [ - 'write_stream' => [ - 'getters' => [ - 'getWriteStream', - ], - ], - ], - ], - 'GetWriteStream' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/datasets/*/tables/*/streams/*}', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php b/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php deleted file mode 100644 index 80aa6257e7d4..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryReadClientTest.php +++ /dev/null @@ -1,344 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigQueryReadClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigQueryReadClient($options); - } - - /** @test */ - public function createReadSessionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $table = 'table110115790'; - $estimatedTotalBytesScanned = 452788190; - $estimatedTotalPhysicalFileSize = 938325754; - $estimatedRowCount = 1745583577; - $traceId = 'traceId1270300245'; - $expectedResponse = new ReadSession(); - $expectedResponse->setName($name); - $expectedResponse->setTable($table); - $expectedResponse->setEstimatedTotalBytesScanned($estimatedTotalBytesScanned); - $expectedResponse->setEstimatedTotalPhysicalFileSize($estimatedTotalPhysicalFileSize); - $expectedResponse->setEstimatedRowCount($estimatedRowCount); - $expectedResponse->setTraceId($traceId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $readSession = new ReadSession(); - $request = (new CreateReadSessionRequest()) - ->setParent($formattedParent) - ->setReadSession($readSession); - $response = $gapicClient->createReadSession($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryRead/CreateReadSession', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReadSession(); - $this->assertProtobufEquals($readSession, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReadSessionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $readSession = new ReadSession(); - $request = (new CreateReadSessionRequest()) - ->setParent($formattedParent) - ->setReadSession($readSession); - try { - $gapicClient->createReadSession($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readRowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $rowCount = 1340416618; - $uncompressedByteSize = 2094376525; - $totalEstimatedRowCount = 1623220052; - $expectedResponse = new ReadRowsResponse(); - $expectedResponse->setRowCount($rowCount); - $expectedResponse->setUncompressedByteSize($uncompressedByteSize); - $expectedResponse->setTotalEstimatedRowCount($totalEstimatedRowCount); - $transport->addResponse($expectedResponse); - $rowCount2 = 349815907; - $uncompressedByteSize2 = 1643824294; - $totalEstimatedRowCount2 = 841338529; - $expectedResponse2 = new ReadRowsResponse(); - $expectedResponse2->setRowCount($rowCount2); - $expectedResponse2->setUncompressedByteSize($uncompressedByteSize2); - $expectedResponse2->setTotalEstimatedRowCount($totalEstimatedRowCount2); - $transport->addResponse($expectedResponse2); - $rowCount3 = 349815906; - $uncompressedByteSize3 = 1643824295; - $totalEstimatedRowCount3 = 841338528; - $expectedResponse3 = new ReadRowsResponse(); - $expectedResponse3->setRowCount($rowCount3); - $expectedResponse3->setUncompressedByteSize($uncompressedByteSize3); - $expectedResponse3->setTotalEstimatedRowCount($totalEstimatedRowCount3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedReadStream = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); - $request = (new ReadRowsRequest()) - ->setReadStream($formattedReadStream); - $serverStream = $gapicClient->readRows($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryRead/ReadRows', $actualFuncCall); - $actualValue = $actualRequestObject->getReadStream(); - $this->assertProtobufEquals($formattedReadStream, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readRowsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $formattedReadStream = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); - $request = (new ReadRowsRequest()) - ->setReadStream($formattedReadStream); - $serverStream = $gapicClient->readRows($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function splitReadStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SplitReadStreamResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); - $request = (new SplitReadStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->splitReadStream($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryRead/SplitReadStream', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function splitReadStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->readStreamName('[PROJECT]', '[LOCATION]', '[SESSION]', '[STREAM]'); - $request = (new SplitReadStreamRequest()) - ->setName($formattedName); - try { - $gapicClient->splitReadStream($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReadSessionAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $table = 'table110115790'; - $estimatedTotalBytesScanned = 452788190; - $estimatedTotalPhysicalFileSize = 938325754; - $estimatedRowCount = 1745583577; - $traceId = 'traceId1270300245'; - $expectedResponse = new ReadSession(); - $expectedResponse->setName($name); - $expectedResponse->setTable($table); - $expectedResponse->setEstimatedTotalBytesScanned($estimatedTotalBytesScanned); - $expectedResponse->setEstimatedTotalPhysicalFileSize($estimatedTotalPhysicalFileSize); - $expectedResponse->setEstimatedRowCount($estimatedRowCount); - $expectedResponse->setTraceId($traceId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $readSession = new ReadSession(); - $request = (new CreateReadSessionRequest()) - ->setParent($formattedParent) - ->setReadSession($readSession); - $response = $gapicClient->createReadSessionAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryRead/CreateReadSession', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReadSession(); - $this->assertProtobufEquals($readSession, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php b/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php deleted file mode 100644 index 749bd3347b29..000000000000 --- a/owl-bot-staging/BigQueryStorage/v1/tests/Unit/V1/Client/BigQueryWriteClientTest.php +++ /dev/null @@ -1,537 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigQueryWriteClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigQueryWriteClient($options); - } - - /** @test */ - public function appendRowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $writeStream = 'writeStream-1431753760'; - $expectedResponse = new AppendRowsResponse(); - $expectedResponse->setWriteStream($writeStream); - $transport->addResponse($expectedResponse); - $writeStream2 = 'writeStream2-1525825645'; - $expectedResponse2 = new AppendRowsResponse(); - $expectedResponse2->setWriteStream($writeStream2); - $transport->addResponse($expectedResponse2); - $writeStream3 = 'writeStream3-1525825644'; - $expectedResponse3 = new AppendRowsResponse(); - $expectedResponse3->setWriteStream($writeStream3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedWriteStream4 = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = new AppendRowsRequest(); - $request->setWriteStream($formattedWriteStream4); - $formattedWriteStream5 = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request2 = new AppendRowsRequest(); - $request2->setWriteStream($formattedWriteStream5); - $formattedWriteStream6 = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request3 = new AppendRowsRequest(); - $request3->setWriteStream($formattedWriteStream6); - $bidi = $gapicClient->appendRows(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/AppendRows', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function appendRowsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->appendRows(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCommitWriteStreamsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCommitWriteStreamsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - $writeStreams = []; - $request = (new BatchCommitWriteStreamsRequest()) - ->setParent($formattedParent) - ->setWriteStreams($writeStreams); - $response = $gapicClient->batchCommitWriteStreams($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/BatchCommitWriteStreams', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getWriteStreams(); - $this->assertProtobufEquals($writeStreams, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCommitWriteStreamsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - $writeStreams = []; - $request = (new BatchCommitWriteStreamsRequest()) - ->setParent($formattedParent) - ->setWriteStreams($writeStreams); - try { - $gapicClient->batchCommitWriteStreams($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createWriteStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $location = 'location1901043637'; - $expectedResponse = new WriteStream(); - $expectedResponse->setName($name); - $expectedResponse->setLocation($location); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - $writeStream = new WriteStream(); - $request = (new CreateWriteStreamRequest()) - ->setParent($formattedParent) - ->setWriteStream($writeStream); - $response = $gapicClient->createWriteStream($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/CreateWriteStream', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getWriteStream(); - $this->assertProtobufEquals($writeStream, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createWriteStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - $writeStream = new WriteStream(); - $request = (new CreateWriteStreamRequest()) - ->setParent($formattedParent) - ->setWriteStream($writeStream); - try { - $gapicClient->createWriteStream($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function finalizeWriteStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $rowCount = 1340416618; - $expectedResponse = new FinalizeWriteStreamResponse(); - $expectedResponse->setRowCount($rowCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = (new FinalizeWriteStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->finalizeWriteStream($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/FinalizeWriteStream', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function finalizeWriteStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = (new FinalizeWriteStreamRequest()) - ->setName($formattedName); - try { - $gapicClient->finalizeWriteStream($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function flushRowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $offset2 = 755984506; - $expectedResponse = new FlushRowsResponse(); - $expectedResponse->setOffset($offset2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedWriteStream = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = (new FlushRowsRequest()) - ->setWriteStream($formattedWriteStream); - $response = $gapicClient->flushRows($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/FlushRows', $actualFuncCall); - $actualValue = $actualRequestObject->getWriteStream(); - $this->assertProtobufEquals($formattedWriteStream, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function flushRowsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedWriteStream = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = (new FlushRowsRequest()) - ->setWriteStream($formattedWriteStream); - try { - $gapicClient->flushRows($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWriteStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $location = 'location1901043637'; - $expectedResponse = new WriteStream(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = (new GetWriteStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->getWriteStream($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/GetWriteStream', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getWriteStreamExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->writeStreamName('[PROJECT]', '[DATASET]', '[TABLE]', '[STREAM]'); - $request = (new GetWriteStreamRequest()) - ->setName($formattedName); - try { - $gapicClient->getWriteStream($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchCommitWriteStreamsAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchCommitWriteStreamsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->tableName('[PROJECT]', '[DATASET]', '[TABLE]'); - $writeStreams = []; - $request = (new BatchCommitWriteStreamsRequest()) - ->setParent($formattedParent) - ->setWriteStreams($writeStreams); - $response = $gapicClient->batchCommitWriteStreamsAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.bigquery.storage.v1.BigQueryWrite/BatchCommitWriteStreams', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getWriteStreams(); - $this->assertProtobufEquals($writeStreams, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}