Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 30373ff

Browse files
docs: add generated snippets (#110)
* chore: use gapic-generator-python 0.63.2 PiperOrigin-RevId: 427792504 Source-Link: googleapis/googleapis@55b9e1e Source-Link: https://github.com/googleapis/googleapis-gen/commit/bf4e86b753f42cb0edb1fd51fbe840d7da0a1cde Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 61baf5c commit 30373ff

File tree

99 files changed

+10344
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+10344
-0
lines changed

google/cloud/metastore_v1/services/dataproc_metastore/async_client.py

Lines changed: 330 additions & 0 deletions
Large diffs are not rendered by default.

google/cloud/metastore_v1/services/dataproc_metastore/client.py

Lines changed: 345 additions & 0 deletions
Large diffs are not rendered by default.

google/cloud/metastore_v1alpha/services/dataproc_metastore/async_client.py

Lines changed: 330 additions & 0 deletions
Large diffs are not rendered by default.

google/cloud/metastore_v1alpha/services/dataproc_metastore/client.py

Lines changed: 345 additions & 0 deletions
Large diffs are not rendered by default.

google/cloud/metastore_v1beta/services/dataproc_metastore/async_client.py

Lines changed: 330 additions & 0 deletions
Large diffs are not rendered by default.

google/cloud/metastore_v1beta/services/dataproc_metastore/client.py

Lines changed: 345 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 CreateBackup
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-metastore
24+
25+
26+
# [START metastore_generated_metastore_v1_DataprocMetastore_CreateBackup_async]
27+
from google.cloud import metastore_v1
28+
29+
30+
async def sample_create_backup():
31+
# Create a client
32+
client = metastore_v1.DataprocMetastoreAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = metastore_v1.CreateBackupRequest(
36+
parent="parent_value",
37+
backup_id="backup_id_value",
38+
)
39+
40+
# Make the request
41+
operation = client.create_backup(request=request)
42+
43+
print("Waiting for operation to complete...")
44+
45+
response = await operation.result()
46+
47+
# Handle the response
48+
print(response)
49+
50+
# [END metastore_generated_metastore_v1_DataprocMetastore_CreateBackup_async]
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 CreateBackup
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-metastore
24+
25+
26+
# [START metastore_generated_metastore_v1_DataprocMetastore_CreateBackup_sync]
27+
from google.cloud import metastore_v1
28+
29+
30+
def sample_create_backup():
31+
# Create a client
32+
client = metastore_v1.DataprocMetastoreClient()
33+
34+
# Initialize request argument(s)
35+
request = metastore_v1.CreateBackupRequest(
36+
parent="parent_value",
37+
backup_id="backup_id_value",
38+
)
39+
40+
# Make the request
41+
operation = client.create_backup(request=request)
42+
43+
print("Waiting for operation to complete...")
44+
45+
response = operation.result()
46+
47+
# Handle the response
48+
print(response)
49+
50+
# [END metastore_generated_metastore_v1_DataprocMetastore_CreateBackup_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 CreateMetadataImport
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-metastore
24+
25+
26+
# [START metastore_generated_metastore_v1_DataprocMetastore_CreateMetadataImport_async]
27+
from google.cloud import metastore_v1
28+
29+
30+
async def sample_create_metadata_import():
31+
# Create a client
32+
client = metastore_v1.DataprocMetastoreAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = metastore_v1.CreateMetadataImportRequest(
36+
parent="parent_value",
37+
metadata_import_id="metadata_import_id_value",
38+
)
39+
40+
# Make the request
41+
operation = client.create_metadata_import(request=request)
42+
43+
print("Waiting for operation to complete...")
44+
45+
response = await operation.result()
46+
47+
# Handle the response
48+
print(response)
49+
50+
# [END metastore_generated_metastore_v1_DataprocMetastore_CreateMetadataImport_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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 CreateMetadataImport
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-metastore
24+
25+
26+
# [START metastore_generated_metastore_v1_DataprocMetastore_CreateMetadataImport_sync]
27+
from google.cloud import metastore_v1
28+
29+
30+
def sample_create_metadata_import():
31+
# Create a client
32+
client = metastore_v1.DataprocMetastoreClient()
33+
34+
# Initialize request argument(s)
35+
request = metastore_v1.CreateMetadataImportRequest(
36+
parent="parent_value",
37+
metadata_import_id="metadata_import_id_value",
38+
)
39+
40+
# Make the request
41+
operation = client.create_metadata_import(request=request)
42+
43+
print("Waiting for operation to complete...")
44+
45+
response = operation.result()
46+
47+
# Handle the response
48+
print(response)
49+
50+
# [END metastore_generated_metastore_v1_DataprocMetastore_CreateMetadataImport_sync]

0 commit comments

Comments
 (0)