Skip to content

Commit d46da7e

Browse files
fix: remove bigquery.readonly auth scope (#394)
* chore: use gapic-generator-python 0.63.2 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix!: remove bigquery.readonly auth scope PiperOrigin-RevId: 429331987 Source-Link: googleapis/googleapis@4b2bd26 Source-Link: https://github.com/googleapis/googleapis-gen/commit/fa17f03b5ae96316cd02f2997f2fd1196e034e5e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmExN2YwM2I1YWU5NjMxNmNkMDJmMjk5N2YyZmQxMTk2ZTAzNGU1ZSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md docs: add generated snippets PiperOrigin-RevId: 427792504 Source-Link: googleapis/googleapis@55b9e1e Source-Link: https://github.com/googleapis/googleapis-gen/commit/bf4e86b753f42cb0edb1fd51fbe840d7da0a1cde Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Tim Swast <[email protected]>
1 parent c9160e6 commit d46da7e

File tree

38 files changed

+3262
-0
lines changed

38 files changed

+3262
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CreateReadSession
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_generated_bigquery_storage_v1_BigQueryRead_CreateReadSession_async]
27+
from google.cloud import bigquery_storage_v1
28+
29+
30+
async def sample_create_read_session():
31+
# Create a client
32+
client = bigquery_storage_v1.BigQueryReadAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = bigquery_storage_v1.CreateReadSessionRequest(parent="parent_value",)
36+
37+
# Make the request
38+
response = await client.create_read_session(request=request)
39+
40+
# Handle the response
41+
print(response)
42+
43+
44+
# [END bigquerystorage_generated_bigquery_storage_v1_BigQueryRead_CreateReadSession_async]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for CreateReadSession
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_generated_bigquery_storage_v1_BigQueryRead_CreateReadSession_sync]
27+
from google.cloud import bigquery_storage_v1
28+
29+
30+
def sample_create_read_session():
31+
# Create a client
32+
client = bigquery_storage_v1.BigQueryReadClient()
33+
34+
# Initialize request argument(s)
35+
request = bigquery_storage_v1.CreateReadSessionRequest(parent="parent_value",)
36+
37+
# Make the request
38+
response = client.create_read_session(request=request)
39+
40+
# Handle the response
41+
print(response)
42+
43+
44+
# [END bigquerystorage_generated_bigquery_storage_v1_BigQueryRead_CreateReadSession_sync]
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for ReadRows
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_generated_bigquery_storage_v1_BigQueryRead_ReadRows_async]
27+
from google.cloud import bigquery_storage_v1
28+
29+
30+
async def sample_read_rows():
31+
# Create a client
32+
client = bigquery_storage_v1.BigQueryReadAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = bigquery_storage_v1.ReadRowsRequest(read_stream="read_stream_value",)
36+
37+
# Make the request
38+
stream = await client.read_rows(request=request)
39+
40+
# Handle the response
41+
async for response in stream:
42+
print(response)
43+
44+
45+
# [END bigquerystorage_generated_bigquery_storage_v1_BigQueryRead_ReadRows_async]
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for ReadRows
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_generated_bigquery_storage_v1_BigQueryRead_ReadRows_sync]
27+
from google.cloud import bigquery_storage_v1
28+
29+
30+
def sample_read_rows():
31+
# Create a client
32+
client = bigquery_storage_v1.BigQueryReadClient()
33+
34+
# Initialize request argument(s)
35+
request = bigquery_storage_v1.ReadRowsRequest(read_stream="read_stream_value",)
36+
37+
# Make the request
38+
stream = client.read_rows(request=request)
39+
40+
# Handle the response
41+
for response in stream:
42+
print(response)
43+
44+
45+
# [END bigquerystorage_generated_bigquery_storage_v1_BigQueryRead_ReadRows_sync]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for SplitReadStream
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_generated_bigquery_storage_v1_BigQueryRead_SplitReadStream_async]
27+
from google.cloud import bigquery_storage_v1
28+
29+
30+
async def sample_split_read_stream():
31+
# Create a client
32+
client = bigquery_storage_v1.BigQueryReadAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = bigquery_storage_v1.SplitReadStreamRequest(name="name_value",)
36+
37+
# Make the request
38+
response = await client.split_read_stream(request=request)
39+
40+
# Handle the response
41+
print(response)
42+
43+
44+
# [END bigquerystorage_generated_bigquery_storage_v1_BigQueryRead_SplitReadStream_async]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for SplitReadStream
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_generated_bigquery_storage_v1_BigQueryRead_SplitReadStream_sync]
27+
from google.cloud import bigquery_storage_v1
28+
29+
30+
def sample_split_read_stream():
31+
# Create a client
32+
client = bigquery_storage_v1.BigQueryReadClient()
33+
34+
# Initialize request argument(s)
35+
request = bigquery_storage_v1.SplitReadStreamRequest(name="name_value",)
36+
37+
# Make the request
38+
response = client.split_read_stream(request=request)
39+
40+
# Handle the response
41+
print(response)
42+
43+
44+
# [END bigquerystorage_generated_bigquery_storage_v1_BigQueryRead_SplitReadStream_sync]
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for AppendRows
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_generated_bigquery_storage_v1_BigQueryWrite_AppendRows_async]
27+
from google.cloud import bigquery_storage_v1
28+
29+
30+
async def sample_append_rows():
31+
# Create a client
32+
client = bigquery_storage_v1.BigQueryWriteAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = bigquery_storage_v1.AppendRowsRequest(write_stream="write_stream_value",)
36+
37+
# This method expects an iterator which contains
38+
# 'bigquery_storage_v1.AppendRowsRequest' objects
39+
# Here we create a generator that yields a single `request` for
40+
# demonstrative purposes.
41+
requests = [request]
42+
43+
def request_generator():
44+
for request in requests:
45+
yield request
46+
47+
# Make the request
48+
stream = await client.append_rows(requests=request_generator())
49+
50+
# Handle the response
51+
async for response in stream:
52+
print(response)
53+
54+
55+
# [END bigquerystorage_generated_bigquery_storage_v1_BigQueryWrite_AppendRows_async]
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for AppendRows
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_generated_bigquery_storage_v1_BigQueryWrite_AppendRows_sync]
27+
from google.cloud import bigquery_storage_v1
28+
29+
30+
def sample_append_rows():
31+
# Create a client
32+
client = bigquery_storage_v1.BigQueryWriteClient()
33+
34+
# Initialize request argument(s)
35+
request = bigquery_storage_v1.AppendRowsRequest(write_stream="write_stream_value",)
36+
37+
# This method expects an iterator which contains
38+
# 'bigquery_storage_v1.AppendRowsRequest' objects
39+
# Here we create a generator that yields a single `request` for
40+
# demonstrative purposes.
41+
requests = [request]
42+
43+
def request_generator():
44+
for request in requests:
45+
yield request
46+
47+
# Make the request
48+
stream = client.append_rows(requests=request_generator())
49+
50+
# Handle the response
51+
for response in stream:
52+
print(response)
53+
54+
55+
# [END bigquerystorage_generated_bigquery_storage_v1_BigQueryWrite_AppendRows_sync]

0 commit comments

Comments
 (0)