Skip to content

Commit

Permalink
feat: add clients for v1beta2 endpoint (#113)
Browse files Browse the repository at this point in the history
This is 100% autogenerated code. Subsequent PRs will cover manual classes.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-bigquery-storage/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

TODO:

- [x] docs build successful
- [x] unit tests pass (need to remove `test_append_rows_flattened_*` tests, as there are no flattened arguments for `append_rows`)
  • Loading branch information
tswast committed Jan 13, 2021
1 parent c6c7a1a commit e5f6198
Show file tree
Hide file tree
Showing 38 changed files with 10,498 additions and 15 deletions.
6 changes: 6 additions & 0 deletions docs/bigquery_storage_v1beta2/big_query_read.rst
@@ -0,0 +1,6 @@
BigQueryRead
------------------------------

.. automodule:: google.cloud.bigquery_storage_v1beta2.services.big_query_read
:members:
:inherited-members:
6 changes: 6 additions & 0 deletions docs/bigquery_storage_v1beta2/big_query_write.rst
@@ -0,0 +1,6 @@
BigQueryWrite
-------------------------------

.. automodule:: google.cloud.bigquery_storage_v1beta2.services.big_query_write
:members:
:inherited-members:
7 changes: 7 additions & 0 deletions docs/bigquery_storage_v1beta2/services.rst
@@ -0,0 +1,7 @@
Services for Google Cloud Bigquery Storage v1beta2 API
======================================================
.. toctree::
:maxdepth: 2

big_query_read
big_query_write
7 changes: 7 additions & 0 deletions docs/bigquery_storage_v1beta2/types.rst
@@ -0,0 +1,7 @@
Types for Google Cloud Bigquery Storage v1beta2 API
===================================================

.. automodule:: google.cloud.bigquery_storage_v1beta2.types
:members:
:undoc-members:
:show-inheritance:
2 changes: 2 additions & 0 deletions docs/index.rst
Expand Up @@ -21,6 +21,8 @@ API Reference
bigquery_storage_v1/library
bigquery_storage_v1/services
bigquery_storage_v1/types
bigquery_storage_v1beta2/services
bigquery_storage_v1beta2/types


Migration Guide
Expand Down
57 changes: 57 additions & 0 deletions google/cloud/bigquery_storage_v1beta2/proto/arrow.proto
@@ -0,0 +1,57 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.bigquery.storage.v1beta2;

option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta2;storage";
option java_multiple_files = true;
option java_outer_classname = "ArrowProto";
option java_package = "com.google.cloud.bigquery.storage.v1beta2";

// Arrow schema as specified in
// https://arrow.apache.org/docs/python/api/datatypes.html
// and serialized to bytes using IPC:
// https://arrow.apache.org/docs/format/Columnar.html#serialization-and-interprocess-communication-ipc
//
// See code samples on how this message can be deserialized.
message ArrowSchema {
// IPC serialized Arrow schema.
bytes serialized_schema = 1;
}

// Arrow RecordBatch.
message ArrowRecordBatch {
// IPC-serialized Arrow RecordBatch.
bytes serialized_record_batch = 1;
}

// Contains options specific to Arrow Serialization.
message ArrowSerializationOptions {
// The IPC format to use when serializing Arrow streams.
enum Format {
// If unspecied the IPC format as of 0.15 release will be used.
FORMAT_UNSPECIFIED = 0;

// Use the legacy IPC message format as of Apache Arrow Release 0.14.
ARROW_0_14 = 1;

// Use the message format as of Apache Arrow Release 0.15.
ARROW_0_15 = 2;
}

// The Arrow IPC format to use.
Format format = 1;
}
35 changes: 35 additions & 0 deletions google/cloud/bigquery_storage_v1beta2/proto/avro.proto
@@ -0,0 +1,35 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.bigquery.storage.v1beta2;

option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta2;storage";
option java_multiple_files = true;
option java_outer_classname = "AvroProto";
option java_package = "com.google.cloud.bigquery.storage.v1beta2";

// Avro schema.
message AvroSchema {
// Json serialized schema, as described at
// https://avro.apache.org/docs/1.8.1/spec.html.
string schema = 1;
}

// Avro rows.
message AvroRows {
// Binary serialized rows in a block.
bytes serialized_binary_rows = 1;
}
41 changes: 41 additions & 0 deletions google/cloud/bigquery_storage_v1beta2/proto/protobuf.proto
@@ -0,0 +1,41 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.bigquery.storage.v1beta2;

import "google/protobuf/descriptor.proto";

option go_package = "google.golang.org/genproto/googleapis/cloud/bigquery/storage/v1beta2;storage";
option java_multiple_files = true;
option java_outer_classname = "ProtoBufProto";
option java_package = "com.google.cloud.bigquery.storage.v1beta2";

// Protobuf schema is an API presentation the proto buffer schema.
message ProtoSchema {
// Descriptor for input message. The descriptor has to be self contained,
// including all the nested types, excepted for proto buffer well known types
// (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf).
google.protobuf.DescriptorProto proto_descriptor = 1;
}

// Protobuf rows.
message ProtoRows {
// 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.
repeated bytes serialized_rows = 1;
}

0 comments on commit e5f6198

Please sign in to comment.