From f248505055e543da8b57ca63f7aa18bec4a486cb Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Thu, 25 Jun 2020 16:38:00 -0700 Subject: [PATCH 001/235] feat: generate v1p5beta1 (#47) * feat: generate v1p5beta1 * fix: fix unit tests, imports * docs: fix docs * docs: include v1p5beta1 docs * build: update pip * chore: try newer version of black * Update build.sh --- asset/snippets/AUTHORING_GUIDE.md | 1 + asset/snippets/CONTRIBUTING.md | 1 + 2 files changed, 2 insertions(+) create mode 100644 asset/snippets/AUTHORING_GUIDE.md create mode 100644 asset/snippets/CONTRIBUTING.md diff --git a/asset/snippets/AUTHORING_GUIDE.md b/asset/snippets/AUTHORING_GUIDE.md new file mode 100644 index 000000000000..55c97b32f4c1 --- /dev/null +++ b/asset/snippets/AUTHORING_GUIDE.md @@ -0,0 +1 @@ +See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md \ No newline at end of file diff --git a/asset/snippets/CONTRIBUTING.md b/asset/snippets/CONTRIBUTING.md new file mode 100644 index 000000000000..34c882b6f1a3 --- /dev/null +++ b/asset/snippets/CONTRIBUTING.md @@ -0,0 +1 @@ +See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/CONTRIBUTING.md \ No newline at end of file From 4564eb63a2de3087f0715f10af5a771fc3c94ec9 Mon Sep 17 00:00:00 2001 From: peter-zheng-g <43967553+peter-zheng-g@users.noreply.github.com> Date: Mon, 12 Nov 2018 17:26:41 -0800 Subject: [PATCH 002/235] [Asset] Add quick start code for ExportAssets API [(#1829)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/1829) * [Asset] Add quick start code for ExportAssets API * [Asset] Minor fix on comment. * [Asset] Fix import for test. * [Asset] Attempt to fix build error * [Asset] Fix code style issue. * [Asset] Fix build failure * [Asset] Minor fix * [Asset] Fix build failure * [Asset] Fix build failure * [Asset] Minor fix. * [Asset] Minor fix on license statement. Remove "All Rights Reserved.". --- .../snippets/quickstart_exportassets.py | 51 +++++++++++++++++++ .../snippets/quickstart_exportassets_test.py | 50 ++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 asset/snippets/snippets/quickstart_exportassets.py create mode 100644 asset/snippets/snippets/quickstart_exportassets_test.py diff --git a/asset/snippets/snippets/quickstart_exportassets.py b/asset/snippets/snippets/quickstart_exportassets.py new file mode 100644 index 000000000000..da120cd38590 --- /dev/null +++ b/asset/snippets/snippets/quickstart_exportassets.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python + +# Copyright 2018 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. + + +import argparse + + +def export_assets(project_id, dump_file_path): + # [START asset_quickstart_exportassets] + from google.cloud import asset_v1beta1 + from google.cloud.asset_v1beta1.proto import asset_service_pb2 + + # TODO project_id = "Your Google Cloud Project ID" + # TODO dump_file_path = "Your asset dump file path" + + client = asset_v1beta1.AssetServiceClient() + parent = client.project_path(project_id) + output_config = asset_service_pb2.OutputConfig() + output_config.gcs_destination.uri = dump_file_path + response = client.export_assets(parent, output_config) + print(response.result) + # [END asset_quickstart_exportassets] + + +if __name__ == '__main__': + + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument('project_id', help='Your Google Cloud project ID') + parser.add_argument('dump_file_path', + help='The file ExportAssets API will dump assets to, ' + 'e.g.: gs:///asset_dump_file') + + args = parser.parse_args() + + export_assets(args.project_id, args.dump_file_path) diff --git a/asset/snippets/snippets/quickstart_exportassets_test.py b/asset/snippets/snippets/quickstart_exportassets_test.py new file mode 100644 index 000000000000..53e55bd37f2f --- /dev/null +++ b/asset/snippets/snippets/quickstart_exportassets_test.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python + +# Copyright 2018 Google LLC. All Rights Reserved. +# +# 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. + +import os + +from google.cloud import storage +import pytest + +import quickstart_exportassets + +PROJECT = os.environ['GCLOUD_PROJECT'] +BUCKET = 'bucket-for-assets' + + +@pytest.fixture(scope='module') +def storage_client(): + yield storage.Client() + + +@pytest.fixture(scope='module') +def asset_bucket(storage_client): + storage_client.create_bucket(BUCKET) + + try: + storage_client.delete_bucket(BUCKET) + except Exception: + pass + + yield BUCKET + + +def test_export_assets(asset_bucket, capsys): + dump_file_path = "gs://", asset_bucket, "/assets-dump.txt" + quickstart_exportassets.export_assets(PROJECT, dump_file_path) + out, _ = capsys.readouterr() + + assert "uri: \"gs://cai-prober-prod-for-assets/phython-test.txt\"" in out From dba0389f5298814fa504f19f59bd185a38b8bdee Mon Sep 17 00:00:00 2001 From: peter-zheng-g <43967553+peter-zheng-g@users.noreply.github.com> Date: Tue, 13 Nov 2018 12:52:06 -0800 Subject: [PATCH 003/235] [Asset] Add requirements.txt [(#1834)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/1834) Adds asset quickstart --- asset/snippets/snippets/quickstart_exportassets.py | 13 +++++++------ .../snippets/quickstart_exportassets_test.py | 12 +++++++----- asset/snippets/snippets/requirements.txt | 2 ++ 3 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 asset/snippets/snippets/requirements.txt diff --git a/asset/snippets/snippets/quickstart_exportassets.py b/asset/snippets/snippets/quickstart_exportassets.py index da120cd38590..fa47a6509bbf 100644 --- a/asset/snippets/snippets/quickstart_exportassets.py +++ b/asset/snippets/snippets/quickstart_exportassets.py @@ -23,15 +23,15 @@ def export_assets(project_id, dump_file_path): from google.cloud import asset_v1beta1 from google.cloud.asset_v1beta1.proto import asset_service_pb2 - # TODO project_id = "Your Google Cloud Project ID" - # TODO dump_file_path = "Your asset dump file path" + # TODO project_id = 'Your Google Cloud Project ID' + # TODO dump_file_path = 'Your asset dump file path' client = asset_v1beta1.AssetServiceClient() parent = client.project_path(project_id) output_config = asset_service_pb2.OutputConfig() output_config.gcs_destination.uri = dump_file_path response = client.export_assets(parent, output_config) - print(response.result) + print(response.result()) # [END asset_quickstart_exportassets] @@ -42,9 +42,10 @@ def export_assets(project_id, dump_file_path): formatter_class=argparse.RawDescriptionHelpFormatter ) parser.add_argument('project_id', help='Your Google Cloud project ID') - parser.add_argument('dump_file_path', - help='The file ExportAssets API will dump assets to, ' - 'e.g.: gs:///asset_dump_file') + parser.add_argument( + 'dump_file_path', + help='The file ExportAssets API will dump assets to, ' + 'e.g.: gs:///asset_dump_file') args = parser.parse_args() diff --git a/asset/snippets/snippets/quickstart_exportassets_test.py b/asset/snippets/snippets/quickstart_exportassets_test.py index 53e55bd37f2f..35036c7b8a1d 100644 --- a/asset/snippets/snippets/quickstart_exportassets_test.py +++ b/asset/snippets/snippets/quickstart_exportassets_test.py @@ -15,6 +15,7 @@ # limitations under the License. import os +import time from google.cloud import storage import pytest @@ -22,7 +23,7 @@ import quickstart_exportassets PROJECT = os.environ['GCLOUD_PROJECT'] -BUCKET = 'bucket-for-assets' +BUCKET = 'assets-{}'.format(int(time.time())) @pytest.fixture(scope='module') @@ -36,15 +37,16 @@ def asset_bucket(storage_client): try: storage_client.delete_bucket(BUCKET) - except Exception: - pass + except Exception as e: + print('Failed to delete bucket{}'.format(BUCKET)) + raise e yield BUCKET def test_export_assets(asset_bucket, capsys): - dump_file_path = "gs://", asset_bucket, "/assets-dump.txt" + dump_file_path = 'gs://{}/assets-dump.txt'.format(asset_bucket) quickstart_exportassets.export_assets(PROJECT, dump_file_path) out, _ = capsys.readouterr() - assert "uri: \"gs://cai-prober-prod-for-assets/phython-test.txt\"" in out + assert dump_file_path in out diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt new file mode 100644 index 000000000000..5a70bfcc86d7 --- /dev/null +++ b/asset/snippets/snippets/requirements.txt @@ -0,0 +1,2 @@ +google-cloud-storage==1.13.0 +google-cloud-asset==0.1.1 From 5b4ad27f31dc5bae35da83d9914dfad98748106d Mon Sep 17 00:00:00 2001 From: peter-zheng-g <43967553+peter-zheng-g@users.noreply.github.com> Date: Fri, 16 Nov 2018 15:50:07 -0800 Subject: [PATCH 004/235] [Asset] Test: fix bucket clean up logic. [(#1845)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/1845) --- asset/snippets/snippets/quickstart_exportassets_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/asset/snippets/snippets/quickstart_exportassets_test.py b/asset/snippets/snippets/quickstart_exportassets_test.py index 35036c7b8a1d..4e08e007aedd 100644 --- a/asset/snippets/snippets/quickstart_exportassets_test.py +++ b/asset/snippets/snippets/quickstart_exportassets_test.py @@ -33,16 +33,16 @@ def storage_client(): @pytest.fixture(scope='module') def asset_bucket(storage_client): - storage_client.create_bucket(BUCKET) + bucket = storage_client.create_bucket(BUCKET) + + yield BUCKET try: - storage_client.delete_bucket(BUCKET) + bucket.delete(force=True) except Exception as e: print('Failed to delete bucket{}'.format(BUCKET)) raise e - yield BUCKET - def test_export_assets(asset_bucket, capsys): dump_file_path = 'gs://{}/assets-dump.txt'.format(asset_bucket) From 4dfd612f2a6599d5cb835472c31f4b47c8fb0803 Mon Sep 17 00:00:00 2001 From: peter-zheng-g <43967553+peter-zheng-g@users.noreply.github.com> Date: Wed, 28 Nov 2018 10:52:15 -0800 Subject: [PATCH 005/235] [Asset] Add quickstart code for BatchGetAssetsHistory API. [(#1867)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/1867) * [Asset] Test: fix bucket clean up logic. * [Asset] Add quickstart code for BatchGetAssetsHistory API. --- .../quickstart_batchgetassetshistory.py | 57 +++++++++++++++++++ .../quickstart_batchgetassetshistory_test.py | 55 ++++++++++++++++++ .../snippets/quickstart_exportassets.py | 4 +- 3 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 asset/snippets/snippets/quickstart_batchgetassetshistory.py create mode 100644 asset/snippets/snippets/quickstart_batchgetassetshistory_test.py diff --git a/asset/snippets/snippets/quickstart_batchgetassetshistory.py b/asset/snippets/snippets/quickstart_batchgetassetshistory.py new file mode 100644 index 000000000000..5bac977176b6 --- /dev/null +++ b/asset/snippets/snippets/quickstart_batchgetassetshistory.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python + +# Copyright 2018 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. + + +import argparse + + +def batch_get_assets_history(project_id, asset_names): + # [START asset_quickstart_batch_get_assets_history] + from google.cloud import asset_v1beta1 + from google.cloud.asset_v1beta1.proto import assets_pb2 + from google.cloud.asset_v1beta1 import enums + + # TODO project_id = 'Your Google Cloud Project ID' + # TODO asset_names = 'Your asset names list, e.g.: + # ["//storage.googleapis.com/[BUCKET_NAME]",]' + + client = asset_v1beta1.AssetServiceClient() + parent = client.project_path(project_id) + content_type = enums.ContentType.RESOURCE + read_time_window = assets_pb2.TimeWindow() + read_time_window.start_time.GetCurrentTime() + response = client.batch_get_assets_history( + parent, content_type, read_time_window, asset_names) + print('assets: {}'.format(response.assets)) + # [END asset_quickstart_batch_get_assets_history] + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument('project_id', help='Your Google Cloud project ID') + parser.add_argument( + 'asset_names', + help='The asset names for which history will be fetched, comma ' + 'delimited, e.g.: //storage.googleapis.com/[BUCKET_NAME]') + + args = parser.parse_args() + + asset_name_list = args.asset_names.split(',') + + batch_get_assets_history(args.project_id, asset_name_list) diff --git a/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py b/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py new file mode 100644 index 000000000000..a709b15ffd2d --- /dev/null +++ b/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python + +# Copyright 2018 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. + +import os +import time + +from google.cloud import storage +import pytest + +import quickstart_batchgetassetshistory + +PROJECT = os.environ['GCLOUD_PROJECT'] +BUCKET = 'assets-{}'.format(int(time.time())) + + +@pytest.fixture(scope='module') +def storage_client(): + yield storage.Client() + + +@pytest.fixture(scope='module') +def asset_bucket(storage_client): + bucket = storage_client.create_bucket(BUCKET) + + yield BUCKET + + try: + bucket.delete(force=True) + except Exception as e: + print('Failed to delete bucket{}'.format(BUCKET)) + raise e + + +def test_batch_get_assets_history(asset_bucket, capsys): + bucket_asset_name = '//storage.googleapis.com/{}'.format(BUCKET) + asset_names = [bucket_asset_name, ] + quickstart_batchgetassetshistory.batch_get_assets_history( + PROJECT, asset_names) + out, _ = capsys.readouterr() + + if not out: + assert bucket_asset_name in out diff --git a/asset/snippets/snippets/quickstart_exportassets.py b/asset/snippets/snippets/quickstart_exportassets.py index fa47a6509bbf..036130dc3cc8 100644 --- a/asset/snippets/snippets/quickstart_exportassets.py +++ b/asset/snippets/snippets/quickstart_exportassets.py @@ -19,7 +19,7 @@ def export_assets(project_id, dump_file_path): - # [START asset_quickstart_exportassets] + # [START asset_quickstart_export_assets] from google.cloud import asset_v1beta1 from google.cloud.asset_v1beta1.proto import asset_service_pb2 @@ -32,7 +32,7 @@ def export_assets(project_id, dump_file_path): output_config.gcs_destination.uri = dump_file_path response = client.export_assets(parent, output_config) print(response.result()) - # [END asset_quickstart_exportassets] + # [END asset_quickstart_export_assets] if __name__ == '__main__': From 155c98b6906f0e4bc81d09e6173f14c3f6a6f689 Mon Sep 17 00:00:00 2001 From: DPEBot Date: Wed, 6 Feb 2019 12:06:35 -0800 Subject: [PATCH 006/235] Auto-update dependencies. [(#1980)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/1980) * Auto-update dependencies. * Update requirements.txt * Update requirements.txt --- asset/snippets/snippets/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 5a70bfcc86d7..1fb91cc49c44 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,2 +1,2 @@ -google-cloud-storage==1.13.0 -google-cloud-asset==0.1.1 +google-cloud-storage==1.13.2 +google-cloud-asset==0.1.2 From 1674fb66a1add4a1c5648e9df0746fc33e07f78d Mon Sep 17 00:00:00 2001 From: peter-zheng-g <43967553+peter-zheng-g@users.noreply.github.com> Date: Tue, 2 Apr 2019 10:42:58 -0700 Subject: [PATCH 007/235] [CloudAsset] Update client library version to v1. [(#2076)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2076) --- .../snippets/quickstart_batchgetassetshistory.py | 9 ++++----- asset/snippets/snippets/quickstart_exportassets.py | 6 +++--- asset/snippets/snippets/requirements.txt | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/asset/snippets/snippets/quickstart_batchgetassetshistory.py b/asset/snippets/snippets/quickstart_batchgetassetshistory.py index 5bac977176b6..ca6a29ac92c4 100644 --- a/asset/snippets/snippets/quickstart_batchgetassetshistory.py +++ b/asset/snippets/snippets/quickstart_batchgetassetshistory.py @@ -20,19 +20,18 @@ def batch_get_assets_history(project_id, asset_names): # [START asset_quickstart_batch_get_assets_history] - from google.cloud import asset_v1beta1 - from google.cloud.asset_v1beta1.proto import assets_pb2 - from google.cloud.asset_v1beta1 import enums + from google.cloud import asset_v1 + from google.cloud.asset_v1.proto import assets_pb2 + from google.cloud.asset_v1 import enums # TODO project_id = 'Your Google Cloud Project ID' # TODO asset_names = 'Your asset names list, e.g.: # ["//storage.googleapis.com/[BUCKET_NAME]",]' - client = asset_v1beta1.AssetServiceClient() + client = asset_v1.AssetServiceClient() parent = client.project_path(project_id) content_type = enums.ContentType.RESOURCE read_time_window = assets_pb2.TimeWindow() - read_time_window.start_time.GetCurrentTime() response = client.batch_get_assets_history( parent, content_type, read_time_window, asset_names) print('assets: {}'.format(response.assets)) diff --git a/asset/snippets/snippets/quickstart_exportassets.py b/asset/snippets/snippets/quickstart_exportassets.py index 036130dc3cc8..ddc05e5544e9 100644 --- a/asset/snippets/snippets/quickstart_exportassets.py +++ b/asset/snippets/snippets/quickstart_exportassets.py @@ -20,13 +20,13 @@ def export_assets(project_id, dump_file_path): # [START asset_quickstart_export_assets] - from google.cloud import asset_v1beta1 - from google.cloud.asset_v1beta1.proto import asset_service_pb2 + from google.cloud import asset_v1 + from google.cloud.asset_v1.proto import asset_service_pb2 # TODO project_id = 'Your Google Cloud Project ID' # TODO dump_file_path = 'Your asset dump file path' - client = asset_v1beta1.AssetServiceClient() + client = asset_v1.AssetServiceClient() parent = client.project_path(project_id) output_config = asset_service_pb2.OutputConfig() output_config.gcs_destination.uri = dump_file_path diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 1fb91cc49c44..0e87ed672ee1 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,2 +1,2 @@ google-cloud-storage==1.13.2 -google-cloud-asset==0.1.2 +google-cloud-asset==0.2.0 From 643c860afe86263862dd5a5bc851e5d71c931098 Mon Sep 17 00:00:00 2001 From: peter-zheng-g <43967553+peter-zheng-g@users.noreply.github.com> Date: Tue, 2 Apr 2019 13:34:11 -0700 Subject: [PATCH 008/235] [CloudAsset] Delay seconds between bucket creation and API call. [(#2082)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2082) There's some latency between bucket creation and when it's reflected in the backend. Need to delay in order to make the API call successfully. --- .../snippets/snippets/quickstart_batchgetassetshistory_test.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py b/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py index a709b15ffd2d..9cdc30ffbce7 100644 --- a/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py +++ b/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py @@ -47,6 +47,9 @@ def asset_bucket(storage_client): def test_batch_get_assets_history(asset_bucket, capsys): bucket_asset_name = '//storage.googleapis.com/{}'.format(BUCKET) asset_names = [bucket_asset_name, ] + # There's some delay between bucket creation and when it's reflected in the + # backend. + time.sleep(15) quickstart_batchgetassetshistory.batch_get_assets_history( PROJECT, asset_names) out, _ = capsys.readouterr() From aafc7b7582820989a5e778c1b3fab2f266e057eb Mon Sep 17 00:00:00 2001 From: cwxie-google <51139172+cwxie-google@users.noreply.github.com> Date: Thu, 22 Aug 2019 17:11:51 -0700 Subject: [PATCH 009/235] Asset: Add Real Time Feed API Sample Code [(#2352)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2352) --- .../snippets/quickstart_createfeed.py | 51 +++++++++++++++++++ .../snippets/quickstart_createfeed_test.py | 44 ++++++++++++++++ .../snippets/quickstart_deletefeed.py | 39 ++++++++++++++ .../snippets/quickstart_deletefeed_test.py | 42 +++++++++++++++ asset/snippets/snippets/quickstart_getfeed.py | 39 ++++++++++++++ .../snippets/quickstart_getfeed_test.py | 45 ++++++++++++++++ .../snippets/snippets/quickstart_listfeeds.py | 41 +++++++++++++++ .../snippets/quickstart_listfeeds_test.py | 28 ++++++++++ .../snippets/quickstart_updatefeed.py | 49 ++++++++++++++++++ .../snippets/quickstart_updatefeed_test.py | 47 +++++++++++++++++ asset/snippets/snippets/requirements.txt | 5 +- 11 files changed, 428 insertions(+), 2 deletions(-) create mode 100644 asset/snippets/snippets/quickstart_createfeed.py create mode 100644 asset/snippets/snippets/quickstart_createfeed_test.py create mode 100644 asset/snippets/snippets/quickstart_deletefeed.py create mode 100644 asset/snippets/snippets/quickstart_deletefeed_test.py create mode 100644 asset/snippets/snippets/quickstart_getfeed.py create mode 100644 asset/snippets/snippets/quickstart_getfeed_test.py create mode 100644 asset/snippets/snippets/quickstart_listfeeds.py create mode 100644 asset/snippets/snippets/quickstart_listfeeds_test.py create mode 100644 asset/snippets/snippets/quickstart_updatefeed.py create mode 100644 asset/snippets/snippets/quickstart_updatefeed_test.py diff --git a/asset/snippets/snippets/quickstart_createfeed.py b/asset/snippets/snippets/quickstart_createfeed.py new file mode 100644 index 000000000000..a36d8bd094f1 --- /dev/null +++ b/asset/snippets/snippets/quickstart_createfeed.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python + +# Copyright 2019 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. + + +import argparse + + +def create_feed(project_id, feed_id, asset_names, topic): + # [START asset_quickstart_create_feed] + from google.cloud import asset_v1p2beta1 + from google.cloud.asset_v1p2beta1.proto import asset_service_pb2 + + # TODO project_id = 'Your Google Cloud Project ID' + # TODO feed_id = 'Feed ID you want to create' + # TODO asset_names = 'List of asset names the feed listen to' + # TODO topic = "Topic name of the feed" + + client = asset_v1p2beta1.AssetServiceClient() + parent = "projects/{}".format(project_id) + feed = asset_service_pb2.Feed() + feed.asset_names.extend(asset_names) + feed.feed_output_config.pubsub_destination.topic = topic + response = client.create_feed(parent, feed_id, feed) + print('feed: {}'.format(response)) + # [END asset_quickstart_create_feed] + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument('project_id', help='Your Google Cloud project ID') + parser.add_argument('feed_id', help='Feed ID you want to create') + parser.add_argument('asset_names', + help='List of asset names the feed listen to') + parser.add_argument('topic', help='Topic name of the feed') + args = parser.parse_args() + create_feed(args.project_id, args.feed_id, args.asset_names, args.topic) diff --git a/asset/snippets/snippets/quickstart_createfeed_test.py b/asset/snippets/snippets/quickstart_createfeed_test.py new file mode 100644 index 000000000000..c566fe7c73b8 --- /dev/null +++ b/asset/snippets/snippets/quickstart_createfeed_test.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python + +# Copyright 2018 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. + +import json +import os +import time + +import quickstart_createfeed +import quickstart_deletefeed +from google.cloud import resource_manager + +json_data = open(os.environ["GOOGLE_APPLICATION_CREDENTIALS"]).read() +data = json.loads(json_data) +PROJECT = data['project_id'] +ASSET_NAME = 'assets-{}'.format(int(time.time())) +FEED_ID = 'feed-{}'.format(int(time.time())) +TOPIC = 'topic-{}'.format(int(time.time())) + + +def test_create_feed(capsys): + client = resource_manager.Client() + project_number = client.fetch_project(PROJECT).number + full_topic_name = "projects/{}/topics/{}".format(PROJECT, TOPIC) + quickstart_createfeed.create_feed( + PROJECT, FEED_ID, [ASSET_NAME, ], full_topic_name) + out, _ = capsys.readouterr() + assert "feed" in out + + # Clean up, delete the feed + feed_name = "projects/{}/feeds/{}".format(project_number, FEED_ID) + quickstart_deletefeed.delete_feed(feed_name) diff --git a/asset/snippets/snippets/quickstart_deletefeed.py b/asset/snippets/snippets/quickstart_deletefeed.py new file mode 100644 index 000000000000..81a54b4ff5d8 --- /dev/null +++ b/asset/snippets/snippets/quickstart_deletefeed.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python + +# Copyright 2018 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. + + +import argparse + + +def delete_feed(feed_name): + # [START asset_quickstart_delete_feed] + from google.cloud import asset_v1p2beta1 + + # TODO feed_name = 'Feed name you want to delete' + + client = asset_v1p2beta1.AssetServiceClient() + client.delete_feed(feed_name) + print('deleted_feed') + # [END asset_quickstart_delete_feed] + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument('feed_name', help='Feed name you want to delete') + args = parser.parse_args() + delete_feed(args.feed_name) diff --git a/asset/snippets/snippets/quickstart_deletefeed_test.py b/asset/snippets/snippets/quickstart_deletefeed_test.py new file mode 100644 index 000000000000..e4aa8abd6512 --- /dev/null +++ b/asset/snippets/snippets/quickstart_deletefeed_test.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python + +# Copyright 2018 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. + +import os +import time + +import quickstart_createfeed +import quickstart_deletefeed +from google.cloud import resource_manager + +PROJECT = os.environ['GCLOUD_PROJECT'] +ASSET_NAME = 'assets-{}'.format(int(time.time())) +FEED_ID = 'feed-{}'.format(int(time.time())) +TOPIC = 'topic-{}'.format(int(time.time())) + + +def test_delete_feed(capsys): + client = resource_manager.Client() + project_number = client.fetch_project(PROJECT).number + # First create the feed, which will be deleted later + full_topic_name = "projects/{}/topics/{}".format(PROJECT, TOPIC) + quickstart_createfeed.create_feed( + PROJECT, FEED_ID, [ASSET_NAME, ], full_topic_name) + + feed_name = "projects/{}/feeds/{}".format(project_number, FEED_ID) + quickstart_deletefeed.delete_feed(feed_name) + + out, _ = capsys.readouterr() + assert "deleted_feed" in out diff --git a/asset/snippets/snippets/quickstart_getfeed.py b/asset/snippets/snippets/quickstart_getfeed.py new file mode 100644 index 000000000000..aab32d242e21 --- /dev/null +++ b/asset/snippets/snippets/quickstart_getfeed.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python + +# Copyright 2018 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. + + +import argparse + + +def get_feed(feed_name): + # [START asset_quickstart_get_feed] + from google.cloud import asset_v1p2beta1 + + # TODO feed_name = 'Feed Name you want to get' + + client = asset_v1p2beta1.AssetServiceClient() + response = client.get_feed(feed_name) + print('gotten_feed: {}'.format(response)) + # [START asset_quickstart_get_feed] + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument('feed_name', help='Feed Name you want to get') + args = parser.parse_args() + get_feed(args.feed_name) diff --git a/asset/snippets/snippets/quickstart_getfeed_test.py b/asset/snippets/snippets/quickstart_getfeed_test.py new file mode 100644 index 000000000000..7104db47f3c5 --- /dev/null +++ b/asset/snippets/snippets/quickstart_getfeed_test.py @@ -0,0 +1,45 @@ +#!/usr/bin/env python + +# Copyright 2018 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. + +import os +import time + +import quickstart_createfeed +import quickstart_deletefeed +import quickstart_getfeed +from google.cloud import resource_manager + +PROJECT = os.environ['GCLOUD_PROJECT'] +ASSET_NAME = 'assets-{}'.format(int(time.time())) +FEED_ID = 'feed-{}'.format(int(time.time())) +TOPIC = 'topic-{}'.format(int(time.time())) + + +def test_get_feed(capsys): + client = resource_manager.Client() + project_number = client.fetch_project(PROJECT).number + # First create the feed, which will be gotten later + full_topic_name = "projects/{}/topics/{}".format(PROJECT, TOPIC) + quickstart_createfeed.create_feed( + PROJECT, FEED_ID, [ASSET_NAME, ], full_topic_name) + + feed_name = "projects/{}/feeds/{}".format(project_number, FEED_ID) + quickstart_getfeed.get_feed(feed_name) + out, _ = capsys.readouterr() + + assert "gotten_feed" in out + # Clean up and delete the feed + quickstart_deletefeed.delete_feed(feed_name) diff --git a/asset/snippets/snippets/quickstart_listfeeds.py b/asset/snippets/snippets/quickstart_listfeeds.py new file mode 100644 index 000000000000..ebcdd46b895e --- /dev/null +++ b/asset/snippets/snippets/quickstart_listfeeds.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python + +# Copyright 2018 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. + + +import argparse + + +def list_feeds(parent_resource): + # [START asset_quickstart_list_feeds] + from google.cloud import asset_v1p2beta1 + + # TODO parent_resource = 'Parent resource you want to list all feeds' + + client = asset_v1p2beta1.AssetServiceClient() + response = client.list_feeds(parent_resource) + print('feeds: {}'.format(response.feeds)) + # [END asset_quickstart_list_feeds] + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument( + 'parent_resource', + help='Parent resource you want to list all feeds') + args = parser.parse_args() + list_feeds(args.parent_resource) diff --git a/asset/snippets/snippets/quickstart_listfeeds_test.py b/asset/snippets/snippets/quickstart_listfeeds_test.py new file mode 100644 index 000000000000..87678f5d2339 --- /dev/null +++ b/asset/snippets/snippets/quickstart_listfeeds_test.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +# Copyright 2018 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. + +import os + +import quickstart_listfeeds + +PROJECT = os.environ['GCLOUD_PROJECT'] + + +def test_list_feeds(capsys): + parent_resource = "projects/{}".format(PROJECT) + quickstart_listfeeds.list_feeds(parent_resource) + out, _ = capsys.readouterr() + assert "feeds" in out diff --git a/asset/snippets/snippets/quickstart_updatefeed.py b/asset/snippets/snippets/quickstart_updatefeed.py new file mode 100644 index 000000000000..5f82b11540af --- /dev/null +++ b/asset/snippets/snippets/quickstart_updatefeed.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python + +# Copyright 2018 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. + + +import argparse + + +def update_feed(feed_name, topic): + # [START asset_quickstart_update_feed] + from google.cloud import asset_v1p2beta1 + from google.cloud.asset_v1p2beta1.proto import asset_service_pb2 + from google.protobuf import field_mask_pb2 + + # TODO feed_name = 'Feed Name you want to update' + # TODO topic = "Topic name you want to update with" + + client = asset_v1p2beta1.AssetServiceClient() + feed = asset_service_pb2.Feed() + feed.name = feed_name + feed.feed_output_config.pubsub_destination.topic = topic + update_mask = field_mask_pb2.FieldMask() + # In this example, we update topic of the feed + update_mask.paths.append("feed_output_config.pubsub_destination.topic") + response = client.update_feed(feed, update_mask) + print('updated_feed: {}'.format(response)) + # [END asset_quickstart_update_feed] + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument('feed_name', help='Feed Name you want to update') + parser.add_argument('topic', help='Topic name you want to update with') + args = parser.parse_args() + update_feed(args.feed_name, args.topic) diff --git a/asset/snippets/snippets/quickstart_updatefeed_test.py b/asset/snippets/snippets/quickstart_updatefeed_test.py new file mode 100644 index 000000000000..a47c2777a3eb --- /dev/null +++ b/asset/snippets/snippets/quickstart_updatefeed_test.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python + +# Copyright 2018 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. + +import os +import time + +import quickstart_createfeed +import quickstart_deletefeed +import quickstart_updatefeed +from google.cloud import resource_manager + +PROJECT = os.environ['GCLOUD_PROJECT'] +ASSET_NAME = 'assets-{}'.format(int(time.time())) +FEED_ID = 'feed-{}'.format(int(time.time())) +TOPIC = 'topic-{}'.format(int(time.time())) +NEW_TOPIC = 'new-topic-{}'.format(int(time.time())) + + +def test_update_feed(capsys): + client = resource_manager.Client() + project_number = client.fetch_project(PROJECT).number + # First create the feed, which will be updated later + full_topic_name = "projects/{}/topics/{}".format(PROJECT, TOPIC) + quickstart_createfeed.create_feed( + PROJECT, FEED_ID, [ASSET_NAME, ], full_topic_name) + + feed_name = "projects/{}/feeds/{}".format(project_number, FEED_ID) + new_full_topic_name = "projects/" + PROJECT + "/topics/" + NEW_TOPIC + quickstart_updatefeed.update_feed(feed_name, new_full_topic_name) + out, _ = capsys.readouterr() + + assert "updated_feed" in out + # Clean up and delete the feed + quickstart_deletefeed.delete_feed(feed_name) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 0e87ed672ee1..46cfaa017f73 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,2 +1,3 @@ -google-cloud-storage==1.13.2 -google-cloud-asset==0.2.0 +google-cloud-storage==1.18.0 +google-cloud-asset==0.4.1 +google-cloud-resource-manager==0.29.2 \ No newline at end of file From 7674039395313cf7083c4b8592c9eeab8ed4465c Mon Sep 17 00:00:00 2001 From: cwxie-google <51139172+cwxie-google@users.noreply.github.com> Date: Thu, 10 Oct 2019 13:21:00 -0700 Subject: [PATCH 010/235] Asset: Update Real Time Feed API unit tests [(#2467)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2467) * Add Real Time Feed API Sample Code * Update Real Time Feed API unit tests --- asset/snippets/snippets/quickstart_createfeed_test.py | 5 +++++ asset/snippets/snippets/quickstart_deletefeed_test.py | 5 +++++ asset/snippets/snippets/quickstart_getfeed_test.py | 5 +++++ asset/snippets/snippets/quickstart_updatefeed_test.py | 8 ++++++++ asset/snippets/snippets/requirements.txt | 3 ++- 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/asset/snippets/snippets/quickstart_createfeed_test.py b/asset/snippets/snippets/quickstart_createfeed_test.py index c566fe7c73b8..113008873b2f 100644 --- a/asset/snippets/snippets/quickstart_createfeed_test.py +++ b/asset/snippets/snippets/quickstart_createfeed_test.py @@ -21,6 +21,7 @@ import quickstart_createfeed import quickstart_deletefeed from google.cloud import resource_manager +from google.cloud import pubsub_v1 json_data = open(os.environ["GOOGLE_APPLICATION_CREDENTIALS"]).read() data = json.loads(json_data) @@ -34,6 +35,9 @@ def test_create_feed(capsys): client = resource_manager.Client() project_number = client.fetch_project(PROJECT).number full_topic_name = "projects/{}/topics/{}".format(PROJECT, TOPIC) + publisher = pubsub_v1.PublisherClient() + topic_path = publisher.topic_path(PROJECT, TOPIC) + publisher.create_topic(topic_path) quickstart_createfeed.create_feed( PROJECT, FEED_ID, [ASSET_NAME, ], full_topic_name) out, _ = capsys.readouterr() @@ -42,3 +46,4 @@ def test_create_feed(capsys): # Clean up, delete the feed feed_name = "projects/{}/feeds/{}".format(project_number, FEED_ID) quickstart_deletefeed.delete_feed(feed_name) + publisher.delete_topic(topic_path) diff --git a/asset/snippets/snippets/quickstart_deletefeed_test.py b/asset/snippets/snippets/quickstart_deletefeed_test.py index e4aa8abd6512..b5b342097568 100644 --- a/asset/snippets/snippets/quickstart_deletefeed_test.py +++ b/asset/snippets/snippets/quickstart_deletefeed_test.py @@ -20,6 +20,7 @@ import quickstart_createfeed import quickstart_deletefeed from google.cloud import resource_manager +from google.cloud import pubsub_v1 PROJECT = os.environ['GCLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(int(time.time())) @@ -32,6 +33,9 @@ def test_delete_feed(capsys): project_number = client.fetch_project(PROJECT).number # First create the feed, which will be deleted later full_topic_name = "projects/{}/topics/{}".format(PROJECT, TOPIC) + publisher = pubsub_v1.PublisherClient() + topic_path = publisher.topic_path(PROJECT, TOPIC) + publisher.create_topic(topic_path) quickstart_createfeed.create_feed( PROJECT, FEED_ID, [ASSET_NAME, ], full_topic_name) @@ -40,3 +44,4 @@ def test_delete_feed(capsys): out, _ = capsys.readouterr() assert "deleted_feed" in out + publisher.delete_topic(topic_path) diff --git a/asset/snippets/snippets/quickstart_getfeed_test.py b/asset/snippets/snippets/quickstart_getfeed_test.py index 7104db47f3c5..044c7c3b0f58 100644 --- a/asset/snippets/snippets/quickstart_getfeed_test.py +++ b/asset/snippets/snippets/quickstart_getfeed_test.py @@ -21,6 +21,7 @@ import quickstart_deletefeed import quickstart_getfeed from google.cloud import resource_manager +from google.cloud import pubsub_v1 PROJECT = os.environ['GCLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(int(time.time())) @@ -33,6 +34,9 @@ def test_get_feed(capsys): project_number = client.fetch_project(PROJECT).number # First create the feed, which will be gotten later full_topic_name = "projects/{}/topics/{}".format(PROJECT, TOPIC) + publisher = pubsub_v1.PublisherClient() + topic_path = publisher.topic_path(PROJECT, TOPIC) + publisher.create_topic(topic_path) quickstart_createfeed.create_feed( PROJECT, FEED_ID, [ASSET_NAME, ], full_topic_name) @@ -43,3 +47,4 @@ def test_get_feed(capsys): assert "gotten_feed" in out # Clean up and delete the feed quickstart_deletefeed.delete_feed(feed_name) + publisher.delete_topic(topic_path) diff --git a/asset/snippets/snippets/quickstart_updatefeed_test.py b/asset/snippets/snippets/quickstart_updatefeed_test.py index a47c2777a3eb..83abb29847f7 100644 --- a/asset/snippets/snippets/quickstart_updatefeed_test.py +++ b/asset/snippets/snippets/quickstart_updatefeed_test.py @@ -21,6 +21,7 @@ import quickstart_deletefeed import quickstart_updatefeed from google.cloud import resource_manager +from google.cloud import pubsub_v1 PROJECT = os.environ['GCLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(int(time.time())) @@ -34,14 +35,21 @@ def test_update_feed(capsys): project_number = client.fetch_project(PROJECT).number # First create the feed, which will be updated later full_topic_name = "projects/{}/topics/{}".format(PROJECT, TOPIC) + publisher = pubsub_v1.PublisherClient() + topic_path = publisher.topic_path(PROJECT, TOPIC) + publisher.create_topic(topic_path) quickstart_createfeed.create_feed( PROJECT, FEED_ID, [ASSET_NAME, ], full_topic_name) feed_name = "projects/{}/feeds/{}".format(project_number, FEED_ID) new_full_topic_name = "projects/" + PROJECT + "/topics/" + NEW_TOPIC + new_topic_path = publisher.topic_path(PROJECT, NEW_TOPIC) + publisher.create_topic(new_topic_path) quickstart_updatefeed.update_feed(feed_name, new_full_topic_name) out, _ = capsys.readouterr() assert "updated_feed" in out # Clean up and delete the feed quickstart_deletefeed.delete_feed(feed_name) + publisher.delete_topic(topic_path) + publisher.delete_topic(new_topic_path) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 46cfaa017f73..f45aab329bb6 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,3 +1,4 @@ google-cloud-storage==1.18.0 google-cloud-asset==0.4.1 -google-cloud-resource-manager==0.29.2 \ No newline at end of file +google-cloud-resource-manager==0.29.2 +google-cloud-pubsub=1.0.2 From 3c4b6e4abebb87202fa13f6abf0e2af398e03db3 Mon Sep 17 00:00:00 2001 From: Gus Class Date: Thu, 10 Oct 2019 14:36:58 -0700 Subject: [PATCH 011/235] Ran wrong tests evaluating PR, fixes requirements in assets. [(#2468)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2468) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index f45aab329bb6..e11205de65a4 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-storage==1.18.0 google-cloud-asset==0.4.1 google-cloud-resource-manager==0.29.2 -google-cloud-pubsub=1.0.2 +google-cloud-pubsub==1.0.2 From 5a8a09bbf87a1b113cce9f2392f7b8d167ebe9d5 Mon Sep 17 00:00:00 2001 From: Gus Class Date: Wed, 23 Oct 2019 16:27:00 -0700 Subject: [PATCH 012/235] Adds updates including compute [(#2436)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2436) * Adds updates including compute * Python 2 compat pytest * Fixing weird \r\n issue from GH merge * Put asset tests back in * Re-add pod operator test * Hack parameter for k8s pod operator --- asset/snippets/snippets/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index e11205de65a4..7fa8bc21c827 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.18.0 +google-cloud-storage==1.19.1 google-cloud-asset==0.4.1 google-cloud-resource-manager==0.29.2 -google-cloud-pubsub==1.0.2 +google-cloud-pubsub==1.0.2 \ No newline at end of file From 2b918ea18efec566e6ed5a1ae5d2d94c8a49687d Mon Sep 17 00:00:00 2001 From: cwxie-google <51139172+cwxie-google@users.noreply.github.com> Date: Mon, 16 Dec 2019 12:23:31 -0800 Subject: [PATCH 013/235] Asset: Update Real Time Feed Sample Code to use v1 [(#2623)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2623) --- asset/snippets/snippets/quickstart_createfeed.py | 6 +++--- asset/snippets/snippets/quickstart_deletefeed.py | 4 ++-- asset/snippets/snippets/quickstart_getfeed.py | 4 ++-- asset/snippets/snippets/quickstart_listfeeds.py | 4 ++-- asset/snippets/snippets/quickstart_updatefeed.py | 6 +++--- asset/snippets/snippets/requirements.txt | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/asset/snippets/snippets/quickstart_createfeed.py b/asset/snippets/snippets/quickstart_createfeed.py index a36d8bd094f1..c77fb5c2cac4 100644 --- a/asset/snippets/snippets/quickstart_createfeed.py +++ b/asset/snippets/snippets/quickstart_createfeed.py @@ -20,15 +20,15 @@ def create_feed(project_id, feed_id, asset_names, topic): # [START asset_quickstart_create_feed] - from google.cloud import asset_v1p2beta1 - from google.cloud.asset_v1p2beta1.proto import asset_service_pb2 + from google.cloud import asset_v1 + from google.cloud.asset_v1.proto import asset_service_pb2 # TODO project_id = 'Your Google Cloud Project ID' # TODO feed_id = 'Feed ID you want to create' # TODO asset_names = 'List of asset names the feed listen to' # TODO topic = "Topic name of the feed" - client = asset_v1p2beta1.AssetServiceClient() + client = asset_v1.AssetServiceClient() parent = "projects/{}".format(project_id) feed = asset_service_pb2.Feed() feed.asset_names.extend(asset_names) diff --git a/asset/snippets/snippets/quickstart_deletefeed.py b/asset/snippets/snippets/quickstart_deletefeed.py index 81a54b4ff5d8..ff7145d34857 100644 --- a/asset/snippets/snippets/quickstart_deletefeed.py +++ b/asset/snippets/snippets/quickstart_deletefeed.py @@ -20,11 +20,11 @@ def delete_feed(feed_name): # [START asset_quickstart_delete_feed] - from google.cloud import asset_v1p2beta1 + from google.cloud import asset_v1 # TODO feed_name = 'Feed name you want to delete' - client = asset_v1p2beta1.AssetServiceClient() + client = asset_v1.AssetServiceClient() client.delete_feed(feed_name) print('deleted_feed') # [END asset_quickstart_delete_feed] diff --git a/asset/snippets/snippets/quickstart_getfeed.py b/asset/snippets/snippets/quickstart_getfeed.py index aab32d242e21..8194155af867 100644 --- a/asset/snippets/snippets/quickstart_getfeed.py +++ b/asset/snippets/snippets/quickstart_getfeed.py @@ -20,11 +20,11 @@ def get_feed(feed_name): # [START asset_quickstart_get_feed] - from google.cloud import asset_v1p2beta1 + from google.cloud import asset_v1 # TODO feed_name = 'Feed Name you want to get' - client = asset_v1p2beta1.AssetServiceClient() + client = asset_v1.AssetServiceClient() response = client.get_feed(feed_name) print('gotten_feed: {}'.format(response)) # [START asset_quickstart_get_feed] diff --git a/asset/snippets/snippets/quickstart_listfeeds.py b/asset/snippets/snippets/quickstart_listfeeds.py index ebcdd46b895e..17731472d616 100644 --- a/asset/snippets/snippets/quickstart_listfeeds.py +++ b/asset/snippets/snippets/quickstart_listfeeds.py @@ -20,11 +20,11 @@ def list_feeds(parent_resource): # [START asset_quickstart_list_feeds] - from google.cloud import asset_v1p2beta1 + from google.cloud import asset_v1 # TODO parent_resource = 'Parent resource you want to list all feeds' - client = asset_v1p2beta1.AssetServiceClient() + client = asset_v1.AssetServiceClient() response = client.list_feeds(parent_resource) print('feeds: {}'.format(response.feeds)) # [END asset_quickstart_list_feeds] diff --git a/asset/snippets/snippets/quickstart_updatefeed.py b/asset/snippets/snippets/quickstart_updatefeed.py index 5f82b11540af..2f776826b04f 100644 --- a/asset/snippets/snippets/quickstart_updatefeed.py +++ b/asset/snippets/snippets/quickstart_updatefeed.py @@ -20,14 +20,14 @@ def update_feed(feed_name, topic): # [START asset_quickstart_update_feed] - from google.cloud import asset_v1p2beta1 - from google.cloud.asset_v1p2beta1.proto import asset_service_pb2 + from google.cloud import asset_v1 + from google.cloud.asset_v1.proto import asset_service_pb2 from google.protobuf import field_mask_pb2 # TODO feed_name = 'Feed Name you want to update' # TODO topic = "Topic name you want to update with" - client = asset_v1p2beta1.AssetServiceClient() + client = asset_v1.AssetServiceClient() feed = asset_service_pb2.Feed() feed.name = feed_name feed.feed_output_config.pubsub_destination.topic = topic diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 7fa8bc21c827..242f4268486a 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-storage==1.19.1 -google-cloud-asset==0.4.1 +google-cloud-asset==0.6.0 google-cloud-resource-manager==0.29.2 google-cloud-pubsub==1.0.2 \ No newline at end of file From a3f4e18ff0b1d4731837a1fc52005a818a9d426e Mon Sep 17 00:00:00 2001 From: DPEBot Date: Fri, 20 Dec 2019 17:41:38 -0800 Subject: [PATCH 014/235] Auto-update dependencies. [(#2005)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2005) * Auto-update dependencies. * Revert update of appengine/flexible/datastore. * revert update of appengine/flexible/scipy * revert update of bigquery/bqml * revert update of bigquery/cloud-client * revert update of bigquery/datalab-migration * revert update of bigtable/quickstart * revert update of compute/api * revert update of container_registry/container_analysis * revert update of dataflow/run_template * revert update of datastore/cloud-ndb * revert update of dialogflow/cloud-client * revert update of dlp * revert update of functions/imagemagick * revert update of functions/ocr/app * revert update of healthcare/api-client/fhir * revert update of iam/api-client * revert update of iot/api-client/gcs_file_to_device * revert update of iot/api-client/mqtt_example * revert update of language/automl * revert update of run/image-processing * revert update of vision/automl * revert update testing/requirements.txt * revert update of vision/cloud-client/detect * revert update of vision/cloud-client/product_search * revert update of jobs/v2/api_client * revert update of jobs/v3/api_client * revert update of opencensus * revert update of translate/cloud-client * revert update to speech/cloud-client Co-authored-by: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Co-authored-by: Doug Mahugh --- asset/snippets/snippets/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 242f4268486a..4c475baaaec3 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.19.1 +google-cloud-storage==1.23.0 google-cloud-asset==0.6.0 -google-cloud-resource-manager==0.29.2 -google-cloud-pubsub==1.0.2 \ No newline at end of file +google-cloud-resource-manager==0.30.0 +google-cloud-pubsub==1.1.0 From 06dd13a55f8baf02ca0da84549163c08ed27fca6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 27 Feb 2020 21:52:08 +0100 Subject: [PATCH 015/235] chore(deps): update dependency google-cloud-asset to v0.7.0 [(#2820)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2820) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 4c475baaaec3..d6af8654e6cb 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-storage==1.23.0 -google-cloud-asset==0.6.0 +google-cloud-asset==0.7.0 google-cloud-resource-manager==0.30.0 google-cloud-pubsub==1.1.0 From e6ca997940cd6fabfd87e486748aec0b9d091c89 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 Mar 2020 18:29:59 +0100 Subject: [PATCH 016/235] chore(deps): update dependency google-cloud-storage to v1.26.0 [(#3046)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3046) * chore(deps): update dependency google-cloud-storage to v1.26.0 * chore(deps): specify dependencies by python version * chore: up other deps to try to remove errors Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com> Co-authored-by: Leah Cole --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d6af8654e6cb..8663e4044012 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.23.0 +google-cloud-storage==1.26.0 google-cloud-asset==0.7.0 google-cloud-resource-manager==0.30.0 google-cloud-pubsub==1.1.0 From 578983e21b6f42b5ea67626399ba1b323e07b108 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 Mar 2020 21:06:39 +0100 Subject: [PATCH 017/235] chore(deps): update dependency google-cloud-asset to v0.8.0 [(#3063)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3063) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 8663e4044012..057ca6d4446b 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-storage==1.26.0 -google-cloud-asset==0.7.0 +google-cloud-asset==0.8.0 google-cloud-resource-manager==0.30.0 google-cloud-pubsub==1.1.0 From f38f28a1c2910c972964d6f2a7f2260abefacc20 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 28 Mar 2020 01:36:56 +0100 Subject: [PATCH 018/235] chore(deps): update dependency google-cloud-resource-manager to v0.30.1 [(#3165)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3165) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [google-cloud-resource-manager](https://togithub.com/googleapis/python-resource-manager) | patch | `==0.30.0` -> `==0.30.1` | --- ### Release Notes
googleapis/python-resource-manager ### [`v0.30.1`](https://togithub.com/googleapis/python-resource-manager/blob/master/CHANGELOG.md#​0301httpswwwgithubcomgoogleapispython-resource-managercomparev0300v0301-2020-02-20) [Compare Source](https://togithub.com/googleapis/python-resource-manager/compare/v0.30.0...v0.30.1)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Never, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#GoogleCloudPlatform/python-docs-samples). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 057ca6d4446b..1cff64b96ec1 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-storage==1.26.0 google-cloud-asset==0.8.0 -google-cloud-resource-manager==0.30.0 +google-cloud-resource-manager==0.30.1 google-cloud-pubsub==1.1.0 From c3d3484c5ea0f567f8878907f8b30803e0e2232e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 30 Mar 2020 19:45:38 +0200 Subject: [PATCH 019/235] chore(deps): update dependency google-cloud-asset to v0.9.0 [(#3149)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3149) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 1cff64b96ec1..42261e886db8 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-storage==1.26.0 -google-cloud-asset==0.8.0 +google-cloud-asset==0.9.0 google-cloud-resource-manager==0.30.1 google-cloud-pubsub==1.1.0 From 88303e11bcf57d92af4ab34f4b88ef8c2aff61eb Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Wed, 1 Apr 2020 19:11:50 -0700 Subject: [PATCH 020/235] Simplify noxfile setup. [(#2806)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/2806) * chore(deps): update dependency requests to v2.23.0 * Simplify noxfile and add version control. * Configure appengine/standard to only test Python 2.7. * Update Kokokro configs to match noxfile. * Add requirements-test to each folder. * Remove Py2 versions from everything execept appengine/standard. * Remove conftest.py. * Remove appengine/standard/conftest.py * Remove 'no-sucess-flaky-report' from pytest.ini. * Add GAE SDK back to appengine/standard tests. * Fix typo. * Roll pytest to python 2 version. * Add a bunch of testing requirements. * Remove typo. * Add appengine lib directory back in. * Add some additional requirements. * Fix issue with flake8 args. * Even more requirements. * Readd appengine conftest.py. * Add a few more requirements. * Even more Appengine requirements. * Add webtest for appengine/standard/mailgun. * Add some additional requirements. * Add workaround for issue with mailjet-rest. * Add responses for appengine/standard/mailjet. Co-authored-by: Renovate Bot --- asset/snippets/snippets/requirements-test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 asset/snippets/snippets/requirements-test.txt diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/asset/snippets/snippets/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 From fbb47f07a0c38d7a7c2c51c01b437583a1066990 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Wed, 15 Apr 2020 11:52:24 -0700 Subject: [PATCH 021/235] Update dependency google-cloud-pubsub to v1.4.2 [(#3336)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3336) Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com> --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 42261e886db8..81a4506ac298 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-storage==1.26.0 google-cloud-asset==0.9.0 google-cloud-resource-manager==0.30.1 -google-cloud-pubsub==1.1.0 +google-cloud-pubsub==1.4.2 From afd04b2dd34ce9894747ce805ed95a06b4dc2c14 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 29 Apr 2020 07:26:36 +0200 Subject: [PATCH 022/235] chore(deps): update dependency google-cloud-storage to v1.28.0 [(#3260)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3260) Co-authored-by: Takashi Matsuo --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 81a4506ac298..592675230e05 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.26.0 +google-cloud-storage==1.28.0 google-cloud-asset==0.9.0 google-cloud-resource-manager==0.30.1 google-cloud-pubsub==1.4.2 From ed5b7abc4670cb5d9ce58a47e3afeed528ca32b2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 12 May 2020 18:59:57 +0200 Subject: [PATCH 023/235] chore(deps): update dependency google-cloud-asset to v0.10.0 [(#3729)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3729) * chore(deps): update dependency google-cloud-asset to v0.10.0 * fix import order Co-authored-by: Leah Cole Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com> --- asset/snippets/snippets/quickstart_createfeed_test.py | 5 +++-- asset/snippets/snippets/quickstart_deletefeed_test.py | 5 +++-- asset/snippets/snippets/quickstart_getfeed_test.py | 5 +++-- asset/snippets/snippets/quickstart_updatefeed_test.py | 5 +++-- asset/snippets/snippets/requirements.txt | 2 +- 5 files changed, 13 insertions(+), 9 deletions(-) diff --git a/asset/snippets/snippets/quickstart_createfeed_test.py b/asset/snippets/snippets/quickstart_createfeed_test.py index 113008873b2f..3b0aeb7554b8 100644 --- a/asset/snippets/snippets/quickstart_createfeed_test.py +++ b/asset/snippets/snippets/quickstart_createfeed_test.py @@ -18,10 +18,11 @@ import os import time +from google.cloud import pubsub_v1 +from google.cloud import resource_manager + import quickstart_createfeed import quickstart_deletefeed -from google.cloud import resource_manager -from google.cloud import pubsub_v1 json_data = open(os.environ["GOOGLE_APPLICATION_CREDENTIALS"]).read() data = json.loads(json_data) diff --git a/asset/snippets/snippets/quickstart_deletefeed_test.py b/asset/snippets/snippets/quickstart_deletefeed_test.py index b5b342097568..9c5baf75e393 100644 --- a/asset/snippets/snippets/quickstart_deletefeed_test.py +++ b/asset/snippets/snippets/quickstart_deletefeed_test.py @@ -17,10 +17,11 @@ import os import time +from google.cloud import pubsub_v1 +from google.cloud import resource_manager + import quickstart_createfeed import quickstart_deletefeed -from google.cloud import resource_manager -from google.cloud import pubsub_v1 PROJECT = os.environ['GCLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(int(time.time())) diff --git a/asset/snippets/snippets/quickstart_getfeed_test.py b/asset/snippets/snippets/quickstart_getfeed_test.py index 044c7c3b0f58..a8a967758cee 100644 --- a/asset/snippets/snippets/quickstart_getfeed_test.py +++ b/asset/snippets/snippets/quickstart_getfeed_test.py @@ -17,11 +17,12 @@ import os import time +from google.cloud import pubsub_v1 +from google.cloud import resource_manager + import quickstart_createfeed import quickstart_deletefeed import quickstart_getfeed -from google.cloud import resource_manager -from google.cloud import pubsub_v1 PROJECT = os.environ['GCLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(int(time.time())) diff --git a/asset/snippets/snippets/quickstart_updatefeed_test.py b/asset/snippets/snippets/quickstart_updatefeed_test.py index 83abb29847f7..c3dd20605bf4 100644 --- a/asset/snippets/snippets/quickstart_updatefeed_test.py +++ b/asset/snippets/snippets/quickstart_updatefeed_test.py @@ -17,11 +17,12 @@ import os import time +from google.cloud import pubsub_v1 +from google.cloud import resource_manager + import quickstart_createfeed import quickstart_deletefeed import quickstart_updatefeed -from google.cloud import resource_manager -from google.cloud import pubsub_v1 PROJECT = os.environ['GCLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(int(time.time())) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 592675230e05..8a0e6f8354ed 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-storage==1.28.0 -google-cloud-asset==0.9.0 +google-cloud-asset==0.10.0 google-cloud-resource-manager==0.30.1 google-cloud-pubsub==1.4.2 From afcd335f387a3b404ae75cd5c344bad8e88cdf3c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 May 2020 07:31:59 +0200 Subject: [PATCH 024/235] chore(deps): update dependency google-cloud-pubsub to v1.4.3 [(#3725)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3725) Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Co-authored-by: Takashi Matsuo --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 8a0e6f8354ed..fe80ee7fda13 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-storage==1.28.0 google-cloud-asset==0.10.0 google-cloud-resource-manager==0.30.1 -google-cloud-pubsub==1.4.2 +google-cloud-pubsub==1.4.3 From 7ce3729d81851a5887ae0f8e299ac90036644dae Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 May 2020 04:18:01 +0200 Subject: [PATCH 025/235] chore(deps): update dependency google-cloud-storage to v1.28.1 [(#3785)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3785) * chore(deps): update dependency google-cloud-storage to v1.28.1 * [asset] testing: use uuid instead of time Co-authored-by: Takashi Matsuo --- .../quickstart_batchgetassetshistory_test.py | 25 +++++++++++-------- .../snippets/quickstart_createfeed_test.py | 8 +++--- .../snippets/quickstart_deletefeed_test.py | 8 +++--- .../snippets/quickstart_exportassets_test.py | 4 +-- .../snippets/quickstart_getfeed_test.py | 8 +++--- .../snippets/quickstart_updatefeed_test.py | 10 ++++---- asset/snippets/snippets/requirements-test.txt | 3 ++- asset/snippets/snippets/requirements.txt | 2 +- 8 files changed, 37 insertions(+), 31 deletions(-) diff --git a/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py b/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py index 9cdc30ffbce7..6b446c9f8065 100644 --- a/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py +++ b/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py @@ -15,15 +15,17 @@ # limitations under the License. import os -import time +import uuid +import backoff +from google.api_core.exceptions import InvalidArgument from google.cloud import storage import pytest import quickstart_batchgetassetshistory PROJECT = os.environ['GCLOUD_PROJECT'] -BUCKET = 'assets-{}'.format(int(time.time())) +BUCKET = 'assets-{}'.format(uuid.uuid4().hex) @pytest.fixture(scope='module') @@ -47,12 +49,15 @@ def asset_bucket(storage_client): def test_batch_get_assets_history(asset_bucket, capsys): bucket_asset_name = '//storage.googleapis.com/{}'.format(BUCKET) asset_names = [bucket_asset_name, ] - # There's some delay between bucket creation and when it's reflected in the - # backend. - time.sleep(15) - quickstart_batchgetassetshistory.batch_get_assets_history( - PROJECT, asset_names) - out, _ = capsys.readouterr() - - if not out: + + @backoff.on_exception( + backoff.expo, (AssertionError, InvalidArgument), max_time=30 + ) + def eventually_consistent_test(): + quickstart_batchgetassetshistory.batch_get_assets_history( + PROJECT, asset_names) + out, _ = capsys.readouterr() + assert bucket_asset_name in out + + eventually_consistent_test() diff --git a/asset/snippets/snippets/quickstart_createfeed_test.py b/asset/snippets/snippets/quickstart_createfeed_test.py index 3b0aeb7554b8..956d957a5789 100644 --- a/asset/snippets/snippets/quickstart_createfeed_test.py +++ b/asset/snippets/snippets/quickstart_createfeed_test.py @@ -16,7 +16,7 @@ import json import os -import time +import uuid from google.cloud import pubsub_v1 from google.cloud import resource_manager @@ -27,9 +27,9 @@ json_data = open(os.environ["GOOGLE_APPLICATION_CREDENTIALS"]).read() data = json.loads(json_data) PROJECT = data['project_id'] -ASSET_NAME = 'assets-{}'.format(int(time.time())) -FEED_ID = 'feed-{}'.format(int(time.time())) -TOPIC = 'topic-{}'.format(int(time.time())) +ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) +FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) +TOPIC = 'topic-{}'.format(uuid.uuid4().hex) def test_create_feed(capsys): diff --git a/asset/snippets/snippets/quickstart_deletefeed_test.py b/asset/snippets/snippets/quickstart_deletefeed_test.py index 9c5baf75e393..7d5d81a97a96 100644 --- a/asset/snippets/snippets/quickstart_deletefeed_test.py +++ b/asset/snippets/snippets/quickstart_deletefeed_test.py @@ -15,7 +15,7 @@ # limitations under the License. import os -import time +import uuid from google.cloud import pubsub_v1 from google.cloud import resource_manager @@ -24,9 +24,9 @@ import quickstart_deletefeed PROJECT = os.environ['GCLOUD_PROJECT'] -ASSET_NAME = 'assets-{}'.format(int(time.time())) -FEED_ID = 'feed-{}'.format(int(time.time())) -TOPIC = 'topic-{}'.format(int(time.time())) +ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) +FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) +TOPIC = 'topic-{}'.format(uuid.uuid4().hex) def test_delete_feed(capsys): diff --git a/asset/snippets/snippets/quickstart_exportassets_test.py b/asset/snippets/snippets/quickstart_exportassets_test.py index 4e08e007aedd..6b2b4b1c9954 100644 --- a/asset/snippets/snippets/quickstart_exportassets_test.py +++ b/asset/snippets/snippets/quickstart_exportassets_test.py @@ -15,7 +15,7 @@ # limitations under the License. import os -import time +import uuid from google.cloud import storage import pytest @@ -23,7 +23,7 @@ import quickstart_exportassets PROJECT = os.environ['GCLOUD_PROJECT'] -BUCKET = 'assets-{}'.format(int(time.time())) +BUCKET = 'assets-{}'.format(uuid.uuid4().hex) @pytest.fixture(scope='module') diff --git a/asset/snippets/snippets/quickstart_getfeed_test.py b/asset/snippets/snippets/quickstart_getfeed_test.py index a8a967758cee..9075582c054d 100644 --- a/asset/snippets/snippets/quickstart_getfeed_test.py +++ b/asset/snippets/snippets/quickstart_getfeed_test.py @@ -15,7 +15,7 @@ # limitations under the License. import os -import time +import uuid from google.cloud import pubsub_v1 from google.cloud import resource_manager @@ -25,9 +25,9 @@ import quickstart_getfeed PROJECT = os.environ['GCLOUD_PROJECT'] -ASSET_NAME = 'assets-{}'.format(int(time.time())) -FEED_ID = 'feed-{}'.format(int(time.time())) -TOPIC = 'topic-{}'.format(int(time.time())) +ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) +FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) +TOPIC = 'topic-{}'.format(uuid.uuid4().hex) def test_get_feed(capsys): diff --git a/asset/snippets/snippets/quickstart_updatefeed_test.py b/asset/snippets/snippets/quickstart_updatefeed_test.py index c3dd20605bf4..ac611c1c9929 100644 --- a/asset/snippets/snippets/quickstart_updatefeed_test.py +++ b/asset/snippets/snippets/quickstart_updatefeed_test.py @@ -15,7 +15,7 @@ # limitations under the License. import os -import time +import uuid from google.cloud import pubsub_v1 from google.cloud import resource_manager @@ -25,10 +25,10 @@ import quickstart_updatefeed PROJECT = os.environ['GCLOUD_PROJECT'] -ASSET_NAME = 'assets-{}'.format(int(time.time())) -FEED_ID = 'feed-{}'.format(int(time.time())) -TOPIC = 'topic-{}'.format(int(time.time())) -NEW_TOPIC = 'new-topic-{}'.format(int(time.time())) +ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) +FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) +TOPIC = 'topic-{}'.format(uuid.uuid4().hex) +NEW_TOPIC = 'new-topic-{}'.format(uuid.uuid4().hex) def test_update_feed(capsys): diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index 781d4326c947..1d19ebfca084 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1 +1,2 @@ -pytest==5.3.2 +backoff==1.10.0 +pytest==5.4.1 diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index fe80ee7fda13..b6c3d539cd28 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.28.0 +google-cloud-storage==1.28.1 google-cloud-asset==0.10.0 google-cloud-resource-manager==0.30.1 google-cloud-pubsub==1.4.3 From 7d2cc60026af15c9ec15feea72230b2268320c90 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 May 2020 21:06:42 +0200 Subject: [PATCH 026/235] Update dependency google-cloud-resource-manager to v0.30.2 [(#3830)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3830) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index b6c3d539cd28..5ea25f2eab2e 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-storage==1.28.1 google-cloud-asset==0.10.0 -google-cloud-resource-manager==0.30.1 +google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.4.3 From eb81856b09819f8ef7aa98670272bbdcde3ec8b4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 May 2020 04:50:04 +0200 Subject: [PATCH 027/235] chore(deps): update dependency google-cloud-pubsub to v1.5.0 [(#3781)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3781) Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 5ea25f2eab2e..0ac54d81cf9b 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-storage==1.28.1 google-cloud-asset==0.10.0 google-cloud-resource-manager==0.30.2 -google-cloud-pubsub==1.4.3 +google-cloud-pubsub==1.5.0 From 39c8f20062ee8f32feace8cb7f25dde5f5767d4a Mon Sep 17 00:00:00 2001 From: Kurtis Van Gent <31518063+kurtisvg@users.noreply.github.com> Date: Tue, 9 Jun 2020 14:34:27 -0700 Subject: [PATCH 028/235] Replace GCLOUD_PROJECT with GOOGLE_CLOUD_PROJECT. [(#4022)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4022) --- .../snippets/snippets/quickstart_batchgetassetshistory_test.py | 2 +- asset/snippets/snippets/quickstart_deletefeed_test.py | 2 +- asset/snippets/snippets/quickstart_exportassets_test.py | 2 +- asset/snippets/snippets/quickstart_getfeed_test.py | 2 +- asset/snippets/snippets/quickstart_listfeeds_test.py | 2 +- asset/snippets/snippets/quickstart_updatefeed_test.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py b/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py index 6b446c9f8065..275a97f17ff8 100644 --- a/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py +++ b/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py @@ -24,7 +24,7 @@ import quickstart_batchgetassetshistory -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BUCKET = 'assets-{}'.format(uuid.uuid4().hex) diff --git a/asset/snippets/snippets/quickstart_deletefeed_test.py b/asset/snippets/snippets/quickstart_deletefeed_test.py index 7d5d81a97a96..5ec6f8021128 100644 --- a/asset/snippets/snippets/quickstart_deletefeed_test.py +++ b/asset/snippets/snippets/quickstart_deletefeed_test.py @@ -23,7 +23,7 @@ import quickstart_createfeed import quickstart_deletefeed -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) TOPIC = 'topic-{}'.format(uuid.uuid4().hex) diff --git a/asset/snippets/snippets/quickstart_exportassets_test.py b/asset/snippets/snippets/quickstart_exportassets_test.py index 6b2b4b1c9954..9ed8bbffd8b3 100644 --- a/asset/snippets/snippets/quickstart_exportassets_test.py +++ b/asset/snippets/snippets/quickstart_exportassets_test.py @@ -22,7 +22,7 @@ import quickstart_exportassets -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] BUCKET = 'assets-{}'.format(uuid.uuid4().hex) diff --git a/asset/snippets/snippets/quickstart_getfeed_test.py b/asset/snippets/snippets/quickstart_getfeed_test.py index 9075582c054d..940ce35557fd 100644 --- a/asset/snippets/snippets/quickstart_getfeed_test.py +++ b/asset/snippets/snippets/quickstart_getfeed_test.py @@ -24,7 +24,7 @@ import quickstart_deletefeed import quickstart_getfeed -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) TOPIC = 'topic-{}'.format(uuid.uuid4().hex) diff --git a/asset/snippets/snippets/quickstart_listfeeds_test.py b/asset/snippets/snippets/quickstart_listfeeds_test.py index 87678f5d2339..a8982b7c774a 100644 --- a/asset/snippets/snippets/quickstart_listfeeds_test.py +++ b/asset/snippets/snippets/quickstart_listfeeds_test.py @@ -18,7 +18,7 @@ import quickstart_listfeeds -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] def test_list_feeds(capsys): diff --git a/asset/snippets/snippets/quickstart_updatefeed_test.py b/asset/snippets/snippets/quickstart_updatefeed_test.py index ac611c1c9929..c996020ef82e 100644 --- a/asset/snippets/snippets/quickstart_updatefeed_test.py +++ b/asset/snippets/snippets/quickstart_updatefeed_test.py @@ -24,7 +24,7 @@ import quickstart_deletefeed import quickstart_updatefeed -PROJECT = os.environ['GCLOUD_PROJECT'] +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) TOPIC = 'topic-{}'.format(uuid.uuid4().hex) From c7198319c087907c44dd09d7daa964c2d8b632f9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 10 Jun 2020 19:30:43 +0200 Subject: [PATCH 029/235] Update dependency google-cloud-asset to v1 [(#4043)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4043) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 0ac54d81cf9b..bac55b5d2d9d 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ google-cloud-storage==1.28.1 -google-cloud-asset==0.10.0 +google-cloud-asset==1.1.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.5.0 From 246c7fa99fd6db0fd66395ddecdea2068af11f06 Mon Sep 17 00:00:00 2001 From: yuyifan-google <65194920+yuyifan-google@users.noreply.github.com> Date: Thu, 18 Jun 2020 12:41:05 -0700 Subject: [PATCH 030/235] feat(asset): Add sample code for two new RPCs. [(#4080)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4080) --- .../quickstart_searchalliampolicies.py | 48 ++++++++++++++ .../quickstart_searchalliampolicies_test.py | 29 +++++++++ .../snippets/quickstart_searchallresources.py | 62 ++++++++++++++++++ .../quickstart_searchallresources_test.py | 64 +++++++++++++++++++ asset/snippets/snippets/requirements.txt | 1 + 5 files changed, 204 insertions(+) create mode 100644 asset/snippets/snippets/quickstart_searchalliampolicies.py create mode 100644 asset/snippets/snippets/quickstart_searchalliampolicies_test.py create mode 100644 asset/snippets/snippets/quickstart_searchallresources.py create mode 100644 asset/snippets/snippets/quickstart_searchallresources_test.py diff --git a/asset/snippets/snippets/quickstart_searchalliampolicies.py b/asset/snippets/snippets/quickstart_searchalliampolicies.py new file mode 100644 index 000000000000..334f1dda30ea --- /dev/null +++ b/asset/snippets/snippets/quickstart_searchalliampolicies.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python + +# 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. + + +import argparse + + +def search_all_iam_policies(scope, query=None, page_size=None): + # [START asset_quickstart_search_all_iam_policies] + from google.cloud import asset_v1 + + client = asset_v1.AssetServiceClient() + response = client.search_all_iam_policies( + scope, query=query, page_size=page_size) + for page in response.pages: + for policy in page: + print(policy) + break + # [END asset_quickstart_search_all_iam_policies] + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument( + 'scope', + help='The search is limited to the resources within the scope.') + parser.add_argument('--query', help='The query statement.') + parser.add_argument( + '--page_size', + type=int, + help='The page size for search result pagination.') + args = parser.parse_args() + search_all_iam_policies(args.scope, args.query, args.page_size) diff --git a/asset/snippets/snippets/quickstart_searchalliampolicies_test.py b/asset/snippets/snippets/quickstart_searchalliampolicies_test.py new file mode 100644 index 000000000000..e1068cb9149c --- /dev/null +++ b/asset/snippets/snippets/quickstart_searchalliampolicies_test.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python + +# 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. + +import os + +import quickstart_searchalliampolicies + +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] + + +def test_search_all_iam_policies(capsys): + scope = "projects/{}".format(PROJECT) + query = "policy:roles/owner" + quickstart_searchalliampolicies.search_all_iam_policies(scope, query=query) + out, _ = capsys.readouterr() + assert "roles/owner" in out diff --git a/asset/snippets/snippets/quickstart_searchallresources.py b/asset/snippets/snippets/quickstart_searchallresources.py new file mode 100644 index 000000000000..7668ffc1a516 --- /dev/null +++ b/asset/snippets/snippets/quickstart_searchallresources.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python + +# 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. + + +import argparse + + +def search_all_resources(scope, + query=None, + asset_types=None, + page_size=None, + order_by=None): + # [START asset_quickstart_search_all_resources] + from google.cloud import asset_v1 + + client = asset_v1.AssetServiceClient() + response = client.search_all_resources( + scope, + query=query, + asset_types=asset_types, + page_size=page_size, + order_by=order_by) + for page in response.pages: + for resource in page: + print(resource) + break + # [END asset_quickstart_search_all_resources] + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter) + parser.add_argument( + 'scope', + help='The search is limited to the resources within the scope.') + parser.add_argument('--query', help='The query statement.') + parser.add_argument( + '--asset_types', nargs='+', help='A list of asset types to search for.') + parser.add_argument( + '--page_size', + type=int, + help='The page size for search result pagination.') + parser.add_argument( + '--order_by', + help='Fields specifying the sorting order of the results.') + args = parser.parse_args() + search_all_resources(args.scope, args.query, args.asset_types, + args.page_size, args.order_by) diff --git a/asset/snippets/snippets/quickstart_searchallresources_test.py b/asset/snippets/snippets/quickstart_searchallresources_test.py new file mode 100644 index 000000000000..ae79a69faf31 --- /dev/null +++ b/asset/snippets/snippets/quickstart_searchallresources_test.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python + +# 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. + +import os +import uuid + +import backoff +from google.api_core.exceptions import NotFound +from google.cloud import bigquery +import pytest + +import quickstart_searchallresources + +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] +DATASET = 'dataset_{}'.format(uuid.uuid4().hex) + + +@pytest.fixture(scope='module') +def bigquery_client(): + yield bigquery.Client() + + +@pytest.fixture(scope='module') +def asset_dataset(bigquery_client): + dataset = bigquery_client.create_dataset(DATASET) + + yield DATASET + + try: + bigquery_client.delete_dataset(dataset) + except NotFound as e: + print('Failed to delete dataset {}'.format(DATASET)) + raise e + + +def test_search_all_resources(asset_dataset, capsys): + scope = "projects/{}".format(PROJECT) + query = "name:{}".format(DATASET) + + # Dataset creation takes some time to propagate, so the dataset is not + # immediately searchable. Need some time before the snippet will pass. + @backoff.on_exception( + backoff.expo, (AssertionError), max_time=30 + ) + def eventually_consistent_test(): + quickstart_searchallresources.search_all_resources(scope, query=query) + out, _ = capsys.readouterr() + + assert DATASET in out + + eventually_consistent_test() diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index bac55b5d2d9d..1424289b1acd 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,3 +2,4 @@ google-cloud-storage==1.28.1 google-cloud-asset==1.1.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.5.0 +google-cloud-bigquery==1.25.0 From aa210e72689c0a68f7889331050158a47d42519e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 20 Jun 2020 01:03:47 +0200 Subject: [PATCH 031/235] chore(deps): update dependency google-cloud-storage to v1.29.0 [(#4040)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4040) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 1424289b1acd..08166568ef9a 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.28.1 +google-cloud-storage==1.29.0 google-cloud-asset==1.1.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.5.0 From 8f4955f0d0e505a54addf9afa59dfc5a1944c2ca Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 20 Jun 2020 06:08:08 +0200 Subject: [PATCH 032/235] Update dependency google-cloud-pubsub to v1.6.0 [(#4039)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4039) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [google-cloud-pubsub](https://togithub.com/googleapis/python-pubsub) | minor | `==1.5.0` -> `==1.6.0` | --- ### Release Notes
googleapis/python-pubsub ### [`v1.6.0`](https://togithub.com/googleapis/python-pubsub/blob/master/CHANGELOG.md#​160-httpswwwgithubcomgoogleapispython-pubsubcomparev150v160-2020-06-09) [Compare Source](https://togithub.com/googleapis/python-pubsub/compare/v1.5.0...v1.6.0) ##### Features - Add flow control for message publishing ([#​96](https://www.github.com/googleapis/python-pubsub/issues/96)) ([06085c4](https://www.github.com/googleapis/python-pubsub/commit/06085c4083b9dccdd50383257799904510bbf3a0)) ##### Bug Fixes - Fix PubSub incompatibility with api-core 1.17.0+ ([#​103](https://www.github.com/googleapis/python-pubsub/issues/103)) ([c02060f](https://www.github.com/googleapis/python-pubsub/commit/c02060fbbe6e2ca4664bee08d2de10665d41dc0b)) ##### Documentation - Clarify that Schedulers shouldn't be used with multiple SubscriberClients ([#​100](https://togithub.com/googleapis/python-pubsub/pull/100)) ([cf9e87c](https://togithub.com/googleapis/python-pubsub/commit/cf9e87c80c0771f3fa6ef784a8d76cb760ad37ef)) - Fix update subscription/snapshot/topic samples ([#​113](https://togithub.com/googleapis/python-pubsub/pull/113)) ([e62c38b](https://togithub.com/googleapis/python-pubsub/commit/e62c38bb33de2434e32f866979de769382dea34a)) ##### Internal / Testing Changes - Re-generated service implementaton using synth: removed experimental notes from the RetryPolicy and filtering features in anticipation of GA, added DetachSubscription (experimental) ([#​114](https://togithub.com/googleapis/python-pubsub/pull/114)) ([0132a46](https://togithub.com/googleapis/python-pubsub/commit/0132a4680e0727ce45d5e27d98ffc9f3541a0962)) - Incorporate will_accept() checks into publish() ([#​108](https://togithub.com/googleapis/python-pubsub/pull/108)) ([6c7677e](https://togithub.com/googleapis/python-pubsub/commit/6c7677ecb259672bbb9b6f7646919e602c698570))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Never, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#GoogleCloudPlatform/python-docs-samples). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 08166568ef9a..258cb352943c 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.29.0 google-cloud-asset==1.1.0 google-cloud-resource-manager==0.30.2 -google-cloud-pubsub==1.5.0 +google-cloud-pubsub==1.6.0 google-cloud-bigquery==1.25.0 From b26a3c3bebd6106c370eeec4e0eb6ad22e3985db Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 23 Jun 2020 07:44:17 +0200 Subject: [PATCH 033/235] chore(deps): update dependency google-cloud-asset to v1.2.0 [(#4140)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4140) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 258cb352943c..efe5228b6e74 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.29.0 -google-cloud-asset==1.1.0 +google-cloud-asset==1.2.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.6.0 google-cloud-bigquery==1.25.0 From bc951c1ed1eedbbd0c66ab56b3e2d7a3d412bb4e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 26 Jun 2020 21:05:07 +0200 Subject: [PATCH 034/235] chore(deps): update dependency google-cloud-asset to v1.3.0 [(#4174)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4174) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index efe5228b6e74..0c09b34e78c5 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.29.0 -google-cloud-asset==1.2.0 +google-cloud-asset==1.3.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.6.0 google-cloud-bigquery==1.25.0 From e16fa0c93dcd78809cbcfaee0cebaae2031bbd47 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Fri, 26 Jun 2020 12:54:48 -0700 Subject: [PATCH 035/235] [asset] fix: bump the timeout [(#4181)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4181) fixes #4164 --- asset/snippets/snippets/quickstart_searchallresources_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/quickstart_searchallresources_test.py b/asset/snippets/snippets/quickstart_searchallresources_test.py index ae79a69faf31..ff4724829ddc 100644 --- a/asset/snippets/snippets/quickstart_searchallresources_test.py +++ b/asset/snippets/snippets/quickstart_searchallresources_test.py @@ -53,7 +53,7 @@ def test_search_all_resources(asset_dataset, capsys): # Dataset creation takes some time to propagate, so the dataset is not # immediately searchable. Need some time before the snippet will pass. @backoff.on_exception( - backoff.expo, (AssertionError), max_time=30 + backoff.expo, (AssertionError), max_time=120 ) def eventually_consistent_test(): quickstart_searchallresources.search_all_resources(scope, query=query) From 2d62b5efe3871fb2dfde8f23cfa9f59fede33df7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Jul 2020 22:52:02 +0200 Subject: [PATCH 036/235] chore(deps): update dependency google-cloud-pubsub to v1.6.1 [(#4242)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4242) Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 0c09b34e78c5..d599b5badad9 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.29.0 google-cloud-asset==1.3.0 google-cloud-resource-manager==0.30.2 -google-cloud-pubsub==1.6.0 +google-cloud-pubsub==1.6.1 google-cloud-bigquery==1.25.0 From df592fd4207d3101f6ae985f779bdc0c0ef07303 Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Mon, 6 Jul 2020 14:10:52 -0700 Subject: [PATCH 037/235] testing(asset): use conftest.py [(#4245)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4245) fixes #4235 (by retrying upon InternalServerError) Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com> --- asset/snippets/snippets/conftest.py | 87 +++++++++++++++++++ .../snippets/quickstart_createfeed.py | 1 + .../snippets/quickstart_createfeed_test.py | 29 ++----- .../snippets/quickstart_deletefeed_test.py | 24 +---- .../snippets/quickstart_getfeed_test.py | 31 +------ .../snippets/quickstart_updatefeed_test.py | 36 +------- 6 files changed, 101 insertions(+), 107 deletions(-) create mode 100644 asset/snippets/snippets/conftest.py diff --git a/asset/snippets/snippets/conftest.py b/asset/snippets/snippets/conftest.py new file mode 100644 index 000000000000..c51b3631d724 --- /dev/null +++ b/asset/snippets/snippets/conftest.py @@ -0,0 +1,87 @@ +#!/usr/bin/env python +# +# 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. + +import os +import uuid + +import backoff +from google.api_core.exceptions import InternalServerError +from google.api_core.exceptions import NotFound +from google.cloud import pubsub_v1 +import pytest + +import quickstart_createfeed +import quickstart_deletefeed + + +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] + + +@pytest.fixture(scope="module") +def test_topic(): + topic_id = f'topic-{uuid.uuid4().hex}' + publisher = pubsub_v1.PublisherClient() + topic_path = publisher.topic_path(PROJECT, topic_id) + topic = publisher.create_topic(topic_path) + + yield topic + + publisher.delete_topic(topic_path) + + +@pytest.fixture(scope="module") +def another_topic(): + topic_id = f'topic-{uuid.uuid4().hex}' + publisher = pubsub_v1.PublisherClient() + topic_path = publisher.topic_path(PROJECT, topic_id) + topic = publisher.create_topic(topic_path) + + yield topic + + publisher.delete_topic(topic_path) + + +@pytest.fixture(scope="module") +def test_feed(test_topic): + feed_id = f'feed-{uuid.uuid4().hex}' + asset_name = f'assets-{uuid.uuid4().hex}' + + @backoff.on_exception(backoff.expo, InternalServerError, max_time=60) + def create_feed(): + return quickstart_createfeed.create_feed( + PROJECT, feed_id, [asset_name, ], test_topic.name) + + feed = create_feed() + + yield feed + + try: + quickstart_deletefeed.delete_feed(feed.name) + except NotFound as e: + print(f"Ignoring NotFound: {e}") + + +@pytest.fixture(scope="module") +def deleter(): + feeds_to_delete = [] + + yield feeds_to_delete + + for feed_name in feeds_to_delete: + try: + quickstart_deletefeed.delete_feed(feed_name) + except NotFound as e: + print(f"Ignoring NotFound: {e}") diff --git a/asset/snippets/snippets/quickstart_createfeed.py b/asset/snippets/snippets/quickstart_createfeed.py index c77fb5c2cac4..7ee7b7e3e732 100644 --- a/asset/snippets/snippets/quickstart_createfeed.py +++ b/asset/snippets/snippets/quickstart_createfeed.py @@ -36,6 +36,7 @@ def create_feed(project_id, feed_id, asset_names, topic): response = client.create_feed(parent, feed_id, feed) print('feed: {}'.format(response)) # [END asset_quickstart_create_feed] + return response if __name__ == '__main__': diff --git a/asset/snippets/snippets/quickstart_createfeed_test.py b/asset/snippets/snippets/quickstart_createfeed_test.py index 956d957a5789..89e993a43b8e 100644 --- a/asset/snippets/snippets/quickstart_createfeed_test.py +++ b/asset/snippets/snippets/quickstart_createfeed_test.py @@ -14,37 +14,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json import os import uuid -from google.cloud import pubsub_v1 -from google.cloud import resource_manager - import quickstart_createfeed -import quickstart_deletefeed -json_data = open(os.environ["GOOGLE_APPLICATION_CREDENTIALS"]).read() -data = json.loads(json_data) -PROJECT = data['project_id'] + +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) -TOPIC = 'topic-{}'.format(uuid.uuid4().hex) -def test_create_feed(capsys): - client = resource_manager.Client() - project_number = client.fetch_project(PROJECT).number - full_topic_name = "projects/{}/topics/{}".format(PROJECT, TOPIC) - publisher = pubsub_v1.PublisherClient() - topic_path = publisher.topic_path(PROJECT, TOPIC) - publisher.create_topic(topic_path) - quickstart_createfeed.create_feed( - PROJECT, FEED_ID, [ASSET_NAME, ], full_topic_name) +def test_create_feed(capsys, test_topic, deleter): + feed = quickstart_createfeed.create_feed( + PROJECT, FEED_ID, [ASSET_NAME, ], test_topic.name) + deleter.append(feed.name) out, _ = capsys.readouterr() assert "feed" in out - - # Clean up, delete the feed - feed_name = "projects/{}/feeds/{}".format(project_number, FEED_ID) - quickstart_deletefeed.delete_feed(feed_name) - publisher.delete_topic(topic_path) diff --git a/asset/snippets/snippets/quickstart_deletefeed_test.py b/asset/snippets/snippets/quickstart_deletefeed_test.py index 5ec6f8021128..caa4dd0c94f6 100644 --- a/asset/snippets/snippets/quickstart_deletefeed_test.py +++ b/asset/snippets/snippets/quickstart_deletefeed_test.py @@ -15,34 +15,16 @@ # limitations under the License. import os -import uuid -from google.cloud import pubsub_v1 -from google.cloud import resource_manager - -import quickstart_createfeed import quickstart_deletefeed + PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] -ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) -FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) -TOPIC = 'topic-{}'.format(uuid.uuid4().hex) -def test_delete_feed(capsys): - client = resource_manager.Client() - project_number = client.fetch_project(PROJECT).number - # First create the feed, which will be deleted later - full_topic_name = "projects/{}/topics/{}".format(PROJECT, TOPIC) - publisher = pubsub_v1.PublisherClient() - topic_path = publisher.topic_path(PROJECT, TOPIC) - publisher.create_topic(topic_path) - quickstart_createfeed.create_feed( - PROJECT, FEED_ID, [ASSET_NAME, ], full_topic_name) +def test_delete_feed(capsys, test_feed): - feed_name = "projects/{}/feeds/{}".format(project_number, FEED_ID) - quickstart_deletefeed.delete_feed(feed_name) + quickstart_deletefeed.delete_feed(test_feed.name) out, _ = capsys.readouterr() assert "deleted_feed" in out - publisher.delete_topic(topic_path) diff --git a/asset/snippets/snippets/quickstart_getfeed_test.py b/asset/snippets/snippets/quickstart_getfeed_test.py index 940ce35557fd..dd2a92bd9bc6 100644 --- a/asset/snippets/snippets/quickstart_getfeed_test.py +++ b/asset/snippets/snippets/quickstart_getfeed_test.py @@ -14,38 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os -import uuid - -from google.cloud import pubsub_v1 -from google.cloud import resource_manager - -import quickstart_createfeed -import quickstart_deletefeed import quickstart_getfeed -PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] -ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) -FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) -TOPIC = 'topic-{}'.format(uuid.uuid4().hex) - - -def test_get_feed(capsys): - client = resource_manager.Client() - project_number = client.fetch_project(PROJECT).number - # First create the feed, which will be gotten later - full_topic_name = "projects/{}/topics/{}".format(PROJECT, TOPIC) - publisher = pubsub_v1.PublisherClient() - topic_path = publisher.topic_path(PROJECT, TOPIC) - publisher.create_topic(topic_path) - quickstart_createfeed.create_feed( - PROJECT, FEED_ID, [ASSET_NAME, ], full_topic_name) - feed_name = "projects/{}/feeds/{}".format(project_number, FEED_ID) - quickstart_getfeed.get_feed(feed_name) +def test_get_feed(capsys, test_feed): + quickstart_getfeed.get_feed(test_feed.name) out, _ = capsys.readouterr() assert "gotten_feed" in out - # Clean up and delete the feed - quickstart_deletefeed.delete_feed(feed_name) - publisher.delete_topic(topic_path) diff --git a/asset/snippets/snippets/quickstart_updatefeed_test.py b/asset/snippets/snippets/quickstart_updatefeed_test.py index c996020ef82e..e09cb19102d5 100644 --- a/asset/snippets/snippets/quickstart_updatefeed_test.py +++ b/asset/snippets/snippets/quickstart_updatefeed_test.py @@ -14,43 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import os -import uuid - -from google.cloud import pubsub_v1 -from google.cloud import resource_manager - -import quickstart_createfeed -import quickstart_deletefeed import quickstart_updatefeed -PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] -ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) -FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) -TOPIC = 'topic-{}'.format(uuid.uuid4().hex) -NEW_TOPIC = 'new-topic-{}'.format(uuid.uuid4().hex) - - -def test_update_feed(capsys): - client = resource_manager.Client() - project_number = client.fetch_project(PROJECT).number - # First create the feed, which will be updated later - full_topic_name = "projects/{}/topics/{}".format(PROJECT, TOPIC) - publisher = pubsub_v1.PublisherClient() - topic_path = publisher.topic_path(PROJECT, TOPIC) - publisher.create_topic(topic_path) - quickstart_createfeed.create_feed( - PROJECT, FEED_ID, [ASSET_NAME, ], full_topic_name) - feed_name = "projects/{}/feeds/{}".format(project_number, FEED_ID) - new_full_topic_name = "projects/" + PROJECT + "/topics/" + NEW_TOPIC - new_topic_path = publisher.topic_path(PROJECT, NEW_TOPIC) - publisher.create_topic(new_topic_path) - quickstart_updatefeed.update_feed(feed_name, new_full_topic_name) +def test_update_feed(capsys, test_feed, another_topic): + quickstart_updatefeed.update_feed(test_feed.name, another_topic.name) out, _ = capsys.readouterr() assert "updated_feed" in out - # Clean up and delete the feed - quickstart_deletefeed.delete_feed(feed_name) - publisher.delete_topic(topic_path) - publisher.delete_topic(new_topic_path) From e2fb09b9410b5fc5741376f57de592b1a6b4e653 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 13 Jul 2020 00:46:30 +0200 Subject: [PATCH 038/235] chore(deps): update dependency pytest to v5.4.3 [(#4279)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4279) * chore(deps): update dependency pytest to v5.4.3 * specify pytest for python 2 in appengine Co-authored-by: Leah Cole --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index 1d19ebfca084..678aa129fb4f 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,2 +1,2 @@ backoff==1.10.0 -pytest==5.4.1 +pytest==5.4.3 From 6406ef0a1c8a0e3171cb1c0348b8fc0771989dcd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Jul 2020 19:20:03 +0200 Subject: [PATCH 039/235] chore(deps): update dependency google-cloud-pubsub to v1.7.0 [(#4290)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4290) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [google-cloud-pubsub](https://togithub.com/googleapis/python-pubsub) | minor | `==1.6.1` -> `==1.7.0` | --- ### Release Notes
googleapis/python-pubsub ### [`v1.7.0`](https://togithub.com/googleapis/python-pubsub/blob/master/CHANGELOG.md#​170-httpswwwgithubcomgoogleapispython-pubsubcomparev161v170-2020-07-13) [Compare Source](https://togithub.com/googleapis/python-pubsub/compare/v1.6.1...v1.7.0) ##### New Features - Add support for server-side flow control. ([#​143](https://togithub.com/googleapis/python-pubsub/pull/143)) ([04e261c](https://www.github.com/googleapis/python-pubsub/commit/04e261c602a2919cc75b3efa3dab099fb2cf704c)) ##### Dependencies - Update samples dependency `google-cloud-pubsub` to `v1.6.1`. ([#​144](https://togithub.com/googleapis/python-pubsub/pull/144)) ([1cb6746](https://togithub.com/googleapis/python-pubsub/commit/1cb6746b00ebb23dbf1663bae301b32c3fc65a88)) ##### Documentation - Add pubsub/cloud-client samples from the common samples repo (with commit history). ([#​151](https://togithub.com/googleapis/python-pubsub/pull/151)) - Add flow control section to publish overview. ([#​129](https://togithub.com/googleapis/python-pubsub/pull/129)) ([acc19eb](https://www.github.com/googleapis/python-pubsub/commit/acc19eb048eef067d9818ef3e310b165d9c6307e)) - Add a link to Pub/Sub filtering language public documentation to `pubsub.proto`. ([#​121](https://togithub.com/googleapis/python-pubsub/pull/121)) ([8802d81](https://www.github.com/googleapis/python-pubsub/commit/8802d8126247f22e26057e68a42f5b5a82dcbf0d))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#GoogleCloudPlatform/python-docs-samples). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d599b5badad9..9623430a983b 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.29.0 google-cloud-asset==1.3.0 google-cloud-resource-manager==0.30.2 -google-cloud-pubsub==1.6.1 +google-cloud-pubsub==1.7.0 google-cloud-bigquery==1.25.0 From 38b9b83dd217b2446289e9b4ae22b4f5ee89e113 Mon Sep 17 00:00:00 2001 From: Larittic-GG <59073661+Larittic-GG@users.noreply.github.com> Date: Fri, 17 Jul 2020 08:24:03 -0700 Subject: [PATCH 040/235] feat: add sample code for ListAssets v1p5beta1 [(#4251)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4251) ## Description Fixes #4250 Note: It's a good idea to open an issue first for discussion. ## Checklist - [x] I have followed [Sample Guidelines from AUTHORING_GUIDE.MD](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md) - [ ] README is updated to include [all relevant information](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#readme-file) - [x] **Tests** pass: `nox -s py-3.6` (see [Test Enviroment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [x] **Lint** pass: `nox -s lint` (see [Test Enviroment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones) - [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones) - [x] Please **merge** this PR for me once it is approved. --- .../snippets/quickstart_listassets.py | 66 +++++++++++++++++++ .../snippets/quickstart_listassets_test.py | 27 ++++++++ 2 files changed, 93 insertions(+) create mode 100644 asset/snippets/snippets/quickstart_listassets.py create mode 100644 asset/snippets/snippets/quickstart_listassets_test.py diff --git a/asset/snippets/snippets/quickstart_listassets.py b/asset/snippets/snippets/quickstart_listassets.py new file mode 100644 index 000000000000..c7d147d77ab2 --- /dev/null +++ b/asset/snippets/snippets/quickstart_listassets.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python + +# 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. + + +import argparse + + +def list_assets(project_id, asset_types, page_size): + # [START asset_quickstart_list_assets] + from google.cloud import asset_v1p5beta1 + from google.cloud.asset_v1p5beta1 import enums + + # TODO project_id = 'Your Google Cloud Project ID' + # TODO asset_types = 'Your asset type list, e.g., + # ["storage.googleapis.com/Bucket","bigquery.googleapis.com/Table"]' + # TODO page_size = 'Num of assets in one page, which must be between 1 and + # 1000 (both inclusively)' + + project_resource = 'projects/{}'.format(project_id) + content_type = enums.ContentType.RESOURCE + client = asset_v1p5beta1.AssetServiceClient() + + # Call ListAssets v1p5beta1 to list assets. + response = client.list_assets( + parent=project_resource, read_time=None, asset_types=asset_types, + content_type=content_type, page_size=page_size) + + for page in response.pages: + for asset in page: + print(asset) + # [END asset_quickstart_list_assets] + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description=__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument('project_id', help='Your Google Cloud project ID') + parser.add_argument( + 'asset_types', + help='The types of the assets to list, comma delimited, e.g., ' + 'storage.googleapis.com/Bucket') + parser.add_argument( + 'page_size', + help='Num of assets in one page, which must be between 1 and 1000 ' + '(both inclusively)') + + args = parser.parse_args() + + asset_type_list = args.asset_types.split(',') + + list_assets(args.project_id, asset_type_list, int(args.page_size)) diff --git a/asset/snippets/snippets/quickstart_listassets_test.py b/asset/snippets/snippets/quickstart_listassets_test.py new file mode 100644 index 000000000000..5a322e716af2 --- /dev/null +++ b/asset/snippets/snippets/quickstart_listassets_test.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +# 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. + +import os + +import quickstart_listassets + +PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] + + +def test_list_assets(capsys): + quickstart_listassets.list_assets(project_id=PROJECT, asset_types=[], page_size=10) + out, _ = capsys.readouterr() + assert 'asset' in out From bcb3f7441473762963448c83e0b1f0dddf4b6f62 Mon Sep 17 00:00:00 2001 From: yuyifan-google <65194920+yuyifan-google@users.noreply.github.com> Date: Thu, 23 Jul 2020 17:13:44 -0700 Subject: [PATCH 041/235] Add commented variables to make samples more friendly to copy and use [(#4365)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4365) --- asset/snippets/snippets/quickstart_searchalliampolicies.py | 4 ++++ asset/snippets/snippets/quickstart_searchallresources.py | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/asset/snippets/snippets/quickstart_searchalliampolicies.py b/asset/snippets/snippets/quickstart_searchalliampolicies.py index 334f1dda30ea..2a089913c513 100644 --- a/asset/snippets/snippets/quickstart_searchalliampolicies.py +++ b/asset/snippets/snippets/quickstart_searchalliampolicies.py @@ -22,6 +22,10 @@ def search_all_iam_policies(scope, query=None, page_size=None): # [START asset_quickstart_search_all_iam_policies] from google.cloud import asset_v1 + # TODO scope = 'Scope of the search' + # TODO query = 'Query statement' + # TODO page_size = Size of each result page + client = asset_v1.AssetServiceClient() response = client.search_all_iam_policies( scope, query=query, page_size=page_size) diff --git a/asset/snippets/snippets/quickstart_searchallresources.py b/asset/snippets/snippets/quickstart_searchallresources.py index 7668ffc1a516..56c7ac44042a 100644 --- a/asset/snippets/snippets/quickstart_searchallresources.py +++ b/asset/snippets/snippets/quickstart_searchallresources.py @@ -26,6 +26,12 @@ def search_all_resources(scope, # [START asset_quickstart_search_all_resources] from google.cloud import asset_v1 + # TODO scope = 'Scope of the search' + # TODO query = 'Query statement' + # TODO asset_types = 'List of asset types to search for' + # TODO page_size = Size of each result page + # TODO order_by = 'Fields to sort the results' + client = asset_v1.AssetServiceClient() response = client.search_all_resources( scope, From db2fc99f8959ccd79536d19f029e5eb6aed70104 Mon Sep 17 00:00:00 2001 From: arithmetic1728 Date: Tue, 4 Aug 2020 12:56:11 -0700 Subject: [PATCH 042/235] chore: update templates --- asset/snippets/snippets/noxfile.py | 224 +++++++++++++++++++++++++++++ 1 file changed, 224 insertions(+) create mode 100644 asset/snippets/snippets/noxfile.py diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py new file mode 100644 index 000000000000..ba55d7ce53ca --- /dev/null +++ b/asset/snippets/snippets/noxfile.py @@ -0,0 +1,224 @@ +# Copyright 2019 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. + +from __future__ import print_function + +import os +from pathlib import Path +import sys + +import nox + + +# WARNING - WARNING - WARNING - WARNING - WARNING +# WARNING - WARNING - WARNING - WARNING - WARNING +# DO NOT EDIT THIS FILE EVER! +# WARNING - WARNING - WARNING - WARNING - WARNING +# WARNING - WARNING - WARNING - WARNING - WARNING + +# Copy `noxfile_config.py` to your directory and modify it instead. + + +# `TEST_CONFIG` dict is a configuration hook that allows users to +# modify the test configurations. The values here should be in sync +# with `noxfile_config.py`. Users will copy `noxfile_config.py` into +# their directory and modify it. + +TEST_CONFIG = { + # You can opt out from the test for specific Python versions. + 'ignored_versions': ["2.7"], + + # An envvar key for determining the project id to use. Change it + # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a + # build specific Cloud project. You can also use your own string + # to use your own Cloud project. + 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', + # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', + + # A dictionary you want to inject into your test. Don't put any + # secrets here. These values will override predefined values. + 'envs': {}, +} + + +try: + # Ensure we can import noxfile_config in the project's directory. + sys.path.append('.') + from noxfile_config import TEST_CONFIG_OVERRIDE +except ImportError as e: + print("No user noxfile_config found: detail: {}".format(e)) + TEST_CONFIG_OVERRIDE = {} + +# Update the TEST_CONFIG with the user supplied values. +TEST_CONFIG.update(TEST_CONFIG_OVERRIDE) + + +def get_pytest_env_vars(): + """Returns a dict for pytest invocation.""" + ret = {} + + # Override the GCLOUD_PROJECT and the alias. + env_key = TEST_CONFIG['gcloud_project_env'] + # This should error out if not set. + ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] + + # Apply user supplied envs. + ret.update(TEST_CONFIG['envs']) + return ret + + +# DO NOT EDIT - automatically generated. +# All versions used to tested samples. +ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8"] + +# Any default versions that should be ignored. +IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] + +TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) + +INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False)) +# +# Style Checks +# + + +def _determine_local_import_names(start_dir): + """Determines all import names that should be considered "local". + + This is used when running the linter to insure that import order is + properly checked. + """ + file_ext_pairs = [os.path.splitext(path) for path in os.listdir(start_dir)] + return [ + basename + for basename, extension in file_ext_pairs + if extension == ".py" + or os.path.isdir(os.path.join(start_dir, basename)) + and basename not in ("__pycache__") + ] + + +# Linting with flake8. +# +# We ignore the following rules: +# E203: whitespace before ‘:’ +# E266: too many leading ‘#’ for block comment +# E501: line too long +# I202: Additional newline in a section of imports +# +# We also need to specify the rules which are ignored by default: +# ['E226', 'W504', 'E126', 'E123', 'W503', 'E24', 'E704', 'E121'] +FLAKE8_COMMON_ARGS = [ + "--show-source", + "--builtin=gettext", + "--max-complexity=20", + "--import-order-style=google", + "--exclude=.nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py", + "--ignore=E121,E123,E126,E203,E226,E24,E266,E501,E704,W503,W504,I202", + "--max-line-length=88", +] + + +@nox.session +def lint(session): + session.install("flake8", "flake8-import-order") + + local_names = _determine_local_import_names(".") + args = FLAKE8_COMMON_ARGS + [ + "--application-import-names", + ",".join(local_names), + "." + ] + session.run("flake8", *args) + + +# +# Sample Tests +# + + +PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] + + +def _session_tests(session, post_install=None): + """Runs py.test for a particular project.""" + if os.path.exists("requirements.txt"): + session.install("-r", "requirements.txt") + + if os.path.exists("requirements-test.txt"): + session.install("-r", "requirements-test.txt") + + if INSTALL_LIBRARY_FROM_SOURCE: + session.install("-e", _get_repo_root()) + + if post_install: + post_install(session) + + session.run( + "pytest", + *(PYTEST_COMMON_ARGS + session.posargs), + # Pytest will return 5 when no tests are collected. This can happen + # on travis where slow and flaky tests are excluded. + # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html + success_codes=[0, 5], + env=get_pytest_env_vars() + ) + + +@nox.session(python=ALL_VERSIONS) +def py(session): + """Runs py.test for a sample using the specified version of Python.""" + if session.python in TESTED_VERSIONS: + _session_tests(session) + else: + session.skip("SKIPPED: {} tests are disabled for this sample.".format( + session.python + )) + + +# +# Readmegen +# + + +def _get_repo_root(): + """ Returns the root folder of the project. """ + # Get root of this repository. Assume we don't have directories nested deeper than 10 items. + p = Path(os.getcwd()) + for i in range(10): + if p is None: + break + if Path(p / ".git").exists(): + return str(p) + p = p.parent + raise Exception("Unable to detect repository root.") + + +GENERATED_READMES = sorted([x for x in Path(".").rglob("*.rst.in")]) + + +@nox.session +@nox.parametrize("path", GENERATED_READMES) +def readmegen(session, path): + """(Re-)generates the readme for a sample.""" + session.install("jinja2", "pyyaml") + dir_ = os.path.dirname(path) + + if os.path.exists(os.path.join(dir_, "requirements.txt")): + session.install("-r", os.path.join(dir_, "requirements.txt")) + + in_file = os.path.join(dir_, "README.rst.in") + session.run( + "python", _get_repo_root() + "/scripts/readme-gen/readme_gen.py", in_file + ) From 68c031f5c056d21c65b1790a3cdd3a83a5528e49 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com> Date: Tue, 4 Aug 2020 16:18:09 -0700 Subject: [PATCH 043/235] fix: limit asset types to avoid exceeding quota --- asset/snippets/snippets/quickstart_listassets_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/quickstart_listassets_test.py b/asset/snippets/snippets/quickstart_listassets_test.py index 5a322e716af2..971f227d9c98 100644 --- a/asset/snippets/snippets/quickstart_listassets_test.py +++ b/asset/snippets/snippets/quickstart_listassets_test.py @@ -22,6 +22,6 @@ def test_list_assets(capsys): - quickstart_listassets.list_assets(project_id=PROJECT, asset_types=[], page_size=10) + quickstart_listassets.list_assets(project_id=PROJECT, asset_types=["iam.googleapis.com/Role"], page_size=10) out, _ = capsys.readouterr() assert 'asset' in out From 713a76ebe4bc391073051b35ec2cb0235d73fe0a Mon Sep 17 00:00:00 2001 From: arithmetic1728 <58957152+arithmetic1728@users.noreply.github.com> Date: Wed, 5 Aug 2020 14:27:59 -0700 Subject: [PATCH 044/235] feat!: move to microgenerator (#58) * feat!: move to microgenerator * update UPGRADING.md * rebase after the samples are moved * update sample * update sample * update sample * update sample * fix linter * fix linter --- asset/snippets/snippets/conftest.py | 13 +++-- asset/snippets/snippets/noxfile.py | 26 ++++----- .../quickstart_batchgetassetshistory.py | 34 +++++++----- .../quickstart_batchgetassetshistory_test.py | 23 ++++---- .../snippets/quickstart_createfeed.py | 24 ++++---- .../snippets/quickstart_createfeed_test.py | 9 +-- .../snippets/quickstart_deletefeed.py | 12 ++-- .../snippets/quickstart_deletefeed_test.py | 2 +- .../snippets/quickstart_exportassets.py | 23 ++++---- .../snippets/quickstart_exportassets_test.py | 12 ++-- asset/snippets/snippets/quickstart_getfeed.py | 12 ++-- .../snippets/quickstart_listassets.py | 43 ++++++++------- .../snippets/quickstart_listassets_test.py | 8 ++- .../snippets/snippets/quickstart_listfeeds.py | 14 ++--- .../snippets/quickstart_listfeeds_test.py | 2 +- .../quickstart_searchalliampolicies.py | 25 ++++----- .../quickstart_searchalliampolicies_test.py | 2 +- .../snippets/quickstart_searchallresources.py | 55 ++++++++++--------- .../quickstart_searchallresources_test.py | 14 ++--- .../snippets/quickstart_updatefeed.py | 17 +++--- 20 files changed, 189 insertions(+), 181 deletions(-) diff --git a/asset/snippets/snippets/conftest.py b/asset/snippets/snippets/conftest.py index c51b3631d724..723827de45b5 100644 --- a/asset/snippets/snippets/conftest.py +++ b/asset/snippets/snippets/conftest.py @@ -27,12 +27,12 @@ import quickstart_deletefeed -PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] @pytest.fixture(scope="module") def test_topic(): - topic_id = f'topic-{uuid.uuid4().hex}' + topic_id = f"topic-{uuid.uuid4().hex}" publisher = pubsub_v1.PublisherClient() topic_path = publisher.topic_path(PROJECT, topic_id) topic = publisher.create_topic(topic_path) @@ -44,7 +44,7 @@ def test_topic(): @pytest.fixture(scope="module") def another_topic(): - topic_id = f'topic-{uuid.uuid4().hex}' + topic_id = f"topic-{uuid.uuid4().hex}" publisher = pubsub_v1.PublisherClient() topic_path = publisher.topic_path(PROJECT, topic_id) topic = publisher.create_topic(topic_path) @@ -56,13 +56,14 @@ def another_topic(): @pytest.fixture(scope="module") def test_feed(test_topic): - feed_id = f'feed-{uuid.uuid4().hex}' - asset_name = f'assets-{uuid.uuid4().hex}' + feed_id = f"feed-{uuid.uuid4().hex}" + asset_name = f"assets-{uuid.uuid4().hex}" @backoff.on_exception(backoff.expo, InternalServerError, max_time=60) def create_feed(): return quickstart_createfeed.create_feed( - PROJECT, feed_id, [asset_name, ], test_topic.name) + PROJECT, feed_id, [asset_name], test_topic.name + ) feed = create_feed() diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index ba55d7ce53ca..5660f08be441 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -37,24 +37,22 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': ["2.7"], - + "ignored_versions": ["2.7"], # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', + "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', - # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. - 'envs': {}, + "envs": {}, } try: # Ensure we can import noxfile_config in the project's directory. - sys.path.append('.') + sys.path.append(".") from noxfile_config import TEST_CONFIG_OVERRIDE except ImportError as e: print("No user noxfile_config found: detail: {}".format(e)) @@ -69,12 +67,12 @@ def get_pytest_env_vars(): ret = {} # Override the GCLOUD_PROJECT and the alias. - env_key = TEST_CONFIG['gcloud_project_env'] + env_key = TEST_CONFIG["gcloud_project_env"] # This should error out if not set. - ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] + ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key] # Apply user supplied envs. - ret.update(TEST_CONFIG['envs']) + ret.update(TEST_CONFIG["envs"]) return ret @@ -83,7 +81,7 @@ def get_pytest_env_vars(): ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8"] # Any default versions that should be ignored. -IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] +IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) @@ -138,7 +136,7 @@ def lint(session): args = FLAKE8_COMMON_ARGS + [ "--application-import-names", ",".join(local_names), - "." + ".", ] session.run("flake8", *args) @@ -182,9 +180,9 @@ def py(session): if session.python in TESTED_VERSIONS: _session_tests(session) else: - session.skip("SKIPPED: {} tests are disabled for this sample.".format( - session.python - )) + session.skip( + "SKIPPED: {} tests are disabled for this sample.".format(session.python) + ) # diff --git a/asset/snippets/snippets/quickstart_batchgetassetshistory.py b/asset/snippets/snippets/quickstart_batchgetassetshistory.py index ca6a29ac92c4..3ee70e30bd73 100644 --- a/asset/snippets/snippets/quickstart_batchgetassetshistory.py +++ b/asset/snippets/snippets/quickstart_batchgetassetshistory.py @@ -21,36 +21,40 @@ def batch_get_assets_history(project_id, asset_names): # [START asset_quickstart_batch_get_assets_history] from google.cloud import asset_v1 - from google.cloud.asset_v1.proto import assets_pb2 - from google.cloud.asset_v1 import enums # TODO project_id = 'Your Google Cloud Project ID' # TODO asset_names = 'Your asset names list, e.g.: # ["//storage.googleapis.com/[BUCKET_NAME]",]' client = asset_v1.AssetServiceClient() - parent = client.project_path(project_id) - content_type = enums.ContentType.RESOURCE - read_time_window = assets_pb2.TimeWindow() + parent = "projects/{}".format(project_id) + content_type = asset_v1.ContentType.RESOURCE + read_time_window = asset_v1.TimeWindow() response = client.batch_get_assets_history( - parent, content_type, read_time_window, asset_names) - print('assets: {}'.format(response.assets)) + request={ + "parent": parent, + "asset_names": asset_names, + "content_type": content_type, + "read_time_window": read_time_window, + } + ) + print("assets: {}".format(response.assets)) # [END asset_quickstart_batch_get_assets_history] -if __name__ == '__main__': +if __name__ == "__main__": parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter ) - parser.add_argument('project_id', help='Your Google Cloud project ID') + parser.add_argument("project_id", help="Your Google Cloud project ID") parser.add_argument( - 'asset_names', - help='The asset names for which history will be fetched, comma ' - 'delimited, e.g.: //storage.googleapis.com/[BUCKET_NAME]') + "asset_names", + help="The asset names for which history will be fetched, comma " + "delimited, e.g.: //storage.googleapis.com/[BUCKET_NAME]", + ) args = parser.parse_args() - asset_name_list = args.asset_names.split(',') + asset_name_list = args.asset_names.split(",") batch_get_assets_history(args.project_id, asset_name_list) diff --git a/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py b/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py index 275a97f17ff8..fd7622c19461 100644 --- a/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py +++ b/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py @@ -24,16 +24,16 @@ import quickstart_batchgetassetshistory -PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] -BUCKET = 'assets-{}'.format(uuid.uuid4().hex) +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] +BUCKET = "assets-{}".format(uuid.uuid4().hex) -@pytest.fixture(scope='module') +@pytest.fixture(scope="module") def storage_client(): yield storage.Client() -@pytest.fixture(scope='module') +@pytest.fixture(scope="module") def asset_bucket(storage_client): bucket = storage_client.create_bucket(BUCKET) @@ -42,20 +42,19 @@ def asset_bucket(storage_client): try: bucket.delete(force=True) except Exception as e: - print('Failed to delete bucket{}'.format(BUCKET)) + print("Failed to delete bucket{}".format(BUCKET)) raise e def test_batch_get_assets_history(asset_bucket, capsys): - bucket_asset_name = '//storage.googleapis.com/{}'.format(BUCKET) - asset_names = [bucket_asset_name, ] + bucket_asset_name = "//storage.googleapis.com/{}".format(BUCKET) + asset_names = [ + bucket_asset_name, + ] - @backoff.on_exception( - backoff.expo, (AssertionError, InvalidArgument), max_time=30 - ) + @backoff.on_exception(backoff.expo, (AssertionError, InvalidArgument), max_time=30) def eventually_consistent_test(): - quickstart_batchgetassetshistory.batch_get_assets_history( - PROJECT, asset_names) + quickstart_batchgetassetshistory.batch_get_assets_history(PROJECT, asset_names) out, _ = capsys.readouterr() assert bucket_asset_name in out diff --git a/asset/snippets/snippets/quickstart_createfeed.py b/asset/snippets/snippets/quickstart_createfeed.py index 7ee7b7e3e732..8e592bde19c2 100644 --- a/asset/snippets/snippets/quickstart_createfeed.py +++ b/asset/snippets/snippets/quickstart_createfeed.py @@ -21,7 +21,6 @@ def create_feed(project_id, feed_id, asset_names, topic): # [START asset_quickstart_create_feed] from google.cloud import asset_v1 - from google.cloud.asset_v1.proto import asset_service_pb2 # TODO project_id = 'Your Google Cloud Project ID' # TODO feed_id = 'Feed ID you want to create' @@ -30,23 +29,24 @@ def create_feed(project_id, feed_id, asset_names, topic): client = asset_v1.AssetServiceClient() parent = "projects/{}".format(project_id) - feed = asset_service_pb2.Feed() + feed = asset_v1.Feed() feed.asset_names.extend(asset_names) feed.feed_output_config.pubsub_destination.topic = topic - response = client.create_feed(parent, feed_id, feed) - print('feed: {}'.format(response)) + response = client.create_feed( + request={"parent": parent, "feed_id": feed_id, "feed": feed} + ) + print("feed: {}".format(response)) # [END asset_quickstart_create_feed] return response -if __name__ == '__main__': +if __name__ == "__main__": parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter) - parser.add_argument('project_id', help='Your Google Cloud project ID') - parser.add_argument('feed_id', help='Feed ID you want to create') - parser.add_argument('asset_names', - help='List of asset names the feed listen to') - parser.add_argument('topic', help='Topic name of the feed') + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("project_id", help="Your Google Cloud project ID") + parser.add_argument("feed_id", help="Feed ID you want to create") + parser.add_argument("asset_names", help="List of asset names the feed listen to") + parser.add_argument("topic", help="Topic name of the feed") args = parser.parse_args() create_feed(args.project_id, args.feed_id, args.asset_names, args.topic) diff --git a/asset/snippets/snippets/quickstart_createfeed_test.py b/asset/snippets/snippets/quickstart_createfeed_test.py index 89e993a43b8e..d53f11fa0c59 100644 --- a/asset/snippets/snippets/quickstart_createfeed_test.py +++ b/asset/snippets/snippets/quickstart_createfeed_test.py @@ -20,14 +20,15 @@ import quickstart_createfeed -PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] -ASSET_NAME = 'assets-{}'.format(uuid.uuid4().hex) -FEED_ID = 'feed-{}'.format(uuid.uuid4().hex) +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] +ASSET_NAME = "assets-{}".format(uuid.uuid4().hex) +FEED_ID = "feed-{}".format(uuid.uuid4().hex) def test_create_feed(capsys, test_topic, deleter): feed = quickstart_createfeed.create_feed( - PROJECT, FEED_ID, [ASSET_NAME, ], test_topic.name) + PROJECT, FEED_ID, [ASSET_NAME], test_topic.name + ) deleter.append(feed.name) out, _ = capsys.readouterr() assert "feed" in out diff --git a/asset/snippets/snippets/quickstart_deletefeed.py b/asset/snippets/snippets/quickstart_deletefeed.py index ff7145d34857..9aab54296424 100644 --- a/asset/snippets/snippets/quickstart_deletefeed.py +++ b/asset/snippets/snippets/quickstart_deletefeed.py @@ -25,15 +25,15 @@ def delete_feed(feed_name): # TODO feed_name = 'Feed name you want to delete' client = asset_v1.AssetServiceClient() - client.delete_feed(feed_name) - print('deleted_feed') + client.delete_feed(request={"name": feed_name}) + print("deleted_feed") # [END asset_quickstart_delete_feed] -if __name__ == '__main__': +if __name__ == "__main__": parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter) - parser.add_argument('feed_name', help='Feed name you want to delete') + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("feed_name", help="Feed name you want to delete") args = parser.parse_args() delete_feed(args.feed_name) diff --git a/asset/snippets/snippets/quickstart_deletefeed_test.py b/asset/snippets/snippets/quickstart_deletefeed_test.py index caa4dd0c94f6..3c5a113a8783 100644 --- a/asset/snippets/snippets/quickstart_deletefeed_test.py +++ b/asset/snippets/snippets/quickstart_deletefeed_test.py @@ -19,7 +19,7 @@ import quickstart_deletefeed -PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] def test_delete_feed(capsys, test_feed): diff --git a/asset/snippets/snippets/quickstart_exportassets.py b/asset/snippets/snippets/quickstart_exportassets.py index ddc05e5544e9..f9784a90f74e 100644 --- a/asset/snippets/snippets/quickstart_exportassets.py +++ b/asset/snippets/snippets/quickstart_exportassets.py @@ -21,31 +21,32 @@ def export_assets(project_id, dump_file_path): # [START asset_quickstart_export_assets] from google.cloud import asset_v1 - from google.cloud.asset_v1.proto import asset_service_pb2 # TODO project_id = 'Your Google Cloud Project ID' # TODO dump_file_path = 'Your asset dump file path' client = asset_v1.AssetServiceClient() - parent = client.project_path(project_id) - output_config = asset_service_pb2.OutputConfig() + parent = "projects/{}".format(project_id) + output_config = asset_v1.OutputConfig() output_config.gcs_destination.uri = dump_file_path - response = client.export_assets(parent, output_config) + response = client.export_assets( + request={"parent": parent, "output_config": output_config} + ) print(response.result()) # [END asset_quickstart_export_assets] -if __name__ == '__main__': +if __name__ == "__main__": parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter ) - parser.add_argument('project_id', help='Your Google Cloud project ID') + parser.add_argument("project_id", help="Your Google Cloud project ID") parser.add_argument( - 'dump_file_path', - help='The file ExportAssets API will dump assets to, ' - 'e.g.: gs:///asset_dump_file') + "dump_file_path", + help="The file ExportAssets API will dump assets to, " + "e.g.: gs:///asset_dump_file", + ) args = parser.parse_args() diff --git a/asset/snippets/snippets/quickstart_exportassets_test.py b/asset/snippets/snippets/quickstart_exportassets_test.py index 9ed8bbffd8b3..9c03d5d58a5b 100644 --- a/asset/snippets/snippets/quickstart_exportassets_test.py +++ b/asset/snippets/snippets/quickstart_exportassets_test.py @@ -22,16 +22,16 @@ import quickstart_exportassets -PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] -BUCKET = 'assets-{}'.format(uuid.uuid4().hex) +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] +BUCKET = "assets-{}".format(uuid.uuid4().hex) -@pytest.fixture(scope='module') +@pytest.fixture(scope="module") def storage_client(): yield storage.Client() -@pytest.fixture(scope='module') +@pytest.fixture(scope="module") def asset_bucket(storage_client): bucket = storage_client.create_bucket(BUCKET) @@ -40,12 +40,12 @@ def asset_bucket(storage_client): try: bucket.delete(force=True) except Exception as e: - print('Failed to delete bucket{}'.format(BUCKET)) + print("Failed to delete bucket{}".format(BUCKET)) raise e def test_export_assets(asset_bucket, capsys): - dump_file_path = 'gs://{}/assets-dump.txt'.format(asset_bucket) + dump_file_path = "gs://{}/assets-dump.txt".format(asset_bucket) quickstart_exportassets.export_assets(PROJECT, dump_file_path) out, _ = capsys.readouterr() diff --git a/asset/snippets/snippets/quickstart_getfeed.py b/asset/snippets/snippets/quickstart_getfeed.py index 8194155af867..aebe76217333 100644 --- a/asset/snippets/snippets/quickstart_getfeed.py +++ b/asset/snippets/snippets/quickstart_getfeed.py @@ -25,15 +25,15 @@ def get_feed(feed_name): # TODO feed_name = 'Feed Name you want to get' client = asset_v1.AssetServiceClient() - response = client.get_feed(feed_name) - print('gotten_feed: {}'.format(response)) + response = client.get_feed(request={"name": feed_name}) + print("gotten_feed: {}".format(response)) # [START asset_quickstart_get_feed] -if __name__ == '__main__': +if __name__ == "__main__": parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter) - parser.add_argument('feed_name', help='Feed Name you want to get') + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("feed_name", help="Feed Name you want to get") args = parser.parse_args() get_feed(args.feed_name) diff --git a/asset/snippets/snippets/quickstart_listassets.py b/asset/snippets/snippets/quickstart_listassets.py index c7d147d77ab2..9c5e191a2df1 100644 --- a/asset/snippets/snippets/quickstart_listassets.py +++ b/asset/snippets/snippets/quickstart_listassets.py @@ -21,7 +21,6 @@ def list_assets(project_id, asset_types, page_size): # [START asset_quickstart_list_assets] from google.cloud import asset_v1p5beta1 - from google.cloud.asset_v1p5beta1 import enums # TODO project_id = 'Your Google Cloud Project ID' # TODO asset_types = 'Your asset type list, e.g., @@ -29,38 +28,44 @@ def list_assets(project_id, asset_types, page_size): # TODO page_size = 'Num of assets in one page, which must be between 1 and # 1000 (both inclusively)' - project_resource = 'projects/{}'.format(project_id) - content_type = enums.ContentType.RESOURCE + project_resource = "projects/{}".format(project_id) + content_type = asset_v1p5beta1.ContentType.RESOURCE client = asset_v1p5beta1.AssetServiceClient() # Call ListAssets v1p5beta1 to list assets. response = client.list_assets( - parent=project_resource, read_time=None, asset_types=asset_types, - content_type=content_type, page_size=page_size) + request={ + "parent": project_resource, + "read_time": None, + "asset_types": asset_types, + "content_type": content_type, + "page_size": page_size, + } + ) - for page in response.pages: - for asset in page: - print(asset) + for asset in response: + print(asset) # [END asset_quickstart_list_assets] -if __name__ == '__main__': +if __name__ == "__main__": parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter ) - parser.add_argument('project_id', help='Your Google Cloud project ID') + parser.add_argument("project_id", help="Your Google Cloud project ID") parser.add_argument( - 'asset_types', - help='The types of the assets to list, comma delimited, e.g., ' - 'storage.googleapis.com/Bucket') + "asset_types", + help="The types of the assets to list, comma delimited, e.g., " + "storage.googleapis.com/Bucket", + ) parser.add_argument( - 'page_size', - help='Num of assets in one page, which must be between 1 and 1000 ' - '(both inclusively)') + "page_size", + help="Num of assets in one page, which must be between 1 and 1000 " + "(both inclusively)", + ) args = parser.parse_args() - asset_type_list = args.asset_types.split(',') + asset_type_list = args.asset_types.split(",") list_assets(args.project_id, asset_type_list, int(args.page_size)) diff --git a/asset/snippets/snippets/quickstart_listassets_test.py b/asset/snippets/snippets/quickstart_listassets_test.py index 971f227d9c98..da3f56a0e329 100644 --- a/asset/snippets/snippets/quickstart_listassets_test.py +++ b/asset/snippets/snippets/quickstart_listassets_test.py @@ -18,10 +18,12 @@ import quickstart_listassets -PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] def test_list_assets(capsys): - quickstart_listassets.list_assets(project_id=PROJECT, asset_types=["iam.googleapis.com/Role"], page_size=10) + quickstart_listassets.list_assets( + project_id=PROJECT, asset_types=["iam.googleapis.com/Role"], page_size=10 + ) out, _ = capsys.readouterr() - assert 'asset' in out + assert "asset" in out diff --git a/asset/snippets/snippets/quickstart_listfeeds.py b/asset/snippets/snippets/quickstart_listfeeds.py index 17731472d616..c432d358dbeb 100644 --- a/asset/snippets/snippets/quickstart_listfeeds.py +++ b/asset/snippets/snippets/quickstart_listfeeds.py @@ -25,17 +25,17 @@ def list_feeds(parent_resource): # TODO parent_resource = 'Parent resource you want to list all feeds' client = asset_v1.AssetServiceClient() - response = client.list_feeds(parent_resource) - print('feeds: {}'.format(response.feeds)) + response = client.list_feeds(request={"parent": parent_resource}) + print("feeds: {}".format(response.feeds)) # [END asset_quickstart_list_feeds] -if __name__ == '__main__': +if __name__ == "__main__": parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter) + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) parser.add_argument( - 'parent_resource', - help='Parent resource you want to list all feeds') + "parent_resource", help="Parent resource you want to list all feeds" + ) args = parser.parse_args() list_feeds(args.parent_resource) diff --git a/asset/snippets/snippets/quickstart_listfeeds_test.py b/asset/snippets/snippets/quickstart_listfeeds_test.py index a8982b7c774a..19c4429795d6 100644 --- a/asset/snippets/snippets/quickstart_listfeeds_test.py +++ b/asset/snippets/snippets/quickstart_listfeeds_test.py @@ -18,7 +18,7 @@ import quickstart_listfeeds -PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] def test_list_feeds(capsys): diff --git a/asset/snippets/snippets/quickstart_searchalliampolicies.py b/asset/snippets/snippets/quickstart_searchalliampolicies.py index 2a089913c513..3782ebb6c30b 100644 --- a/asset/snippets/snippets/quickstart_searchalliampolicies.py +++ b/asset/snippets/snippets/quickstart_searchalliampolicies.py @@ -28,25 +28,24 @@ def search_all_iam_policies(scope, query=None, page_size=None): client = asset_v1.AssetServiceClient() response = client.search_all_iam_policies( - scope, query=query, page_size=page_size) - for page in response.pages: - for policy in page: - print(policy) + request={"scope": scope, "query": query, "page_size": page_size} + ) + for policy in response: + print(policy) break # [END asset_quickstart_search_all_iam_policies] -if __name__ == '__main__': +if __name__ == "__main__": parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter) + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) parser.add_argument( - 'scope', - help='The search is limited to the resources within the scope.') - parser.add_argument('--query', help='The query statement.') + "scope", help="The search is limited to the resources within the scope." + ) + parser.add_argument("--query", help="The query statement.") parser.add_argument( - '--page_size', - type=int, - help='The page size for search result pagination.') + "--page_size", type=int, help="The page size for search result pagination." + ) args = parser.parse_args() search_all_iam_policies(args.scope, args.query, args.page_size) diff --git a/asset/snippets/snippets/quickstart_searchalliampolicies_test.py b/asset/snippets/snippets/quickstart_searchalliampolicies_test.py index e1068cb9149c..c9d313eaf84d 100644 --- a/asset/snippets/snippets/quickstart_searchalliampolicies_test.py +++ b/asset/snippets/snippets/quickstart_searchalliampolicies_test.py @@ -18,7 +18,7 @@ import quickstart_searchalliampolicies -PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] def test_search_all_iam_policies(capsys): diff --git a/asset/snippets/snippets/quickstart_searchallresources.py b/asset/snippets/snippets/quickstart_searchallresources.py index 56c7ac44042a..afecca7b335c 100644 --- a/asset/snippets/snippets/quickstart_searchallresources.py +++ b/asset/snippets/snippets/quickstart_searchallresources.py @@ -18,11 +18,9 @@ import argparse -def search_all_resources(scope, - query=None, - asset_types=None, - page_size=None, - order_by=None): +def search_all_resources( + scope, query=None, asset_types=None, page_size=None, order_by=None +): # [START asset_quickstart_search_all_resources] from google.cloud import asset_v1 @@ -34,35 +32,38 @@ def search_all_resources(scope, client = asset_v1.AssetServiceClient() response = client.search_all_resources( - scope, - query=query, - asset_types=asset_types, - page_size=page_size, - order_by=order_by) - for page in response.pages: - for resource in page: - print(resource) + request={ + "scope": scope, + "query": query, + "asset_types": asset_types, + "page_size": page_size, + "order_by": order_by, + } + ) + for resource in response: + print(resource) break # [END asset_quickstart_search_all_resources] -if __name__ == '__main__': +if __name__ == "__main__": parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter) + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) parser.add_argument( - 'scope', - help='The search is limited to the resources within the scope.') - parser.add_argument('--query', help='The query statement.') + "scope", help="The search is limited to the resources within the scope." + ) + parser.add_argument("--query", help="The query statement.") parser.add_argument( - '--asset_types', nargs='+', help='A list of asset types to search for.') + "--asset_types", nargs="+", help="A list of asset types to search for." + ) parser.add_argument( - '--page_size', - type=int, - help='The page size for search result pagination.') + "--page_size", type=int, help="The page size for search result pagination." + ) parser.add_argument( - '--order_by', - help='Fields specifying the sorting order of the results.') + "--order_by", help="Fields specifying the sorting order of the results." + ) args = parser.parse_args() - search_all_resources(args.scope, args.query, args.asset_types, - args.page_size, args.order_by) + search_all_resources( + args.scope, args.query, args.asset_types, args.page_size, args.order_by + ) diff --git a/asset/snippets/snippets/quickstart_searchallresources_test.py b/asset/snippets/snippets/quickstart_searchallresources_test.py index ff4724829ddc..e594a72a3454 100644 --- a/asset/snippets/snippets/quickstart_searchallresources_test.py +++ b/asset/snippets/snippets/quickstart_searchallresources_test.py @@ -24,16 +24,16 @@ import quickstart_searchallresources -PROJECT = os.environ['GOOGLE_CLOUD_PROJECT'] -DATASET = 'dataset_{}'.format(uuid.uuid4().hex) +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] +DATASET = "dataset_{}".format(uuid.uuid4().hex) -@pytest.fixture(scope='module') +@pytest.fixture(scope="module") def bigquery_client(): yield bigquery.Client() -@pytest.fixture(scope='module') +@pytest.fixture(scope="module") def asset_dataset(bigquery_client): dataset = bigquery_client.create_dataset(DATASET) @@ -42,7 +42,7 @@ def asset_dataset(bigquery_client): try: bigquery_client.delete_dataset(dataset) except NotFound as e: - print('Failed to delete dataset {}'.format(DATASET)) + print("Failed to delete dataset {}".format(DATASET)) raise e @@ -52,9 +52,7 @@ def test_search_all_resources(asset_dataset, capsys): # Dataset creation takes some time to propagate, so the dataset is not # immediately searchable. Need some time before the snippet will pass. - @backoff.on_exception( - backoff.expo, (AssertionError), max_time=120 - ) + @backoff.on_exception(backoff.expo, (AssertionError), max_time=120) def eventually_consistent_test(): quickstart_searchallresources.search_all_resources(scope, query=query) out, _ = capsys.readouterr() diff --git a/asset/snippets/snippets/quickstart_updatefeed.py b/asset/snippets/snippets/quickstart_updatefeed.py index 2f776826b04f..3ad638ecc694 100644 --- a/asset/snippets/snippets/quickstart_updatefeed.py +++ b/asset/snippets/snippets/quickstart_updatefeed.py @@ -21,29 +21,28 @@ def update_feed(feed_name, topic): # [START asset_quickstart_update_feed] from google.cloud import asset_v1 - from google.cloud.asset_v1.proto import asset_service_pb2 from google.protobuf import field_mask_pb2 # TODO feed_name = 'Feed Name you want to update' # TODO topic = "Topic name you want to update with" client = asset_v1.AssetServiceClient() - feed = asset_service_pb2.Feed() + feed = asset_v1.Feed() feed.name = feed_name feed.feed_output_config.pubsub_destination.topic = topic update_mask = field_mask_pb2.FieldMask() # In this example, we update topic of the feed update_mask.paths.append("feed_output_config.pubsub_destination.topic") - response = client.update_feed(feed, update_mask) - print('updated_feed: {}'.format(response)) + response = client.update_feed(request={"feed": feed, "update_mask": update_mask}) + print("updated_feed: {}".format(response)) # [END asset_quickstart_update_feed] -if __name__ == '__main__': +if __name__ == "__main__": parser = argparse.ArgumentParser( - description=__doc__, - formatter_class=argparse.RawDescriptionHelpFormatter) - parser.add_argument('feed_name', help='Feed Name you want to update') - parser.add_argument('topic', help='Topic name you want to update with') + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("feed_name", help="Feed Name you want to update") + parser.add_argument("topic", help="Topic name you want to update with") args = parser.parse_args() update_feed(args.feed_name, args.topic) From 016bfa050f007d46d14d716ed257b0b5be411418 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 Aug 2020 18:49:32 +0200 Subject: [PATCH 045/235] chore(deps): update dependency google-cloud-asset to v2 (#69) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 9623430a983b..f5a49a69e754 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.29.0 -google-cloud-asset==1.3.0 +google-cloud-asset==2.0.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 google-cloud-bigquery==1.25.0 From ddc4a64b9a41088a39b90737d0c6bf3161f6d855 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 Aug 2020 18:58:03 +0200 Subject: [PATCH 046/235] chore(deps): update dependency google-cloud-storage to v1.30.0 (#63) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [google-cloud-storage](https://togithub.com/googleapis/python-storage) | minor | `==1.29.0` -> `==1.30.0` | --- ### Release Notes
googleapis/python-storage ### [`v1.30.0`](https://togithub.com/googleapis/python-storage/blob/master/CHANGELOG.md#​1300-httpswwwgithubcomgoogleapispython-storagecomparev1290v1300-2020-07-24) [Compare Source](https://togithub.com/googleapis/python-storage/compare/v1.29.0...v1.30.0) ##### Features - add timeouts to Blob methods where missing ([#​185](https://www.github.com/googleapis/python-storage/issues/185)) ([6eeb855](https://www.github.com/googleapis/python-storage/commit/6eeb855aa0e6a7835d1d4f6e72951e43af22ab57)) - auto-populate standard headers for non-chunked downloads ([#​204](https://www.github.com/googleapis/python-storage/issues/204)) ([d8432cd](https://www.github.com/googleapis/python-storage/commit/d8432cd65a4e9b38eebd1ade2ff00f2f44bb0ef6)), closes [#​24](https://www.github.com/googleapis/python-storage/issues/24) - migrate to Service Account Credentials API ([#​189](https://www.github.com/googleapis/python-storage/issues/189)) ([e4990d0](https://www.github.com/googleapis/python-storage/commit/e4990d06043dbd8d1a417f3a1a67fe8746071f1c)) ##### Bug Fixes - add multiprocessing.rst to synthool excludes ([#​186](https://www.github.com/googleapis/python-storage/issues/186)) ([4d76e38](https://www.github.com/googleapis/python-storage/commit/4d76e3882210ed2818a43256265f6df31348d410)) ##### Documentation - fix indent in code blocks ([#​171](https://www.github.com/googleapis/python-storage/issues/171)) ([62d1543](https://www.github.com/googleapis/python-storage/commit/62d1543e18040b286b23464562aa6eb998074c54)), closes [#​170](https://www.github.com/googleapis/python-storage/issues/170) - remove doubled word in docstring ([#​209](https://www.github.com/googleapis/python-storage/issues/209)) ([7a4e7a5](https://www.github.com/googleapis/python-storage/commit/7a4e7a5974abedb0b7b2e110cacbfcd0a40346b6)) ##### Documentation - fix indent in code blocks ([#​171](https://www.github.com/googleapis/python-storage/issues/171)) ([62d1543](https://www.github.com/googleapis/python-storage/commit/62d1543e18040b286b23464562aa6eb998074c54)), closes [#​170](https://www.github.com/googleapis/python-storage/issues/170) - remove doubled word in docstring ([#​209](https://www.github.com/googleapis/python-storage/issues/209)) ([7a4e7a5](https://www.github.com/googleapis/python-storage/commit/7a4e7a5974abedb0b7b2e110cacbfcd0a40346b6)) ##### Dependencies - prep for grmp-1.0.0 release ([#​211](https://www.github.com/googleapis/python-storage/issues/211)) ([55bae9a](https://www.github.com/googleapis/python-storage/commit/55bae9a0e7c0db512c10c6b3b621cd2ef05c9729))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index f5a49a69e754..770d12805b31 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.29.0 +google-cloud-storage==1.30.0 google-cloud-asset==2.0.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 From 054a302f64302f847ce727fdf57948d7a3cc99df Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 Aug 2020 19:06:03 +0200 Subject: [PATCH 047/235] chore(deps): update dependency google-cloud-bigquery to v1.26.1 (#62) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [google-cloud-bigquery](https://togithub.com/googleapis/python-bigquery) | minor | `==1.25.0` -> `==1.26.1` | --- ### Release Notes
googleapis/python-bigquery ### [`v1.26.1`](https://togithub.com/googleapis/python-bigquery/blob/master/CHANGELOG.md#​1261-httpswwwgithubcomgoogleapispython-bigquerycomparev1260v1261-2020-07-25) [Compare Source](https://togithub.com/googleapis/python-bigquery/compare/v1.26.0...v1.26.1) ### [`v1.26.0`](https://togithub.com/googleapis/python-bigquery/blob/master/CHANGELOG.md#​1260-httpswwwgithubcomgoogleapispython-bigquerycomparev1250v1260-2020-07-20) [Compare Source](https://togithub.com/googleapis/python-bigquery/compare/v1.25.0...v1.26.0) ##### Features - use BigQuery Storage client by default (if dependencies available) ([#​55](https://www.github.com/googleapis/python-bigquery/issues/55)) ([e75ff82](https://www.github.com/googleapis/python-bigquery/commit/e75ff8297c65981545b097f75a17cf9e78ac6772)), closes [#​91](https://www.github.com/googleapis/python-bigquery/issues/91) - **bigquery:** add **eq** method for class PartitionRange and RangePartitioning ([#​162](https://www.github.com/googleapis/python-bigquery/issues/162)) ([0d2a88d](https://www.github.com/googleapis/python-bigquery/commit/0d2a88d8072154cfc9152afd6d26a60ddcdfbc73)) - **bigquery:** expose date_as_object parameter to users ([#​150](https://www.github.com/googleapis/python-bigquery/issues/150)) ([a2d5ce9](https://www.github.com/googleapis/python-bigquery/commit/a2d5ce9e97992318d7dc85c51c053cab74e25a11)) - **bigquery:** expose date_as_object parameter to users ([#​150](https://www.github.com/googleapis/python-bigquery/issues/150)) ([cbd831e](https://www.github.com/googleapis/python-bigquery/commit/cbd831e08024a67148723afd49e1db085e0a862c)) ##### Bug Fixes - dry run queries with DB API cursor ([#​128](https://www.github.com/googleapis/python-bigquery/issues/128)) ([bc33a67](https://www.github.com/googleapis/python-bigquery/commit/bc33a678a765f0232615aa2038b8cc67c88468a0)) - omit `NaN` values when uploading from `insert_rows_from_dataframe` ([#​170](https://www.github.com/googleapis/python-bigquery/issues/170)) ([f9f2f45](https://www.github.com/googleapis/python-bigquery/commit/f9f2f45bc009c03cd257441bd4b6beb1754e2177)) ##### Documentation - **bigquery:** add client thread-safety documentation ([#​132](https://www.github.com/googleapis/python-bigquery/issues/132)) ([fce76b3](https://www.github.com/googleapis/python-bigquery/commit/fce76b3776472b1da798df862a3405e659e35bab)) - **bigquery:** add docstring for conflict exception ([#​171](https://www.github.com/googleapis/python-bigquery/issues/171)) ([9c3409b](https://www.github.com/googleapis/python-bigquery/commit/9c3409bb06218bf499620544f8e92802df0cce47)) - **bigquery:** consistent use of optional keyword ([#​153](https://www.github.com/googleapis/python-bigquery/issues/153)) ([79d8c61](https://www.github.com/googleapis/python-bigquery/commit/79d8c61064cca18b596a24b6f738c7611721dd5c)) - **bigquery:** fix the broken docs ([#​139](https://www.github.com/googleapis/python-bigquery/issues/139)) ([3235255](https://www.github.com/googleapis/python-bigquery/commit/3235255cc5f483949f34d2e8ef13b372e8713782))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 770d12805b31..672fec9436c7 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.30.0 google-cloud-asset==2.0.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 -google-cloud-bigquery==1.25.0 +google-cloud-bigquery==1.26.1 From bd0020c80ef5a008edc962712b3b67842c823a1a Mon Sep 17 00:00:00 2001 From: lvvvvvf <53883181+lvvvvvf@users.noreply.github.com> Date: Mon, 17 Aug 2020 15:05:11 -0700 Subject: [PATCH 048/235] samples: Add export to BigQuery (#70) --- .../snippets/quickstart_exportassets.py | 26 +++++++++++++++++ .../snippets/quickstart_exportassets_test.py | 29 +++++++++++++++++-- 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/quickstart_exportassets.py b/asset/snippets/snippets/quickstart_exportassets.py index f9784a90f74e..0d9c30664fd4 100644 --- a/asset/snippets/snippets/quickstart_exportassets.py +++ b/asset/snippets/snippets/quickstart_exportassets.py @@ -36,6 +36,32 @@ def export_assets(project_id, dump_file_path): # [END asset_quickstart_export_assets] +def export_assets_bigquery(project_id, dataset, table): + # [START asset_quickstart_export_assets_bigquery] + from google.cloud import asset_v1 + + # TODO project_id = 'Your Google Cloud Project ID' + # TODO dataset = 'Your BigQuery dataset path' + # TODO table = 'Your BigQuery table name' + + client = asset_v1.AssetServiceClient() + parent = "projects/{}".format(project_id) + content_type = asset_v1.ContentType.RESOURCE + output_config = asset_v1.OutputConfig() + output_config.bigquery_destination.dataset = dataset + output_config.bigquery_destination.table = table + output_config.bigquery_destination.force = True + response = client.export_assets( + request={ + "parent": parent, + "content_type": content_type, + "output_config": output_config + } + ) + print(response.result()) + # [END asset_quickstart_export_assets_bigquery] + + if __name__ == "__main__": parser = argparse.ArgumentParser( diff --git a/asset/snippets/snippets/quickstart_exportassets_test.py b/asset/snippets/snippets/quickstart_exportassets_test.py index 9c03d5d58a5b..af7cc07399af 100644 --- a/asset/snippets/snippets/quickstart_exportassets_test.py +++ b/asset/snippets/snippets/quickstart_exportassets_test.py @@ -17,6 +17,7 @@ import os import uuid +from google.cloud import bigquery from google.cloud import storage import pytest @@ -24,6 +25,7 @@ PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] BUCKET = "assets-{}".format(uuid.uuid4().hex) +DATASET = "assets_{}".format(int(uuid.uuid4())) @pytest.fixture(scope="module") @@ -31,6 +33,11 @@ def storage_client(): yield storage.Client() +@pytest.fixture(scope="module") +def bigquery_client(): + yield bigquery.Client() + + @pytest.fixture(scope="module") def asset_bucket(storage_client): bucket = storage_client.create_bucket(BUCKET) @@ -44,9 +51,27 @@ def asset_bucket(storage_client): raise e -def test_export_assets(asset_bucket, capsys): +@pytest.fixture(scope='module') +def dataset(bigquery_client): + dataset_id = "{}.{}".format(PROJECT, DATASET) + dataset = bigquery.Dataset(dataset_id) + dataset.location = "US" + dataset = bigquery_client.create_dataset(dataset) + + yield DATASET + + bigquery_client.delete_dataset( + dataset_id, delete_contents=True, not_found_ok=False) + + +def test_export_assets(asset_bucket, dataset, capsys): dump_file_path = "gs://{}/assets-dump.txt".format(asset_bucket) quickstart_exportassets.export_assets(PROJECT, dump_file_path) out, _ = capsys.readouterr() - assert dump_file_path in out + + dataset_id = "projects/{}/datasets/{}".format(PROJECT, dataset) + quickstart_exportassets.export_assets_bigquery( + PROJECT, dataset_id, "assettable") + out, _ = capsys.readouterr() + assert dataset_id in out From 2a295abeebf4a2255769a0ab118269e95f170bde Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 9 Sep 2020 17:50:49 +0000 Subject: [PATCH 049/235] fix(sample): mark a test with flaky (#81) fixes #75 --- asset/snippets/snippets/quickstart_searchallresources_test.py | 1 + asset/snippets/snippets/requirements-test.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/asset/snippets/snippets/quickstart_searchallresources_test.py b/asset/snippets/snippets/quickstart_searchallresources_test.py index e594a72a3454..f27eeb3b39c1 100644 --- a/asset/snippets/snippets/quickstart_searchallresources_test.py +++ b/asset/snippets/snippets/quickstart_searchallresources_test.py @@ -46,6 +46,7 @@ def asset_dataset(bigquery_client): raise e +@pytest.mark.flaky(max_runs=3, min_passes=1) def test_search_all_resources(asset_dataset, capsys): scope = "projects/{}".format(PROJECT) query = "name:{}".format(DATASET) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index 678aa129fb4f..bd6c79990493 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,2 +1,3 @@ backoff==1.10.0 +flaky==3.7.0 pytest==5.4.3 From daa598c1b6854d8b769f6f76c584f30edd165228 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 18 Sep 2020 00:22:06 +0200 Subject: [PATCH 050/235] chore(deps): update dependency google-cloud-bigquery to v1.27.2 (#74) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [google-cloud-bigquery](https://togithub.com/googleapis/python-bigquery) | minor | `==1.26.1` -> `==1.27.2` | --- ### Release Notes
googleapis/python-bigquery ### [`v1.27.2`](https://togithub.com/googleapis/python-bigquery/blob/master/CHANGELOG.md#​1272-httpswwwgithubcomgoogleapispython-bigquerycomparev1271v1272-2020-08-18) [Compare Source](https://togithub.com/googleapis/python-bigquery/compare/v1.26.1...v1.27.2)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 672fec9436c7..c3f3463f3a65 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.30.0 google-cloud-asset==2.0.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 -google-cloud-bigquery==1.26.1 +google-cloud-bigquery==1.27.2 From f78522db2d8e3176c73c27ba4cf2c8bc2b7bc08e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 18 Sep 2020 00:34:02 +0200 Subject: [PATCH 051/235] chore(deps): update dependency google-cloud-storage to v1.31.0 (#77) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [google-cloud-storage](https://togithub.com/googleapis/python-storage) | minor | `==1.30.0` -> `==1.31.0` | --- ### Release Notes
googleapis/python-storage ### [`v1.31.0`](https://togithub.com/googleapis/python-storage/blob/master/CHANGELOG.md#​1310-httpswwwgithubcomgoogleapispython-storagecomparev1300v1310-2020-08-26) [Compare Source](https://togithub.com/googleapis/python-storage/compare/v1.30.0...v1.31.0) ##### Features - add configurable checksumming for blob uploads and downloads ([#​246](https://www.github.com/googleapis/python-storage/issues/246)) ([23b7d1c](https://www.github.com/googleapis/python-storage/commit/23b7d1c3155deae3c804c510dee3a7cec97cd46c)) - add support for 'Blob.custom_time' and lifecycle rules ([#​199](https://www.github.com/googleapis/python-storage/issues/199)) ([180873d](https://www.github.com/googleapis/python-storage/commit/180873de139f7f8e00b7bef423bc15760cf68cc2)) - error message return from api ([#​235](https://www.github.com/googleapis/python-storage/issues/235)) ([a8de586](https://www.github.com/googleapis/python-storage/commit/a8de5868f32b45868f178f420138fcd2fe42f5fd)) - **storage:** add support of daysSinceNoncurrentTime and noncurrentTimeBefore ([#​162](https://www.github.com/googleapis/python-storage/issues/162)) ([136c097](https://www.github.com/googleapis/python-storage/commit/136c0970f8ef7ad4751104e3b8b7dd3204220a67)) - pass 'client_options' to base class ctor ([#​225](https://www.github.com/googleapis/python-storage/issues/225)) ([e1f91fc](https://www.github.com/googleapis/python-storage/commit/e1f91fcca6c001bc3b0c5f759a7a003fcf60c0a6)), closes [#​210](https://www.github.com/googleapis/python-storage/issues/210) - rename 'Blob.download_as_{string,bytes}', add 'Blob.download_as_text' ([#​182](https://www.github.com/googleapis/python-storage/issues/182)) ([73107c3](https://www.github.com/googleapis/python-storage/commit/73107c35f23c4a358e957c2b8188300a7fa958fe)) ##### Bug Fixes - change datetime.now to utcnow ([#​251](https://www.github.com/googleapis/python-storage/issues/251)) ([3465d08](https://www.github.com/googleapis/python-storage/commit/3465d08e098edb250dee5e97d1fb9ded8bae5700)), closes [#​228](https://www.github.com/googleapis/python-storage/issues/228) - extract hashes correctly during download ([#​238](https://www.github.com/googleapis/python-storage/issues/238)) ([23cfb65](https://www.github.com/googleapis/python-storage/commit/23cfb65c3a3b10759c67846e162e4ed77a3f5307)) - repair mal-formed docstring ([#​255](https://www.github.com/googleapis/python-storage/issues/255)) ([e722376](https://www.github.com/googleapis/python-storage/commit/e722376371cb8a3acc46d6c84fb41f4e874f41aa)) ##### Documentation - update docs build (via synth) ([#​222](https://www.github.com/googleapis/python-storage/issues/222)) ([4c5adfa](https://www.github.com/googleapis/python-storage/commit/4c5adfa6e05bf018d72ee1a7e99679fd55f2c662))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index c3f3463f3a65..769f1da86aef 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.30.0 +google-cloud-storage==1.31.0 google-cloud-asset==2.0.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 From 6155be92ac7c049e45cc3637914974d46f7cd757 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 18 Sep 2020 16:07:32 -0700 Subject: [PATCH 052/235] feat: add support for per type and partition export (#86) --- asset/snippets/snippets/noxfile.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 5660f08be441..ba55d7ce53ca 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -37,22 +37,24 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7"], + 'ignored_versions': ["2.7"], + # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", + 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', + # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. - "envs": {}, + 'envs': {}, } try: # Ensure we can import noxfile_config in the project's directory. - sys.path.append(".") + sys.path.append('.') from noxfile_config import TEST_CONFIG_OVERRIDE except ImportError as e: print("No user noxfile_config found: detail: {}".format(e)) @@ -67,12 +69,12 @@ def get_pytest_env_vars(): ret = {} # Override the GCLOUD_PROJECT and the alias. - env_key = TEST_CONFIG["gcloud_project_env"] + env_key = TEST_CONFIG['gcloud_project_env'] # This should error out if not set. - ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key] + ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] # Apply user supplied envs. - ret.update(TEST_CONFIG["envs"]) + ret.update(TEST_CONFIG['envs']) return ret @@ -81,7 +83,7 @@ def get_pytest_env_vars(): ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8"] # Any default versions that should be ignored. -IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] +IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) @@ -136,7 +138,7 @@ def lint(session): args = FLAKE8_COMMON_ARGS + [ "--application-import-names", ",".join(local_names), - ".", + "." ] session.run("flake8", *args) @@ -180,9 +182,9 @@ def py(session): if session.python in TESTED_VERSIONS: _session_tests(session) else: - session.skip( - "SKIPPED: {} tests are disabled for this sample.".format(session.python) - ) + session.skip("SKIPPED: {} tests are disabled for this sample.".format( + session.python + )) # From f2885353f5733718935c49f37f303e5f537b4990 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 25 Sep 2020 18:08:03 +0200 Subject: [PATCH 053/235] chore(deps): update dependency google-cloud-bigquery to v1.28.0 (#94) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [google-cloud-bigquery](https://togithub.com/googleapis/python-bigquery) | minor | `==1.27.2` -> `==1.28.0` | --- ### Release Notes
googleapis/python-bigquery ### [`v1.28.0`](https://togithub.com/googleapis/python-bigquery/blob/master/CHANGELOG.md#​1280-httpswwwgithubcomgoogleapispython-bigquerycomparev1272v1280-2020-09-22) [Compare Source](https://togithub.com/googleapis/python-bigquery/compare/v1.27.2...v1.28.0) ##### Features - add custom cell magic parser to handle complex `--params` values ([#​213](https://www.github.com/googleapis/python-bigquery/issues/213)) ([dcfbac2](https://www.github.com/googleapis/python-bigquery/commit/dcfbac267fbf66d189b0cc7e76f4712122a74b7b)) - add instrumentation to list methods ([#​239](https://www.github.com/googleapis/python-bigquery/issues/239)) ([fa9f9ca](https://www.github.com/googleapis/python-bigquery/commit/fa9f9ca491c3f9954287102c567ec483aa6151d4)) - add opentelemetry tracing ([#​215](https://www.github.com/googleapis/python-bigquery/issues/215)) ([a04996c](https://www.github.com/googleapis/python-bigquery/commit/a04996c537e9d8847411fcbb1b05da5f175b339e)) - expose require_partition_filter for hive_partition ([#​257](https://www.github.com/googleapis/python-bigquery/issues/257)) ([aa1613c](https://www.github.com/googleapis/python-bigquery/commit/aa1613c1bf48c7efb999cb8b8c422c80baf1950b)) ##### Bug Fixes - fix dependency issue in fastavro ([#​241](https://www.github.com/googleapis/python-bigquery/issues/241)) ([2874abf](https://www.github.com/googleapis/python-bigquery/commit/2874abf4827f1ea529519d4b138511d31f732a50)) - update minimum dependency versions ([#​263](https://www.github.com/googleapis/python-bigquery/issues/263)) ([1be66ce](https://www.github.com/googleapis/python-bigquery/commit/1be66ce94a32b1f924bdda05d068c2977631af9e)) - validate job_config.source_format in load_table_from_dataframe ([#​262](https://www.github.com/googleapis/python-bigquery/issues/262)) ([6160fee](https://www.github.com/googleapis/python-bigquery/commit/6160fee4b1a79b0ea9031cc18caf6322fe4c4084)) ##### Documentation - recommend insert_rows_json to avoid call to tables.get ([#​258](https://www.github.com/googleapis/python-bigquery/issues/258)) ([ae647eb](https://www.github.com/googleapis/python-bigquery/commit/ae647ebd68deff6e30ca2cffb5b7422c6de4940b)) ##### [1.27.2](https://www.github.com/googleapis/python-bigquery/compare/v1.27.1...v1.27.2) (2020-08-18) ##### Bug Fixes - rationalize platform constraints for 'pyarrow' extra ([#​235](https://www.github.com/googleapis/python-bigquery/issues/235)) ([c9a0567](https://www.github.com/googleapis/python-bigquery/commit/c9a0567f59491b769a9e2fd535430423e39d4fa8)) ##### [1.27.1](https://www.github.com/googleapis/python-bigquery/compare/v1.27.0...v1.27.1) (2020-08-18) ##### Bug Fixes - tweak pyarrow extra to soothe PyPI ([#​230](https://www.github.com/googleapis/python-bigquery/issues/230)) ([c15efbd](https://www.github.com/googleapis/python-bigquery/commit/c15efbd1ee4488898fc862768eef701443f492f6))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 769f1da86aef..b3a3715578d5 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.31.0 google-cloud-asset==2.0.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 -google-cloud-bigquery==1.27.2 +google-cloud-bigquery==1.28.0 From 924213a93bd4322c8818fb4b2f04006aabe568b1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 28 Sep 2020 20:50:25 +0200 Subject: [PATCH 054/235] chore(deps): update dependency google-cloud-asset to v2.1.0 (#100) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index b3a3715578d5..482a4c15164e 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.31.0 -google-cloud-asset==2.0.0 +google-cloud-asset==2.1.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 google-cloud-bigquery==1.28.0 From b8f1a47441b8a50f1c9b55a6b4ad6787d3f33c33 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 29 Sep 2020 21:45:49 +0200 Subject: [PATCH 055/235] chore(deps): update dependency google-cloud-storage to v1.31.2 (#89) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 482a4c15164e..979dce49f11b 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.31.0 +google-cloud-storage==1.31.2 google-cloud-asset==2.1.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 From eb237a678abd94ccd690030ab0515532c1e3a379 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 13 Oct 2020 22:07:12 +0200 Subject: [PATCH 056/235] chore(deps): update dependency google-cloud-bigquery to v2 (#101) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 979dce49f11b..8786cc7e2584 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.31.2 google-cloud-asset==2.1.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 -google-cloud-bigquery==1.28.0 +google-cloud-bigquery==2.1.0 From a9eb38723a916e2524f13d4ad2ac5b9bb2c6b9af Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 23 Oct 2020 20:48:05 +0200 Subject: [PATCH 057/235] chore(deps): update dependency google-cloud-storage to v1.32.0 (#103) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 8786cc7e2584..460c4429589f 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.31.2 +google-cloud-storage==1.32.0 google-cloud-asset==2.1.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 From 6d627f9f0868f9329169c5196d722655b02e31e3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Oct 2020 19:32:10 +0100 Subject: [PATCH 058/235] chore(deps): update dependency google-cloud-bigquery to v2.2.0 (#102) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [google-cloud-bigquery](https://togithub.com/googleapis/python-bigquery) | minor | `==2.1.0` -> `==2.2.0` | --- ### Release Notes
googleapis/python-bigquery ### [`v2.2.0`](https://togithub.com/googleapis/python-bigquery/blob/master/CHANGELOG.md#​220-httpswwwgithubcomgoogleapispython-bigquerycomparev210v220-2020-10-19) [Compare Source](https://togithub.com/googleapis/python-bigquery/compare/v2.1.0...v2.2.0) ##### Features - add method api_repr for table list item ([#​299](https://www.github.com/googleapis/python-bigquery/issues/299)) ([07c70f0](https://www.github.com/googleapis/python-bigquery/commit/07c70f0292f9212f0c968cd5c9206e8b0409c0da)) - add support for listing arima, automl, boosted tree, DNN, and matrix factorization models ([#​328](https://www.github.com/googleapis/python-bigquery/issues/328)) ([502a092](https://www.github.com/googleapis/python-bigquery/commit/502a0926018abf058cb84bd18043c25eba15a2cc)) - add timeout paramter to load_table_from_file and it dependent methods ([#​327](https://www.github.com/googleapis/python-bigquery/issues/327)) ([b0dd892](https://www.github.com/googleapis/python-bigquery/commit/b0dd892176e31ac25fddd15554b5bfa054299d4d)) - add to_api_repr method to Model ([#​326](https://www.github.com/googleapis/python-bigquery/issues/326)) ([fb401bd](https://www.github.com/googleapis/python-bigquery/commit/fb401bd94477323bba68cf252dd88166495daf54)) - allow client options to be set in magics context ([#​322](https://www.github.com/googleapis/python-bigquery/issues/322)) ([5178b55](https://www.github.com/googleapis/python-bigquery/commit/5178b55682f5e264bfc082cde26acb1fdc953a18)) ##### Bug Fixes - make TimePartitioning repr evaluable ([#​110](https://www.github.com/googleapis/python-bigquery/issues/110)) ([20f473b](https://www.github.com/googleapis/python-bigquery/commit/20f473bfff5ae98377f5d9cdf18bfe5554d86ff4)), closes [#​109](https://www.github.com/googleapis/python-bigquery/issues/109) - use version.py instead of pkg_resources.get_distribution ([#​307](https://www.github.com/googleapis/python-bigquery/issues/307)) ([b8f502b](https://www.github.com/googleapis/python-bigquery/commit/b8f502b14f21d1815697e4d57cf1225dfb4a7c5e)) ##### Performance Improvements - add size parameter for load table from dataframe and json methods ([#​280](https://www.github.com/googleapis/python-bigquery/issues/280)) ([3be78b7](https://www.github.com/googleapis/python-bigquery/commit/3be78b737add7111e24e912cd02fc6df75a07de6)) ##### Documentation - update clustering field docstrings ([#​286](https://www.github.com/googleapis/python-bigquery/issues/286)) ([5ea1ece](https://www.github.com/googleapis/python-bigquery/commit/5ea1ece2d911cdd1f3d9549ee01559ce8ed8269a)), closes [#​285](https://www.github.com/googleapis/python-bigquery/issues/285) - update snippets samples to support version 2.0 ([#​309](https://www.github.com/googleapis/python-bigquery/issues/309)) ([61634be](https://www.github.com/googleapis/python-bigquery/commit/61634be9bf9e3df7589fc1bfdbda87288859bb13)) ##### Dependencies - add protobuf dependency ([#​306](https://www.github.com/googleapis/python-bigquery/issues/306)) ([cebb5e0](https://www.github.com/googleapis/python-bigquery/commit/cebb5e0e911e8c9059bc8c9e7fce4440e518bff3)), closes [#​305](https://www.github.com/googleapis/python-bigquery/issues/305) - require pyarrow for pandas support ([#​314](https://www.github.com/googleapis/python-bigquery/issues/314)) ([801e4c0](https://www.github.com/googleapis/python-bigquery/commit/801e4c0574b7e421aa3a28cafec6fd6bcce940dd)), closes [#​265](https://www.github.com/googleapis/python-bigquery/issues/265)
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 460c4429589f..81e912a570c1 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.32.0 google-cloud-asset==2.1.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 -google-cloud-bigquery==2.1.0 +google-cloud-bigquery==2.2.0 From 2b3bc843a2cbef3d522a82349f6a398a39e3dd1e Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 11 Nov 2020 16:23:03 -0800 Subject: [PATCH 059/235] testing(sample): fix broken tests (#108) * testing(sample): fix broken tests fixes #104 fixes #105 * explicitly specify the project id on bucket creation longer timeout --- .../snippets/quickstart_batchgetassetshistory_test.py | 6 +++--- .../snippets/snippets/quickstart_searchallresources_test.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py b/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py index fd7622c19461..1bb483ebead7 100644 --- a/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py +++ b/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py @@ -30,12 +30,12 @@ @pytest.fixture(scope="module") def storage_client(): - yield storage.Client() + yield storage.Client(project=PROJECT) @pytest.fixture(scope="module") def asset_bucket(storage_client): - bucket = storage_client.create_bucket(BUCKET) + bucket = storage_client.create_bucket(BUCKET, project=PROJECT) yield BUCKET @@ -52,7 +52,7 @@ def test_batch_get_assets_history(asset_bucket, capsys): bucket_asset_name, ] - @backoff.on_exception(backoff.expo, (AssertionError, InvalidArgument), max_time=30) + @backoff.on_exception(backoff.expo, (AssertionError, InvalidArgument), max_time=60) def eventually_consistent_test(): quickstart_batchgetassetshistory.batch_get_assets_history(PROJECT, asset_names) out, _ = capsys.readouterr() diff --git a/asset/snippets/snippets/quickstart_searchallresources_test.py b/asset/snippets/snippets/quickstart_searchallresources_test.py index f27eeb3b39c1..da019752270d 100644 --- a/asset/snippets/snippets/quickstart_searchallresources_test.py +++ b/asset/snippets/snippets/quickstart_searchallresources_test.py @@ -53,7 +53,7 @@ def test_search_all_resources(asset_dataset, capsys): # Dataset creation takes some time to propagate, so the dataset is not # immediately searchable. Need some time before the snippet will pass. - @backoff.on_exception(backoff.expo, (AssertionError), max_time=120) + @backoff.on_exception(backoff.expo, (AssertionError), max_time=240) def eventually_consistent_test(): quickstart_searchallresources.search_all_resources(scope, query=query) out, _ = capsys.readouterr() From 78bb9b574f934f18a3a4f062db9c4f4241da71d3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 16 Nov 2020 23:24:01 +0100 Subject: [PATCH 060/235] chore(deps): update dependency google-cloud-storage to v1.33.0 (#110) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 81e912a570c1..87e5e2420293 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.32.0 +google-cloud-storage==1.33.0 google-cloud-asset==2.1.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 From cd0cc5c19ccf857cb36ca925fa45257d4039d103 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 17 Nov 2020 00:42:07 +0100 Subject: [PATCH 061/235] chore(deps): update dependency google-cloud-bigquery to v2.4.0 (#106) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 87e5e2420293..a7a4f4572a38 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.33.0 google-cloud-asset==2.1.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 -google-cloud-bigquery==2.2.0 +google-cloud-bigquery==2.4.0 From e61b5fc632ee77feb5adc91aeef25fb3425d2e5c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 18 Nov 2020 16:49:09 -0800 Subject: [PATCH 062/235] feat: add AnalyzeIamPolicy and ExportIamPolicyAnalysis; support OSInventory; add common resource helper methods; expose client transport (#113) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * chore: upgrade to gapic-generator-python 0.35.6 PiperOrigin-RevId: 338157137 Source-Author: Google APIs Source-Date: Tue Oct 20 16:08:47 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: c7331b75b0b7bbd614373b7d37085db1c80dd4be Source-Link: https://github.com/googleapis/googleapis/commit/c7331b75b0b7bbd614373b7d37085db1c80dd4be * chore: upgrade to gapic-generator-python 0.35.6 PiperOrigin-RevId: 338489505 Source-Author: Google APIs Source-Date: Thu Oct 22 09:36:18 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 4b34a0869404af9d83ae89952d28712a4d29eba6 Source-Link: https://github.com/googleapis/googleapis/commit/4b34a0869404af9d83ae89952d28712a4d29eba6 * fix: switch firestore/v1 to grpc_service_config PiperOrigin-RevId: 338520351 Source-Author: Google APIs Source-Date: Thu Oct 22 12:01:06 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: b448d7dce89eebc3a4066a9e979a0b96bdb66b62 Source-Link: https://github.com/googleapis/googleapis/commit/b448d7dce89eebc3a4066a9e979a0b96bdb66b62 * docs: renamed App + Web to Google Analytics 4 (GA4) in public documentation PiperOrigin-RevId: 338527875 Source-Author: Google APIs Source-Date: Thu Oct 22 12:36:23 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 2131e2f755b3c2604e2d08de81a299fd7e377dcd Source-Link: https://github.com/googleapis/googleapis/commit/2131e2f755b3c2604e2d08de81a299fd7e377dcd * chore: update grpc dependency to v1.33.1 PiperOrigin-RevId: 338646463 Source-Author: Google APIs Source-Date: Fri Oct 23 03:57:15 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 20b11dfe4538cd5da7b4c3dd7d2bf5b9922ff3ed Source-Link: https://github.com/googleapis/googleapis/commit/20b11dfe4538cd5da7b4c3dd7d2bf5b9922ff3ed * fix!: update package names to avoid conflict with google-cloud-bigquery BREAKING CHANGE: update package names to avoid conflict with google-cloud-bigquery The google-cloud-bigquery package uses the `google.cloud.bigquery` path as a plain Python module, not a namespace package. When this package and google-cloud-bigquery are installed in the same environment, conflicts can result. PiperOrigin-RevId: 339048690 Source-Author: Google APIs Source-Date: Mon Oct 26 09:00:37 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 3c8c2d81369c4665824b20706426b018507415f7 Source-Link: https://github.com/googleapis/googleapis/commit/3c8c2d81369c4665824b20706426b018507415f7 * chore: upgrade to gapic-generator 0.35.9 PiperOrigin-RevId: 339292950 Source-Author: Google APIs Source-Date: Tue Oct 27 11:32:46 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 07d41a7e5cade45aba6f0d277c89722b48f2c956 Source-Link: https://github.com/googleapis/googleapis/commit/07d41a7e5cade45aba6f0d277c89722b48f2c956 * feat: add AnalyzeIamPolicy and AnalyzeIamPolicyLongrunning RPCs PiperOrigin-RevId: 339708980 Source-Author: Google APIs Source-Date: Thu Oct 29 11:23:44 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 00bbad4dfd6633cf4b5f9596c1f93b756bb5c776 Source-Link: https://github.com/googleapis/googleapis/commit/00bbad4dfd6633cf4b5f9596c1f93b756bb5c776 * feat: added support OSInventory in Assets. docs: updated existing docs. Clients receive detailed OSInventory in Assets. PiperOrigin-RevId: 342689216 Source-Author: Google APIs Source-Date: Mon Nov 16 12:04:29 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 1f8a5144b52f7677dc43c55b21ccaf9e1b425ceb Source-Link: https://github.com/googleapis/googleapis/commit/1f8a5144b52f7677dc43c55b21ccaf9e1b425ceb * fix: remove parse_asset_path, regen * build: fix sync-repo-settings * chore: fix coverage Co-authored-by: Bu Sun Kim --- asset/snippets/snippets/noxfile.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index ba55d7ce53ca..b90eef00f2d9 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -39,6 +39,10 @@ # You can opt out from the test for specific Python versions. 'ignored_versions': ["2.7"], + # Old samples are opted out of enforcing Python type hints + # All new samples should feature them + 'enforce_type_hints': False, + # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string @@ -132,7 +136,10 @@ def _determine_local_import_names(start_dir): @nox.session def lint(session): - session.install("flake8", "flake8-import-order") + if not TEST_CONFIG['enforce_type_hints']: + session.install("flake8", "flake8-import-order") + else: + session.install("flake8", "flake8-import-order", "flake8-annotations") local_names = _determine_local_import_names(".") args = FLAKE8_COMMON_ARGS + [ @@ -141,8 +148,18 @@ def lint(session): "." ] session.run("flake8", *args) +# +# Black +# +@nox.session +def blacken(session): + session.install("black") + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + session.run("black", *python_files) + # # Sample Tests # @@ -201,6 +218,11 @@ def _get_repo_root(): break if Path(p / ".git").exists(): return str(p) + # .git is not available in repos cloned via Cloud Build + # setup.py is always in the library's root, so use that instead + # https://github.com/googleapis/synthtool/issues/792 + if Path(p / "setup.py").exists(): + return str(p) p = p.parent raise Exception("Unable to detect repository root.") From 8499e3ee72b599c666a7323cfb03f1b8c82fdb0b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Nov 2020 17:48:05 +0100 Subject: [PATCH 063/235] chore(deps): update dependency google-cloud-asset to v2.2.0 (#117) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [google-cloud-asset](https://togithub.com/googleapis/python-asset) | minor | `==2.1.0` -> `==2.2.0` | --- ### Release Notes
googleapis/python-asset ### [`v2.2.0`](https://togithub.com/googleapis/python-asset/blob/master/CHANGELOG.md#​220-httpswwwgithubcomgoogleapispython-assetcomparev210v220-2020-11-19) [Compare Source](https://togithub.com/googleapis/python-asset/compare/v2.1.0...v2.2.0) ##### Features - add AnalyzeIamPolicy and ExportIamPolicyAnalysis; support OSInventory; add common resource helper methods; expose client transport ([#​113](https://www.github.com/googleapis/python-asset/issues/113)) ([3bf4c0a](https://www.github.com/googleapis/python-asset/commit/3bf4c0ab20346e3a12af168e20139f2cc067540a)) ##### Documentation - remove note on editable installs ([#​99](https://www.github.com/googleapis/python-asset/issues/99)) ([cf6072a](https://www.github.com/googleapis/python-asset/commit/cf6072a09b76dce78bd4c0c471c8c2d81186e0c6))
--- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index a7a4f4572a38..86c805be99bf 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.33.0 -google-cloud-asset==2.1.0 +google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 google-cloud-bigquery==2.4.0 From 922ab50238a0a191cd825ec6e196d422dfdaec6d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 5 Dec 2020 06:37:11 +0100 Subject: [PATCH 064/235] chore(deps): update dependency google-cloud-bigquery to v2.5.0 (#128) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 86c805be99bf..d79aa3a35df9 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.33.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 -google-cloud-bigquery==2.4.0 +google-cloud-bigquery==2.5.0 From 0b3c577a67c569834d14aa6291cae59a88067895 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 7 Dec 2020 23:40:47 +0100 Subject: [PATCH 065/235] chore(deps): update dependency google-cloud-bigquery to v2.6.0 (#130) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d79aa3a35df9..9a36574fc8ec 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.33.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 -google-cloud-bigquery==2.5.0 +google-cloud-bigquery==2.6.0 From 7900dc469f8f8f8ba25118ce666b49fcd7370a36 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 11 Dec 2020 21:43:16 +0100 Subject: [PATCH 066/235] chore(deps): update dependency google-cloud-storage to v1.34.0 (#135) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 9a36574fc8ec..5de81176d084 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.33.0 +google-cloud-storage==1.34.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 From 6eb3f81a7bc515bb6893c88be97f50e4270f0b0f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Dec 2020 22:33:43 +0100 Subject: [PATCH 067/235] chore(deps): update dependency google-cloud-storage to v1.35.0 (#137) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 5de81176d084..87b4d63b5b85 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.34.0 +google-cloud-storage==1.35.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.2 google-cloud-pubsub==1.7.0 From 65b371b267e53e5dcf1e96dd1b8d3b675e21e0bf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Dec 2020 22:44:31 +0100 Subject: [PATCH 068/235] chore(deps): update dependency google-cloud-resource-manager to v0.30.3 (#134) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 87b4d63b5b85..fdca29a29d91 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.35.0 google-cloud-asset==2.2.0 -google-cloud-resource-manager==0.30.2 +google-cloud-resource-manager==0.30.3 google-cloud-pubsub==1.7.0 google-cloud-bigquery==2.6.0 From abb93760825e000817b371772a78462d714fa1f8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Dec 2020 22:53:12 +0100 Subject: [PATCH 069/235] chore(deps): update dependency google-cloud-bigquery to v2.6.1 (#133) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index fdca29a29d91..5c72be9b13d9 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.35.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==1.7.0 -google-cloud-bigquery==2.6.0 +google-cloud-bigquery==2.6.1 From 3505b1ba072bfb5ebeb742dc531c777e498dff05 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 22 Dec 2020 09:40:46 -0800 Subject: [PATCH 070/235] fix: remove v1beta1 (#127) v1beta1 API has been turned down. --- asset/snippets/snippets/noxfile.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index b90eef00f2d9..bca0522ec4d9 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -17,6 +17,7 @@ import os from pathlib import Path import sys +from typing import Callable, Dict, List, Optional import nox @@ -68,7 +69,7 @@ TEST_CONFIG.update(TEST_CONFIG_OVERRIDE) -def get_pytest_env_vars(): +def get_pytest_env_vars() -> Dict[str, str]: """Returns a dict for pytest invocation.""" ret = {} @@ -97,7 +98,7 @@ def get_pytest_env_vars(): # -def _determine_local_import_names(start_dir): +def _determine_local_import_names(start_dir: str) -> List[str]: """Determines all import names that should be considered "local". This is used when running the linter to insure that import order is @@ -135,7 +136,7 @@ def _determine_local_import_names(start_dir): @nox.session -def lint(session): +def lint(session: nox.sessions.Session) -> None: if not TEST_CONFIG['enforce_type_hints']: session.install("flake8", "flake8-import-order") else: @@ -154,7 +155,7 @@ def lint(session): @nox.session -def blacken(session): +def blacken(session: nox.sessions.Session) -> None: session.install("black") python_files = [path for path in os.listdir(".") if path.endswith(".py")] @@ -168,7 +169,7 @@ def blacken(session): PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] -def _session_tests(session, post_install=None): +def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: """Runs py.test for a particular project.""" if os.path.exists("requirements.txt"): session.install("-r", "requirements.txt") @@ -194,7 +195,7 @@ def _session_tests(session, post_install=None): @nox.session(python=ALL_VERSIONS) -def py(session): +def py(session: nox.sessions.Session) -> None: """Runs py.test for a sample using the specified version of Python.""" if session.python in TESTED_VERSIONS: _session_tests(session) @@ -209,7 +210,7 @@ def py(session): # -def _get_repo_root(): +def _get_repo_root() -> Optional[str]: """ Returns the root folder of the project. """ # Get root of this repository. Assume we don't have directories nested deeper than 10 items. p = Path(os.getcwd()) @@ -232,7 +233,7 @@ def _get_repo_root(): @nox.session @nox.parametrize("path", GENERATED_READMES) -def readmegen(session, path): +def readmegen(session: nox.sessions.Session, path: str) -> None: """(Re-)generates the readme for a sample.""" session.install("jinja2", "pyyaml") dir_ = os.path.dirname(path) From c658a40dc9527d064d91a32241c8940c13ce3408 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 28 Dec 2020 21:19:41 +0100 Subject: [PATCH 071/235] chore(deps): update dependency google-cloud-pubsub to v2 (#84) * chore(deps): update dependency google-cloud-pubsub to v2 * upgrade pubsub to v2 * run blacken Co-authored-by: Leah Cole Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com> --- asset/snippets/snippets/conftest.py | 8 ++++---- asset/snippets/snippets/requirements.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/asset/snippets/snippets/conftest.py b/asset/snippets/snippets/conftest.py index 723827de45b5..a8c9056838c6 100644 --- a/asset/snippets/snippets/conftest.py +++ b/asset/snippets/snippets/conftest.py @@ -35,11 +35,11 @@ def test_topic(): topic_id = f"topic-{uuid.uuid4().hex}" publisher = pubsub_v1.PublisherClient() topic_path = publisher.topic_path(PROJECT, topic_id) - topic = publisher.create_topic(topic_path) + topic = publisher.create_topic(request={"name": topic_path}) yield topic - publisher.delete_topic(topic_path) + publisher.delete_topic(request={"topic": topic_path}) @pytest.fixture(scope="module") @@ -47,11 +47,11 @@ def another_topic(): topic_id = f"topic-{uuid.uuid4().hex}" publisher = pubsub_v1.PublisherClient() topic_path = publisher.topic_path(PROJECT, topic_id) - topic = publisher.create_topic(topic_path) + topic = publisher.create_topic(request={"name": topic_path}) yield topic - publisher.delete_topic(topic_path) + publisher.delete_topic(request={"topic": topic_path}) @pytest.fixture(scope="module") diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 5c72be9b13d9..8329695d5988 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.35.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 -google-cloud-pubsub==1.7.0 +google-cloud-pubsub==2.2.0 google-cloud-bigquery==2.6.1 From 56931cd760cd8779d7db2fbf81dd8f4a03e936b6 Mon Sep 17 00:00:00 2001 From: aaronlichen-hp <75718017+aaronlichen-hp@users.noreply.github.com> Date: Mon, 11 Jan 2021 10:07:11 -0800 Subject: [PATCH 072/235] =?UTF-8?q?samples:=20Add=20analyze=5Fiam=5Fpolicy?= =?UTF-8?q?=20and=20anlayze=5Fiam=5Fpolicy=5Flongrunning=20sa=E2=80=A6=20(?= =?UTF-8?q?#132)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * samples: Add analyze_iam_policy and anlayze_iam_policy_longrunning samples --- .../snippets/quickstart_analyzeiampolicy.py | 53 +++++++++ .../quickstart_analyzeiampolicy_test.py | 27 +++++ .../quickstart_analyzeiampolicylongrunning.py | 105 ++++++++++++++++++ ...kstart_analyzeiampolicylongrunning_test.py | 77 +++++++++++++ 4 files changed, 262 insertions(+) create mode 100644 asset/snippets/snippets/quickstart_analyzeiampolicy.py create mode 100644 asset/snippets/snippets/quickstart_analyzeiampolicy_test.py create mode 100644 asset/snippets/snippets/quickstart_analyzeiampolicylongrunning.py create mode 100644 asset/snippets/snippets/quickstart_analyzeiampolicylongrunning_test.py diff --git a/asset/snippets/snippets/quickstart_analyzeiampolicy.py b/asset/snippets/snippets/quickstart_analyzeiampolicy.py new file mode 100644 index 000000000000..20e0fa51d68f --- /dev/null +++ b/asset/snippets/snippets/quickstart_analyzeiampolicy.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python + +# Copyright 2020 Google LLC. All Rights Reserved. +# +# 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. + + +import argparse + + +def analyze_iam_policy(project_id): + # [START asset_quickstart_analyze_iam_policy] + from google.cloud import asset_v1 + + # TODO project_id = 'Your Google Cloud Project ID' + + client = asset_v1.AssetServiceClient() + parent = "projects/{}".format(project_id) + + # Build analysis query + analysis_query = asset_v1.IamPolicyAnalysisQuery() + analysis_query.scope = parent + analysis_query.resource_selector.full_resource_name = f"//cloudresourcemanager.googleapis.com/{parent}" + analysis_query.options.expand_groups = True + analysis_query.options.output_group_edges = True + + response = client.analyze_iam_policy( + request={"analysis_query": analysis_query} + ) + print(response) + # [END asset_quickstart_analyze_iam_policy] + + +if __name__ == "__main__": + + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("project_id", help="Your Google Cloud project ID") + + args = parser.parse_args() + + analyze_iam_policy(args.project_id) diff --git a/asset/snippets/snippets/quickstart_analyzeiampolicy_test.py b/asset/snippets/snippets/quickstart_analyzeiampolicy_test.py new file mode 100644 index 000000000000..ec39838979e9 --- /dev/null +++ b/asset/snippets/snippets/quickstart_analyzeiampolicy_test.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +# Copyright 2020 Google LLC. All Rights Reserved. +# +# 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. + +import os + +import quickstart_analyzeiampolicy + +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] + + +def test_analyze_iam_policy(capsys): + quickstart_analyzeiampolicy.analyze_iam_policy(PROJECT) + out, _ = capsys.readouterr() + assert "fully_explored: true" in out diff --git a/asset/snippets/snippets/quickstart_analyzeiampolicylongrunning.py b/asset/snippets/snippets/quickstart_analyzeiampolicylongrunning.py new file mode 100644 index 000000000000..8b932f6cfc64 --- /dev/null +++ b/asset/snippets/snippets/quickstart_analyzeiampolicylongrunning.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python + +# Copyright 2020 Google LLC. All Rights Reserved. +# +# 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. + + +import argparse + + +def analyze_iam_policy_longrunning_gcs(project_id, dump_file_path): + # [START asset_quickstart_analyze_iam_policy_longrunning_gcs] + from google.cloud import asset_v1 + + # TODO project_id = 'Your Google Cloud Project ID' + # TODO dump_file_path = 'Your analysis dump file path' + + client = asset_v1.AssetServiceClient() + parent = "projects/{}".format(project_id) + + # Build analysis query + analysis_query = asset_v1.IamPolicyAnalysisQuery() + analysis_query.scope = parent + analysis_query.resource_selector.full_resource_name = f"//cloudresourcemanager.googleapis.com/{parent}" + analysis_query.options.expand_groups = True + analysis_query.options.output_group_edges = True + + output_config = asset_v1.IamPolicyAnalysisOutputConfig() + output_config.gcs_destination.uri = dump_file_path + operation = client.analyze_iam_policy_longrunning( + request={"analysis_query": analysis_query, "output_config": output_config} + ) + + operation.result(300) + print(operation.done()) + # [END asset_quickstart_analyze_iam_policy_longrunning_gcs] + + +def analyze_iam_policy_longrunning_bigquery(project_id, dataset, table): + # [START asset_quickstart_analyze_iam_policy_longrunning_bigquery] + from google.cloud import asset_v1 + + # TODO project_id = 'Your Google Cloud Project ID' + # TODO dataset = 'Your BigQuery dataset path' + # TODO table = 'Your BigQuery table name' + + client = asset_v1.AssetServiceClient() + parent = "projects/{}".format(project_id) + + # Build analysis query + analysis_query = asset_v1.IamPolicyAnalysisQuery() + analysis_query.scope = parent + analysis_query.resource_selector.full_resource_name = f"//cloudresourcemanager.googleapis.com/{parent}" + analysis_query.options.expand_groups = True + analysis_query.options.output_group_edges = True + + output_config = asset_v1.IamPolicyAnalysisOutputConfig() + output_config.bigquery_destination.dataset = dataset + output_config.bigquery_destination.table_prefix = table + output_config.bigquery_destination.write_disposition = "WRITE_TRUNCATE" + operation = client.analyze_iam_policy_longrunning( + request={"analysis_query": analysis_query, "output_config": output_config} + ) + + operation.result(300) + print(operation.done()) + # [END asset_quickstart_analyze_iam_policy_longrunning_bigquery] + + +if __name__ == "__main__": + + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("project_id", help="Your Google Cloud project ID") + parser.add_argument( + "dump_file_path", + help="The GCS file that the analysis results will be dumped to, " + "e.g.: gs:///analysis_dump_file", + ) + parser.add_argument( + "dataset", + help="The BigQuery dataset that analysis results will be exported to, " + "e.g.: my_dataset", + ) + parser.add_argument( + "table_prefix", + help="The prefix of the BigQuery table that analysis results will be exported to, " + "e.g.: my_table", + ) + + args = parser.parse_args() + + analyze_iam_policy_longrunning_gcs(args.project_id, args.dump_file_path) + analyze_iam_policy_longrunning_bigquery(args.project_id, args.dataset, args.table_prefix) diff --git a/asset/snippets/snippets/quickstart_analyzeiampolicylongrunning_test.py b/asset/snippets/snippets/quickstart_analyzeiampolicylongrunning_test.py new file mode 100644 index 000000000000..bbee8d79cf3f --- /dev/null +++ b/asset/snippets/snippets/quickstart_analyzeiampolicylongrunning_test.py @@ -0,0 +1,77 @@ +#!/usr/bin/env python + +# Copyright 2020 Google LLC. All Rights Reserved. +# +# 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. + +import os +import uuid + +from google.cloud import bigquery +from google.cloud import storage + +import pytest + +import quickstart_analyzeiampolicylongrunning + +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] +BUCKET = "analysis-{}".format(int(uuid.uuid4())) +DATASET = "analysis_{}".format(int(uuid.uuid4())) + + +@pytest.fixture(scope="module") +def storage_client(): + yield storage.Client() + + +@pytest.fixture(scope="module") +def bigquery_client(): + yield bigquery.Client() + + +@pytest.fixture(scope="module") +def analysis_bucket(storage_client): + bucket = storage_client.create_bucket(BUCKET) + + yield BUCKET + + try: + bucket.delete(force=True) + except Exception as e: + print("Failed to delete bucket{}".format(BUCKET)) + raise e + + +@pytest.fixture(scope="module") +def dataset(bigquery_client): + dataset_id = "{}.{}".format(PROJECT, DATASET) + dataset = bigquery.Dataset(dataset_id) + dataset.location = "US" + dataset = bigquery_client.create_dataset(dataset) + + yield DATASET + + bigquery_client.delete_dataset( + dataset_id, delete_contents=True, not_found_ok=False) + + +def test_analyze_iam_policy_longrunning(analysis_bucket, dataset, capsys): + dump_file_path = "gs://{}/analysis-dump.txt".format(analysis_bucket) + quickstart_analyzeiampolicylongrunning.analyze_iam_policy_longrunning_gcs(PROJECT, dump_file_path) + out, _ = capsys.readouterr() + assert "True" in out + + dataset_id = "projects/{}/datasets/{}".format(PROJECT, dataset) + quickstart_analyzeiampolicylongrunning.analyze_iam_policy_longrunning_bigquery(PROJECT, dataset_id, "analysis_") + out, _ = capsys.readouterr() + assert "True" in out From db089dbef895d2eab2b51cd454e5a99bb3a43cf8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Jan 2021 20:05:04 +0100 Subject: [PATCH 073/235] chore(deps): update dependency google-cloud-bigquery to v2.6.2 (#144) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 8329695d5988..347976dc02c2 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.35.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.2.0 -google-cloud-bigquery==2.6.1 +google-cloud-bigquery==2.6.2 From 6ed7f8df0c2d56fbc887890311b05efcd508be86 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Feb 2021 19:32:46 +0100 Subject: [PATCH 074/235] chore(deps): update dependency google-cloud-bigquery to v2.7.0 (#147) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 347976dc02c2..59eb4f748262 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.35.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.2.0 -google-cloud-bigquery==2.6.2 +google-cloud-bigquery==2.7.0 From 19cee55386ffbeb0655e8cdf703bdc4a1b8974bd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 11 Feb 2021 17:40:32 +0100 Subject: [PATCH 075/235] chore(deps): update dependency google-cloud-storage to v1.36.0 (#150) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 59eb4f748262..6ac7353ded6c 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.35.0 +google-cloud-storage==1.36.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.2.0 From 568d090bd0eb3bedbdd01b5a4e7bac9307309eee Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 12 Feb 2021 07:24:47 +0100 Subject: [PATCH 076/235] chore(deps): update dependency google-cloud-bigquery to v2.8.0 (#152) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 6ac7353ded6c..8f584ae3d5b4 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.36.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.2.0 -google-cloud-bigquery==2.7.0 +google-cloud-bigquery==2.8.0 From 04a81e2298ffb2df26476e00a2844097a9581774 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 12 Feb 2021 18:00:20 +0100 Subject: [PATCH 077/235] chore(deps): update dependency google-cloud-pubsub to v2.3.0 (#151) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 8f584ae3d5b4..c46ace121c60 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.36.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 -google-cloud-pubsub==2.2.0 +google-cloud-pubsub==2.3.0 google-cloud-bigquery==2.8.0 From fbb8df1db8d1a1ffb3de4bef89350a9782096767 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 20 Feb 2021 06:57:34 +0100 Subject: [PATCH 078/235] chore(deps): update dependency google-cloud-bigquery to v2.9.0 (#153) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index c46ace121c60..d110dfd6318d 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.36.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.3.0 -google-cloud-bigquery==2.8.0 +google-cloud-bigquery==2.9.0 From 8bb4e576a1d7cbdda56afc1c0e001984e6e4a704 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Feb 2021 05:39:08 +0100 Subject: [PATCH 079/235] chore(deps): update dependency google-cloud-storage to v1.36.1 (#155) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d110dfd6318d..bc5412374bef 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.36.0 +google-cloud-storage==1.36.1 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.3.0 From 8d9ead945802992d9b33bb143f64f34e99a0604f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Feb 2021 05:41:12 +0100 Subject: [PATCH 080/235] chore(deps): update dependency google-cloud-pubsub to v2.4.0 (#154) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index bc5412374bef..cf204ddb943a 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.36.1 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 -google-cloud-pubsub==2.3.0 +google-cloud-pubsub==2.4.0 google-cloud-bigquery==2.9.0 From 71e69173b7393200eda9138a8df9238273294977 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 25 Feb 2021 22:05:08 +0100 Subject: [PATCH 081/235] chore(deps): update dependency google-cloud-bigquery to v2.10.0 (#156) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index cf204ddb943a..591894253447 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.36.1 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.4.0 -google-cloud-bigquery==2.9.0 +google-cloud-bigquery==2.10.0 From 1af14bbace48463f8592aeece4eaedbc2ab31508 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 10 Mar 2021 20:13:39 +0100 Subject: [PATCH 082/235] chore(deps): update dependency google-cloud-bigquery to v2.11.0 (#158) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 591894253447..5cdbbfd10a8a 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.36.1 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.4.0 -google-cloud-bigquery==2.10.0 +google-cloud-bigquery==2.11.0 From a52ca431707af47e4c1f9c613e044205cb46bcf7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 11 Mar 2021 22:34:57 +0100 Subject: [PATCH 083/235] chore(deps): update dependency google-cloud-storage to v1.36.2 (#159) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 5cdbbfd10a8a..75a3a84df634 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.36.1 +google-cloud-storage==1.36.2 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.4.0 From c368537c7dcb78ce03c00ad8a3ce4c307a18d001 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Mar 2021 18:18:10 +0100 Subject: [PATCH 084/235] chore(deps): update dependency google-cloud-bigquery to v2.12.0 (#161) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 75a3a84df634..3bf4e02349eb 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.36.2 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.4.0 -google-cloud-bigquery==2.11.0 +google-cloud-bigquery==2.12.0 From 2020c9a351250a548a3502cf9fa7379f62201ccb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 22 Mar 2021 19:36:06 +0100 Subject: [PATCH 085/235] chore(deps): update dependency google-cloud-bigquery to v2.13.0 (#162) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 3bf4e02349eb..78c9c4416980 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.36.2 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.4.0 -google-cloud-bigquery==2.12.0 +google-cloud-bigquery==2.13.0 From 9863203912b1898eef53de637829435e205162bd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 24 Mar 2021 22:07:48 +0100 Subject: [PATCH 086/235] chore(deps): update dependency google-cloud-bigquery to v2.13.1 (#163) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 78c9c4416980..261958a41c3c 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.36.2 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.4.0 -google-cloud-bigquery==2.13.0 +google-cloud-bigquery==2.13.1 From 0c440c22227222465903b9d5bb81604a5c6fd471 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 26 Mar 2021 06:27:39 +0100 Subject: [PATCH 087/235] chore(deps): update dependency google-cloud-storage to v1.37.0 (#165) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 261958a41c3c..0232c93a4e51 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.36.2 +google-cloud-storage==1.37.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.4.0 From 0ee7a7c5cb5a00978d744906f75cfc3e1fc2ae32 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 1 Apr 2021 19:27:15 +0200 Subject: [PATCH 088/235] chore(deps): update dependency google-cloud-pubsub to v2.4.1 (#166) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 0232c93a4e51..c7dbc0bcc0f0 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.37.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 -google-cloud-pubsub==2.4.0 +google-cloud-pubsub==2.4.1 google-cloud-bigquery==2.13.1 From 309cf02df292d4dbe93c62948c92387ba5b9da4e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 2 Apr 2021 13:16:58 -0700 Subject: [PATCH 089/235] fix: use correct retry deadlines (#164) feat: add `from_service_account_info` --- asset/snippets/snippets/noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index bca0522ec4d9..97bf7da80e39 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -85,7 +85,7 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. # All versions used to tested samples. -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8"] +ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] From 68ff2ccc50e66cdbb34d047b9d274e05616daab1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 8 Apr 2021 20:33:16 +0200 Subject: [PATCH 090/235] chore(deps): update dependency google-cloud-storage to v1.37.1 (#170) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index c7dbc0bcc0f0..8d3951227286 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.37.0 +google-cloud-storage==1.37.1 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.4.1 From 5551433fcf5a676d61c627b0f9b596ea1ad214f7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Apr 2021 19:52:12 +0200 Subject: [PATCH 091/235] chore(deps): update dependency google-cloud-storage to v1.38.0 (#180) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 8d3951227286..4253d4f28f3a 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.37.1 +google-cloud-storage==1.38.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.4.1 From 4c23a5d0520405e90b0430cf9c671507befc7a91 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Apr 2021 19:53:04 +0200 Subject: [PATCH 092/235] chore(deps): update dependency google-cloud-bigquery to v2.14.0 (#179) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 4253d4f28f3a..27d55a750ebd 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.38.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.4.1 -google-cloud-bigquery==2.13.1 +google-cloud-bigquery==2.14.0 From 7af2011021247e31fd5e514267518b5fe298c650 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 12 May 2021 11:51:29 -0400 Subject: [PATCH 093/235] chore: migrate to owl bot (#186) * chore: migrate to owl bot * chore: copy files from googleapis-gen ee56c3493ec6aeb237ff515ecea949710944a20f * chore: run the post processor --- asset/snippets/snippets/noxfile.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 97bf7da80e39..956cdf4f9250 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -172,10 +172,16 @@ def blacken(session: nox.sessions.Session) -> None: def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: """Runs py.test for a particular project.""" if os.path.exists("requirements.txt"): - session.install("-r", "requirements.txt") + if os.path.exists("constraints.txt"): + session.install("-r", "requirements.txt", "-c", "constraints.txt") + else: + session.install("-r", "requirements.txt") if os.path.exists("requirements-test.txt"): - session.install("-r", "requirements-test.txt") + if os.path.exists("constraints-test.txt"): + session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt") + else: + session.install("-r", "requirements-test.txt") if INSTALL_LIBRARY_FROM_SOURCE: session.install("-e", _get_repo_root()) From a8dd6cc08721cf38ca201f5706193bb290a2a407 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 14 May 2021 03:02:43 +0200 Subject: [PATCH 094/235] chore(deps): update dependency pytest to v6 (#187) --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index bd6c79990493..a2d247d830b0 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ backoff==1.10.0 flaky==3.7.0 -pytest==5.4.3 +pytest==6.2.4 From 036397b4af64cbfa019a9ce02edd0677d5dac467 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 14 May 2021 03:08:24 +0200 Subject: [PATCH 095/235] chore(deps): update dependency google-cloud-bigquery to v2.16.1 (#183) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 27d55a750ebd..e6592f3029b1 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.38.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.4.1 -google-cloud-bigquery==2.14.0 +google-cloud-bigquery==2.16.1 From 52cd275b1b0689e9e2674148b5c52e85a1fe9ab9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 14 May 2021 03:23:24 +0200 Subject: [PATCH 096/235] chore(deps): update dependency google-cloud-pubsub to v2.4.2 (#185) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index e6592f3029b1..e2743592ff6c 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.38.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 -google-cloud-pubsub==2.4.1 +google-cloud-pubsub==2.4.2 google-cloud-bigquery==2.16.1 From d6b17ec7962e0de70711f6db91d9acd23dc722b6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 22 May 2021 09:18:05 +0000 Subject: [PATCH 097/235] chore: new owl bot post processor docker image (#194) gcr.io/repo-automation-bots/owlbot-python:latest@sha256:3c3a445b3ddc99ccd5d31edc4b4519729635d20693900db32c4f587ed51f7479 --- asset/snippets/snippets/noxfile.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 956cdf4f9250..5ff9e1db5808 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -50,7 +50,10 @@ # to use your own Cloud project. 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', - + # If you need to use a specific version of pip, + # change pip_version_override to the string representation + # of the version number, for example, "20.2.4" + "pip_version_override": None, # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. 'envs': {}, @@ -170,6 +173,9 @@ def blacken(session: nox.sessions.Session) -> None: def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: + if TEST_CONFIG["pip_version_override"]: + pip_version = TEST_CONFIG["pip_version_override"] + session.install(f"pip=={pip_version}") """Runs py.test for a particular project.""" if os.path.exists("requirements.txt"): if os.path.exists("constraints.txt"): From 4c69002bc16877ca25a378e86db510bc2e7ac789 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 May 2021 00:53:33 +0200 Subject: [PATCH 098/235] chore(deps): update dependency google-cloud-bigquery to v2.17.0 (#193) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index e2743592ff6c..a247f2a86f07 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.38.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.4.2 -google-cloud-bigquery==2.16.1 +google-cloud-bigquery==2.17.0 From 1b2314d741055c31d9db0e8bf4112e043c5578da Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 May 2021 20:13:21 +0200 Subject: [PATCH 099/235] chore(deps): update dependency google-cloud-pubsub to v2.5.0 (#191) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index a247f2a86f07..726246a16a0a 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.38.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 -google-cloud-pubsub==2.4.2 +google-cloud-pubsub==2.5.0 google-cloud-bigquery==2.17.0 From f539759922a7cbbcd60fb47aaef4522f8a2ea41a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Jun 2021 17:46:03 +0200 Subject: [PATCH 100/235] chore(deps): update dependency google-cloud-bigquery to v2.18.0 (#198) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-bigquery](https://togithub.com/googleapis/python-bigquery) | `==2.17.0` -> `==2.18.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.18.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.18.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.18.0/compatibility-slim/2.17.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.18.0/confidence-slim/2.17.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-bigquery ### [`v2.18.0`](https://togithub.com/googleapis/python-bigquery/blob/master/CHANGELOG.md#​2180-httpswwwgithubcomgoogleapispython-bigquerycomparev2170v2180-2021-06-02) [Compare Source](https://togithub.com/googleapis/python-bigquery/compare/v2.17.0...v2.18.0) ##### Features - add support for Parquet options ([#​679](https://www.github.com/googleapis/python-bigquery/issues/679)) ([d792ce0](https://www.github.com/googleapis/python-bigquery/commit/d792ce09388a6ee3706777915dd2818d4c854f79))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 726246a16a0a..fb590529d1d3 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.38.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.5.0 -google-cloud-bigquery==2.17.0 +google-cloud-bigquery==2.18.0 From f94d9ccd75ab70c2e61297ee2b21f275efe0c37e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 7 Jun 2021 16:58:15 +0200 Subject: [PATCH 101/235] chore(deps): update dependency google-cloud-bigquery to v2.20.0 (#199) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index fb590529d1d3..76b08c7c8315 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.38.0 google-cloud-asset==2.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.5.0 -google-cloud-bigquery==2.18.0 +google-cloud-bigquery==2.20.0 From 27d6948dca1d00e479dd33ad352782b314c44ed6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 9 Jun 2021 07:11:55 +0200 Subject: [PATCH 102/235] chore(deps): update dependency google-cloud-asset to v3 (#200) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 76b08c7c8315..f06c10b16ab5 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.38.0 -google-cloud-asset==2.2.0 +google-cloud-asset==3.1.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.5.0 google-cloud-bigquery==2.20.0 From 421e117f934cc8f63a85a7f26e552712159b55f9 Mon Sep 17 00:00:00 2001 From: peter-zheng-g <43967553+peter-zheng-g@users.noreply.github.com> Date: Mon, 21 Jun 2021 11:45:55 -0700 Subject: [PATCH 103/235] samples: Update asset lib to v1 for ListAssets sample code (#204) Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/quickstart_listassets.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/asset/snippets/snippets/quickstart_listassets.py b/asset/snippets/snippets/quickstart_listassets.py index 9c5e191a2df1..75180075521b 100644 --- a/asset/snippets/snippets/quickstart_listassets.py +++ b/asset/snippets/snippets/quickstart_listassets.py @@ -20,7 +20,7 @@ def list_assets(project_id, asset_types, page_size): # [START asset_quickstart_list_assets] - from google.cloud import asset_v1p5beta1 + from google.cloud import asset_v1 # TODO project_id = 'Your Google Cloud Project ID' # TODO asset_types = 'Your asset type list, e.g., @@ -29,10 +29,10 @@ def list_assets(project_id, asset_types, page_size): # 1000 (both inclusively)' project_resource = "projects/{}".format(project_id) - content_type = asset_v1p5beta1.ContentType.RESOURCE - client = asset_v1p5beta1.AssetServiceClient() + content_type = asset_v1.ContentType.RESOURCE + client = asset_v1.AssetServiceClient() - # Call ListAssets v1p5beta1 to list assets. + # Call ListAssets v1 to list assets. response = client.list_assets( request={ "parent": project_resource, From 795ac8634ccf91368c5f5f70a8da6c2a9a996a3b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 21 Jun 2021 21:21:12 +0200 Subject: [PATCH 104/235] chore(deps): update dependency google-cloud-pubsub to v2.6.0 (#209) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index f06c10b16ab5..491e7a1817f2 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.38.0 google-cloud-asset==3.1.0 google-cloud-resource-manager==0.30.3 -google-cloud-pubsub==2.5.0 +google-cloud-pubsub==2.6.0 google-cloud-bigquery==2.20.0 From 8de8443f481008316cc38dcbc22d825a63b89318 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 26 Jun 2021 00:50:14 +0200 Subject: [PATCH 105/235] chore(deps): update dependency google-cloud-storage to v1.39.0 (#212) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-storage](https://togithub.com/googleapis/python-storage) | `==1.38.0` -> `==1.39.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.39.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.39.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.39.0/compatibility-slim/1.38.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.39.0/confidence-slim/1.38.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-storage ### [`v1.39.0`](https://togithub.com/googleapis/python-storage/blob/master/CHANGELOG.md#​1390-httpswwwgithubcomgoogleapispython-storagecomparev1380v1390-2021-06-21) [Compare Source](https://togithub.com/googleapis/python-storage/compare/v1.38.0...v1.39.0) ##### Features - media operation retries can be configured using the same interface as with non-media operation ([#​447](https://www.github.com/googleapis/python-storage/issues/447)) ([0dbbb8a](https://www.github.com/googleapis/python-storage/commit/0dbbb8ac17a4b632707485ee6c7cc15e4670efaa)) ##### Bug Fixes - add ConnectionError to default retry ([#​445](https://www.github.com/googleapis/python-storage/issues/445)) ([8344253](https://www.github.com/googleapis/python-storage/commit/8344253a1969b9d04b81f87a6d7bddd3ddb55006)) - apply idempotency policies for ACLs ([#​458](https://www.github.com/googleapis/python-storage/issues/458)) ([2232f38](https://www.github.com/googleapis/python-storage/commit/2232f38933dbdfeb4f6585291794d332771ffdf2)) - replace python lifecycle action parsing ValueError with warning ([#​437](https://www.github.com/googleapis/python-storage/issues/437)) ([2532d50](https://www.github.com/googleapis/python-storage/commit/2532d506b44fc1ef0fa0a996822d29e7459c465a)) - revise blob.compose query parameters `if_generation_match` ([#​454](https://www.github.com/googleapis/python-storage/issues/454)) ([70d19e7](https://www.github.com/googleapis/python-storage/commit/70d19e72831dee112bb07f38b50beef4890c1155)) ##### Documentation - streamline 'timeout' / 'retry' docs in docstrings ([#​461](https://www.github.com/googleapis/python-storage/issues/461)) ([78b2eba](https://www.github.com/googleapis/python-storage/commit/78b2eba81003b437cd24f2b8d269ea2455682507)) - streamline docstrings for conditional parmas ([#​464](https://www.github.com/googleapis/python-storage/issues/464)) ([6999370](https://www.github.com/googleapis/python-storage/commit/69993702390322df07cc2e818003186a47524c2b))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 491e7a1817f2..1ebd073bcd7c 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.38.0 +google-cloud-storage==1.39.0 google-cloud-asset==3.1.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.6.0 From c3ba8eefc0833a29422f09541f8bebe76bf3d71a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 1 Jul 2021 04:08:08 +0200 Subject: [PATCH 106/235] chore(deps): update dependency google-cloud-storage to v1.40.0 (#219) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-storage](https://togithub.com/googleapis/python-storage) | `==1.39.0` -> `==1.40.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.40.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.40.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.40.0/compatibility-slim/1.39.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.40.0/confidence-slim/1.39.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-storage ### [`v1.40.0`](https://togithub.com/googleapis/python-storage/blob/master/CHANGELOG.md#​1400-httpswwwgithubcomgoogleapispython-storagecomparev1390v1400-2021-06-30) [Compare Source](https://togithub.com/googleapis/python-storage/compare/v1.39.0...v1.40.0) ##### Features - add preconditions and retry configuration to blob.create_resumable_upload_session ([#​484](https://www.github.com/googleapis/python-storage/issues/484)) ([0ae35ee](https://www.github.com/googleapis/python-storage/commit/0ae35eef0fe82fe60bc095c4b183102bb1dabeeb)) - add public access prevention to bucket IAM configuration ([#​304](https://www.github.com/googleapis/python-storage/issues/304)) ([e3e57a9](https://www.github.com/googleapis/python-storage/commit/e3e57a9c779d6b87852063787f19e27c76b1bb14)) ##### Bug Fixes - replace default retry for upload operations ([#​480](https://www.github.com/googleapis/python-storage/issues/480)) ([c027ccf](https://www.github.com/googleapis/python-storage/commit/c027ccf4279fb05e041754294f10744b7d81beea))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 1ebd073bcd7c..0dad613cf49c 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.39.0 +google-cloud-storage==1.40.0 google-cloud-asset==3.1.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.6.0 From be50a2eef075e35f79631f62804b0aed57e74282 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 12 Jul 2021 19:46:32 +0200 Subject: [PATCH 107/235] chore(deps): update dependency google-cloud-pubsub to v2.6.1 (#221) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 0dad613cf49c..4f9b340b5620 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.40.0 google-cloud-asset==3.1.0 google-cloud-resource-manager==0.30.3 -google-cloud-pubsub==2.6.0 +google-cloud-pubsub==2.6.1 google-cloud-bigquery==2.20.0 From cf641c5dfa968c43c6c0334b3b6ef46f1159d523 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 13 Jul 2021 12:50:23 +0200 Subject: [PATCH 108/235] chore(deps): update dependency google-cloud-asset to v3.2.0 (#223) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-asset](https://togithub.com/googleapis/python-asset) | `==3.1.0` -> `==3.2.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.2.0/compatibility-slim/3.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.2.0/confidence-slim/3.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-asset ### [`v3.2.0`](https://togithub.com/googleapis/python-asset/blob/master/CHANGELOG.md#​320-httpswwwgithubcomgoogleapispython-assetcomparev310v320-2021-07-12) [Compare Source](https://togithub.com/googleapis/python-asset/compare/v3.1.0...v3.2.0) ##### Features - add always_use_jwt_access ([0a14f25](https://www.github.com/googleapis/python-asset/commit/0a14f25784a5d39b666709c2dc6521f014eea781)) - add new searchable fields (memberTypes, roles, project, folders and organization) in SearchAllIamPolicies ([0a14f25](https://www.github.com/googleapis/python-asset/commit/0a14f25784a5d39b666709c2dc6521f014eea781)) - new request fields (assetTypes and orderBy) in SearchAllIamPolicies ([0a14f25](https://www.github.com/googleapis/python-asset/commit/0a14f25784a5d39b666709c2dc6521f014eea781)) - new response fields (assetType, folders and organization) in SearchAllIamPolicies ([0a14f25](https://www.github.com/googleapis/python-asset/commit/0a14f25784a5d39b666709c2dc6521f014eea781)) ##### Bug Fixes - disable always_use_jwt_access ([0a14f25](https://www.github.com/googleapis/python-asset/commit/0a14f25784a5d39b666709c2dc6521f014eea781)) - disable always_use_jwt_access ([#​217](https://www.github.com/googleapis/python-asset/issues/217)) ([0a14f25](https://www.github.com/googleapis/python-asset/commit/0a14f25784a5d39b666709c2dc6521f014eea781)) ##### Documentation - omit mention of Python 2.7 in 'CONTRIBUTING.rst' ([#​1127](https://www.github.com/googleapis/python-asset/issues/1127)) ([#​205](https://www.github.com/googleapis/python-asset/issues/205)) ([b9db51a](https://www.github.com/googleapis/python-asset/commit/b9db51a1e88615ab2da22da188d59987fcfca5d4)), closes [#​1126](https://www.github.com/googleapis/python-asset/issues/1126)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 4f9b340b5620..b60143280f7f 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.40.0 -google-cloud-asset==3.1.0 +google-cloud-asset==3.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.6.1 google-cloud-bigquery==2.20.0 From fd338015f9f00526b1fe06730de9d37c48b61718 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 13 Jul 2021 12:56:29 +0200 Subject: [PATCH 109/235] chore(deps): update dependency backoff to v1.11.0 (#222) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [backoff](https://togithub.com/litl/backoff) | `==1.10.0` -> `==1.11.0` | [![age](https://badges.renovateapi.com/packages/pypi/backoff/1.11.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/backoff/1.11.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/backoff/1.11.0/compatibility-slim/1.10.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/backoff/1.11.0/confidence-slim/1.10.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
litl/backoff ### [`v1.11.0`](https://togithub.com/litl/backoff/blob/master/CHANGELOG.md#v1110-2021-07-12) [Compare Source](https://togithub.com/litl/backoff/compare/v1.10.0...v1.11.0) ##### Changed - Configurable logging levels for backoff and giveup events - Minor documentation fixes ##### NOTE THIS WILL BE THE FINAL PYTHON 2.7 COMPATIBLE RELEASE.
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index a2d247d830b0..1686e66f21be 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ -backoff==1.10.0 +backoff==1.11.0 flaky==3.7.0 pytest==6.2.4 From 6bcdd67d5a61361e88f38483490e0b7ca2122ef6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 13 Jul 2021 20:44:27 +0200 Subject: [PATCH 110/235] chore(deps): update dependency google-cloud-bigquery to v2.21.0 (#226) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-bigquery](https://togithub.com/googleapis/python-bigquery) | `==2.20.0` -> `==2.21.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.21.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.21.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.21.0/compatibility-slim/2.20.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.21.0/confidence-slim/2.20.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-bigquery ### [`v2.21.0`](https://togithub.com/googleapis/python-bigquery/blob/master/CHANGELOG.md#​2210-httpswwwgithubcomgoogleapispython-bigquerycomparev2200v2210-2021-07-12) ##### Features - Add max_results parameter to some of the `QueryJob` methods. ([#​698](https://www.github.com/googleapis/python-bigquery/issues/698)) ([2a9618f](https://www.github.com/googleapis/python-bigquery/commit/2a9618f4daaa4a014161e1a2f7376844eec9e8da)) - Add support for decimal target types. ([#​735](https://www.github.com/googleapis/python-bigquery/issues/735)) ([7d2d3e9](https://www.github.com/googleapis/python-bigquery/commit/7d2d3e906a9eb161911a198fb925ad79de5df934)) - Add support for table snapshots. ([#​740](https://www.github.com/googleapis/python-bigquery/issues/740)) ([ba86b2a](https://www.github.com/googleapis/python-bigquery/commit/ba86b2a6300ae5a9f3c803beeb42bda4c522e34c)) - Enable unsetting policy tags on schema fields. ([#​703](https://www.github.com/googleapis/python-bigquery/issues/703)) ([18bb443](https://www.github.com/googleapis/python-bigquery/commit/18bb443c7acd0a75dcb57d9aebe38b2d734ff8c7)) - Make it easier to disable best-effort deduplication with streaming inserts. ([#​734](https://www.github.com/googleapis/python-bigquery/issues/734)) ([1246da8](https://www.github.com/googleapis/python-bigquery/commit/1246da86b78b03ca1aa2c45ec71649e294cfb2f1)) - Support passing struct data to the DB API. ([#​718](https://www.github.com/googleapis/python-bigquery/issues/718)) ([38b3ef9](https://www.github.com/googleapis/python-bigquery/commit/38b3ef96c3dedc139b84f0ff06885141ae7ce78c)) ##### Bug Fixes - Inserting non-finite floats with `insert_rows()`. ([#​728](https://www.github.com/googleapis/python-bigquery/issues/728)) ([d047419](https://www.github.com/googleapis/python-bigquery/commit/d047419879e807e123296da2eee89a5253050166)) - Use `pandas` function to check for `NaN`. ([#​750](https://www.github.com/googleapis/python-bigquery/issues/750)) ([67bc5fb](https://www.github.com/googleapis/python-bigquery/commit/67bc5fbd306be7cdffd216f3791d4024acfa95b3)) ##### Documentation - Add docs for all enums in module. ([#​745](https://www.github.com/googleapis/python-bigquery/issues/745)) ([145944f](https://www.github.com/googleapis/python-bigquery/commit/145944f24fedc4d739687399a8309f9d51d43dfd)) - Omit mention of Python 2.7 in `CONTRIBUTING.rst`. ([#​706](https://www.github.com/googleapis/python-bigquery/issues/706)) ([27d6839](https://www.github.com/googleapis/python-bigquery/commit/27d6839ee8a40909e4199cfa0da8b6b64705b2e9))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index b60143280f7f..d3edf7549832 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.40.0 google-cloud-asset==3.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.6.1 -google-cloud-bigquery==2.20.0 +google-cloud-bigquery==2.21.0 From f19931c1fafcdf6656f944dc6ead6b4451cd8e26 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 16 Jul 2021 15:12:08 +0200 Subject: [PATCH 111/235] chore(deps): update dependency backoff to v1.11.1 (#231) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [backoff](https://togithub.com/litl/backoff) | `==1.11.0` -> `==1.11.1` | [![age](https://badges.renovateapi.com/packages/pypi/backoff/1.11.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/backoff/1.11.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/backoff/1.11.1/compatibility-slim/1.11.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/backoff/1.11.1/confidence-slim/1.11.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
litl/backoff ### [`v1.11.1`](https://togithub.com/litl/backoff/blob/master/CHANGELOG.md#v1111-2021-07-14) [Compare Source](https://togithub.com/litl/backoff/compare/v1.11.0...v1.11.1) ##### Changed - Update **version** in backoff module
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index 1686e66f21be..2f23bc5c1922 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ -backoff==1.11.0 +backoff==1.11.1 flaky==3.7.0 pytest==6.2.4 From c40265109afeb1244a9ccafbd32936206f66ee58 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 16 Jul 2021 15:16:09 +0200 Subject: [PATCH 112/235] chore(deps): update dependency google-cloud-storage to v1.41.0 (#227) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-storage](https://togithub.com/googleapis/python-storage) | `==1.40.0` -> `==1.41.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.41.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.41.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.41.0/compatibility-slim/1.40.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/1.41.0/confidence-slim/1.40.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-storage ### [`v1.41.0`](https://togithub.com/googleapis/python-storage/blob/master/CHANGELOG.md#​1410-httpswwwgithubcomgoogleapispython-storagecomparev1400v1410-2021-07-13) [Compare Source](https://togithub.com/googleapis/python-storage/compare/v1.40.0...v1.41.0) ##### Features - add support for Etag headers on reads ([#​489](https://www.github.com/googleapis/python-storage/issues/489)) ([741d3fd](https://www.github.com/googleapis/python-storage/commit/741d3fda4e4280022cede29ebeb7c2ea09e73b6f)) ##### Bug Fixes - **deps:** update minimum dependency versions to pick up bugfixes ([#​496](https://www.github.com/googleapis/python-storage/issues/496)) ([92251a5](https://www.github.com/googleapis/python-storage/commit/92251a5c8ea4d663773506eb1c630201a657aa69)), closes [#​494](https://www.github.com/googleapis/python-storage/issues/494) - populate etag / generation / metageneration properties during download ([#​488](https://www.github.com/googleapis/python-storage/issues/488)) ([49ba14c](https://www.github.com/googleapis/python-storage/commit/49ba14c9c47dbe6bc2bb45d53bbe5621c131fbcb)) - revise and rename is_etag_in_json(data) ([#​483](https://www.github.com/googleapis/python-storage/issues/483)) ([0a52546](https://www.github.com/googleapis/python-storage/commit/0a5254647bf1155874fe48f3891bcc34a76b0b81))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d3edf7549832..d298e688b3d8 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.40.0 +google-cloud-storage==1.41.0 google-cloud-asset==3.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.6.1 From 97d3731b03e275ebfa4397bdb2c71a15b31e8a0f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Jul 2021 00:26:55 +0200 Subject: [PATCH 113/235] chore(deps): update dependency google-cloud-bigquery to v2.22.0 (#233) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d298e688b3d8..d0590fe1ccc3 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.41.0 google-cloud-asset==3.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.6.1 -google-cloud-bigquery==2.21.0 +google-cloud-bigquery==2.22.0 From caaca3234a11fecfc062a7a60f0345a1770e0688 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Jul 2021 19:37:10 +0200 Subject: [PATCH 114/235] chore(deps): update dependency google-cloud-storage to v1.41.1 (#237) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d0590fe1ccc3..e0fd9dfd4c75 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.41.0 +google-cloud-storage==1.41.1 google-cloud-asset==3.2.0 google-cloud-resource-manager==0.30.3 google-cloud-pubsub==2.6.1 From 6c1534c537e6973611b929d30e8aaa6dab07d45e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 Jul 2021 13:48:38 +0000 Subject: [PATCH 115/235] feat: add Samples section to CONTRIBUTING.rst (#235) Source-Link: https://github.com/googleapis/synthtool/commit/52e4e46eff2a0b70e3ff5506a02929d089d077d4 Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:6186535cbdbf6b9fe61f00294929221d060634dae4a0795c1cefdbc995b2d605 --- asset/snippets/snippets/noxfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 5ff9e1db5808..6a8ccdae22c9 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -28,8 +28,9 @@ # WARNING - WARNING - WARNING - WARNING - WARNING # WARNING - WARNING - WARNING - WARNING - WARNING -# Copy `noxfile_config.py` to your directory and modify it instead. +BLACK_VERSION = "black==19.10b0" +# Copy `noxfile_config.py` to your directory and modify it instead. # `TEST_CONFIG` dict is a configuration hook that allows users to # modify the test configurations. The values here should be in sync @@ -159,7 +160,7 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: - session.install("black") + session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) From 2754b6e3d8a87a901bae3b251080003e26a78590 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 22 Jul 2021 15:58:29 +0200 Subject: [PATCH 116/235] chore(deps): update dependency google-cloud-resource-manager to v1 (#239) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-resource-manager](https://togithub.com/googleapis/python-resource-manager) | `==0.30.3` -> `==1.0.1` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-resource-manager/1.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-resource-manager/1.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-resource-manager/1.0.1/compatibility-slim/0.30.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-resource-manager/1.0.1/confidence-slim/0.30.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-resource-manager ### [`v1.0.1`](https://togithub.com/googleapis/python-resource-manager/blob/master/CHANGELOG.md#​101-httpswwwgithubcomgoogleapispython-resource-managercomparev100v101-2021-07-20) [Compare Source](https://togithub.com/googleapis/python-resource-manager/compare/v0.30.3...v1.0.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index e0fd9dfd4c75..d3a10fcb2092 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.41.1 google-cloud-asset==3.2.0 -google-cloud-resource-manager==0.30.3 +google-cloud-resource-manager==1.0.1 google-cloud-pubsub==2.6.1 google-cloud-bigquery==2.22.0 From 6ec7ce8877b7865e56725b34823d11d8a1a0a7a1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 22 Jul 2021 17:14:25 +0200 Subject: [PATCH 117/235] chore(deps): update dependency google-cloud-asset to v3.2.1 (#238) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-asset](https://togithub.com/googleapis/python-asset) | `==3.2.0` -> `==3.2.1` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.2.1/compatibility-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.2.1/confidence-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-asset ### [`v3.2.1`](https://togithub.com/googleapis/python-asset/blob/master/CHANGELOG.md#​321-httpswwwgithubcomgoogleapispython-assetcomparev320v321-2021-07-21) [Compare Source](https://togithub.com/googleapis/python-asset/compare/v3.2.0...v3.2.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d3a10fcb2092..466f5694cf54 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.41.1 -google-cloud-asset==3.2.0 +google-cloud-asset==3.2.1 google-cloud-resource-manager==1.0.1 google-cloud-pubsub==2.6.1 google-cloud-bigquery==2.22.0 From 68cda753e2c70ffe284c2ec351417ccba020ddf9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 22 Jul 2021 23:22:42 +0200 Subject: [PATCH 118/235] chore(deps): update dependency google-cloud-bigquery to v2.22.1 (#241) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 466f5694cf54..6180c3477b2f 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.41.1 google-cloud-asset==3.2.1 google-cloud-resource-manager==1.0.1 google-cloud-pubsub==2.6.1 -google-cloud-bigquery==2.22.0 +google-cloud-bigquery==2.22.1 From 9fabf7cea438683f8df6ad69f24e9c434077dac5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Jul 2021 16:41:53 +0200 Subject: [PATCH 119/235] chore(deps): update dependency google-cloud-bigquery to v2.23.0 (#246) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 6180c3477b2f..e6ec729672cf 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.41.1 google-cloud-asset==3.2.1 google-cloud-resource-manager==1.0.1 google-cloud-pubsub==2.6.1 -google-cloud-bigquery==2.22.1 +google-cloud-bigquery==2.23.0 From 82a46c5548872718dfbec1c434f586e8cae192f8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Jul 2021 19:31:21 +0200 Subject: [PATCH 120/235] chore(deps): update dependency google-cloud-pubsub to v2.7.0 (#249) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index e6ec729672cf..a7dc3482f106 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.41.1 google-cloud-asset==3.2.1 google-cloud-resource-manager==1.0.1 -google-cloud-pubsub==2.6.1 +google-cloud-pubsub==2.7.0 google-cloud-bigquery==2.23.0 From 5196a8c511e9a48dd23882984bef14185ed3ac4e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Jul 2021 21:40:32 +0200 Subject: [PATCH 121/235] chore(deps): update dependency google-cloud-bigquery to v2.23.1 (#250) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index a7dc3482f106..fdd198c32bc1 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.41.1 google-cloud-asset==3.2.1 google-cloud-resource-manager==1.0.1 google-cloud-pubsub==2.7.0 -google-cloud-bigquery==2.23.0 +google-cloud-bigquery==2.23.1 From 5b843dce89f44f756dcfa37f37aa2c6e0f8236cb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Jul 2021 21:40:49 +0200 Subject: [PATCH 122/235] chore(deps): update dependency google-cloud-resource-manager to v1.0.2 (#248) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index fdd198c32bc1..898e313e8315 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.41.1 google-cloud-asset==3.2.1 -google-cloud-resource-manager==1.0.1 +google-cloud-resource-manager==1.0.2 google-cloud-pubsub==2.7.0 google-cloud-bigquery==2.23.1 From 33dc6df592b06db565544c85563c632086bbbc08 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 29 Jul 2021 12:59:41 +0200 Subject: [PATCH 123/235] chore(deps): update dependency google-cloud-asset to v3.3.0 (#251) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 898e313e8315..aed7a545b678 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.41.1 -google-cloud-asset==3.2.1 +google-cloud-asset==3.3.0 google-cloud-resource-manager==1.0.2 google-cloud-pubsub==2.7.0 google-cloud-bigquery==2.23.1 From 394d31002b030b4a6f142f10d42d4f5d4cbe16cf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 29 Jul 2021 19:58:35 +0200 Subject: [PATCH 124/235] chore(deps): update dependency google-cloud-bigquery to v2.23.2 (#252) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index aed7a545b678..b1517146b929 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.41.1 google-cloud-asset==3.3.0 google-cloud-resource-manager==1.0.2 google-cloud-pubsub==2.7.0 -google-cloud-bigquery==2.23.1 +google-cloud-bigquery==2.23.2 From 10475a8ac4c7ec8ae885aac627c599efb6869a91 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Fri, 30 Jul 2021 13:30:31 -0400 Subject: [PATCH 125/235] ci: opt in to use multiple projects (#253) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #242 🦕 --- asset/snippets/snippets/noxfile_config.py | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 asset/snippets/snippets/noxfile_config.py diff --git a/asset/snippets/snippets/noxfile_config.py b/asset/snippets/snippets/noxfile_config.py new file mode 100644 index 000000000000..4a4db8c2de30 --- /dev/null +++ b/asset/snippets/snippets/noxfile_config.py @@ -0,0 +1,38 @@ +# Copyright 2021 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. + +# Default TEST_CONFIG_OVERRIDE for python repos. + +# You can copy this file into your directory, then it will be inported from +# the noxfile.py. + +# The source of truth: +# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/noxfile_config.py + +TEST_CONFIG_OVERRIDE = { + # You can opt out from the test for specific Python versions. + "ignored_versions": ["2.7"], + # Old samples are opted out of enforcing Python type hints + # All new samples should feature them + "enforce_type_hints": False, + # An envvar key for determining the project id to use. Change it + # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a + # build specific Cloud project. You can also use your own string + # to use your own Cloud project. + # "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", + "gcloud_project_env": "BUILD_SPECIFIC_GCLOUD_PROJECT", + # A dictionary you want to inject into your test. Don't put any + # secrets here. These values will override predefined values. + "envs": {}, +} From b7bc83774ebc4a45eff07e98e63c74c91cb4c700 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 10 Aug 2021 19:41:40 +0200 Subject: [PATCH 126/235] chore(deps): update dependency google-cloud-bigquery to v2.23.3 (#256) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index b1517146b929..77b2d7a9fb48 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.41.1 google-cloud-asset==3.3.0 google-cloud-resource-manager==1.0.2 google-cloud-pubsub==2.7.0 -google-cloud-bigquery==2.23.2 +google-cloud-bigquery==2.23.3 From 1fe46482e20bcf78215cffb60a54b22032164503 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 11 Aug 2021 16:32:42 +0000 Subject: [PATCH 127/235] chore: fix INSTALL_LIBRARY_FROM_SOURCE in noxfile.py (#257) Source-Link: https://github.com/googleapis/synthtool/commit/6252f2cd074c38f37b44abe5e96d128733eb1b61 Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:50e35228649c47b6ca82aa0be3ff9eb2afce51c82b66c4a03fe4afeb5ff6c0fc --- asset/snippets/snippets/noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 6a8ccdae22c9..125bb619cc49 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -96,7 +96,7 @@ def get_pytest_env_vars() -> Dict[str, str]: TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = bool(os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False)) +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") # # Style Checks # From 43234e35a3cc9f04ac3ce29e0f7591e2074ab79f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 12 Aug 2021 16:56:24 +0200 Subject: [PATCH 128/235] chore(deps): update dependency google-cloud-storage to v1.42.0 (#260) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 77b2d7a9fb48..ab54b6fcf62a 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.41.1 +google-cloud-storage==1.42.0 google-cloud-asset==3.3.0 google-cloud-resource-manager==1.0.2 google-cloud-pubsub==2.7.0 From e53f967967152831154de600ad1b25e6a5a04a69 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 12 Aug 2021 17:08:27 +0200 Subject: [PATCH 129/235] chore(deps): update dependency google-cloud-bigquery to v2.24.0 (#259) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-bigquery](https://togithub.com/googleapis/python-bigquery) | `==2.23.3` -> `==2.24.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.24.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.24.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.24.0/compatibility-slim/2.23.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.24.0/confidence-slim/2.23.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-bigquery ### [`v2.24.0`](https://togithub.com/googleapis/python-bigquery/blob/master/CHANGELOG.md#​2240-httpswwwgithubcomgoogleapispython-bigquerycomparev2233v2240-2021-08-11) [Compare Source](https://togithub.com/googleapis/python-bigquery/compare/v2.23.3...v2.24.0) ##### Features - add support for transaction statistics ([#​849](https://www.github.com/googleapis/python-bigquery/issues/849)) ([7f7b1a8](https://www.github.com/googleapis/python-bigquery/commit/7f7b1a808d50558772a0deb534ca654da65d629e)) - make the same `Table*` instances equal to each other ([#​867](https://www.github.com/googleapis/python-bigquery/issues/867)) ([c1a3d44](https://www.github.com/googleapis/python-bigquery/commit/c1a3d4435739a21d25aa154145e36d3a7c42eeb6)) - retry failed query jobs in `result()` ([#​837](https://www.github.com/googleapis/python-bigquery/issues/837)) ([519d99c](https://www.github.com/googleapis/python-bigquery/commit/519d99c20e7d1101f76981f3de036fdf3c7a4ecc)) - support `ScalarQueryParameterType` for `type_` argument in `ScalarQueryParameter` constructor ([#​850](https://www.github.com/googleapis/python-bigquery/issues/850)) ([93d15e2](https://www.github.com/googleapis/python-bigquery/commit/93d15e2e5405c2cc6d158c4e5737361344193dbc)) ##### Bug Fixes - make unicode characters working well in load_table_from_json ([#​865](https://www.github.com/googleapis/python-bigquery/issues/865)) ([ad9c802](https://www.github.com/googleapis/python-bigquery/commit/ad9c8026f0e667f13dd754279f9dc40d06f4fa78)) ##### [2.23.3](https://www.github.com/googleapis/python-bigquery/compare/v2.23.2...v2.23.3) (2021-08-06) ##### Bug Fixes - increase default retry deadline to 10 minutes ([#​859](https://www.github.com/googleapis/python-bigquery/issues/859)) ([30770fd](https://www.github.com/googleapis/python-bigquery/commit/30770fd0575fbd5aaa70c14196a4cc54627aecd2)) ##### [2.23.2](https://www.github.com/googleapis/python-bigquery/compare/v2.23.1...v2.23.2) (2021-07-29) ##### Dependencies - expand pyarrow pins to support 5.x releases ([#​833](https://www.github.com/googleapis/python-bigquery/issues/833)) ([80e3a61](https://www.github.com/googleapis/python-bigquery/commit/80e3a61c60419fb19b70b664c6415cd01ba82f5b)) ##### [2.23.1](https://www.github.com/googleapis/python-bigquery/compare/v2.23.0...v2.23.1) (2021-07-28) ##### Bug Fixes - `insert_rows()` accepts float column values as strings again ([#​824](https://www.github.com/googleapis/python-bigquery/issues/824)) ([d9378af](https://www.github.com/googleapis/python-bigquery/commit/d9378af13add879118a1d004529b811f72c325d6))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index ab54b6fcf62a..77e8a3a4d1e2 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.0 google-cloud-asset==3.3.0 google-cloud-resource-manager==1.0.2 google-cloud-pubsub==2.7.0 -google-cloud-bigquery==2.23.3 +google-cloud-bigquery==2.24.0 From 5c309a195f40ed896fa3a1d4b3bea9b05b616313 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 13 Aug 2021 11:17:38 -0400 Subject: [PATCH 130/235] chore: drop mention of Python 2.7 from templates (#261) Source-Link: https://github.com/googleapis/synthtool/commit/facee4cc1ea096cd8bcc008bb85929daa7c414c0 Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:9743664022bd63a8084be67f144898314c7ca12f0a03e422ac17c733c129d803 Co-authored-by: Owl Bot --- asset/snippets/snippets/noxfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 125bb619cc49..e73436a15626 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -39,7 +39,7 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': ["2.7"], + 'ignored_versions': [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them @@ -88,8 +88,8 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. -# All versions used to tested samples. -ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8", "3.9"] +# All versions used to test samples. +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] From 5d9c4b52e9f33386e125d17a1378786084d24975 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Aug 2021 16:43:42 +0200 Subject: [PATCH 131/235] chore(deps): update dependency google-cloud-bigquery to v2.24.1 (#267) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 77e8a3a4d1e2..a513c850fe02 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.0 google-cloud-asset==3.3.0 google-cloud-resource-manager==1.0.2 google-cloud-pubsub==2.7.0 -google-cloud-bigquery==2.24.0 +google-cloud-bigquery==2.24.1 From 1f58f73202f6a4e52115219be31cf07eb92949de Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Aug 2021 19:33:37 +0200 Subject: [PATCH 132/235] chore(deps): update dependency google-cloud-resource-manager to v1.1.0 (#268) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index a513c850fe02..b90695648863 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.0 google-cloud-asset==3.3.0 -google-cloud-resource-manager==1.0.2 +google-cloud-resource-manager==1.1.0 google-cloud-pubsub==2.7.0 google-cloud-bigquery==2.24.1 From 6d3bff47e8cd52dba0ba52f3dccaa064bd6e899c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 24 Aug 2021 19:34:13 +0200 Subject: [PATCH 133/235] chore(deps): update dependency google-cloud-pubsub to v2.7.1 (#269) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index b90695648863..1daadd3eb26e 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.0 google-cloud-asset==3.3.0 google-cloud-resource-manager==1.1.0 -google-cloud-pubsub==2.7.0 +google-cloud-pubsub==2.7.1 google-cloud-bigquery==2.24.1 From 11d1c40ac82997b025d94dc81c73af772d691e5c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 25 Aug 2021 15:07:59 +0200 Subject: [PATCH 134/235] chore(deps): update dependency google-cloud-bigquery to v2.25.0 (#271) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 1daadd3eb26e..8a407faf6767 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.0 google-cloud-asset==3.3.0 google-cloud-resource-manager==1.1.0 google-cloud-pubsub==2.7.1 -google-cloud-bigquery==2.24.1 +google-cloud-bigquery==2.25.0 From 11f5911e85525309539cc6889a41880b5f38475d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 25 Aug 2021 15:43:11 +0200 Subject: [PATCH 135/235] chore(deps): update dependency google-cloud-asset to v3.4.0 (#266) Co-authored-by: Leah E. Cole <6719667+leahecole@users.noreply.github.com> Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 8a407faf6767..e4ae212f3d5d 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.0 -google-cloud-asset==3.3.0 +google-cloud-asset==3.4.0 google-cloud-resource-manager==1.1.0 google-cloud-pubsub==2.7.1 google-cloud-bigquery==2.25.0 From 457b211a1b98b0a43155cf5685908ae5ba6934ee Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 26 Aug 2021 18:03:58 +0200 Subject: [PATCH 136/235] chore(deps): update dependency google-cloud-bigquery to v2.25.1 (#273) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index e4ae212f3d5d..4fa1539d36bf 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.0 google-cloud-asset==3.4.0 google-cloud-resource-manager==1.1.0 google-cloud-pubsub==2.7.1 -google-cloud-bigquery==2.25.0 +google-cloud-bigquery==2.25.1 From 32f5fd31e6143a74123d1c5d227d67fba507e12e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 31 Aug 2021 00:46:17 +0200 Subject: [PATCH 137/235] chore(deps): update dependency pytest to v6.2.5 (#276) --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index 2f23bc5c1922..23bba2f0c079 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ backoff==1.11.1 flaky==3.7.0 -pytest==6.2.4 +pytest==6.2.5 From c88a4f6bdb56354ede7a2b56b9c0cd8ecb48f757 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Sep 2021 16:52:28 +0200 Subject: [PATCH 138/235] chore(deps): update dependency google-cloud-bigquery to v2.25.2 (#277) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 4fa1539d36bf..ae855a920674 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.0 google-cloud-asset==3.4.0 google-cloud-resource-manager==1.1.0 google-cloud-pubsub==2.7.1 -google-cloud-bigquery==2.25.1 +google-cloud-bigquery==2.25.2 From 354baa8620a23f943aa7223f4dfdc47f215d3881 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 2 Sep 2021 02:29:24 +0200 Subject: [PATCH 139/235] chore(deps): update dependency google-cloud-bigquery to v2.26.0 (#280) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index ae855a920674..cb7f1eba1567 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.0 google-cloud-asset==3.4.0 google-cloud-resource-manager==1.1.0 google-cloud-pubsub==2.7.1 -google-cloud-bigquery==2.25.2 +google-cloud-bigquery==2.26.0 From 48e0a04a7fc112d3c499b00a38601551c283196e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Sep 2021 17:50:10 +0200 Subject: [PATCH 140/235] chore(deps): update dependency google-cloud-pubsub to v2.8.0 (#287) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-pubsub](https://togithub.com/googleapis/python-pubsub) | `==2.7.1` -> `==2.8.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-pubsub/2.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-pubsub/2.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-pubsub/2.8.0/compatibility-slim/2.7.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-pubsub/2.8.0/confidence-slim/2.7.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-pubsub ### [`v2.8.0`](https://togithub.com/googleapis/python-pubsub/blob/master/CHANGELOG.md#​280-httpswwwgithubcomgoogleapispython-pubsubcomparev271v280-2021-09-02) [Compare Source](https://togithub.com/googleapis/python-pubsub/compare/v2.7.1...v2.8.0) ##### Features - closed subscriber as context manager raises ([#​488](https://www.togithub.com/googleapis/python-pubsub/issues/488)) ([a05a3f2](https://www.github.com/googleapis/python-pubsub/commit/a05a3f250cf8567ffe0d2eb3ecc45856a2bcd07c)) ##### Documentation - clarify the types of Message parameters ([#​486](https://www.togithub.com/googleapis/python-pubsub/issues/486)) ([633e91b](https://www.github.com/googleapis/python-pubsub/commit/633e91bbfc0a8f4f484089acff6812b754f40c75)) ##### [2.7.1](https://www.github.com/googleapis/python-pubsub/compare/v2.7.0...v2.7.1) (2021-08-13) ##### Bug Fixes - remove dependency on pytz ([#​472](https://www.togithub.com/googleapis/python-pubsub/issues/472)) ([972cc16](https://www.github.com/googleapis/python-pubsub/commit/972cc163f5a1477b37a5ab7e329faf1468637fa2))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index cb7f1eba1567..b7e86d25e429 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.0 google-cloud-asset==3.4.0 google-cloud-resource-manager==1.1.0 -google-cloud-pubsub==2.7.1 +google-cloud-pubsub==2.8.0 google-cloud-bigquery==2.26.0 From d7d39d276b00d4078cd07b42b57610c72386e8de Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 8 Sep 2021 17:06:10 +0200 Subject: [PATCH 141/235] chore(deps): update dependency google-cloud-asset to v3.5.0 (#289) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-asset](https://togithub.com/googleapis/python-asset) | `==3.4.0` -> `==3.5.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.5.0/compatibility-slim/3.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.5.0/confidence-slim/3.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-asset ### [`v3.5.0`](https://togithub.com/googleapis/python-asset/blob/master/CHANGELOG.md#​350-httpswwwgithubcomgoogleapispython-assetcomparev340v350-2021-09-03) [Compare Source](https://togithub.com/googleapis/python-asset/compare/v3.4.0...v3.5.0) ##### Features - add inventory_path ([#​283](https://www.togithub.com/googleapis/python-asset/issues/283)) ([fbb47e6](https://www.github.com/googleapis/python-asset/commit/fbb47e6487fe454ca84d2415cf756a87bf66739f)) - **v1:** Add content type Relationship to support relationship search ([038febe](https://www.github.com/googleapis/python-asset/commit/038febe4c21d6ece23872e01cffc1110c59d6699)) - **v1:** add relationships ([#​281](https://www.togithub.com/googleapis/python-asset/issues/281)) ([038febe](https://www.github.com/googleapis/python-asset/commit/038febe4c21d6ece23872e01cffc1110c59d6699))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index b7e86d25e429..f2e863827317 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.0 -google-cloud-asset==3.4.0 +google-cloud-asset==3.5.0 google-cloud-resource-manager==1.1.0 google-cloud-pubsub==2.8.0 google-cloud-bigquery==2.26.0 From b81cfc548656265a705d3344df9fc46937603d1d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Sep 2021 16:42:36 +0200 Subject: [PATCH 142/235] chore(deps): update dependency google-cloud-storage to v1.42.1 (#290) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index f2e863827317..6fed775a27e4 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.42.0 +google-cloud-storage==1.42.1 google-cloud-asset==3.5.0 google-cloud-resource-manager==1.1.0 google-cloud-pubsub==2.8.0 From d8832505c884ec8709a721ba72e159fba1f8c884 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 17 Sep 2021 00:38:24 +0200 Subject: [PATCH 143/235] chore(deps): update dependency google-cloud-storage to v1.42.2 (#292) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 6fed775a27e4..81362ed6628b 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.42.1 +google-cloud-storage==1.42.2 google-cloud-asset==3.5.0 google-cloud-resource-manager==1.1.0 google-cloud-pubsub==2.8.0 From 56e7c16cc929ba0b83082e03e4609c272947132b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 17 Sep 2021 15:52:29 +0000 Subject: [PATCH 144/235] chore: blacken samples noxfile template (#291) --- asset/snippets/snippets/noxfile.py | 44 +++++++++++++++++------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index e73436a15626..b008613f03ff 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -39,17 +39,15 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - 'ignored_versions': [], - + "ignored_versions": [], # Old samples are opted out of enforcing Python type hints # All new samples should feature them - 'enforce_type_hints': False, - + "enforce_type_hints": False, # An envvar key for determining the project id to use. Change it # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a # build specific Cloud project. You can also use your own string # to use your own Cloud project. - 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', + "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', # If you need to use a specific version of pip, # change pip_version_override to the string representation @@ -57,13 +55,13 @@ "pip_version_override": None, # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. - 'envs': {}, + "envs": {}, } try: # Ensure we can import noxfile_config in the project's directory. - sys.path.append('.') + sys.path.append(".") from noxfile_config import TEST_CONFIG_OVERRIDE except ImportError as e: print("No user noxfile_config found: detail: {}".format(e)) @@ -78,12 +76,12 @@ def get_pytest_env_vars() -> Dict[str, str]: ret = {} # Override the GCLOUD_PROJECT and the alias. - env_key = TEST_CONFIG['gcloud_project_env'] + env_key = TEST_CONFIG["gcloud_project_env"] # This should error out if not set. - ret['GOOGLE_CLOUD_PROJECT'] = os.environ[env_key] + ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key] # Apply user supplied envs. - ret.update(TEST_CONFIG['envs']) + ret.update(TEST_CONFIG["envs"]) return ret @@ -92,11 +90,14 @@ def get_pytest_env_vars() -> Dict[str, str]: ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] # Any default versions that should be ignored. -IGNORED_VERSIONS = TEST_CONFIG['ignored_versions'] +IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) -INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ("True", "true") +INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ( + "True", + "true", +) # # Style Checks # @@ -141,7 +142,7 @@ def _determine_local_import_names(start_dir: str) -> List[str]: @nox.session def lint(session: nox.sessions.Session) -> None: - if not TEST_CONFIG['enforce_type_hints']: + if not TEST_CONFIG["enforce_type_hints"]: session.install("flake8", "flake8-import-order") else: session.install("flake8", "flake8-import-order", "flake8-annotations") @@ -150,9 +151,11 @@ def lint(session: nox.sessions.Session) -> None: args = FLAKE8_COMMON_ARGS + [ "--application-import-names", ",".join(local_names), - "." + ".", ] session.run("flake8", *args) + + # # Black # @@ -165,6 +168,7 @@ def blacken(session: nox.sessions.Session) -> None: session.run("black", *python_files) + # # Sample Tests # @@ -173,7 +177,9 @@ def blacken(session: nox.sessions.Session) -> None: PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] -def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: +def _session_tests( + session: nox.sessions.Session, post_install: Callable = None +) -> None: if TEST_CONFIG["pip_version_override"]: pip_version = TEST_CONFIG["pip_version_override"] session.install(f"pip=={pip_version}") @@ -203,7 +209,7 @@ def _session_tests(session: nox.sessions.Session, post_install: Callable = None) # on travis where slow and flaky tests are excluded. # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html success_codes=[0, 5], - env=get_pytest_env_vars() + env=get_pytest_env_vars(), ) @@ -213,9 +219,9 @@ def py(session: nox.sessions.Session) -> None: if session.python in TESTED_VERSIONS: _session_tests(session) else: - session.skip("SKIPPED: {} tests are disabled for this sample.".format( - session.python - )) + session.skip( + "SKIPPED: {} tests are disabled for this sample.".format(session.python) + ) # From 0a19b432d8020c050f7dad2c5320073c2bedd1d7 Mon Sep 17 00:00:00 2001 From: lvvvvvf <53883181+lvvvvvf@users.noreply.github.com> Date: Tue, 21 Sep 2021 18:07:41 -0700 Subject: [PATCH 145/235] feat: add relationship samples (#293) * Add export to BigQuery * Add comments to variables * fix: fix lint * fix: fix the test * feat: add relationship samples * fix: fix build errors in main * fix: fix feed tests --- asset/snippets/snippets/conftest.py | 4 +++- asset/snippets/snippets/quickstart_createfeed.py | 7 +++++-- .../snippets/quickstart_createfeed_test.py | 14 ++++++++++++-- asset/snippets/snippets/quickstart_exportassets.py | 4 ++-- .../snippets/quickstart_exportassets_test.py | 10 +++++++++- asset/snippets/snippets/quickstart_listassets.py | 7 ++++--- .../snippets/quickstart_listassets_test.py | 11 +++++++++-- 7 files changed, 44 insertions(+), 13 deletions(-) diff --git a/asset/snippets/snippets/conftest.py b/asset/snippets/snippets/conftest.py index a8c9056838c6..d5c895f9d177 100644 --- a/asset/snippets/snippets/conftest.py +++ b/asset/snippets/snippets/conftest.py @@ -56,13 +56,15 @@ def another_topic(): @pytest.fixture(scope="module") def test_feed(test_topic): + from google.cloud import asset_v1 + feed_id = f"feed-{uuid.uuid4().hex}" asset_name = f"assets-{uuid.uuid4().hex}" @backoff.on_exception(backoff.expo, InternalServerError, max_time=60) def create_feed(): return quickstart_createfeed.create_feed( - PROJECT, feed_id, [asset_name], test_topic.name + PROJECT, feed_id, [asset_name], test_topic.name, asset_v1.ContentType.RESOURCE ) feed = create_feed() diff --git a/asset/snippets/snippets/quickstart_createfeed.py b/asset/snippets/snippets/quickstart_createfeed.py index 8e592bde19c2..0e8b1cf8e0a9 100644 --- a/asset/snippets/snippets/quickstart_createfeed.py +++ b/asset/snippets/snippets/quickstart_createfeed.py @@ -18,7 +18,7 @@ import argparse -def create_feed(project_id, feed_id, asset_names, topic): +def create_feed(project_id, feed_id, asset_names, topic, content_type): # [START asset_quickstart_create_feed] from google.cloud import asset_v1 @@ -26,12 +26,14 @@ def create_feed(project_id, feed_id, asset_names, topic): # TODO feed_id = 'Feed ID you want to create' # TODO asset_names = 'List of asset names the feed listen to' # TODO topic = "Topic name of the feed" + # TODO content_type ="Content type of the feed" client = asset_v1.AssetServiceClient() parent = "projects/{}".format(project_id) feed = asset_v1.Feed() feed.asset_names.extend(asset_names) feed.feed_output_config.pubsub_destination.topic = topic + feed.content_type = content_type response = client.create_feed( request={"parent": parent, "feed_id": feed_id, "feed": feed} ) @@ -48,5 +50,6 @@ def create_feed(project_id, feed_id, asset_names, topic): parser.add_argument("feed_id", help="Feed ID you want to create") parser.add_argument("asset_names", help="List of asset names the feed listen to") parser.add_argument("topic", help="Topic name of the feed") + parser.add_argument("content_type", help="Content type of the feed") args = parser.parse_args() - create_feed(args.project_id, args.feed_id, args.asset_names, args.topic) + create_feed(args.project_id, args.feed_id, args.asset_names, args.topic, args.content_type) diff --git a/asset/snippets/snippets/quickstart_createfeed_test.py b/asset/snippets/snippets/quickstart_createfeed_test.py index d53f11fa0c59..2e7941524aee 100644 --- a/asset/snippets/snippets/quickstart_createfeed_test.py +++ b/asset/snippets/snippets/quickstart_createfeed_test.py @@ -23,12 +23,22 @@ PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] ASSET_NAME = "assets-{}".format(uuid.uuid4().hex) FEED_ID = "feed-{}".format(uuid.uuid4().hex) +FEED_ID_R = "feed-{}".format(uuid.uuid4().hex) def test_create_feed(capsys, test_topic, deleter): + from google.cloud import asset_v1 + feed = quickstart_createfeed.create_feed( - PROJECT, FEED_ID, [ASSET_NAME], test_topic.name - ) + PROJECT, FEED_ID, [ASSET_NAME], test_topic.name, + asset_v1.ContentType.RESOURCE) deleter.append(feed.name) out, _ = capsys.readouterr() assert "feed" in out + + feed_r = quickstart_createfeed.create_feed( + PROJECT, FEED_ID_R, [ASSET_NAME], test_topic.name, + asset_v1.ContentType.RELATIONSHIP) + deleter.append(feed_r.name) + out_r, _ = capsys.readouterr() + assert "feed" in out_r diff --git a/asset/snippets/snippets/quickstart_exportassets.py b/asset/snippets/snippets/quickstart_exportassets.py index 0d9c30664fd4..17c767fb1e61 100644 --- a/asset/snippets/snippets/quickstart_exportassets.py +++ b/asset/snippets/snippets/quickstart_exportassets.py @@ -36,17 +36,17 @@ def export_assets(project_id, dump_file_path): # [END asset_quickstart_export_assets] -def export_assets_bigquery(project_id, dataset, table): +def export_assets_bigquery(project_id, dataset, table, content_type): # [START asset_quickstart_export_assets_bigquery] from google.cloud import asset_v1 # TODO project_id = 'Your Google Cloud Project ID' # TODO dataset = 'Your BigQuery dataset path' # TODO table = 'Your BigQuery table name' + # TODO content_type ="Content type to export" client = asset_v1.AssetServiceClient() parent = "projects/{}".format(project_id) - content_type = asset_v1.ContentType.RESOURCE output_config = asset_v1.OutputConfig() output_config.bigquery_destination.dataset = dataset output_config.bigquery_destination.table = table diff --git a/asset/snippets/snippets/quickstart_exportassets_test.py b/asset/snippets/snippets/quickstart_exportassets_test.py index af7cc07399af..7d527dc99bc6 100644 --- a/asset/snippets/snippets/quickstart_exportassets_test.py +++ b/asset/snippets/snippets/quickstart_exportassets_test.py @@ -17,6 +17,7 @@ import os import uuid +from google.cloud import asset_v1 from google.cloud import bigquery from google.cloud import storage import pytest @@ -70,8 +71,15 @@ def test_export_assets(asset_bucket, dataset, capsys): out, _ = capsys.readouterr() assert dump_file_path in out + content_type = asset_v1.ContentType.RESOURCE dataset_id = "projects/{}/datasets/{}".format(PROJECT, dataset) quickstart_exportassets.export_assets_bigquery( - PROJECT, dataset_id, "assettable") + PROJECT, dataset_id, "assettable", content_type) out, _ = capsys.readouterr() assert dataset_id in out + + content_type_r = asset_v1.ContentType.RELATIONSHIP + quickstart_exportassets.export_assets_bigquery( + PROJECT, dataset_id, "assettable", content_type_r) + out_r, _ = capsys.readouterr() + assert dataset_id in out_r diff --git a/asset/snippets/snippets/quickstart_listassets.py b/asset/snippets/snippets/quickstart_listassets.py index 75180075521b..3cd2969196c2 100644 --- a/asset/snippets/snippets/quickstart_listassets.py +++ b/asset/snippets/snippets/quickstart_listassets.py @@ -18,7 +18,7 @@ import argparse -def list_assets(project_id, asset_types, page_size): +def list_assets(project_id, asset_types, page_size, content_type): # [START asset_quickstart_list_assets] from google.cloud import asset_v1 @@ -27,9 +27,9 @@ def list_assets(project_id, asset_types, page_size): # ["storage.googleapis.com/Bucket","bigquery.googleapis.com/Table"]' # TODO page_size = 'Num of assets in one page, which must be between 1 and # 1000 (both inclusively)' + # TODO content_type ="Content type to list" project_resource = "projects/{}".format(project_id) - content_type = asset_v1.ContentType.RESOURCE client = asset_v1.AssetServiceClient() # Call ListAssets v1 to list assets. @@ -63,9 +63,10 @@ def list_assets(project_id, asset_types, page_size): help="Num of assets in one page, which must be between 1 and 1000 " "(both inclusively)", ) + parser.add_argument("content_type", help="Content type to list") args = parser.parse_args() asset_type_list = args.asset_types.split(",") - list_assets(args.project_id, asset_type_list, int(args.page_size)) + list_assets(args.project_id, asset_type_list, int(args.page_size), args.content_type) diff --git a/asset/snippets/snippets/quickstart_listassets_test.py b/asset/snippets/snippets/quickstart_listassets_test.py index da3f56a0e329..801270d398da 100644 --- a/asset/snippets/snippets/quickstart_listassets_test.py +++ b/asset/snippets/snippets/quickstart_listassets_test.py @@ -22,8 +22,15 @@ def test_list_assets(capsys): + from google.cloud import asset_v1 + quickstart_listassets.list_assets( - project_id=PROJECT, asset_types=["iam.googleapis.com/Role"], page_size=10 - ) + project_id=PROJECT, asset_types=["iam.googleapis.com/Role"], page_size=10, + content_type=asset_v1.ContentType.RESOURCE) out, _ = capsys.readouterr() assert "asset" in out + + quickstart_listassets.list_assets( + project_id=PROJECT, asset_types=[], page_size=10, content_type=asset_v1.ContentType.RELATIONSHIP) + out_r, _ = capsys.readouterr() + assert "asset" in out_r From 41724cfc7a207ae4340bf219428439a7d9c504c1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 27 Sep 2021 17:54:12 +0200 Subject: [PATCH 146/235] chore(deps): update dependency google-cloud-bigquery to v2.27.0 (#299) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-bigquery](https://togithub.com/googleapis/python-bigquery) | `==2.26.0` -> `==2.27.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.27.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.27.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.27.0/compatibility-slim/2.26.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/2.27.0/confidence-slim/2.26.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-bigquery ### [`v2.27.0`](https://togithub.com/googleapis/python-bigquery/blob/master/CHANGELOG.md#​2270-httpswwwgithubcomgoogleapispython-bigquerycomparev2260v2270-2021-09-24) [Compare Source](https://togithub.com/googleapis/python-bigquery/compare/v2.26.0...v2.27.0) ##### Features - Add py.typed for PEP 561 compliance ([#​976](https://www.togithub.com/googleapis/python-bigquery/issues/976)) ([96e6bee](https://www.github.com/googleapis/python-bigquery/commit/96e6beef3c63b663b7e5879b1458f4dd1a47a5b5)) - include key metadata in Job representation ([#​964](https://www.togithub.com/googleapis/python-bigquery/issues/964)) ([acca1cb](https://www.github.com/googleapis/python-bigquery/commit/acca1cb7baaa3b00508246c994ade40314d421c3)) ##### Bug Fixes - Arrow extension-type metadata was not set when calling the REST API or when there are no rows ([#​946](https://www.togithub.com/googleapis/python-bigquery/issues/946)) ([864383b](https://www.github.com/googleapis/python-bigquery/commit/864383bc01636b3774f7da194587b8b7edd0383d)) - disambiguate missing policy tags from explicitly unset policy tags ([#​983](https://www.togithub.com/googleapis/python-bigquery/issues/983)) ([f83c00a](https://www.github.com/googleapis/python-bigquery/commit/f83c00acead70fc0ce9959eefb133a672d816277)) - remove default timeout ([#​974](https://www.togithub.com/googleapis/python-bigquery/issues/974)) ([1cef0d4](https://www.github.com/googleapis/python-bigquery/commit/1cef0d4664bf448168b26487a71795144b7f4d6b)) ##### Documentation - simplify destination table sample with f-strings ([#​966](https://www.togithub.com/googleapis/python-bigquery/issues/966)) ([ab6e76f](https://www.github.com/googleapis/python-bigquery/commit/ab6e76f9489262fd9c1876a1c4f93d7e139aa999))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 81362ed6628b..3efec693ae02 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.2 google-cloud-asset==3.5.0 google-cloud-resource-manager==1.1.0 google-cloud-pubsub==2.8.0 -google-cloud-bigquery==2.26.0 +google-cloud-bigquery==2.27.0 From daf6cd5563345d2dcd2f06fb770f7d4f9f3d727d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 27 Sep 2021 19:50:29 +0200 Subject: [PATCH 147/235] chore(deps): update all dependencies (#300) --- asset/snippets/snippets/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 3efec693ae02..02bbec8d3060 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.2 -google-cloud-asset==3.5.0 -google-cloud-resource-manager==1.1.0 +google-cloud-asset==3.6.0 +google-cloud-resource-manager==1.1.1 google-cloud-pubsub==2.8.0 google-cloud-bigquery==2.27.0 From 5dcedd42c3e122955bcee31efe26f8084d75b8fc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 28 Sep 2021 16:56:40 +0200 Subject: [PATCH 148/235] chore(deps): update dependency google-cloud-bigquery to v2.27.1 (#301) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 02bbec8d3060..b20e3b362b98 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.2 google-cloud-asset==3.6.0 google-cloud-resource-manager==1.1.1 google-cloud-pubsub==2.8.0 -google-cloud-bigquery==2.27.0 +google-cloud-bigquery==2.27.1 From 61fd68f6d11def301bdd66766efe8f11cbcee609 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Sep 2021 15:44:26 +0000 Subject: [PATCH 149/235] chore: fail samples nox session if python version is missing (#304) --- asset/snippets/snippets/noxfile.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index b008613f03ff..1fd8956fbf01 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -98,6 +98,10 @@ def get_pytest_env_vars() -> Dict[str, str]: "True", "true", ) + +# Error if a python version is missing +nox.options.error_on_missing_interpreters = True + # # Style Checks # From 54b164bc259d9c1ef2208727638e5d5b6926427e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 30 Sep 2021 19:43:13 +0200 Subject: [PATCH 150/235] chore(deps): update all dependencies (#305) --- asset/snippets/snippets/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index b20e3b362b98..9be783843035 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.2 -google-cloud-asset==3.6.0 -google-cloud-resource-manager==1.1.1 +google-cloud-asset==3.6.1 +google-cloud-resource-manager==1.1.2 google-cloud-pubsub==2.8.0 google-cloud-bigquery==2.27.1 From 71a15cfdf4eaaa6f26b45eb0dfae5feae8a793ec Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 30 Sep 2021 22:19:46 +0200 Subject: [PATCH 151/235] chore(deps): update dependency google-cloud-bigquery to v2.28.0 (#306) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 9be783843035..c598fa6768d7 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.2 google-cloud-asset==3.6.1 google-cloud-resource-manager==1.1.2 google-cloud-pubsub==2.8.0 -google-cloud-bigquery==2.27.1 +google-cloud-bigquery==2.28.0 From b1ae62bfd61db513ef0ee4268efe51a7b27663c0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 1 Oct 2021 12:17:54 +0200 Subject: [PATCH 152/235] chore(deps): update dependency google-cloud-storage to v1.42.3 (#307) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index c598fa6768d7..6aaebbac31e4 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.42.2 +google-cloud-storage==1.42.3 google-cloud-asset==3.6.1 google-cloud-resource-manager==1.1.2 google-cloud-pubsub==2.8.0 From 20b5dbe5f35bde5d7a5f572893dec54098f6e18f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Oct 2021 14:15:07 +0200 Subject: [PATCH 153/235] chore(deps): update dependency google-cloud-resource-manager to v1.2.0 (#311) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 6aaebbac31e4..53645aadec8f 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.3 google-cloud-asset==3.6.1 -google-cloud-resource-manager==1.1.2 +google-cloud-resource-manager==1.2.0 google-cloud-pubsub==2.8.0 google-cloud-bigquery==2.28.0 From dda552025f2b811302640822584ae56e840050e3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 8 Oct 2021 17:16:50 +0000 Subject: [PATCH 154/235] chore(python): Add kokoro configs for python 3.10 samples testing (#315) --- asset/snippets/snippets/noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 1fd8956fbf01..93a9122cc457 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -87,7 +87,7 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. # All versions used to test samples. -ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] +ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] From 4f2e232e0c8665413d62ca88fff0dfcf494d90b0 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 12 Oct 2021 21:24:58 +0200 Subject: [PATCH 155/235] chore(deps): update dependency google-cloud-bigquery to v2.28.1 (#313) Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 53645aadec8f..79f9dec1e30f 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.3 google-cloud-asset==3.6.1 google-cloud-resource-manager==1.2.0 google-cloud-pubsub==2.8.0 -google-cloud-bigquery==2.28.0 +google-cloud-bigquery==2.28.1 From ff046d4b9d027c479aa112455256c5be43ed8e24 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Oct 2021 23:46:37 +0200 Subject: [PATCH 156/235] chore(deps): update dependency google-cloud-asset to v3.7.0 (#317) Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 79f9dec1e30f..1a7892236436 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.3 -google-cloud-asset==3.6.1 +google-cloud-asset==3.7.0 google-cloud-resource-manager==1.2.0 google-cloud-pubsub==2.8.0 google-cloud-bigquery==2.28.1 From e6f21807f52333c579cf4a4e516f6269a38c3cbf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Oct 2021 21:54:14 +0200 Subject: [PATCH 157/235] chore(deps): update dependency google-cloud-resource-manager to v1.3.0 (#321) Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 1a7892236436..1a571f975787 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.3 google-cloud-asset==3.7.0 -google-cloud-resource-manager==1.2.0 +google-cloud-resource-manager==1.3.0 google-cloud-pubsub==2.8.0 google-cloud-bigquery==2.28.1 From 79527e7a2789429596cdf9d68cdfa0e964059e7c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 30 Oct 2021 19:15:41 +0200 Subject: [PATCH 158/235] chore(deps): update dependency google-cloud-bigquery to v2.29.0 (#323) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 1a571f975787..6fbc91a26b8d 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.3 google-cloud-asset==3.7.0 google-cloud-resource-manager==1.3.0 google-cloud-pubsub==2.8.0 -google-cloud-bigquery==2.28.1 +google-cloud-bigquery==2.29.0 From 0f7e672ee363e6db50a38eb68620ec3a54a15e09 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Nov 2021 18:40:17 +0100 Subject: [PATCH 159/235] chore(deps): update dependency google-cloud-resource-manager to v1.3.1 (#328) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 6fbc91a26b8d..c4c7c4cabe37 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.3 google-cloud-asset==3.7.0 -google-cloud-resource-manager==1.3.0 +google-cloud-resource-manager==1.3.1 google-cloud-pubsub==2.8.0 google-cloud-bigquery==2.29.0 From ec952761d26b25ab7c47c7be4fe2b0e38866787c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 3 Nov 2021 12:30:44 +0100 Subject: [PATCH 160/235] chore(deps): update dependency google-cloud-asset to v3.7.1 (#329) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index c4c7c4cabe37..b5a9f10230db 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.3 -google-cloud-asset==3.7.0 +google-cloud-asset==3.7.1 google-cloud-resource-manager==1.3.1 google-cloud-pubsub==2.8.0 google-cloud-bigquery==2.29.0 From 4c3a6a61ccab030ea2de0a7f3e742964a8c7ed5f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 10:17:15 +0100 Subject: [PATCH 161/235] chore(deps): update dependency google-cloud-bigquery to v2.30.0 (#330) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index b5a9f10230db..85ee15a3ffc6 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.3 google-cloud-asset==3.7.1 google-cloud-resource-manager==1.3.1 google-cloud-pubsub==2.8.0 -google-cloud-bigquery==2.29.0 +google-cloud-bigquery==2.30.0 From f528a1199007371cdffe8f5daf8a2003fe9364e6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 5 Nov 2021 18:27:26 +0100 Subject: [PATCH 162/235] chore(deps): update all dependencies (#331) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 85ee15a3ffc6..a3a52dca1056 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.42.3 google-cloud-asset==3.7.1 google-cloud-resource-manager==1.3.1 google-cloud-pubsub==2.8.0 -google-cloud-bigquery==2.30.0 +google-cloud-bigquery==2.30.1 From c6822cee19e7f1356055d0a590d27f7c39dd00d1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 8 Nov 2021 19:31:02 +0100 Subject: [PATCH 163/235] chore(deps): update dependency google-cloud-resource-manager to v1.3.2 (#334) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index a3a52dca1056..e6cb22885cae 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.3 google-cloud-asset==3.7.1 -google-cloud-resource-manager==1.3.1 +google-cloud-resource-manager==1.3.2 google-cloud-pubsub==2.8.0 google-cloud-bigquery==2.30.1 From 885607e2a670c9bc5f657bf8644b333b41da97e9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 11 Nov 2021 02:11:10 +0100 Subject: [PATCH 164/235] chore(deps): update dependency google-cloud-pubsub to v2.9.0 (#336) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index e6cb22885cae..4017e3f0ad54 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.3 google-cloud-asset==3.7.1 google-cloud-resource-manager==1.3.2 -google-cloud-pubsub==2.8.0 +google-cloud-pubsub==2.9.0 google-cloud-bigquery==2.30.1 From 59ae5315a8a6e904eddf96891b1cdc959f6011b6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Nov 2021 12:54:24 +0100 Subject: [PATCH 165/235] chore(deps): update dependency google-cloud-resource-manager to v1.3.3 (#338) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 4017e3f0ad54..8d3510782971 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==1.42.3 google-cloud-asset==3.7.1 -google-cloud-resource-manager==1.3.2 +google-cloud-resource-manager==1.3.3 google-cloud-pubsub==2.9.0 google-cloud-bigquery==2.30.1 From 167f77f3d373bf3a953f0ed90a99a5cc389e8bb1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 18 Nov 2021 11:11:34 +0100 Subject: [PATCH 166/235] chore(deps): update dependency google-cloud-storage to v1.43.0 (#340) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 8d3510782971..66b14cf9af08 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.42.3 +google-cloud-storage==1.43.0 google-cloud-asset==3.7.1 google-cloud-resource-manager==1.3.3 google-cloud-pubsub==2.9.0 From d3e36e178d0a1ae7b374a190e3bb5fa927610c50 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 7 Dec 2021 00:10:54 +0100 Subject: [PATCH 167/235] chore(deps): update dependency google-cloud-bigquery to v2.31.0 (#341) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 66b14cf9af08..bc2ce0e9663a 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==1.43.0 google-cloud-asset==3.7.1 google-cloud-resource-manager==1.3.3 google-cloud-pubsub==2.9.0 -google-cloud-bigquery==2.30.1 +google-cloud-bigquery==2.31.0 From bc9cfb672f77d6f1710e824cbb47dba9ca24398c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 9 Dec 2021 11:49:51 -0800 Subject: [PATCH 168/235] chore: update python-docs-samples link to main branch (#342) Source-Link: https://github.com/googleapis/synthtool/commit/0941ef32b18aff0be34a40404f3971d9f51996e9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2f90537dd7df70f6b663cd654b1fa5dee483cf6a4edcfd46072b2775be8a23ec Co-authored-by: Owl Bot --- asset/snippets/AUTHORING_GUIDE.md | 2 +- asset/snippets/CONTRIBUTING.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/snippets/AUTHORING_GUIDE.md b/asset/snippets/AUTHORING_GUIDE.md index 55c97b32f4c1..8249522ffc2d 100644 --- a/asset/snippets/AUTHORING_GUIDE.md +++ b/asset/snippets/AUTHORING_GUIDE.md @@ -1 +1 @@ -See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md \ No newline at end of file +See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md \ No newline at end of file diff --git a/asset/snippets/CONTRIBUTING.md b/asset/snippets/CONTRIBUTING.md index 34c882b6f1a3..f5fe2e6baf13 100644 --- a/asset/snippets/CONTRIBUTING.md +++ b/asset/snippets/CONTRIBUTING.md @@ -1 +1 @@ -See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/CONTRIBUTING.md \ No newline at end of file +See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/CONTRIBUTING.md \ No newline at end of file From 24ee862d107e7c559f511e9f912d97273ab7df29 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 8 Jan 2022 12:05:37 +0100 Subject: [PATCH 169/235] chore(deps): update dependency google-cloud-storage to v1.44.0 (#348) Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index bc2ce0e9663a..828b39ef1f1d 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==1.43.0 +google-cloud-storage==1.44.0 google-cloud-asset==3.7.1 google-cloud-resource-manager==1.3.3 google-cloud-pubsub==2.9.0 From d0f602e6a2fa74c00432ef513ffaf4c862541daa Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 07:30:22 -0500 Subject: [PATCH 170/235] chore(samples): Add check for tests in directory (#351) Source-Link: https://github.com/googleapis/synthtool/commit/52aef91f8d25223d9dbdb4aebd94ba8eea2101f3 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:36a95b8f494e4674dc9eee9af98961293b51b86b3649942aac800ae6c1f796d4 Co-authored-by: Owl Bot --- asset/snippets/snippets/noxfile.py | 70 +++++++++++++++++------------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 93a9122cc457..3bbef5d54f44 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -14,6 +14,7 @@ from __future__ import print_function +import glob import os from pathlib import Path import sys @@ -184,37 +185,44 @@ def blacken(session: nox.sessions.Session) -> None: def _session_tests( session: nox.sessions.Session, post_install: Callable = None ) -> None: - if TEST_CONFIG["pip_version_override"]: - pip_version = TEST_CONFIG["pip_version_override"] - session.install(f"pip=={pip_version}") - """Runs py.test for a particular project.""" - if os.path.exists("requirements.txt"): - if os.path.exists("constraints.txt"): - session.install("-r", "requirements.txt", "-c", "constraints.txt") - else: - session.install("-r", "requirements.txt") - - if os.path.exists("requirements-test.txt"): - if os.path.exists("constraints-test.txt"): - session.install("-r", "requirements-test.txt", "-c", "constraints-test.txt") - else: - session.install("-r", "requirements-test.txt") - - if INSTALL_LIBRARY_FROM_SOURCE: - session.install("-e", _get_repo_root()) - - if post_install: - post_install(session) - - session.run( - "pytest", - *(PYTEST_COMMON_ARGS + session.posargs), - # Pytest will return 5 when no tests are collected. This can happen - # on travis where slow and flaky tests are excluded. - # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html - success_codes=[0, 5], - env=get_pytest_env_vars(), - ) + # check for presence of tests + test_list = glob.glob("*_test.py") + glob.glob("test_*.py") + if len(test_list) == 0: + print("No tests found, skipping directory.") + else: + if TEST_CONFIG["pip_version_override"]: + pip_version = TEST_CONFIG["pip_version_override"] + session.install(f"pip=={pip_version}") + """Runs py.test for a particular project.""" + if os.path.exists("requirements.txt"): + if os.path.exists("constraints.txt"): + session.install("-r", "requirements.txt", "-c", "constraints.txt") + else: + session.install("-r", "requirements.txt") + + if os.path.exists("requirements-test.txt"): + if os.path.exists("constraints-test.txt"): + session.install( + "-r", "requirements-test.txt", "-c", "constraints-test.txt" + ) + else: + session.install("-r", "requirements-test.txt") + + if INSTALL_LIBRARY_FROM_SOURCE: + session.install("-e", _get_repo_root()) + + if post_install: + post_install(session) + + session.run( + "pytest", + *(PYTEST_COMMON_ARGS + session.posargs), + # Pytest will return 5 when no tests are collected. This can happen + # on travis where slow and flaky tests are excluded. + # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html + success_codes=[0, 5], + env=get_pytest_env_vars(), + ) @nox.session(python=ALL_VERSIONS) From 9a2cd6a47bf50f20f929aec25dc358e67e3f0656 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 16 Jan 2022 15:17:39 +0100 Subject: [PATCH 171/235] chore(deps): update all dependencies (#352) Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 828b39ef1f1d..d4283cc1d530 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ -google-cloud-storage==1.44.0 +google-cloud-storage==2.0.0 google-cloud-asset==3.7.1 google-cloud-resource-manager==1.3.3 google-cloud-pubsub==2.9.0 -google-cloud-bigquery==2.31.0 +google-cloud-bigquery==2.32.0 From bc68358e6807007d70de47fc081417b229347a18 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 18 Jan 2022 20:23:55 -0500 Subject: [PATCH 172/235] chore(python): Noxfile recognizes that tests can live in a folder (#356) Source-Link: https://github.com/googleapis/synthtool/commit/4760d8dce1351d93658cb11d02a1b7ceb23ae5d7 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:f0e4b51deef56bed74d3e2359c583fc104a8d6367da3984fc5c66938db738828 Co-authored-by: Owl Bot --- asset/snippets/snippets/noxfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 3bbef5d54f44..20cdfc620138 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -187,6 +187,7 @@ def _session_tests( ) -> None: # check for presence of tests test_list = glob.glob("*_test.py") + glob.glob("test_*.py") + test_list.extend(glob.glob("tests")) if len(test_list) == 0: print("No tests found, skipping directory.") else: From 0fc1ab6828cbb4836747165d87c2c0c7a09aa9db Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 5 Feb 2022 17:56:52 +0100 Subject: [PATCH 173/235] chore(deps): update dependency google-cloud-storage to v2.1.0 (#357) * chore(deps): update dependency google-cloud-storage to v2.1.0 * add pin for google-cloud-storage for py36 * remove pin for py36 * fix typo Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d4283cc1d530..2130f6c4bb8b 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==2.0.0 +google-cloud-storage==2.1.0 google-cloud-asset==3.7.1 google-cloud-resource-manager==1.3.3 google-cloud-pubsub==2.9.0 From 626a4a9c0f27f0442366ef850e4460bfc478b6d0 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 5 Feb 2022 17:14:43 +0000 Subject: [PATCH 174/235] chore: use gapic-generator-python 0.63.1 (#365) - [x] Regenerate this pull request now. docs: add autogenerated code snippets PiperOrigin-RevId: 426256923 Source-Link: https://github.com/googleapis/googleapis/commit/9ebabfa115341b8016b6ed64b22c04260360a8ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/a88175263e60a1d45d3a447848652b0f670b2cb8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTg4MTc1MjYzZTYwYTFkNDVkM2E0NDc4NDg2NTJiMGY2NzBiMmNiOCJ9 Closes: #285 --- ..._asset_service_analyze_iam_policy_async.py | 48 + ...ce_analyze_iam_policy_longrunning_async.py | 54 + ...ice_analyze_iam_policy_longrunning_sync.py | 54 + ...1_asset_service_analyze_iam_policy_sync.py | 48 + ...set_v1_asset_service_analyze_move_async.py | 46 + ...sset_v1_asset_service_analyze_move_sync.py | 46 + ..._service_batch_get_assets_history_async.py | 45 + ...t_service_batch_get_assets_history_sync.py | 45 + ...sset_v1_asset_service_create_feed_async.py | 50 + ...asset_v1_asset_service_create_feed_sync.py | 50 + ...sset_v1_asset_service_delete_feed_async.py | 43 + ...asset_v1_asset_service_delete_feed_sync.py | 43 + ...et_v1_asset_service_export_assets_async.py | 51 + ...set_v1_asset_service_export_assets_sync.py | 51 + ...d_asset_v1_asset_service_get_feed_async.py | 45 + ...ed_asset_v1_asset_service_get_feed_sync.py | 45 + ...sset_v1_asset_service_list_assets_async.py | 44 + ...asset_v1_asset_service_list_assets_sync.py | 44 + ...asset_v1_asset_service_list_feeds_async.py | 45 + ..._asset_v1_asset_service_list_feeds_sync.py | 45 + ...t_service_search_all_iam_policies_async.py | 44 + ...et_service_search_all_iam_policies_sync.py | 44 + ...sset_service_search_all_resources_async.py | 44 + ...asset_service_search_all_resources_sync.py | 44 + ...sset_v1_asset_service_update_feed_async.py | 48 + ...asset_v1_asset_service_update_feed_sync.py | 48 + ...t_service_search_all_iam_policies_async.py | 44 + ...et_service_search_all_iam_policies_sync.py | 44 + ...sset_service_search_all_resources_async.py | 44 + ...asset_service_search_all_resources_sync.py | 44 + ...p2beta1_asset_service_create_feed_async.py | 50 + ...1p2beta1_asset_service_create_feed_sync.py | 50 + ...p2beta1_asset_service_delete_feed_async.py | 43 + ...1p2beta1_asset_service_delete_feed_sync.py | 43 + ..._v1p2beta1_asset_service_get_feed_async.py | 45 + ...t_v1p2beta1_asset_service_get_feed_sync.py | 45 + ...1p2beta1_asset_service_list_feeds_async.py | 45 + ...v1p2beta1_asset_service_list_feeds_sync.py | 45 + ...p2beta1_asset_service_update_feed_async.py | 48 + ...1p2beta1_asset_service_update_feed_sync.py | 48 + ..._asset_service_analyze_iam_policy_async.py | 48 + ...1_asset_service_analyze_iam_policy_sync.py | 48 + ...ervice_export_iam_policy_analysis_async.py | 54 + ...service_export_iam_policy_analysis_sync.py | 54 + ...p5beta1_asset_service_list_assets_async.py | 44 + ...1p5beta1_asset_service_list_assets_sync.py | 44 + .../snippet_metadata_asset_v1.json | 1137 +++++++++++++++++ .../snippet_metadata_asset_v1p1beta1.json | 174 +++ .../snippet_metadata_asset_v1p2beta1.json | 445 +++++++ .../snippet_metadata_asset_v1p4beta1.json | 178 +++ .../snippet_metadata_asset_v1p5beta1.json | 89 ++ asset/snippets/snippets/noxfile_config.py | 2 +- 52 files changed, 4168 insertions(+), 1 deletion(-) create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py create mode 100644 asset/snippets/generated_samples/snippet_metadata_asset_v1.json create mode 100644 asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json create mode 100644 asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json create mode 100644 asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json create mode 100644 asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py new file mode 100644 index 000000000000..1759b7e38c2c --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AnalyzeIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async] +from google.cloud import asset_v1 + + +async def sample_analyze_iam_policy(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + analysis_query = asset_v1.IamPolicyAnalysisQuery() + analysis_query.scope = "scope_value" + + request = asset_v1.AnalyzeIamPolicyRequest( + analysis_query=analysis_query, + ) + + # Make the request + response = await client.analyze_iam_policy(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py new file mode 100644 index 000000000000..51ef3ab86a18 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AnalyzeIamPolicyLongrunning +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async] +from google.cloud import asset_v1 + + +async def sample_analyze_iam_policy_longrunning(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + analysis_query = asset_v1.IamPolicyAnalysisQuery() + analysis_query.scope = "scope_value" + + output_config = asset_v1.IamPolicyAnalysisOutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = asset_v1.AnalyzeIamPolicyLongrunningRequest( + analysis_query=analysis_query, + output_config=output_config, + ) + + # Make the request + operation = client.analyze_iam_policy_longrunning(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py new file mode 100644 index 000000000000..eee8fb97ed75 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AnalyzeIamPolicyLongrunning +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync] +from google.cloud import asset_v1 + + +def sample_analyze_iam_policy_longrunning(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + analysis_query = asset_v1.IamPolicyAnalysisQuery() + analysis_query.scope = "scope_value" + + output_config = asset_v1.IamPolicyAnalysisOutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = asset_v1.AnalyzeIamPolicyLongrunningRequest( + analysis_query=analysis_query, + output_config=output_config, + ) + + # Make the request + operation = client.analyze_iam_policy_longrunning(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py new file mode 100644 index 000000000000..9dd189550952 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AnalyzeIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync] +from google.cloud import asset_v1 + + +def sample_analyze_iam_policy(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + analysis_query = asset_v1.IamPolicyAnalysisQuery() + analysis_query.scope = "scope_value" + + request = asset_v1.AnalyzeIamPolicyRequest( + analysis_query=analysis_query, + ) + + # Make the request + response = client.analyze_iam_policy(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_async.py new file mode 100644 index 000000000000..c10915fb45fa --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AnalyzeMove +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_AnalyzeMove_async] +from google.cloud import asset_v1 + + +async def sample_analyze_move(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.AnalyzeMoveRequest( + resource="resource_value", + destination_parent="destination_parent_value", + ) + + # Make the request + response = await client.analyze_move(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_AnalyzeMove_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py new file mode 100644 index 000000000000..b4c6b03e064a --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AnalyzeMove +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_AnalyzeMove_sync] +from google.cloud import asset_v1 + + +def sample_analyze_move(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.AnalyzeMoveRequest( + resource="resource_value", + destination_parent="destination_parent_value", + ) + + # Make the request + response = client.analyze_move(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_AnalyzeMove_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py new file mode 100644 index 000000000000..edae4c7f9289 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchGetAssetsHistory +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async] +from google.cloud import asset_v1 + + +async def sample_batch_get_assets_history(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.BatchGetAssetsHistoryRequest( + parent="parent_value", + ) + + # Make the request + response = await client.batch_get_assets_history(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py new file mode 100644 index 000000000000..5bf8c8de15fb --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchGetAssetsHistory +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync] +from google.cloud import asset_v1 + + +def sample_batch_get_assets_history(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.BatchGetAssetsHistoryRequest( + parent="parent_value", + ) + + # Make the request + response = client.batch_get_assets_history(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py new file mode 100644 index 000000000000..a988dfe5d494 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_CreateFeed_async] +from google.cloud import asset_v1 + + +async def sample_create_feed(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + feed = asset_v1.Feed() + feed.name = "name_value" + + request = asset_v1.CreateFeedRequest( + parent="parent_value", + feed_id="feed_id_value", + feed=feed, + ) + + # Make the request + response = await client.create_feed(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_CreateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py new file mode 100644 index 000000000000..e33028822916 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_CreateFeed_sync] +from google.cloud import asset_v1 + + +def sample_create_feed(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + feed = asset_v1.Feed() + feed.name = "name_value" + + request = asset_v1.CreateFeedRequest( + parent="parent_value", + feed_id="feed_id_value", + feed=feed, + ) + + # Make the request + response = client.create_feed(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_CreateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py new file mode 100644 index 000000000000..d9fea4281440 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_DeleteFeed_async] +from google.cloud import asset_v1 + + +async def sample_delete_feed(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.DeleteFeedRequest( + name="name_value", + ) + + # Make the request + response = await client.delete_feed(request=request) + + +# [END cloudasset_generated_asset_v1_AssetService_DeleteFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py new file mode 100644 index 000000000000..f9008baa7b8b --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync] +from google.cloud import asset_v1 + + +def sample_delete_feed(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.DeleteFeedRequest( + name="name_value", + ) + + # Make the request + response = client.delete_feed(request=request) + + +# [END cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py new file mode 100644 index 000000000000..f384bea0adfb --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ExportAssets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_ExportAssets_async] +from google.cloud import asset_v1 + + +async def sample_export_assets(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + output_config = asset_v1.OutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = asset_v1.ExportAssetsRequest( + parent="parent_value", + output_config=output_config, + ) + + # Make the request + operation = client.export_assets(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_ExportAssets_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py new file mode 100644 index 000000000000..4ac84ea71306 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ExportAssets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_ExportAssets_sync] +from google.cloud import asset_v1 + + +def sample_export_assets(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + output_config = asset_v1.OutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = asset_v1.ExportAssetsRequest( + parent="parent_value", + output_config=output_config, + ) + + # Make the request + operation = client.export_assets(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_ExportAssets_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py new file mode 100644 index 000000000000..33c88d3b4b2a --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_GetFeed_async] +from google.cloud import asset_v1 + + +async def sample_get_feed(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.GetFeedRequest( + name="name_value", + ) + + # Make the request + response = await client.get_feed(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_GetFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py new file mode 100644 index 000000000000..98834ef0be65 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_GetFeed_sync] +from google.cloud import asset_v1 + + +def sample_get_feed(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.GetFeedRequest( + name="name_value", + ) + + # Make the request + response = client.get_feed(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_GetFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py new file mode 100644 index 000000000000..0a6a0b4a098d --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAssets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_ListAssets_async] +from google.cloud import asset_v1 + + +async def sample_list_assets(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.ListAssetsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_assets(request=request) + async for response in page_result: + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_ListAssets_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py new file mode 100644 index 000000000000..5fad10b12adf --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAssets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_ListAssets_sync] +from google.cloud import asset_v1 + + +def sample_list_assets(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.ListAssetsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_assets(request=request) + for response in page_result: + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_ListAssets_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py new file mode 100644 index 000000000000..8eec6bfab483 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListFeeds +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_ListFeeds_async] +from google.cloud import asset_v1 + + +async def sample_list_feeds(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.ListFeedsRequest( + parent="parent_value", + ) + + # Make the request + response = await client.list_feeds(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_ListFeeds_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py new file mode 100644 index 000000000000..7aba515f8bd3 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListFeeds +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_ListFeeds_sync] +from google.cloud import asset_v1 + + +def sample_list_feeds(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.ListFeedsRequest( + parent="parent_value", + ) + + # Make the request + response = client.list_feeds(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_ListFeeds_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py new file mode 100644 index 000000000000..9be060836a2c --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SearchAllIamPolicies +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async] +from google.cloud import asset_v1 + + +async def sample_search_all_iam_policies(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.SearchAllIamPoliciesRequest( + scope="scope_value", + ) + + # Make the request + page_result = client.search_all_iam_policies(request=request) + async for response in page_result: + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py new file mode 100644 index 000000000000..e39c08295ba9 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SearchAllIamPolicies +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync] +from google.cloud import asset_v1 + + +def sample_search_all_iam_policies(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.SearchAllIamPoliciesRequest( + scope="scope_value", + ) + + # Make the request + page_result = client.search_all_iam_policies(request=request) + for response in page_result: + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py new file mode 100644 index 000000000000..aba043b4b80c --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SearchAllResources +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_SearchAllResources_async] +from google.cloud import asset_v1 + + +async def sample_search_all_resources(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.SearchAllResourcesRequest( + scope="scope_value", + ) + + # Make the request + page_result = client.search_all_resources(request=request) + async for response in page_result: + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_SearchAllResources_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py new file mode 100644 index 000000000000..475d8b4ad58d --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SearchAllResources +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync] +from google.cloud import asset_v1 + + +def sample_search_all_resources(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.SearchAllResourcesRequest( + scope="scope_value", + ) + + # Make the request + page_result = client.search_all_resources(request=request) + for response in page_result: + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py new file mode 100644 index 000000000000..e409b05b7182 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_UpdateFeed_async] +from google.cloud import asset_v1 + + +async def sample_update_feed(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + feed = asset_v1.Feed() + feed.name = "name_value" + + request = asset_v1.UpdateFeedRequest( + feed=feed, + ) + + # Make the request + response = await client.update_feed(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_UpdateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py new file mode 100644 index 000000000000..214f4886f215 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync] +from google.cloud import asset_v1 + + +def sample_update_feed(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + feed = asset_v1.Feed() + feed.name = "name_value" + + request = asset_v1.UpdateFeedRequest( + feed=feed, + ) + + # Make the request + response = client.update_feed(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py new file mode 100644 index 000000000000..9a921581e3af --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SearchAllIamPolicies +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_async] +from google.cloud import asset_v1p1beta1 + + +async def sample_search_all_iam_policies(): + # Create a client + client = asset_v1p1beta1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1p1beta1.SearchAllIamPoliciesRequest( + scope="scope_value", + ) + + # Make the request + page_result = client.search_all_iam_policies(request=request) + async for response in page_result: + print(response) + +# [END cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py new file mode 100644 index 000000000000..a60db86f2598 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SearchAllIamPolicies +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_sync] +from google.cloud import asset_v1p1beta1 + + +def sample_search_all_iam_policies(): + # Create a client + client = asset_v1p1beta1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1p1beta1.SearchAllIamPoliciesRequest( + scope="scope_value", + ) + + # Make the request + page_result = client.search_all_iam_policies(request=request) + for response in page_result: + print(response) + +# [END cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py new file mode 100644 index 000000000000..f9e4aa6f5bf2 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SearchAllResources +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_async] +from google.cloud import asset_v1p1beta1 + + +async def sample_search_all_resources(): + # Create a client + client = asset_v1p1beta1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1p1beta1.SearchAllResourcesRequest( + scope="scope_value", + ) + + # Make the request + page_result = client.search_all_resources(request=request) + async for response in page_result: + print(response) + +# [END cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py new file mode 100644 index 000000000000..5e1e2afb0d9b --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for SearchAllResources +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_sync] +from google.cloud import asset_v1p1beta1 + + +def sample_search_all_resources(): + # Create a client + client = asset_v1p1beta1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1p1beta1.SearchAllResourcesRequest( + scope="scope_value", + ) + + # Make the request + page_result = client.search_all_resources(request=request) + for response in page_result: + print(response) + +# [END cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py new file mode 100644 index 000000000000..76c170007a91 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_async] +from google.cloud import asset_v1p2beta1 + + +async def sample_create_feed(): + # Create a client + client = asset_v1p2beta1.AssetServiceAsyncClient() + + # Initialize request argument(s) + feed = asset_v1p2beta1.Feed() + feed.name = "name_value" + + request = asset_v1p2beta1.CreateFeedRequest( + parent="parent_value", + feed_id="feed_id_value", + feed=feed, + ) + + # Make the request + response = await client.create_feed(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py new file mode 100644 index 000000000000..7ad3a6672e66 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_sync] +from google.cloud import asset_v1p2beta1 + + +def sample_create_feed(): + # Create a client + client = asset_v1p2beta1.AssetServiceClient() + + # Initialize request argument(s) + feed = asset_v1p2beta1.Feed() + feed.name = "name_value" + + request = asset_v1p2beta1.CreateFeedRequest( + parent="parent_value", + feed_id="feed_id_value", + feed=feed, + ) + + # Make the request + response = client.create_feed(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py new file mode 100644 index 000000000000..a382ca424cf4 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_async] +from google.cloud import asset_v1p2beta1 + + +async def sample_delete_feed(): + # Create a client + client = asset_v1p2beta1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1p2beta1.DeleteFeedRequest( + name="name_value", + ) + + # Make the request + response = await client.delete_feed(request=request) + + +# [END cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py new file mode 100644 index 000000000000..8d4eb12361c0 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_sync] +from google.cloud import asset_v1p2beta1 + + +def sample_delete_feed(): + # Create a client + client = asset_v1p2beta1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1p2beta1.DeleteFeedRequest( + name="name_value", + ) + + # Make the request + response = client.delete_feed(request=request) + + +# [END cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py new file mode 100644 index 000000000000..0d6e77c1668d --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_async] +from google.cloud import asset_v1p2beta1 + + +async def sample_get_feed(): + # Create a client + client = asset_v1p2beta1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1p2beta1.GetFeedRequest( + name="name_value", + ) + + # Make the request + response = await client.get_feed(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py new file mode 100644 index 000000000000..85675ca550bd --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_sync] +from google.cloud import asset_v1p2beta1 + + +def sample_get_feed(): + # Create a client + client = asset_v1p2beta1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1p2beta1.GetFeedRequest( + name="name_value", + ) + + # Make the request + response = client.get_feed(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py new file mode 100644 index 000000000000..cd59d163c77f --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListFeeds +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_async] +from google.cloud import asset_v1p2beta1 + + +async def sample_list_feeds(): + # Create a client + client = asset_v1p2beta1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1p2beta1.ListFeedsRequest( + parent="parent_value", + ) + + # Make the request + response = await client.list_feeds(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py new file mode 100644 index 000000000000..aeec26d12cde --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListFeeds +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_sync] +from google.cloud import asset_v1p2beta1 + + +def sample_list_feeds(): + # Create a client + client = asset_v1p2beta1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1p2beta1.ListFeedsRequest( + parent="parent_value", + ) + + # Make the request + response = client.list_feeds(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py new file mode 100644 index 000000000000..5eb68f7763ed --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_async] +from google.cloud import asset_v1p2beta1 + + +async def sample_update_feed(): + # Create a client + client = asset_v1p2beta1.AssetServiceAsyncClient() + + # Initialize request argument(s) + feed = asset_v1p2beta1.Feed() + feed.name = "name_value" + + request = asset_v1p2beta1.UpdateFeedRequest( + feed=feed, + ) + + # Make the request + response = await client.update_feed(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py new file mode 100644 index 000000000000..35a9b0220de2 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateFeed +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_sync] +from google.cloud import asset_v1p2beta1 + + +def sample_update_feed(): + # Create a client + client = asset_v1p2beta1.AssetServiceClient() + + # Initialize request argument(s) + feed = asset_v1p2beta1.Feed() + feed.name = "name_value" + + request = asset_v1p2beta1.UpdateFeedRequest( + feed=feed, + ) + + # Make the request + response = client.update_feed(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py new file mode 100644 index 000000000000..1456349977b5 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AnalyzeIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_async] +from google.cloud import asset_v1p4beta1 + + +async def sample_analyze_iam_policy(): + # Create a client + client = asset_v1p4beta1.AssetServiceAsyncClient() + + # Initialize request argument(s) + analysis_query = asset_v1p4beta1.IamPolicyAnalysisQuery() + analysis_query.parent = "parent_value" + + request = asset_v1p4beta1.AnalyzeIamPolicyRequest( + analysis_query=analysis_query, + ) + + # Make the request + response = await client.analyze_iam_policy(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py new file mode 100644 index 000000000000..038ff538bdd4 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for AnalyzeIamPolicy +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_sync] +from google.cloud import asset_v1p4beta1 + + +def sample_analyze_iam_policy(): + # Create a client + client = asset_v1p4beta1.AssetServiceClient() + + # Initialize request argument(s) + analysis_query = asset_v1p4beta1.IamPolicyAnalysisQuery() + analysis_query.parent = "parent_value" + + request = asset_v1p4beta1.AnalyzeIamPolicyRequest( + analysis_query=analysis_query, + ) + + # Make the request + response = client.analyze_iam_policy(request=request) + + # Handle response + print(response) + +# [END cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py new file mode 100644 index 000000000000..bcd9193b5244 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ExportIamPolicyAnalysis +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_async] +from google.cloud import asset_v1p4beta1 + + +async def sample_export_iam_policy_analysis(): + # Create a client + client = asset_v1p4beta1.AssetServiceAsyncClient() + + # Initialize request argument(s) + analysis_query = asset_v1p4beta1.IamPolicyAnalysisQuery() + analysis_query.parent = "parent_value" + + output_config = asset_v1p4beta1.IamPolicyAnalysisOutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = asset_v1p4beta1.ExportIamPolicyAnalysisRequest( + analysis_query=analysis_query, + output_config=output_config, + ) + + # Make the request + operation = client.export_iam_policy_analysis(request=request) + + print("Waiting for operation to complete...") + + response = await operation.result() + print(response) + +# [END cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py new file mode 100644 index 000000000000..892e6c866b88 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ExportIamPolicyAnalysis +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_sync] +from google.cloud import asset_v1p4beta1 + + +def sample_export_iam_policy_analysis(): + # Create a client + client = asset_v1p4beta1.AssetServiceClient() + + # Initialize request argument(s) + analysis_query = asset_v1p4beta1.IamPolicyAnalysisQuery() + analysis_query.parent = "parent_value" + + output_config = asset_v1p4beta1.IamPolicyAnalysisOutputConfig() + output_config.gcs_destination.uri = "uri_value" + + request = asset_v1p4beta1.ExportIamPolicyAnalysisRequest( + analysis_query=analysis_query, + output_config=output_config, + ) + + # Make the request + operation = client.export_iam_policy_analysis(request=request) + + print("Waiting for operation to complete...") + + response = operation.result() + print(response) + +# [END cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py new file mode 100644 index 000000000000..f787254ba79c --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAssets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_async] +from google.cloud import asset_v1p5beta1 + + +async def sample_list_assets(): + # Create a client + client = asset_v1p5beta1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1p5beta1.ListAssetsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_assets(request=request) + async for response in page_result: + print(response) + +# [END cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py new file mode 100644 index 000000000000..6a80f403d4e5 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListAssets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_sync] +from google.cloud import asset_v1p5beta1 + + +def sample_list_assets(): + # Create a client + client = asset_v1p5beta1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1p5beta1.ListAssetsRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_assets(request=request) + for response in page_result: + print(response) + +# [END cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_sync] diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json new file mode 100644 index 000000000000..1b51e40a9d26 --- /dev/null +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json @@ -0,0 +1,1137 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "AnalyzeIamPolicyLongrunning" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "AnalyzeIamPolicyLongrunning" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "AnalyzeIamPolicy" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "AnalyzeIamPolicy" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "AnalyzeMove" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_analyze_move_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeMove_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "AnalyzeMove" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeMove_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "BatchGetAssetsHistory" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "BatchGetAssetsHistory" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "CreateFeed" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_create_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "CreateFeed" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "DeleteFeed" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "DeleteFeed" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "ExportAssets" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_export_assets_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "ExportAssets" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", + "segments": [ + { + "end": 50, + "start": 27, + "type": "FULL" + }, + { + "end": 50, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 42, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 43, + "type": "REQUEST_EXECUTION" + }, + { + "end": 51, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "GetFeed" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_get_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "GetFeed" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "ListAssets" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_list_assets_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "ListAssets" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "ListFeeds" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "ListFeeds" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "SearchAllIamPolicies" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "SearchAllIamPolicies" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "SearchAllResources" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "SearchAllResources" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "UpdateFeed" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_update_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "UpdateFeed" + } + }, + "file": "cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json new file mode 100644 index 000000000000..14a3c62f8790 --- /dev/null +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json @@ -0,0 +1,174 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "SearchAllIamPolicies" + } + }, + "file": "cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py", + "regionTag": "cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "SearchAllIamPolicies" + } + }, + "file": "cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py", + "regionTag": "cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "SearchAllResources" + } + }, + "file": "cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py", + "regionTag": "cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "SearchAllResources" + } + }, + "file": "cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py", + "regionTag": "cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json new file mode 100644 index 000000000000..b4394ee1f558 --- /dev/null +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json @@ -0,0 +1,445 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "CreateFeed" + } + }, + "file": "cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "CreateFeed" + } + }, + "file": "cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "DeleteFeed" + } + }, + "file": "cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "DeleteFeed" + } + }, + "file": "cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "GetFeed" + } + }, + "file": "cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "GetFeed" + } + }, + "file": "cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "ListFeeds" + } + }, + "file": "cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py", + "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_async", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "ListFeeds" + } + }, + "file": "cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py", + "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_sync", + "segments": [ + { + "end": 44, + "start": 27, + "type": "FULL" + }, + { + "end": 44, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 41, + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 45, + "start": 42, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "UpdateFeed" + } + }, + "file": "cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py", + "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "UpdateFeed" + } + }, + "file": "cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py", + "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json new file mode 100644 index 000000000000..85a9eedbb393 --- /dev/null +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json @@ -0,0 +1,178 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "AnalyzeIamPolicy" + } + }, + "file": "cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py", + "regionTag": "cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_async", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "AnalyzeIamPolicy" + } + }, + "file": "cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py", + "regionTag": "cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_sync", + "segments": [ + { + "end": 47, + "start": 27, + "type": "FULL" + }, + { + "end": 47, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 41, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 44, + "start": 42, + "type": "REQUEST_EXECUTION" + }, + { + "end": 48, + "start": 45, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "ExportIamPolicyAnalysis" + } + }, + "file": "cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py", + "regionTag": "cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_async", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "ExportIamPolicyAnalysis" + } + }, + "file": "cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py", + "regionTag": "cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_sync", + "segments": [ + { + "end": 53, + "start": 27, + "type": "FULL" + }, + { + "end": 53, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 45, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 46, + "type": "REQUEST_EXECUTION" + }, + { + "end": 54, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json new file mode 100644 index 000000000000..3947141c6f19 --- /dev/null +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json @@ -0,0 +1,89 @@ +{ + "snippets": [ + { + "clientMethod": { + "async": true, + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "ListAssets" + } + }, + "file": "cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py", + "regionTag": "cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + }, + { + "clientMethod": { + "method": { + "service": { + "shortName": "AssetService" + }, + "shortName": "ListAssets" + } + }, + "file": "cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py", + "regionTag": "cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "type": "RESPONSE_HANDLING" + } + ] + } + ] +} diff --git a/asset/snippets/snippets/noxfile_config.py b/asset/snippets/snippets/noxfile_config.py index 4a4db8c2de30..5c3e8031a977 100644 --- a/asset/snippets/snippets/noxfile_config.py +++ b/asset/snippets/snippets/noxfile_config.py @@ -18,7 +18,7 @@ # the noxfile.py. # The source of truth: -# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/noxfile_config.py +# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/noxfile_config.py TEST_CONFIG_OVERRIDE = { # You can opt out from the test for specific Python versions. From cdb78ae07fe08be26e37987538cf51696dfc2318 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 5 Feb 2022 18:26:50 +0100 Subject: [PATCH 175/235] chore(deps): update dependency pytest to v7 (#366) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pytest](https://docs.pytest.org/en/latest/) ([source](https://togithub.com/pytest-dev/pytest), [changelog](https://docs.pytest.org/en/stable/changelog.html)) | `==6.2.5` -> `==7.0.0` | [![age](https://badges.renovateapi.com/packages/pypi/pytest/7.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/pytest/7.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/pytest/7.0.0/compatibility-slim/6.2.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/pytest/7.0.0/confidence-slim/6.2.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
pytest-dev/pytest ### [`v7.0.0`](https://togithub.com/pytest-dev/pytest/releases/7.0.0) [Compare Source](https://togithub.com/pytest-dev/pytest/compare/6.2.5...7.0.0) # pytest 7.0.0 (2022-02-03) (**Please see the full set of changes for this release also in the 7.0.0rc1 notes below**) ## Deprecations - [#​9488](https://togithub.com/pytest-dev/pytest/issues/9488): If custom subclasses of nodes like `pytest.Item`{.interpreted-text role="class"} override the `__init__` method, they should take `**kwargs`. See `uncooperative-constructors-deprecated`{.interpreted-text role="ref"} for details. Note that a deprection warning is only emitted when there is a conflict in the arguments pytest expected to pass. This deprecation was already part of pytest 7.0.0rc1 but wasn't documented. ## Bug Fixes - [#​9355](https://togithub.com/pytest-dev/pytest/issues/9355): Fixed error message prints function decorators when using assert in Python 3.8 and above. - [#​9396](https://togithub.com/pytest-dev/pytest/issues/9396): Ensure `pytest.Config.inifile`{.interpreted-text role="attr"} is available during the `pytest_cmdline_main <_pytest.hookspec.pytest_cmdline_main>`{.interpreted-text role="func"} hook (regression during `7.0.0rc1`). ## Improved Documentation - [#​9404](https://togithub.com/pytest-dev/pytest/issues/9404): Added extra documentation on alternatives to common misuses of \[pytest.warns(None)]{.title-ref} ahead of its deprecation. - [#​9505](https://togithub.com/pytest-dev/pytest/issues/9505): Clarify where the configuration files are located. To avoid confusions documentation mentions that configuration file is located in the root of the repository. ## Trivial/Internal Changes - [#​9521](https://togithub.com/pytest-dev/pytest/issues/9521): Add test coverage to assertion rewrite path. # pytest 7.0.0rc1 (2021-12-06) ## Breaking Changes - [#​7259](https://togithub.com/pytest-dev/pytest/issues/7259): The `Node.reportinfo() `{.interpreted-text role="ref"} function first return value type has been expanded from \[py.path.local | str]{.title-ref} to \[os.PathLike\[str] | str]{.title-ref}. Most plugins which refer to \[reportinfo()]{.title-ref} only define it as part of a custom `pytest.Item`{.interpreted-text role="class"} implementation. Since \[py.path.local]{.title-ref} is a \[os.PathLike\[str]]{.title-ref}, these plugins are unaffacted. Plugins and users which call \[reportinfo()]{.title-ref}, use the first return value and interact with it as a \[py.path.local]{.title-ref}, would need to adjust by calling \[py.path.local(fspath)]{.title-ref}. Although preferably, avoid the legacy \[py.path.local]{.title-ref} and use \[pathlib.Path]{.title-ref}, or use \[item.location]{.title-ref} or \[item.path]{.title-ref}, instead. Note: pytest was not able to provide a deprecation period for this change. - [#​8246](https://togithub.com/pytest-dev/pytest/issues/8246): `--version` now writes version information to `stdout` rather than `stderr`. - [#​8733](https://togithub.com/pytest-dev/pytest/issues/8733): Drop a workaround for [pyreadline](https://togithub.com/pyreadline/pyreadline) that made it work with `--pdb`. The workaround was introduced in [#​1281](https://togithub.com/pytest-dev/pytest/pull/1281) in 2015, however since then [pyreadline seems to have gone unmaintained](https://togithub.com/pyreadline/pyreadline/issues/58), is [generating warnings](https://togithub.com/pytest-dev/pytest/issues/8847), and will stop working on Python 3.10. - [#​9061](https://togithub.com/pytest-dev/pytest/issues/9061): Using `pytest.approx`{.interpreted-text role="func"} in a boolean context now raises an error hinting at the proper usage. It is apparently common for users to mistakenly use `pytest.approx` like this: ```{.sourceCode .python} assert pytest.approx(actual, expected) ``` While the correct usage is: ```{.sourceCode .python} assert actual == pytest.approx(expected) ``` The new error message helps catch those mistakes. - [#​9277](https://togithub.com/pytest-dev/pytest/issues/9277): The `pytest.Instance` collector type has been removed. Importing `pytest.Instance` or `_pytest.python.Instance` returns a dummy type and emits a deprecation warning. See `instance-collector-deprecation`{.interpreted-text role="ref"} for details. - [#​9308](https://togithub.com/pytest-dev/pytest/issues/9308): **PytestRemovedIn7Warning deprecation warnings are now errors by default.** Following our plan to remove deprecated features with as little disruption as possible, all warnings of type `PytestRemovedIn7Warning` now generate errors instead of warning messages by default. **The affected features will be effectively removed in pytest 7.1**, so please consult the `deprecations`{.interpreted-text role="ref"} section in the docs for directions on how to update existing code. In the pytest `7.0.X` series, it is possible to change the errors back into warnings as a stopgap measure by adding this to your `pytest.ini` file: ```{.sourceCode .ini} [pytest] filterwarnings = ignore::pytest.PytestRemovedIn7Warning ``` But this will stop working when pytest `7.1` is released. **If you have concerns** about the removal of a specific feature, please add a comment to `9308`{.interpreted-text role="issue"}. ## Deprecations - [#​7259](https://togithub.com/pytest-dev/pytest/issues/7259): `py.path.local` arguments for hooks have been deprecated. See `the deprecation note `{.interpreted-text role="ref"} for full details. `py.path.local` arguments to Node constructors have been deprecated. See `the deprecation note `{.interpreted-text role="ref"} for full details. ::: {.note} ::: {.admonition-title} Note ::: The name of the `~_pytest.nodes.Node`{.interpreted-text role="class"} arguments and attributes (the new attribute being `path`) is **the opposite** of the situation for hooks (the old argument being `path`). This is an unfortunate artifact due to historical reasons, which should be resolved in future versions as we slowly get rid of the `py`{.interpreted-text role="pypi"} dependency (see `9283`{.interpreted-text role="issue"} for a longer discussion). ::: - [#​7469](https://togithub.com/pytest-dev/pytest/issues/7469): Directly constructing the following classes is now deprecated: - `_pytest.mark.structures.Mark` - `_pytest.mark.structures.MarkDecorator` - `_pytest.mark.structures.MarkGenerator` - `_pytest.python.Metafunc` - `_pytest.runner.CallInfo` - `_pytest._code.ExceptionInfo` - `_pytest.config.argparsing.Parser` - `_pytest.config.argparsing.OptionGroup` - `_pytest.pytester.HookRecorder` These constructors have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 8. - [#​8242](https://togithub.com/pytest-dev/pytest/issues/8242): Raising `unittest.SkipTest`{.interpreted-text role="class"} to skip collection of tests during the pytest collection phase is deprecated. Use `pytest.skip`{.interpreted-text role="func"} instead. Note: This deprecation only relates to using `unittest.SkipTest`{.interpreted-text role="class"} during test collection. You are probably not doing that. Ordinary usage of `unittest.SkipTest`{.interpreted-text role="class"} / `unittest.TestCase.skipTest`{.interpreted-text role="meth"} / `unittest.skip`{.interpreted-text role="func"} in unittest test cases is fully supported. - [#​8315](https://togithub.com/pytest-dev/pytest/issues/8315): Several behaviors of `Parser.addoption `{.interpreted-text role="meth"} are now scheduled for removal in pytest 8 (deprecated since pytest 2.4.0): - `parser.addoption(..., help=".. %default ..")` - use `%(default)s` instead. - `parser.addoption(..., type="int/string/float/complex")` - use `type=int` etc. instead. - [#​8447](https://togithub.com/pytest-dev/pytest/issues/8447): Defining a custom pytest node type which is both an `pytest.Item `{.interpreted-text role="class"} and a `pytest.Collector `{.interpreted-text role="class"} (e.g. `pytest.File `{.interpreted-text role="class"}) now issues a warning. It was never sanely supported and triggers hard to debug errors. See `the deprecation note `{.interpreted-text role="ref"} for full details. - [#​8592](https://togithub.com/pytest-dev/pytest/issues/8592): `pytest_cmdline_preparse`{.interpreted-text role="hook"} has been officially deprecated. It will be removed in a future release. Use `pytest_load_initial_conftests`{.interpreted-text role="hook"} instead. See `the deprecation note `{.interpreted-text role="ref"} for full details. - [#​8645](https://togithub.com/pytest-dev/pytest/issues/8645): `pytest.warns(None) `{.interpreted-text role="func"} is now deprecated because many people used it to mean "this code does not emit warnings", but it actually had the effect of checking that the code emits at least one warning of any type - like `pytest.warns()` or `pytest.warns(Warning)`. - [#​8948](https://togithub.com/pytest-dev/pytest/issues/8948): `pytest.skip(msg=...) `{.interpreted-text role="func"}, `pytest.fail(msg=...) `{.interpreted-text role="func"} and `pytest.exit(msg=...) `{.interpreted-text role="func"} signatures now accept a `reason` argument instead of `msg`. Using `msg` still works, but is deprecated and will be removed in a future release. This was changed for consistency with `pytest.mark.skip `{.interpreted-text role="func"} and `pytest.mark.xfail `{.interpreted-text role="func"} which both accept `reason` as an argument. - [#​8174](https://togithub.com/pytest-dev/pytest/issues/8174): The following changes have been made to types reachable through `pytest.ExceptionInfo.traceback`{.interpreted-text role="attr"}: - The `path` property of `_pytest.code.Code` returns `Path` instead of `py.path.local`. - The `path` property of `_pytest.code.TracebackEntry` returns `Path` instead of `py.path.local`. There was no deprecation period for this change (sorry!). ## Features - [#​5196](https://togithub.com/pytest-dev/pytest/issues/5196): Tests are now ordered by definition order in more cases. In a class hierarchy, tests from base classes are now consistently ordered before tests defined on their subclasses (reverse MRO order). - [#​7132](https://togithub.com/pytest-dev/pytest/issues/7132): Added two environment variables `PYTEST_THEME`{.interpreted-text role="envvar"} and `PYTEST_THEME_MODE`{.interpreted-text role="envvar"} to let the users customize the pygments theme used. - [#​7259](https://togithub.com/pytest-dev/pytest/issues/7259): Added `cache.mkdir() `{.interpreted-text role="meth"}, which is similar to the existing `cache.makedir() `{.interpreted-text role="meth"}, but returns a `pathlib.Path`{.interpreted-text role="class"} instead of a legacy `py.path.local`. Added a `paths` type to `parser.addini() `{.interpreted-text role="meth"}, as in `parser.addini("mypaths", "my paths", type="paths")`, which is similar to the existing `pathlist`, but returns a list of `pathlib.Path`{.interpreted-text role="class"} instead of legacy `py.path.local`. - [#​7469](https://togithub.com/pytest-dev/pytest/issues/7469): The types of objects used in pytest's API are now exported so they may be used in type annotations. The newly-exported types are: - `pytest.Config` for `Config `{.interpreted-text role="class"}. - `pytest.Mark` for `marks `{.interpreted-text role="class"}. - `pytest.MarkDecorator` for `mark decorators `{.interpreted-text role="class"}. - `pytest.MarkGenerator` for the `pytest.mark `{.interpreted-text role="class"} singleton. - `pytest.Metafunc` for the `metafunc `{.interpreted-text role="class"} argument to the `pytest_generate_tests`{.interpreted-text role="hook"} hook. - `pytest.CallInfo` for the `CallInfo `{.interpreted-text role="class"} type passed to various hooks. - `pytest.PytestPluginManager` for `PytestPluginManager `{.interpreted-text role="class"}. - `pytest.ExceptionInfo` for the `ExceptionInfo `{.interpreted-text role="class"} type returned from `pytest.raises`{.interpreted-text role="func"} and passed to various hooks. - `pytest.Parser` for the `Parser `{.interpreted-text role="class"} type passed to the `pytest_addoption`{.interpreted-text role="hook"} hook. - `pytest.OptionGroup` for the `OptionGroup `{.interpreted-text role="class"} type returned from the `parser.addgroup `{.interpreted-text role="func"} method. - `pytest.HookRecorder` for the `HookRecorder `{.interpreted-text role="class"} type returned from `~pytest.Pytester`{.interpreted-text role="class"}. - `pytest.RecordedHookCall` for the `RecordedHookCall `{.interpreted-text role="class"} type returned from `~pytest.HookRecorder`{.interpreted-text role="class"}. - `pytest.RunResult` for the `RunResult `{.interpreted-text role="class"} type returned from `~pytest.Pytester`{.interpreted-text role="class"}. - `pytest.LineMatcher` for the `LineMatcher `{.interpreted-text role="class"} type used in `~pytest.RunResult`{.interpreted-text role="class"} and others. - `pytest.TestReport` for the `TestReport `{.interpreted-text role="class"} type used in various hooks. - `pytest.CollectReport` for the `CollectReport `{.interpreted-text role="class"} type used in various hooks. Constructing most of them directly is not supported; they are only meant for use in type annotations. Doing so will emit a deprecation warning, and may become a hard-error in pytest 8.0. Subclassing them is also not supported. This is not currently enforced at runtime, but is detected by type-checkers such as mypy. - [#​7856](https://togithub.com/pytest-dev/pytest/issues/7856): `--import-mode=importlib `{.interpreted-text role="ref"} now works with features that depend on modules being on :py`sys.modules`{.interpreted-text role="data"}, such as `pickle`{.interpreted-text role="mod"} and `dataclasses`{.interpreted-text role="mod"}. - [#​8144](https://togithub.com/pytest-dev/pytest/issues/8144): The following hooks now receive an additional `pathlib.Path` argument, equivalent to an existing `py.path.local` argument: - `pytest_ignore_collect`{.interpreted-text role="hook"} - The `collection_path` parameter (equivalent to existing `path` parameter). - `pytest_collect_file`{.interpreted-text role="hook"} - The `file_path` parameter (equivalent to existing `path` parameter). - `pytest_pycollect_makemodule`{.interpreted-text role="hook"} - The `module_path` parameter (equivalent to existing `path` parameter). - `pytest_report_header`{.interpreted-text role="hook"} - The `start_path` parameter (equivalent to existing `startdir` parameter). - `pytest_report_collectionfinish`{.interpreted-text role="hook"} - The `start_path` parameter (equivalent to existing `startdir` parameter). ::: {.note} ::: {.admonition-title} Note ::: The name of the `~_pytest.nodes.Node`{.interpreted-text role="class"} arguments and attributes (the new attribute being `path`) is **the opposite** of the situation for hooks (the old argument being `path`). This is an unfortunate artifact due to historical reasons, which should be resolved in future versions as we slowly get rid of the `py`{.interpreted-text role="pypi"} dependency (see `9283`{.interpreted-text role="issue"} for a longer discussion). ::: - [#​8251](https://togithub.com/pytest-dev/pytest/issues/8251): Implement `Node.path` as a `pathlib.Path`. Both the old `fspath` and this new attribute gets set no matter whether `path` or `fspath` (deprecated) is passed to the constructor. It is a replacement for the `fspath` attribute (which represents the same path as `py.path.local`). While `fspath` is not deprecated yet due to the ongoing migration of methods like `~_pytest.Item.reportinfo`{.interpreted-text role="meth"}, we expect to deprecate it in a future release. ::: {.note} ::: {.admonition-title} Note ::: The name of the `~_pytest.nodes.Node`{.interpreted-text role="class"} arguments and attributes (the new attribute being `path`) is **the opposite** of the situation for hooks (the old argument being `path`). This is an unfortunate artifact due to historical reasons, which should be resolved in future versions as we slowly get rid of the `py`{.interpreted-text role="pypi"} dependency (see `9283`{.interpreted-text role="issue"} for a longer discussion). ::: - [#​8421](https://togithub.com/pytest-dev/pytest/issues/8421): `pytest.approx`{.interpreted-text role="func"} now works on `~decimal.Decimal`{.interpreted-text role="class"} within mappings/dicts and sequences/lists. - [#​8606](https://togithub.com/pytest-dev/pytest/issues/8606): pytest invocations with `--fixtures-per-test` and `--fixtures` have been enriched with: - Fixture location path printed with the fixture name. - First section of the fixture's docstring printed under the fixture name. - Whole of fixture's docstring printed under the fixture name using `--verbose` option. - [#​8761](https://togithub.com/pytest-dev/pytest/issues/8761): New `version-tuple`{.interpreted-text role="ref"} attribute, which makes it simpler for users to do something depending on the pytest version (such as declaring hooks which are introduced in later versions). - [#​8789](https://togithub.com/pytest-dev/pytest/issues/8789): Switch TOML parser from `toml` to `tomli` for TOML v1.0.0 support in `pyproject.toml`. - [#​8920](https://togithub.com/pytest-dev/pytest/issues/8920): Added `pytest.Stash`{.interpreted-text role="class"}, a facility for plugins to store their data on `~pytest.Config`{.interpreted-text role="class"} and `~_pytest.nodes.Node`{.interpreted-text role="class"}s in a type-safe and conflict-free manner. See `plugin-stash`{.interpreted-text role="ref"} for details. - [#​8953](https://togithub.com/pytest-dev/pytest/issues/8953): `RunResult <_pytest.pytester.RunResult>`{.interpreted-text role="class"} method `assert_outcomes <_pytest.pytester.RunResult.assert_outcomes>`{.interpreted-text role="meth"} now accepts a `warnings` argument to assert the total number of warnings captured. - [#​8954](https://togithub.com/pytest-dev/pytest/issues/8954): `--debug` flag now accepts a `str`{.interpreted-text role="class"} file to route debug logs into, remains defaulted to \[pytestdebug.log]{.title-ref}. - [#​9023](https://togithub.com/pytest-dev/pytest/issues/9023): Full diffs are now always shown for equality assertions of iterables when \[CI]{.title-ref} or `BUILD_NUMBER` is found in the environment, even when `-v` isn't used. - [#​9113](https://togithub.com/pytest-dev/pytest/issues/9113): `RunResult <_pytest.pytester.RunResult>`{.interpreted-text role="class"} method `assert_outcomes <_pytest.pytester.RunResult.assert_outcomes>`{.interpreted-text role="meth"} now accepts a `deselected` argument to assert the total number of deselected tests. - [#​9114](https://togithub.com/pytest-dev/pytest/issues/9114): Added `pythonpath`{.interpreted-text role="confval"} setting that adds listed paths to `sys.path`{.interpreted-text role="data"} for the duration of the test session. If you currently use the pytest-pythonpath or pytest-srcpaths plugins, you should be able to replace them with built-in \[pythonpath]{.title-ref} setting. ## Improvements - [#​7480](https://togithub.com/pytest-dev/pytest/issues/7480): A deprecation scheduled to be removed in a major version X (e.g. pytest 7, 8, 9, ...) now uses warning category \[PytestRemovedInXWarning]{.title-ref}, a subclass of `~pytest.PytestDeprecationWarning`{.interpreted-text role="class"}, instead of `PytestDeprecationWarning`{.interpreted-text role="class"} directly. See `backwards-compatibility`{.interpreted-text role="ref"} for more details. - [#​7864](https://togithub.com/pytest-dev/pytest/issues/7864): Improved error messages when parsing warning filters. Previously pytest would show an internal traceback, which besides being ugly sometimes would hide the cause of the problem (for example an `ImportError` while importing a specific warning type). - [#​8335](https://togithub.com/pytest-dev/pytest/issues/8335): Improved `pytest.approx`{.interpreted-text role="func"} assertion messages for sequences of numbers. The assertion messages now dumps a table with the index and the error of each diff. Example: > assert [1, 2, 3, 4] == pytest.approx([1, 3, 3, 5]) E assert comparison failed for 2 values: E Index | Obtained | Expected E 1 | 2 | 3 +- 3.0e-06 E 3 | 4 | 5 +- 5.0e-06 - [#​8403](https://togithub.com/pytest-dev/pytest/issues/8403): By default, pytest will truncate long strings in assert errors so they don't clutter the output too much, currently at `240` characters by default. However, in some cases the longer output helps, or is even crucial, to diagnose a failure. Using `-v` will now increase the truncation threshold to `2400` characters, and `-vv` or higher will disable truncation entirely. - [#​8509](https://togithub.com/pytest-dev/pytest/issues/8509): Fixed issue where `unittest.TestCase.setUpClass`{.interpreted-text role="meth"} is not called when a test has \[/]{.title-ref} in its name since pytest 6.2.0. This refers to the path part in pytest node IDs, e.g. `TestClass::test_it` in the node ID `tests/test_file.py::TestClass::test_it`. Now, instead of assuming that the test name does not contain `/`, it is assumed that test path does not contain `::`. We plan to hopefully make both of these work in the future. - [#​8803](https://togithub.com/pytest-dev/pytest/issues/8803): It is now possible to add colors to custom log levels on cli log. By using `add_color_level <_pytest.logging.add_color_level>`{.interpreted-text role="func"} from a `pytest_configure` hook, colors can be added: logging_plugin = config.pluginmanager.get_plugin('logging-plugin') logging_plugin.log_cli_handler.formatter.add_color_level(logging.INFO, 'cyan') logging_plugin.log_cli_handler.formatter.add_color_level(logging.SPAM, 'blue') See `log_colors`{.interpreted-text role="ref"} for more information. - [#​8822](https://togithub.com/pytest-dev/pytest/issues/8822): When showing fixture paths in \[--fixtures]{.title-ref} or \[--fixtures-by-test]{.title-ref}, fixtures coming from pytest itself now display an elided path, rather than the full path to the file in the \[site-packages]{.title-ref} directory. - [#​8898](https://togithub.com/pytest-dev/pytest/issues/8898): Complex numbers are now treated like floats and integers when generating parameterization IDs. - [#​9062](https://togithub.com/pytest-dev/pytest/issues/9062): `--stepwise-skip` now implicitly enables `--stepwise` and can be used on its own. - [#​9205](https://togithub.com/pytest-dev/pytest/issues/9205): `pytest.Cache.set`{.interpreted-text role="meth"} now preserves key order when saving dicts. ## Bug Fixes - [#​7124](https://togithub.com/pytest-dev/pytest/issues/7124): Fixed an issue where `__main__.py` would raise an `ImportError` when `--doctest-modules` was provided. - [#​8061](https://togithub.com/pytest-dev/pytest/issues/8061): Fixed failing `staticmethod` test cases if they are inherited from a parent test class. - [#​8192](https://togithub.com/pytest-dev/pytest/issues/8192): `testdir.makefile` now silently accepts values which don't start with `.` to maintain backward compatibility with older pytest versions. `pytester.makefile` now issues a clearer error if the `.` is missing in the `ext` argument. - [#​8258](https://togithub.com/pytest-dev/pytest/issues/8258): Fixed issue where pytest's `faulthandler` support would not dump traceback on crashes if the `faulthandler`{.interpreted-text role="mod"} module was already enabled during pytest startup (using `python -X dev -m pytest` for example). - [#​8317](https://togithub.com/pytest-dev/pytest/issues/8317): Fixed an issue where illegal directory characters derived from `getpass.getuser()` raised an `OSError`. - [#​8367](https://togithub.com/pytest-dev/pytest/issues/8367): Fix `Class.from_parent` so it forwards extra keyword arguments to the constructor. - [#​8377](https://togithub.com/pytest-dev/pytest/issues/8377): The test selection options `pytest -k` and `pytest -m` now support matching names containing forward slash (`/`) characters. - [#​8384](https://togithub.com/pytest-dev/pytest/issues/8384): The `@pytest.mark.skip` decorator now correctly handles its arguments. When the `reason` argument is accidentally given both positional and as a keyword (e.g. because it was confused with `skipif`), a `TypeError` now occurs. Before, such tests were silently skipped, and the positional argument ignored. Additionally, `reason` is now documented correctly as positional or keyword (rather than keyword-only). - [#​8394](https://togithub.com/pytest-dev/pytest/issues/8394): Use private names for internal fixtures that handle classic setup/teardown so that they don't show up with the default `--fixtures` invocation (but they still show up with `--fixtures -v`). - [#​8456](https://togithub.com/pytest-dev/pytest/issues/8456): The `required_plugins`{.interpreted-text role="confval"} config option now works correctly when pre-releases of plugins are installed, rather than falsely claiming that those plugins aren't installed at all. - [#​8464](https://togithub.com/pytest-dev/pytest/issues/8464): `-c ` now also properly defines `rootdir` as the directory that contains ``. - [#​8503](https://togithub.com/pytest-dev/pytest/issues/8503): `pytest.MonkeyPatch.syspath_prepend`{.interpreted-text role="meth"} no longer fails when `setuptools` is not installed. It now only calls `pkg_resources.fixup_namespace_packages`{.interpreted-text role="func"} if `pkg_resources` was previously imported, because it is not needed otherwise. - [#​8548](https://togithub.com/pytest-dev/pytest/issues/8548): Introduce fix to handle precision width in `log-cli-format` in turn to fix output coloring for certain formats. - [#​8796](https://togithub.com/pytest-dev/pytest/issues/8796): Fixed internal error when skipping doctests. - [#​8983](https://togithub.com/pytest-dev/pytest/issues/8983): The test selection options `pytest -k` and `pytest -m` now support matching names containing backslash (\[\\]{.title-ref}) characters. Backslashes are treated literally, not as escape characters (the values being matched against are already escaped). - [#​8990](https://togithub.com/pytest-dev/pytest/issues/8990): Fix \[pytest -vv]{.title-ref} crashing with an internal exception \[AttributeError: 'str' object has no attribute 'relative_to']{.title-ref} in some cases. - [#​9077](https://togithub.com/pytest-dev/pytest/issues/9077): Fixed confusing error message when `request.fspath` / `request.path` was accessed from a session-scoped fixture. - [#​9131](https://togithub.com/pytest-dev/pytest/issues/9131): Fixed the URL used by `--pastebin` to use [bpa.st](http://bpa.st). - [#​9163](https://togithub.com/pytest-dev/pytest/issues/9163): The end line number and end column offset are now properly set for rewritten assert statements. - [#​9169](https://togithub.com/pytest-dev/pytest/issues/9169): Support for the `files` API from `importlib.resources` within rewritten files. - [#​9272](https://togithub.com/pytest-dev/pytest/issues/9272): The nose compatibility module-level fixtures \[setup()]{.title-ref} and \[teardown()]{.title-ref} are now only called once per module, instead of for each test function. They are now called even if object-level \[setup]{.title-ref}/\[teardown]{.title-ref} is defined. ## Improved Documentation - [#​4320](https://togithub.com/pytest-dev/pytest/issues/4320): Improved docs for \[pytester.copy_example]{.title-ref}. - [#​5105](https://togithub.com/pytest-dev/pytest/issues/5105): Add automatically generated `plugin-list`{.interpreted-text role="ref"}. The list is updated on a periodic schedule. - [#​8337](https://togithub.com/pytest-dev/pytest/issues/8337): Recommend [numpy.testing](https://numpy.org/doc/stable/reference/routines.testing.html) module on `pytest.approx`{.interpreted-text role="func"} documentation. - [#​8655](https://togithub.com/pytest-dev/pytest/issues/8655): Help text for `--pdbcls` more accurately reflects the option's behavior. - [#​9210](https://togithub.com/pytest-dev/pytest/issues/9210): Remove incorrect docs about `confcutdir` being a configuration option: it can only be set through the `--confcutdir` command-line option. - [#​9242](https://togithub.com/pytest-dev/pytest/issues/9242): Upgrade readthedocs configuration to use a [newer Ubuntu version](https://blog.readthedocs.com/new-build-specification/)\` with better unicode support for PDF docs. - [#​9341](https://togithub.com/pytest-dev/pytest/issues/9341): Various methods commonly used for `non-python tests`{.interpreted-text role="ref"} are now correctly documented in the reference docs. They were undocumented previously. ## Trivial/Internal Changes - [#​8133](https://togithub.com/pytest-dev/pytest/issues/8133): Migrate to `setuptools_scm` 6.x to use `SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST` for more robust release tooling. - [#​8174](https://togithub.com/pytest-dev/pytest/issues/8174): The following changes have been made to internal pytest types/functions: - The `_pytest.code.getfslineno()` function returns `Path` instead of `py.path.local`. - The `_pytest.python.path_matches_patterns()` function takes `Path` instead of `py.path.local`. - The `_pytest._code.Traceback.cut()` function accepts any `os.PathLike[str]`, not just `py.path.local`. - [#​8248](https://togithub.com/pytest-dev/pytest/issues/8248): Internal Restructure: let `python.PyObjMixin` inherit from `nodes.Node` to carry over typing information. - [#​8432](https://togithub.com/pytest-dev/pytest/issues/8432): Improve error message when `pytest.skip`{.interpreted-text role="func"} is used at module level without passing \[allow_module_level=True]{.title-ref}. - [#​8818](https://togithub.com/pytest-dev/pytest/issues/8818): Ensure `regendoc` opts out of `TOX_ENV` cachedir selection to ensure independent example test runs. - [#​8913](https://togithub.com/pytest-dev/pytest/issues/8913): The private `CallSpec2._arg2scopenum` attribute has been removed after an internal refactoring. - [#​8967](https://togithub.com/pytest-dev/pytest/issues/8967): `pytest_assertion_pass`{.interpreted-text role="hook"} is no longer considered experimental and future changes to it will be considered more carefully. - [#​9202](https://togithub.com/pytest-dev/pytest/issues/9202): Add github action to upload coverage report to codecov instead of bash uploader. - [#​9225](https://togithub.com/pytest-dev/pytest/issues/9225): Changed the command used to create sdist and wheel artifacts: using the build package instead of setup.py. - [#​9351](https://togithub.com/pytest-dev/pytest/issues/9351): Correct minor typos in doc/en/example/special.rst.
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index 23bba2f0c079..b00fceee19f5 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ backoff==1.11.1 flaky==3.7.0 -pytest==6.2.5 +pytest==7.0.0 From cda489b2440ce9ba6b980ef4ced8ddf28dcd12d1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 09:27:29 -0700 Subject: [PATCH 176/235] chore: use gapic-generator-python 0.63.2 (#367) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.63.2 PiperOrigin-RevId: 427792504 Source-Link: https://github.com/googleapis/googleapis/commit/55b9e1e0b3106c850d13958352bc0751147b6b15 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 --- ..._asset_service_analyze_iam_policy_async.py | 2 +- ...ce_analyze_iam_policy_longrunning_async.py | 2 + ...ice_analyze_iam_policy_longrunning_sync.py | 2 + ...1_asset_service_analyze_iam_policy_sync.py | 2 +- ...set_v1_asset_service_analyze_move_async.py | 2 +- ...sset_v1_asset_service_analyze_move_sync.py | 2 +- ..._service_batch_get_assets_history_async.py | 2 +- ...t_service_batch_get_assets_history_sync.py | 2 +- ...sset_v1_asset_service_create_feed_async.py | 2 +- ...asset_v1_asset_service_create_feed_sync.py | 2 +- ...sset_v1_asset_service_delete_feed_async.py | 2 +- ...asset_v1_asset_service_delete_feed_sync.py | 2 +- ...et_v1_asset_service_export_assets_async.py | 2 + ...set_v1_asset_service_export_assets_sync.py | 2 + ...d_asset_v1_asset_service_get_feed_async.py | 2 +- ...ed_asset_v1_asset_service_get_feed_sync.py | 2 +- ...sset_v1_asset_service_list_assets_async.py | 2 + ...asset_v1_asset_service_list_assets_sync.py | 2 + ...asset_v1_asset_service_list_feeds_async.py | 2 +- ..._asset_v1_asset_service_list_feeds_sync.py | 2 +- ...t_service_search_all_iam_policies_async.py | 2 + ...et_service_search_all_iam_policies_sync.py | 2 + ...sset_service_search_all_resources_async.py | 2 + ...asset_service_search_all_resources_sync.py | 2 + ...sset_v1_asset_service_update_feed_async.py | 2 +- ...asset_v1_asset_service_update_feed_sync.py | 2 +- ...t_service_search_all_iam_policies_async.py | 2 + ...et_service_search_all_iam_policies_sync.py | 2 + ...sset_service_search_all_resources_async.py | 2 + ...asset_service_search_all_resources_sync.py | 2 + ...p2beta1_asset_service_create_feed_async.py | 2 +- ...1p2beta1_asset_service_create_feed_sync.py | 2 +- ...p2beta1_asset_service_delete_feed_async.py | 2 +- ...1p2beta1_asset_service_delete_feed_sync.py | 2 +- ..._v1p2beta1_asset_service_get_feed_async.py | 2 +- ...t_v1p2beta1_asset_service_get_feed_sync.py | 2 +- ...1p2beta1_asset_service_list_feeds_async.py | 2 +- ...v1p2beta1_asset_service_list_feeds_sync.py | 2 +- ...p2beta1_asset_service_update_feed_async.py | 2 +- ...1p2beta1_asset_service_update_feed_sync.py | 2 +- ..._asset_service_analyze_iam_policy_async.py | 2 +- ...1_asset_service_analyze_iam_policy_sync.py | 2 +- ...ervice_export_iam_policy_analysis_async.py | 2 + ...service_export_iam_policy_analysis_sync.py | 2 + ...p5beta1_asset_service_list_assets_async.py | 2 + ...1p5beta1_asset_service_list_assets_sync.py | 2 + .../snippet_metadata_asset_v1.json | 80 ++++++++++++------- .../snippet_metadata_asset_v1p1beta1.json | 32 +++++--- .../snippet_metadata_asset_v1p4beta1.json | 16 ++-- .../snippet_metadata_asset_v1p5beta1.json | 16 ++-- 50 files changed, 154 insertions(+), 82 deletions(-) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py index 1759b7e38c2c..a5d56bf2cbc9 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py @@ -42,7 +42,7 @@ async def sample_analyze_iam_policy(): # Make the request response = await client.analyze_iam_policy(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py index 51ef3ab86a18..623137191de1 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py @@ -49,6 +49,8 @@ async def sample_analyze_iam_policy_longrunning(): print("Waiting for operation to complete...") response = await operation.result() + + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py index eee8fb97ed75..17a51630b690 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py @@ -49,6 +49,8 @@ def sample_analyze_iam_policy_longrunning(): print("Waiting for operation to complete...") response = operation.result() + + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py index 9dd189550952..ddf13b735780 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py @@ -42,7 +42,7 @@ def sample_analyze_iam_policy(): # Make the request response = client.analyze_iam_policy(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_async.py index c10915fb45fa..896fa18f0526 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_async.py @@ -40,7 +40,7 @@ async def sample_analyze_move(): # Make the request response = await client.analyze_move(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_AnalyzeMove_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py index b4c6b03e064a..154660b22892 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py @@ -40,7 +40,7 @@ def sample_analyze_move(): # Make the request response = client.analyze_move(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_AnalyzeMove_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py index edae4c7f9289..b84841a0d8cb 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py @@ -39,7 +39,7 @@ async def sample_batch_get_assets_history(): # Make the request response = await client.batch_get_assets_history(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py index 5bf8c8de15fb..df9319427adf 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py @@ -39,7 +39,7 @@ def sample_batch_get_assets_history(): # Make the request response = client.batch_get_assets_history(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py index a988dfe5d494..9894a01dca1a 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py @@ -44,7 +44,7 @@ async def sample_create_feed(): # Make the request response = await client.create_feed(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_CreateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py index e33028822916..5efaf5e1b12e 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py @@ -44,7 +44,7 @@ def sample_create_feed(): # Make the request response = client.create_feed(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_CreateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py index d9fea4281440..3af184162064 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py @@ -37,7 +37,7 @@ async def sample_delete_feed(): ) # Make the request - response = await client.delete_feed(request=request) + await client.delete_feed(request=request) # [END cloudasset_generated_asset_v1_AssetService_DeleteFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py index f9008baa7b8b..f8e462e5899e 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py @@ -37,7 +37,7 @@ def sample_delete_feed(): ) # Make the request - response = client.delete_feed(request=request) + client.delete_feed(request=request) # [END cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py index f384bea0adfb..e9cd14623189 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py @@ -46,6 +46,8 @@ async def sample_export_assets(): print("Waiting for operation to complete...") response = await operation.result() + + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_ExportAssets_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py index 4ac84ea71306..8a1a4fffb10f 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py @@ -46,6 +46,8 @@ def sample_export_assets(): print("Waiting for operation to complete...") response = operation.result() + + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_ExportAssets_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py index 33c88d3b4b2a..7ce97094b421 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py @@ -39,7 +39,7 @@ async def sample_get_feed(): # Make the request response = await client.get_feed(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_GetFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py index 98834ef0be65..12f433dc1bab 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py @@ -39,7 +39,7 @@ def sample_get_feed(): # Make the request response = client.get_feed(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_GetFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py index 0a6a0b4a098d..67b2c65501a9 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py @@ -38,6 +38,8 @@ async def sample_list_assets(): # Make the request page_result = client.list_assets(request=request) + + # Handle the response async for response in page_result: print(response) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py index 5fad10b12adf..212999ece715 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py @@ -38,6 +38,8 @@ def sample_list_assets(): # Make the request page_result = client.list_assets(request=request) + + # Handle the response for response in page_result: print(response) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py index 8eec6bfab483..82031eb9a334 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py @@ -39,7 +39,7 @@ async def sample_list_feeds(): # Make the request response = await client.list_feeds(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_ListFeeds_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py index 7aba515f8bd3..dc811344f52a 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py @@ -39,7 +39,7 @@ def sample_list_feeds(): # Make the request response = client.list_feeds(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_ListFeeds_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py index 9be060836a2c..610d8d6d419e 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py @@ -38,6 +38,8 @@ async def sample_search_all_iam_policies(): # Make the request page_result = client.search_all_iam_policies(request=request) + + # Handle the response async for response in page_result: print(response) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py index e39c08295ba9..d73fcfd4ce41 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py @@ -38,6 +38,8 @@ def sample_search_all_iam_policies(): # Make the request page_result = client.search_all_iam_policies(request=request) + + # Handle the response for response in page_result: print(response) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py index aba043b4b80c..7d635dce5280 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py @@ -38,6 +38,8 @@ async def sample_search_all_resources(): # Make the request page_result = client.search_all_resources(request=request) + + # Handle the response async for response in page_result: print(response) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py index 475d8b4ad58d..061437752016 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py @@ -38,6 +38,8 @@ def sample_search_all_resources(): # Make the request page_result = client.search_all_resources(request=request) + + # Handle the response for response in page_result: print(response) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py index e409b05b7182..6f1d9b65f2a7 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py @@ -42,7 +42,7 @@ async def sample_update_feed(): # Make the request response = await client.update_feed(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_UpdateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py index 214f4886f215..9d99cb0070fb 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py @@ -42,7 +42,7 @@ def sample_update_feed(): # Make the request response = client.update_feed(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py index 9a921581e3af..4b39ac69c879 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py @@ -38,6 +38,8 @@ async def sample_search_all_iam_policies(): # Make the request page_result = client.search_all_iam_policies(request=request) + + # Handle the response async for response in page_result: print(response) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py index a60db86f2598..1c9f96d20acc 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py @@ -38,6 +38,8 @@ def sample_search_all_iam_policies(): # Make the request page_result = client.search_all_iam_policies(request=request) + + # Handle the response for response in page_result: print(response) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py index f9e4aa6f5bf2..27282ddec699 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py @@ -38,6 +38,8 @@ async def sample_search_all_resources(): # Make the request page_result = client.search_all_resources(request=request) + + # Handle the response async for response in page_result: print(response) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py index 5e1e2afb0d9b..bc0c01da4b56 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py @@ -38,6 +38,8 @@ def sample_search_all_resources(): # Make the request page_result = client.search_all_resources(request=request) + + # Handle the response for response in page_result: print(response) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py index 76c170007a91..ef0decff63ae 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py @@ -44,7 +44,7 @@ async def sample_create_feed(): # Make the request response = await client.create_feed(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py index 7ad3a6672e66..c11a409f280a 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py @@ -44,7 +44,7 @@ def sample_create_feed(): # Make the request response = client.create_feed(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py index a382ca424cf4..14652b76e927 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py @@ -37,7 +37,7 @@ async def sample_delete_feed(): ) # Make the request - response = await client.delete_feed(request=request) + await client.delete_feed(request=request) # [END cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py index 8d4eb12361c0..f6a16738b3c7 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py @@ -37,7 +37,7 @@ def sample_delete_feed(): ) # Make the request - response = client.delete_feed(request=request) + client.delete_feed(request=request) # [END cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py index 0d6e77c1668d..49e9bc8a7db8 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py @@ -39,7 +39,7 @@ async def sample_get_feed(): # Make the request response = await client.get_feed(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py index 85675ca550bd..c2ac229f055e 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py @@ -39,7 +39,7 @@ def sample_get_feed(): # Make the request response = client.get_feed(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py index cd59d163c77f..c20268f366ed 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py @@ -39,7 +39,7 @@ async def sample_list_feeds(): # Make the request response = await client.list_feeds(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py index aeec26d12cde..3db59fbcd177 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py @@ -39,7 +39,7 @@ def sample_list_feeds(): # Make the request response = client.list_feeds(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py index 5eb68f7763ed..a733af0b226d 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py @@ -42,7 +42,7 @@ async def sample_update_feed(): # Make the request response = await client.update_feed(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py index 35a9b0220de2..c60ab87a6723 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py @@ -42,7 +42,7 @@ def sample_update_feed(): # Make the request response = client.update_feed(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py index 1456349977b5..b04e5bcb5fa7 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py @@ -42,7 +42,7 @@ async def sample_analyze_iam_policy(): # Make the request response = await client.analyze_iam_policy(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py index 038ff538bdd4..80c82f9d8c5f 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py @@ -42,7 +42,7 @@ def sample_analyze_iam_policy(): # Make the request response = client.analyze_iam_policy(request=request) - # Handle response + # Handle the response print(response) # [END cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py index bcd9193b5244..9707f8f55a62 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py @@ -49,6 +49,8 @@ async def sample_export_iam_policy_analysis(): print("Waiting for operation to complete...") response = await operation.result() + + # Handle the response print(response) # [END cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py index 892e6c866b88..3a1f88ce483d 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py @@ -49,6 +49,8 @@ def sample_export_iam_policy_analysis(): print("Waiting for operation to complete...") response = operation.result() + + # Handle the response print(response) # [END cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py index f787254ba79c..c87a511da83d 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py @@ -38,6 +38,8 @@ async def sample_list_assets(): # Make the request page_result = client.list_assets(request=request) + + # Handle the response async for response in page_result: print(response) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py index 6a80f403d4e5..1b744685e8ef 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py @@ -38,6 +38,8 @@ def sample_list_assets(): # Make the request page_result = client.list_assets(request=request) + + # Handle the response for response in page_result: print(response) diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json index 1b51e40a9d26..9bade840fd68 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json @@ -14,12 +14,12 @@ "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", "segments": [ { - "end": 53, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 55, "start": 27, "type": "SHORT" }, @@ -34,11 +34,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 52, "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ] @@ -56,12 +58,12 @@ "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", "segments": [ { - "end": 53, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 55, "start": 27, "type": "SHORT" }, @@ -76,11 +78,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 52, "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ] @@ -540,12 +544,12 @@ "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", "segments": [ { - "end": 50, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 52, "start": 27, "type": "SHORT" }, @@ -560,11 +564,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 49, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ] @@ -582,12 +588,12 @@ "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", "segments": [ { - "end": 50, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 50, + "end": 52, "start": 27, "type": "SHORT" }, @@ -602,11 +608,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 49, "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 51, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ] @@ -714,12 +722,12 @@ "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", "segments": [ { - "end": 43, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 45, "start": 27, "type": "SHORT" }, @@ -734,11 +742,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -756,12 +766,12 @@ "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", "segments": [ { - "end": 43, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 45, "start": 27, "type": "SHORT" }, @@ -776,11 +786,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -888,12 +900,12 @@ "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", "segments": [ { - "end": 43, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 45, "start": 27, "type": "SHORT" }, @@ -908,11 +920,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -930,12 +944,12 @@ "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", "segments": [ { - "end": 43, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 45, "start": 27, "type": "SHORT" }, @@ -950,11 +964,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -973,12 +989,12 @@ "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", "segments": [ { - "end": 43, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 45, "start": 27, "type": "SHORT" }, @@ -993,11 +1009,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -1015,12 +1033,12 @@ "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", "segments": [ { - "end": 43, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 45, "start": 27, "type": "SHORT" }, @@ -1035,11 +1053,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ] diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json index 14a3c62f8790..81d35fd9fd08 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json @@ -14,12 +14,12 @@ "regionTag": "cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_async", "segments": [ { - "end": 43, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 45, "start": 27, "type": "SHORT" }, @@ -34,11 +34,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -56,12 +58,12 @@ "regionTag": "cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_sync", "segments": [ { - "end": 43, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 45, "start": 27, "type": "SHORT" }, @@ -76,11 +78,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -99,12 +103,12 @@ "regionTag": "cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_async", "segments": [ { - "end": 43, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 45, "start": 27, "type": "SHORT" }, @@ -119,11 +123,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -141,12 +147,12 @@ "regionTag": "cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_sync", "segments": [ { - "end": 43, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 45, "start": 27, "type": "SHORT" }, @@ -161,11 +167,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ] diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json index 85a9eedbb393..3e900271947c 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json @@ -103,12 +103,12 @@ "regionTag": "cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_async", "segments": [ { - "end": 53, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 55, "start": 27, "type": "SHORT" }, @@ -123,11 +123,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 52, "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ] @@ -145,12 +147,12 @@ "regionTag": "cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_sync", "segments": [ { - "end": 53, + "end": 55, "start": 27, "type": "FULL" }, { - "end": 53, + "end": 55, "start": 27, "type": "SHORT" }, @@ -165,11 +167,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 52, "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 54, + "end": 56, + "start": 53, "type": "RESPONSE_HANDLING" } ] diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json index 3947141c6f19..dc0291cab9e9 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json @@ -14,12 +14,12 @@ "regionTag": "cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_async", "segments": [ { - "end": 43, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 45, "start": 27, "type": "SHORT" }, @@ -34,11 +34,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ] @@ -56,12 +58,12 @@ "regionTag": "cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_sync", "segments": [ { - "end": 43, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 45, "start": 27, "type": "SHORT" }, @@ -76,11 +78,13 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 44, + "end": 46, + "start": 42, "type": "RESPONSE_HANDLING" } ] From 5f4f2451c0242191a9519a40a93f6660837be9a6 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 25 Feb 2022 15:09:14 +0100 Subject: [PATCH 177/235] chore(deps): update all dependencies (#368) --- asset/snippets/snippets/requirements-test.txt | 2 +- asset/snippets/snippets/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index b00fceee19f5..c4bb1f1cdc53 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ backoff==1.11.1 flaky==3.7.0 -pytest==7.0.0 +pytest==7.0.1 diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 2130f6c4bb8b..94f97086d520 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==2.1.0 google-cloud-asset==3.7.1 google-cloud-resource-manager==1.3.3 google-cloud-pubsub==2.9.0 -google-cloud-bigquery==2.32.0 +google-cloud-bigquery==2.34.0 From 35275fe370429d66a64f928e16be3f5e4441e7fa Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 09:45:03 -0500 Subject: [PATCH 178/235] chore: use gapic-generator-python 0.63.4 (#369) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.63.4 chore: fix snippet region tag format chore: fix docstring code block formatting PiperOrigin-RevId: 430730865 Source-Link: https://github.com/googleapis/googleapis/commit/ea5800229f73f94fd7204915a86ed09dcddf429a Source-Link: https://github.com/googleapis/googleapis-gen/commit/ca893ff8af25fc7fe001de1405a517d80446ecca Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2E4OTNmZjhhZjI1ZmM3ZmUwMDFkZTE0MDVhNTE3ZDgwNDQ2ZWNjYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * remove redundant samples Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- ...asset_service_analyze_iam_policy_async.py} | 4 +- ...e_analyze_iam_policy_longrunning_async.py} | 4 +- ...ce_analyze_iam_policy_longrunning_sync.py} | 4 +- ..._asset_service_analyze_iam_policy_sync.py} | 4 +- ...rated_asset_service_analyze_move_async.py} | 4 +- ...erated_asset_service_analyze_move_sync.py} | 4 +- ...service_batch_get_assets_history_async.py} | 4 +- ..._service_batch_get_assets_history_sync.py} | 4 +- ...erated_asset_service_create_feed_async.py} | 4 +- ...nerated_asset_service_create_feed_sync.py} | 4 +- ...erated_asset_service_delete_feed_async.py} | 4 +- ...nerated_asset_service_delete_feed_sync.py} | 4 +- ...ated_asset_service_export_assets_async.py} | 4 +- ...rated_asset_service_export_assets_sync.py} | 4 +- ...generated_asset_service_get_feed_async.py} | 4 +- ..._generated_asset_service_get_feed_sync.py} | 4 +- ...erated_asset_service_list_assets_async.py} | 4 +- ...nerated_asset_service_list_assets_sync.py} | 4 +- ...nerated_asset_service_list_feeds_async.py} | 4 +- ...enerated_asset_service_list_feeds_sync.py} | 4 +- ..._service_search_all_iam_policies_async.py} | 4 +- ...t_service_search_all_iam_policies_sync.py} | 4 +- ...set_service_search_all_resources_async.py} | 4 +- ...sset_service_search_all_resources_sync.py} | 4 +- ...erated_asset_service_update_feed_async.py} | 4 +- ...nerated_asset_service_update_feed_sync.py} | 4 +- ..._service_search_all_iam_policies_async.py} | 4 +- ...t_service_search_all_iam_policies_sync.py} | 4 +- ...set_service_search_all_resources_async.py} | 4 +- ...sset_service_search_all_resources_sync.py} | 4 +- ...erated_asset_service_create_feed_async.py} | 4 +- ...nerated_asset_service_create_feed_sync.py} | 4 +- ...erated_asset_service_delete_feed_async.py} | 4 +- ...nerated_asset_service_delete_feed_sync.py} | 4 +- ...generated_asset_service_get_feed_async.py} | 4 +- ..._generated_asset_service_get_feed_sync.py} | 4 +- ...nerated_asset_service_list_feeds_async.py} | 4 +- ...enerated_asset_service_list_feeds_sync.py} | 4 +- ...erated_asset_service_update_feed_async.py} | 4 +- ...nerated_asset_service_update_feed_sync.py} | 4 +- ...asset_service_analyze_iam_policy_async.py} | 4 +- ..._asset_service_analyze_iam_policy_sync.py} | 4 +- ...rvice_export_iam_policy_analysis_async.py} | 4 +- ...ervice_export_iam_policy_analysis_sync.py} | 4 +- ...erated_asset_service_list_assets_async.py} | 4 +- ...nerated_asset_service_list_assets_sync.py} | 4 +- .../snippet_metadata_asset_v1.json | 104 +++++++++--------- .../snippet_metadata_asset_v1p1beta1.json | 16 +-- .../snippet_metadata_asset_v1p2beta1.json | 40 +++---- .../snippet_metadata_asset_v1p4beta1.json | 16 +-- .../snippet_metadata_asset_v1p5beta1.json | 8 +- 51 files changed, 184 insertions(+), 184 deletions(-) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py => cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py => cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py => cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py => cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_analyze_move_async.py => cloudasset_v1_generated_asset_service_analyze_move_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py => cloudasset_v1_generated_asset_service_analyze_move_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py => cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py => cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_create_feed_async.py => cloudasset_v1_generated_asset_service_create_feed_async.py} (91%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_create_feed_sync.py => cloudasset_v1_generated_asset_service_create_feed_sync.py} (91%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_delete_feed_async.py => cloudasset_v1_generated_asset_service_delete_feed_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py => cloudasset_v1_generated_asset_service_delete_feed_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_export_assets_async.py => cloudasset_v1_generated_asset_service_export_assets_async.py} (91%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_export_assets_sync.py => cloudasset_v1_generated_asset_service_export_assets_sync.py} (91%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_get_feed_async.py => cloudasset_v1_generated_asset_service_get_feed_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_get_feed_sync.py => cloudasset_v1_generated_asset_service_get_feed_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_list_assets_async.py => cloudasset_v1_generated_asset_service_list_assets_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_list_assets_sync.py => cloudasset_v1_generated_asset_service_list_assets_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_list_feeds_async.py => cloudasset_v1_generated_asset_service_list_feeds_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py => cloudasset_v1_generated_asset_service_list_feeds_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py => cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py => cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py => cloudasset_v1_generated_asset_service_search_all_resources_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py => cloudasset_v1_generated_asset_service_search_all_resources_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_update_feed_async.py => cloudasset_v1_generated_asset_service_update_feed_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1_asset_service_update_feed_sync.py => cloudasset_v1_generated_asset_service_update_feed_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py => cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py => cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py => cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py => cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py => cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py => cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py => cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py => cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py => cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py => cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py => cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py => cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py => cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py => cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py => cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py} (89%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py => cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py => cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py => cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py => cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py} (90%) rename asset/snippets/generated_samples/{cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py => cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py} (90%) diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py index a5d56bf2cbc9..8f0644233143 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async] +# [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async] from google.cloud import asset_v1 @@ -45,4 +45,4 @@ async def sample_analyze_iam_policy(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async] +# [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py index 623137191de1..adaeb096c445 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async] +# [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async] from google.cloud import asset_v1 @@ -53,4 +53,4 @@ async def sample_analyze_iam_policy_longrunning(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async] +# [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py index 17a51630b690..490f82262516 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync] +# [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync] from google.cloud import asset_v1 @@ -53,4 +53,4 @@ def sample_analyze_iam_policy_longrunning(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync] +# [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py index ddf13b735780..1fb3097ad575 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync] +# [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync] from google.cloud import asset_v1 @@ -45,4 +45,4 @@ def sample_analyze_iam_policy(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync] +# [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py index 896fa18f0526..e0347f517683 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_AnalyzeMove_async] +# [START cloudasset_v1_generated_AssetService_AnalyzeMove_async] from google.cloud import asset_v1 @@ -43,4 +43,4 @@ async def sample_analyze_move(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_AnalyzeMove_async] +# [END cloudasset_v1_generated_AssetService_AnalyzeMove_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py index 154660b22892..7223eb5b5f14 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_AnalyzeMove_sync] +# [START cloudasset_v1_generated_AssetService_AnalyzeMove_sync] from google.cloud import asset_v1 @@ -43,4 +43,4 @@ def sample_analyze_move(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_AnalyzeMove_sync] +# [END cloudasset_v1_generated_AssetService_AnalyzeMove_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py index b84841a0d8cb..80b3d45858dc 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async] +# [START cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async] from google.cloud import asset_v1 @@ -42,4 +42,4 @@ async def sample_batch_get_assets_history(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async] +# [END cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py index df9319427adf..baf15f6d4d8c 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync] +# [START cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync] from google.cloud import asset_v1 @@ -42,4 +42,4 @@ def sample_batch_get_assets_history(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync] +# [END cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py similarity index 91% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py index 9894a01dca1a..2a1f800722a1 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_CreateFeed_async] +# [START cloudasset_v1_generated_AssetService_CreateFeed_async] from google.cloud import asset_v1 @@ -47,4 +47,4 @@ async def sample_create_feed(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_CreateFeed_async] +# [END cloudasset_v1_generated_AssetService_CreateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py similarity index 91% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py index 5efaf5e1b12e..880514078cea 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_create_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_CreateFeed_sync] +# [START cloudasset_v1_generated_AssetService_CreateFeed_sync] from google.cloud import asset_v1 @@ -47,4 +47,4 @@ def sample_create_feed(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_CreateFeed_sync] +# [END cloudasset_v1_generated_AssetService_CreateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py index 3af184162064..e32050772beb 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_DeleteFeed_async] +# [START cloudasset_v1_generated_AssetService_DeleteFeed_async] from google.cloud import asset_v1 @@ -40,4 +40,4 @@ async def sample_delete_feed(): await client.delete_feed(request=request) -# [END cloudasset_generated_asset_v1_AssetService_DeleteFeed_async] +# [END cloudasset_v1_generated_AssetService_DeleteFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py index f8e462e5899e..d592f05e075f 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync] +# [START cloudasset_v1_generated_AssetService_DeleteFeed_sync] from google.cloud import asset_v1 @@ -40,4 +40,4 @@ def sample_delete_feed(): client.delete_feed(request=request) -# [END cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync] +# [END cloudasset_v1_generated_AssetService_DeleteFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py similarity index 91% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py index e9cd14623189..b544fe05cca4 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_ExportAssets_async] +# [START cloudasset_v1_generated_AssetService_ExportAssets_async] from google.cloud import asset_v1 @@ -50,4 +50,4 @@ async def sample_export_assets(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_ExportAssets_async] +# [END cloudasset_v1_generated_AssetService_ExportAssets_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py similarity index 91% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py index 8a1a4fffb10f..9092f49d1f24 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_export_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_ExportAssets_sync] +# [START cloudasset_v1_generated_AssetService_ExportAssets_sync] from google.cloud import asset_v1 @@ -50,4 +50,4 @@ def sample_export_assets(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_ExportAssets_sync] +# [END cloudasset_v1_generated_AssetService_ExportAssets_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py index 7ce97094b421..99becdfc8506 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_GetFeed_async] +# [START cloudasset_v1_generated_AssetService_GetFeed_async] from google.cloud import asset_v1 @@ -42,4 +42,4 @@ async def sample_get_feed(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_GetFeed_async] +# [END cloudasset_v1_generated_AssetService_GetFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py index 12f433dc1bab..139e812cd8d0 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_get_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_GetFeed_sync] +# [START cloudasset_v1_generated_AssetService_GetFeed_sync] from google.cloud import asset_v1 @@ -42,4 +42,4 @@ def sample_get_feed(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_GetFeed_sync] +# [END cloudasset_v1_generated_AssetService_GetFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py index 67b2c65501a9..e460c974c003 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_ListAssets_async] +# [START cloudasset_v1_generated_AssetService_ListAssets_async] from google.cloud import asset_v1 @@ -43,4 +43,4 @@ async def sample_list_assets(): async for response in page_result: print(response) -# [END cloudasset_generated_asset_v1_AssetService_ListAssets_async] +# [END cloudasset_v1_generated_AssetService_ListAssets_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py index 212999ece715..eee88ec49225 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_ListAssets_sync] +# [START cloudasset_v1_generated_AssetService_ListAssets_sync] from google.cloud import asset_v1 @@ -43,4 +43,4 @@ def sample_list_assets(): for response in page_result: print(response) -# [END cloudasset_generated_asset_v1_AssetService_ListAssets_sync] +# [END cloudasset_v1_generated_AssetService_ListAssets_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py index 82031eb9a334..d109f0a053a0 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_ListFeeds_async] +# [START cloudasset_v1_generated_AssetService_ListFeeds_async] from google.cloud import asset_v1 @@ -42,4 +42,4 @@ async def sample_list_feeds(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_ListFeeds_async] +# [END cloudasset_v1_generated_AssetService_ListFeeds_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py index dc811344f52a..faec88fedabe 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_ListFeeds_sync] +# [START cloudasset_v1_generated_AssetService_ListFeeds_sync] from google.cloud import asset_v1 @@ -42,4 +42,4 @@ def sample_list_feeds(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_ListFeeds_sync] +# [END cloudasset_v1_generated_AssetService_ListFeeds_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py index 610d8d6d419e..553ad8d7f4fc 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async] +# [START cloudasset_v1_generated_AssetService_SearchAllIamPolicies_async] from google.cloud import asset_v1 @@ -43,4 +43,4 @@ async def sample_search_all_iam_policies(): async for response in page_result: print(response) -# [END cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async] +# [END cloudasset_v1_generated_AssetService_SearchAllIamPolicies_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py index d73fcfd4ce41..d97ee0d08054 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync] +# [START cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync] from google.cloud import asset_v1 @@ -43,4 +43,4 @@ def sample_search_all_iam_policies(): for response in page_result: print(response) -# [END cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync] +# [END cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py index 7d635dce5280..7a2736b9eb30 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_SearchAllResources_async] +# [START cloudasset_v1_generated_AssetService_SearchAllResources_async] from google.cloud import asset_v1 @@ -43,4 +43,4 @@ async def sample_search_all_resources(): async for response in page_result: print(response) -# [END cloudasset_generated_asset_v1_AssetService_SearchAllResources_async] +# [END cloudasset_v1_generated_AssetService_SearchAllResources_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py index 061437752016..5021d6586d31 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync] +# [START cloudasset_v1_generated_AssetService_SearchAllResources_sync] from google.cloud import asset_v1 @@ -43,4 +43,4 @@ def sample_search_all_resources(): for response in page_result: print(response) -# [END cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync] +# [END cloudasset_v1_generated_AssetService_SearchAllResources_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py index 6f1d9b65f2a7..65a6d688f282 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_UpdateFeed_async] +# [START cloudasset_v1_generated_AssetService_UpdateFeed_async] from google.cloud import asset_v1 @@ -45,4 +45,4 @@ async def sample_update_feed(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_UpdateFeed_async] +# [END cloudasset_v1_generated_AssetService_UpdateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py rename to asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py index 9d99cb0070fb..467c81dbb9c5 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1_asset_service_update_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync] +# [START cloudasset_v1_generated_AssetService_UpdateFeed_sync] from google.cloud import asset_v1 @@ -45,4 +45,4 @@ def sample_update_feed(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync] +# [END cloudasset_v1_generated_AssetService_UpdateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py rename to asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py index 4b39ac69c879..026215b4c6d9 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_async] +# [START cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_async] from google.cloud import asset_v1p1beta1 @@ -43,4 +43,4 @@ async def sample_search_all_iam_policies(): async for response in page_result: print(response) -# [END cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_async] +# [END cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py rename to asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py index 1c9f96d20acc..3c445660091f 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_sync] +# [START cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_sync] from google.cloud import asset_v1p1beta1 @@ -43,4 +43,4 @@ def sample_search_all_iam_policies(): for response in page_result: print(response) -# [END cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_sync] +# [END cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py rename to asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py index 27282ddec699..a906016b45ea 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_async] +# [START cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_async] from google.cloud import asset_v1p1beta1 @@ -43,4 +43,4 @@ async def sample_search_all_resources(): async for response in page_result: print(response) -# [END cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_async] +# [END cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py rename to asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py index bc0c01da4b56..f88b317b8ecc 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_sync] +# [START cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_sync] from google.cloud import asset_v1p1beta1 @@ -43,4 +43,4 @@ def sample_search_all_resources(): for response in page_result: print(response) -# [END cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_sync] +# [END cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py rename to asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py index ef0decff63ae..a5799f06b6c8 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_async] +# [START cloudasset_v1p2beta1_generated_AssetService_CreateFeed_async] from google.cloud import asset_v1p2beta1 @@ -47,4 +47,4 @@ async def sample_create_feed(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_async] +# [END cloudasset_v1p2beta1_generated_AssetService_CreateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py rename to asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py index c11a409f280a..3ce857182d26 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_sync] +# [START cloudasset_v1p2beta1_generated_AssetService_CreateFeed_sync] from google.cloud import asset_v1p2beta1 @@ -47,4 +47,4 @@ def sample_create_feed(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_sync] +# [END cloudasset_v1p2beta1_generated_AssetService_CreateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py rename to asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py index 14652b76e927..69387f52b9bf 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_async] +# [START cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_async] from google.cloud import asset_v1p2beta1 @@ -40,4 +40,4 @@ async def sample_delete_feed(): await client.delete_feed(request=request) -# [END cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_async] +# [END cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py rename to asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py index f6a16738b3c7..504c3ca2aa17 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_sync] +# [START cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_sync] from google.cloud import asset_v1p2beta1 @@ -40,4 +40,4 @@ def sample_delete_feed(): client.delete_feed(request=request) -# [END cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_sync] +# [END cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py rename to asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py index 49e9bc8a7db8..44f9f3b9fd25 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_async] +# [START cloudasset_v1p2beta1_generated_AssetService_GetFeed_async] from google.cloud import asset_v1p2beta1 @@ -42,4 +42,4 @@ async def sample_get_feed(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_async] +# [END cloudasset_v1p2beta1_generated_AssetService_GetFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py rename to asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py index c2ac229f055e..0b045077ff1c 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_sync] +# [START cloudasset_v1p2beta1_generated_AssetService_GetFeed_sync] from google.cloud import asset_v1p2beta1 @@ -42,4 +42,4 @@ def sample_get_feed(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_sync] +# [END cloudasset_v1p2beta1_generated_AssetService_GetFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py rename to asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py index c20268f366ed..f7e6a7654199 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_async] +# [START cloudasset_v1p2beta1_generated_AssetService_ListFeeds_async] from google.cloud import asset_v1p2beta1 @@ -42,4 +42,4 @@ async def sample_list_feeds(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_async] +# [END cloudasset_v1p2beta1_generated_AssetService_ListFeeds_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py rename to asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py index 3db59fbcd177..78351e7a3829 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_sync] +# [START cloudasset_v1p2beta1_generated_AssetService_ListFeeds_sync] from google.cloud import asset_v1p2beta1 @@ -42,4 +42,4 @@ def sample_list_feeds(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_sync] +# [END cloudasset_v1p2beta1_generated_AssetService_ListFeeds_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py rename to asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py index a733af0b226d..06cbf85dc358 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_async] +# [START cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_async] from google.cloud import asset_v1p2beta1 @@ -45,4 +45,4 @@ async def sample_update_feed(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_async] +# [END cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py rename to asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py index c60ab87a6723..1cba214312ae 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_sync] +# [START cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_sync] from google.cloud import asset_v1p2beta1 @@ -45,4 +45,4 @@ def sample_update_feed(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_sync] +# [END cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py similarity index 89% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py rename to asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py index b04e5bcb5fa7..261cd72a61b9 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_async] +# [START cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_async] from google.cloud import asset_v1p4beta1 @@ -45,4 +45,4 @@ async def sample_analyze_iam_policy(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_async] +# [END cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py rename to asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py index 80c82f9d8c5f..45a837ec039c 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_sync] +# [START cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_sync] from google.cloud import asset_v1p4beta1 @@ -45,4 +45,4 @@ def sample_analyze_iam_policy(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_sync] +# [END cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py rename to asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py index 9707f8f55a62..d514491ad8c9 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_async] +# [START cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_async] from google.cloud import asset_v1p4beta1 @@ -53,4 +53,4 @@ async def sample_export_iam_policy_analysis(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_async] +# [END cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py rename to asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py index 3a1f88ce483d..e070713466f2 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_sync] +# [START cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_sync] from google.cloud import asset_v1p4beta1 @@ -53,4 +53,4 @@ def sample_export_iam_policy_analysis(): # Handle the response print(response) -# [END cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_sync] +# [END cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_sync] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py rename to asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py index c87a511da83d..908699884cbb 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_async] +# [START cloudasset_v1p5beta1_generated_AssetService_ListAssets_async] from google.cloud import asset_v1p5beta1 @@ -43,4 +43,4 @@ async def sample_list_assets(): async for response in page_result: print(response) -# [END cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_async] +# [END cloudasset_v1p5beta1_generated_AssetService_ListAssets_async] diff --git a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py similarity index 90% rename from asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py rename to asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py index 1b744685e8ef..9fb3ac2071a3 100644 --- a/asset/snippets/generated_samples/cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py @@ -23,7 +23,7 @@ # python3 -m pip install google-cloud-asset -# [START cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_sync] +# [START cloudasset_v1p5beta1_generated_AssetService_ListAssets_sync] from google.cloud import asset_v1p5beta1 @@ -43,4 +43,4 @@ def sample_list_assets(): for response in page_result: print(response) -# [END cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_sync] +# [END cloudasset_v1p5beta1_generated_AssetService_ListAssets_sync] diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json index 9bade840fd68..1d3a68fd5a2d 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json @@ -10,8 +10,8 @@ "shortName": "AnalyzeIamPolicyLongrunning" } }, - "file": "cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async", + "file": "cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async", "segments": [ { "end": 55, @@ -54,8 +54,8 @@ "shortName": "AnalyzeIamPolicyLongrunning" } }, - "file": "cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync", + "file": "cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync", "segments": [ { "end": 55, @@ -99,8 +99,8 @@ "shortName": "AnalyzeIamPolicy" } }, - "file": "cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async", + "file": "cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async", "segments": [ { "end": 47, @@ -143,8 +143,8 @@ "shortName": "AnalyzeIamPolicy" } }, - "file": "cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync", + "file": "cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync", "segments": [ { "end": 47, @@ -188,8 +188,8 @@ "shortName": "AnalyzeMove" } }, - "file": "cloudasset_generated_asset_v1_asset_service_analyze_move_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeMove_async", + "file": "cloudasset_v1_generated_asset_service_analyze_move_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeMove_async", "segments": [ { "end": 45, @@ -232,8 +232,8 @@ "shortName": "AnalyzeMove" } }, - "file": "cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_AnalyzeMove_sync", + "file": "cloudasset_v1_generated_asset_service_analyze_move_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeMove_sync", "segments": [ { "end": 45, @@ -277,8 +277,8 @@ "shortName": "BatchGetAssetsHistory" } }, - "file": "cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async", + "file": "cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async", "segments": [ { "end": 44, @@ -321,8 +321,8 @@ "shortName": "BatchGetAssetsHistory" } }, - "file": "cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync", + "file": "cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync", "segments": [ { "end": 44, @@ -366,8 +366,8 @@ "shortName": "CreateFeed" } }, - "file": "cloudasset_generated_asset_v1_asset_service_create_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_async", + "file": "cloudasset_v1_generated_asset_service_create_feed_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_async", "segments": [ { "end": 49, @@ -410,8 +410,8 @@ "shortName": "CreateFeed" } }, - "file": "cloudasset_generated_asset_v1_asset_service_create_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_CreateFeed_sync", + "file": "cloudasset_v1_generated_asset_service_create_feed_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_sync", "segments": [ { "end": 49, @@ -455,8 +455,8 @@ "shortName": "DeleteFeed" } }, - "file": "cloudasset_generated_asset_v1_asset_service_delete_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_async", + "file": "cloudasset_v1_generated_asset_service_delete_feed_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_async", "segments": [ { "end": 42, @@ -497,8 +497,8 @@ "shortName": "DeleteFeed" } }, - "file": "cloudasset_generated_asset_v1_asset_service_delete_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_DeleteFeed_sync", + "file": "cloudasset_v1_generated_asset_service_delete_feed_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_sync", "segments": [ { "end": 42, @@ -540,8 +540,8 @@ "shortName": "ExportAssets" } }, - "file": "cloudasset_generated_asset_v1_asset_service_export_assets_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_async", + "file": "cloudasset_v1_generated_asset_service_export_assets_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_async", "segments": [ { "end": 52, @@ -584,8 +584,8 @@ "shortName": "ExportAssets" } }, - "file": "cloudasset_generated_asset_v1_asset_service_export_assets_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ExportAssets_sync", + "file": "cloudasset_v1_generated_asset_service_export_assets_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_sync", "segments": [ { "end": 52, @@ -629,8 +629,8 @@ "shortName": "GetFeed" } }, - "file": "cloudasset_generated_asset_v1_asset_service_get_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_async", + "file": "cloudasset_v1_generated_asset_service_get_feed_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_GetFeed_async", "segments": [ { "end": 44, @@ -673,8 +673,8 @@ "shortName": "GetFeed" } }, - "file": "cloudasset_generated_asset_v1_asset_service_get_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_GetFeed_sync", + "file": "cloudasset_v1_generated_asset_service_get_feed_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_GetFeed_sync", "segments": [ { "end": 44, @@ -718,8 +718,8 @@ "shortName": "ListAssets" } }, - "file": "cloudasset_generated_asset_v1_asset_service_list_assets_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_async", + "file": "cloudasset_v1_generated_asset_service_list_assets_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_ListAssets_async", "segments": [ { "end": 45, @@ -762,8 +762,8 @@ "shortName": "ListAssets" } }, - "file": "cloudasset_generated_asset_v1_asset_service_list_assets_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListAssets_sync", + "file": "cloudasset_v1_generated_asset_service_list_assets_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_ListAssets_sync", "segments": [ { "end": 45, @@ -807,8 +807,8 @@ "shortName": "ListFeeds" } }, - "file": "cloudasset_generated_asset_v1_asset_service_list_feeds_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_async", + "file": "cloudasset_v1_generated_asset_service_list_feeds_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_async", "segments": [ { "end": 44, @@ -851,8 +851,8 @@ "shortName": "ListFeeds" } }, - "file": "cloudasset_generated_asset_v1_asset_service_list_feeds_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_ListFeeds_sync", + "file": "cloudasset_v1_generated_asset_service_list_feeds_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_sync", "segments": [ { "end": 44, @@ -896,8 +896,8 @@ "shortName": "SearchAllIamPolicies" } }, - "file": "cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_async", + "file": "cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_SearchAllIamPolicies_async", "segments": [ { "end": 45, @@ -940,8 +940,8 @@ "shortName": "SearchAllIamPolicies" } }, - "file": "cloudasset_generated_asset_v1_asset_service_search_all_iam_policies_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllIamPolicies_sync", + "file": "cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync", "segments": [ { "end": 45, @@ -985,8 +985,8 @@ "shortName": "SearchAllResources" } }, - "file": "cloudasset_generated_asset_v1_asset_service_search_all_resources_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_async", + "file": "cloudasset_v1_generated_asset_service_search_all_resources_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_SearchAllResources_async", "segments": [ { "end": 45, @@ -1029,8 +1029,8 @@ "shortName": "SearchAllResources" } }, - "file": "cloudasset_generated_asset_v1_asset_service_search_all_resources_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_SearchAllResources_sync", + "file": "cloudasset_v1_generated_asset_service_search_all_resources_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_SearchAllResources_sync", "segments": [ { "end": 45, @@ -1074,8 +1074,8 @@ "shortName": "UpdateFeed" } }, - "file": "cloudasset_generated_asset_v1_asset_service_update_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_async", + "file": "cloudasset_v1_generated_asset_service_update_feed_async.py", + "regionTag": "cloudasset_v1_generated_AssetService_UpdateFeed_async", "segments": [ { "end": 47, @@ -1118,8 +1118,8 @@ "shortName": "UpdateFeed" } }, - "file": "cloudasset_generated_asset_v1_asset_service_update_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1_AssetService_UpdateFeed_sync", + "file": "cloudasset_v1_generated_asset_service_update_feed_sync.py", + "regionTag": "cloudasset_v1_generated_AssetService_UpdateFeed_sync", "segments": [ { "end": 47, diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json index 81d35fd9fd08..f9a3789f2cf1 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json @@ -10,8 +10,8 @@ "shortName": "SearchAllIamPolicies" } }, - "file": "cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_async.py", - "regionTag": "cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_async", + "file": "cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py", + "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_async", "segments": [ { "end": 45, @@ -54,8 +54,8 @@ "shortName": "SearchAllIamPolicies" } }, - "file": "cloudasset_generated_asset_v1p1beta1_asset_service_search_all_iam_policies_sync.py", - "regionTag": "cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllIamPolicies_sync", + "file": "cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py", + "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_sync", "segments": [ { "end": 45, @@ -99,8 +99,8 @@ "shortName": "SearchAllResources" } }, - "file": "cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_async.py", - "regionTag": "cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_async", + "file": "cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py", + "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_async", "segments": [ { "end": 45, @@ -143,8 +143,8 @@ "shortName": "SearchAllResources" } }, - "file": "cloudasset_generated_asset_v1p1beta1_asset_service_search_all_resources_sync.py", - "regionTag": "cloudasset_generated_asset_v1p1beta1_AssetService_SearchAllResources_sync", + "file": "cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py", + "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_sync", "segments": [ { "end": 45, diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json index b4394ee1f558..0c20c26d3c86 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json @@ -10,8 +10,8 @@ "shortName": "CreateFeed" } }, - "file": "cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_async", + "file": "cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py", + "regionTag": "cloudasset_v1p2beta1_generated_AssetService_CreateFeed_async", "segments": [ { "end": 49, @@ -54,8 +54,8 @@ "shortName": "CreateFeed" } }, - "file": "cloudasset_generated_asset_v1p2beta1_asset_service_create_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_CreateFeed_sync", + "file": "cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py", + "regionTag": "cloudasset_v1p2beta1_generated_AssetService_CreateFeed_sync", "segments": [ { "end": 49, @@ -99,8 +99,8 @@ "shortName": "DeleteFeed" } }, - "file": "cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_async", + "file": "cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py", + "regionTag": "cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_async", "segments": [ { "end": 42, @@ -141,8 +141,8 @@ "shortName": "DeleteFeed" } }, - "file": "cloudasset_generated_asset_v1p2beta1_asset_service_delete_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_DeleteFeed_sync", + "file": "cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py", + "regionTag": "cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_sync", "segments": [ { "end": 42, @@ -184,8 +184,8 @@ "shortName": "GetFeed" } }, - "file": "cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_async", + "file": "cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py", + "regionTag": "cloudasset_v1p2beta1_generated_AssetService_GetFeed_async", "segments": [ { "end": 44, @@ -228,8 +228,8 @@ "shortName": "GetFeed" } }, - "file": "cloudasset_generated_asset_v1p2beta1_asset_service_get_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_GetFeed_sync", + "file": "cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py", + "regionTag": "cloudasset_v1p2beta1_generated_AssetService_GetFeed_sync", "segments": [ { "end": 44, @@ -273,8 +273,8 @@ "shortName": "ListFeeds" } }, - "file": "cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_async.py", - "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_async", + "file": "cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py", + "regionTag": "cloudasset_v1p2beta1_generated_AssetService_ListFeeds_async", "segments": [ { "end": 44, @@ -317,8 +317,8 @@ "shortName": "ListFeeds" } }, - "file": "cloudasset_generated_asset_v1p2beta1_asset_service_list_feeds_sync.py", - "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_ListFeeds_sync", + "file": "cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py", + "regionTag": "cloudasset_v1p2beta1_generated_AssetService_ListFeeds_sync", "segments": [ { "end": 44, @@ -362,8 +362,8 @@ "shortName": "UpdateFeed" } }, - "file": "cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_async.py", - "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_async", + "file": "cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py", + "regionTag": "cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_async", "segments": [ { "end": 47, @@ -406,8 +406,8 @@ "shortName": "UpdateFeed" } }, - "file": "cloudasset_generated_asset_v1p2beta1_asset_service_update_feed_sync.py", - "regionTag": "cloudasset_generated_asset_v1p2beta1_AssetService_UpdateFeed_sync", + "file": "cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py", + "regionTag": "cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_sync", "segments": [ { "end": 47, diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json index 3e900271947c..a91113b46021 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json @@ -10,8 +10,8 @@ "shortName": "AnalyzeIamPolicy" } }, - "file": "cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_async.py", - "regionTag": "cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_async", + "file": "cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py", + "regionTag": "cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_async", "segments": [ { "end": 47, @@ -54,8 +54,8 @@ "shortName": "AnalyzeIamPolicy" } }, - "file": "cloudasset_generated_asset_v1p4beta1_asset_service_analyze_iam_policy_sync.py", - "regionTag": "cloudasset_generated_asset_v1p4beta1_AssetService_AnalyzeIamPolicy_sync", + "file": "cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py", + "regionTag": "cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_sync", "segments": [ { "end": 47, @@ -99,8 +99,8 @@ "shortName": "ExportIamPolicyAnalysis" } }, - "file": "cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_async.py", - "regionTag": "cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_async", + "file": "cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py", + "regionTag": "cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_async", "segments": [ { "end": 55, @@ -143,8 +143,8 @@ "shortName": "ExportIamPolicyAnalysis" } }, - "file": "cloudasset_generated_asset_v1p4beta1_asset_service_export_iam_policy_analysis_sync.py", - "regionTag": "cloudasset_generated_asset_v1p4beta1_AssetService_ExportIamPolicyAnalysis_sync", + "file": "cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py", + "regionTag": "cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_sync", "segments": [ { "end": 55, diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json index dc0291cab9e9..291cde2dd59b 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json @@ -10,8 +10,8 @@ "shortName": "ListAssets" } }, - "file": "cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_async.py", - "regionTag": "cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_async", + "file": "cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py", + "regionTag": "cloudasset_v1p5beta1_generated_AssetService_ListAssets_async", "segments": [ { "end": 45, @@ -54,8 +54,8 @@ "shortName": "ListAssets" } }, - "file": "cloudasset_generated_asset_v1p5beta1_asset_service_list_assets_sync.py", - "regionTag": "cloudasset_generated_asset_v1p5beta1_AssetService_ListAssets_sync", + "file": "cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py", + "regionTag": "cloudasset_v1p5beta1_generated_AssetService_ListAssets_sync", "segments": [ { "end": 45, From 2d14cf22d748b0bd429b82480dfb1cc562a05727 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 05:34:14 -0500 Subject: [PATCH 179/235] chore: update copyright year to 2022 (#370) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update copyright year to 2022 PiperOrigin-RevId: 431037888 Source-Link: https://github.com/googleapis/googleapis/commit/b3397f5febbf21dfc69b875ddabaf76bee765058 Source-Link: https://github.com/googleapis/googleapis-gen/commit/510b54e1cdefd53173984df16645081308fe897e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTEwYjU0ZTFjZGVmZDUzMTczOTg0ZGYxNjY0NTA4MTMwOGZlODk3ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- ...asset_v1_generated_asset_service_analyze_iam_policy_async.py | 2 +- ...erated_asset_service_analyze_iam_policy_longrunning_async.py | 2 +- ...nerated_asset_service_analyze_iam_policy_longrunning_sync.py | 2 +- ...dasset_v1_generated_asset_service_analyze_iam_policy_sync.py | 2 +- .../cloudasset_v1_generated_asset_service_analyze_move_async.py | 2 +- .../cloudasset_v1_generated_asset_service_analyze_move_sync.py | 2 +- ...v1_generated_asset_service_batch_get_assets_history_async.py | 2 +- ..._v1_generated_asset_service_batch_get_assets_history_sync.py | 2 +- .../cloudasset_v1_generated_asset_service_create_feed_async.py | 2 +- .../cloudasset_v1_generated_asset_service_create_feed_sync.py | 2 +- .../cloudasset_v1_generated_asset_service_delete_feed_async.py | 2 +- .../cloudasset_v1_generated_asset_service_delete_feed_sync.py | 2 +- ...cloudasset_v1_generated_asset_service_export_assets_async.py | 2 +- .../cloudasset_v1_generated_asset_service_export_assets_sync.py | 2 +- .../cloudasset_v1_generated_asset_service_get_feed_async.py | 2 +- .../cloudasset_v1_generated_asset_service_get_feed_sync.py | 2 +- .../cloudasset_v1_generated_asset_service_list_assets_async.py | 2 +- .../cloudasset_v1_generated_asset_service_list_assets_sync.py | 2 +- .../cloudasset_v1_generated_asset_service_list_feeds_async.py | 2 +- .../cloudasset_v1_generated_asset_service_list_feeds_sync.py | 2 +- ..._v1_generated_asset_service_search_all_iam_policies_async.py | 2 +- ...t_v1_generated_asset_service_search_all_iam_policies_sync.py | 2 +- ...set_v1_generated_asset_service_search_all_resources_async.py | 2 +- ...sset_v1_generated_asset_service_search_all_resources_sync.py | 2 +- .../cloudasset_v1_generated_asset_service_update_feed_async.py | 2 +- .../cloudasset_v1_generated_asset_service_update_feed_sync.py | 2 +- ...ta1_generated_asset_service_search_all_iam_policies_async.py | 2 +- ...eta1_generated_asset_service_search_all_iam_policies_sync.py | 2 +- ...1beta1_generated_asset_service_search_all_resources_async.py | 2 +- ...p1beta1_generated_asset_service_search_all_resources_sync.py | 2 +- ...asset_v1p2beta1_generated_asset_service_create_feed_async.py | 2 +- ...dasset_v1p2beta1_generated_asset_service_create_feed_sync.py | 2 +- ...asset_v1p2beta1_generated_asset_service_delete_feed_async.py | 2 +- ...dasset_v1p2beta1_generated_asset_service_delete_feed_sync.py | 2 +- ...oudasset_v1p2beta1_generated_asset_service_get_feed_async.py | 2 +- ...loudasset_v1p2beta1_generated_asset_service_get_feed_sync.py | 2 +- ...dasset_v1p2beta1_generated_asset_service_list_feeds_async.py | 2 +- ...udasset_v1p2beta1_generated_asset_service_list_feeds_sync.py | 2 +- ...asset_v1p2beta1_generated_asset_service_update_feed_async.py | 2 +- ...dasset_v1p2beta1_generated_asset_service_update_feed_sync.py | 2 +- ...1p4beta1_generated_asset_service_analyze_iam_policy_async.py | 2 +- ...v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py | 2 +- ..._generated_asset_service_export_iam_policy_analysis_async.py | 2 +- ...1_generated_asset_service_export_iam_policy_analysis_sync.py | 2 +- ...asset_v1p5beta1_generated_asset_service_list_assets_async.py | 2 +- ...dasset_v1p5beta1_generated_asset_service_list_assets_sync.py | 2 +- 46 files changed, 46 insertions(+), 46 deletions(-) diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py index 8f0644233143..46380a92b6e2 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py index adaeb096c445..db412762851d 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py index 490f82262516..c3aa140669f8 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py index 1fb3097ad575..9a0a2e54c8b6 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py index e0347f517683..683e076e4859 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py index 7223eb5b5f14..41e5bd209114 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py index 80b3d45858dc..36489d63b00e 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py index baf15f6d4d8c..680f02c0f5c7 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py index 2a1f800722a1..7a0a5bf4bd01 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py index 880514078cea..612e6e13af6f 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py index e32050772beb..86660f4f2050 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py index d592f05e075f..ec710e646bb9 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py index b544fe05cca4..aea177ab7ff9 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py index 9092f49d1f24..c536997de12c 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py index 99becdfc8506..d9adab2adc00 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py index 139e812cd8d0..81b3b9adcab1 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py index e460c974c003..2e48093c8077 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py index eee88ec49225..ed8981813fb8 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py index d109f0a053a0..ec138b7375b1 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py index faec88fedabe..2822c78bd066 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py index 553ad8d7f4fc..282ea53bcbea 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py index d97ee0d08054..542da876b8d3 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py index 7a2736b9eb30..c43226442b15 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py index 5021d6586d31..c2bf14027ae4 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py index 65a6d688f282..1d8dc82b9a59 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py index 467c81dbb9c5..e48a0b6684f1 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py index 026215b4c6d9..2c21eaf26662 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py index 3c445660091f..d055c5f050f2 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py index a906016b45ea..ccf3fd821458 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py index f88b317b8ecc..45a0edf56773 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py index a5799f06b6c8..d42eae09b40d 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py index 3ce857182d26..85eed9c92129 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py index 69387f52b9bf..1aeaec6cfee0 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py index 504c3ca2aa17..c50ffb1b88a3 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py index 44f9f3b9fd25..3fcef1440b2c 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py index 0b045077ff1c..6daf97d7e4d2 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py index f7e6a7654199..b3963d085c31 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py index 78351e7a3829..50b3dad3e6bf 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py index 06cbf85dc358..1f7490f4b2cb 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py index 1cba214312ae..bcd82af3655f 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py index 261cd72a61b9..d7aed0d43ed7 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py index 45a837ec039c..6ce8dda47650 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py index d514491ad8c9..2859417cbb2b 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py index e070713466f2..05c73b3eb267 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py index 908699884cbb..2757f9702c14 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py index 9fb3ac2071a3..f983764a378c 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2020 Google LLC +# Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. From 53e0dfc68f137251061abac26e6ce25b73f044eb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 1 Mar 2022 12:18:28 +0100 Subject: [PATCH 180/235] chore(deps): update all dependencies (#372) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- asset/snippets/snippets/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 94f97086d520..ca0e569ac684 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.1.0 -google-cloud-asset==3.7.1 -google-cloud-resource-manager==1.3.3 +google-cloud-asset==3.8.0 +google-cloud-resource-manager==1.4.0 google-cloud-pubsub==2.9.0 google-cloud-bigquery==2.34.0 From 3a2022892547fdb746e52b762f4b9cfefd042981 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 3 Mar 2022 13:57:15 +0100 Subject: [PATCH 181/235] chore(deps): update all dependencies (#377) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index ca0e569ac684..accfa3f52d9c 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==2.1.0 google-cloud-asset==3.8.0 google-cloud-resource-manager==1.4.0 google-cloud-pubsub==2.9.0 -google-cloud-bigquery==2.34.0 +google-cloud-bigquery==2.34.1 From 5a7e40b44d4ea7fcc1ffdfbe1d13601287e6b4db Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 5 Mar 2022 00:28:12 +0000 Subject: [PATCH 182/235] chore(deps): update actions/download-artifact action to v3 (#381) chore: Adding support for pytest-xdist and pytest-parallel Source-Link: https://github.com/googleapis/synthtool/commit/38e11ad1104dcc1e63b52691ddf2fe4015d06955 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:4e1991042fe54b991db9ca17c8fb386e61b22fe4d1472a568bf0fcac85dcf5d3 --- asset/snippets/snippets/noxfile.py | 80 +++++++++++++++++------------- 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 20cdfc620138..4c808af73ea2 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -188,42 +188,54 @@ def _session_tests( # check for presence of tests test_list = glob.glob("*_test.py") + glob.glob("test_*.py") test_list.extend(glob.glob("tests")) + if len(test_list) == 0: print("No tests found, skipping directory.") - else: - if TEST_CONFIG["pip_version_override"]: - pip_version = TEST_CONFIG["pip_version_override"] - session.install(f"pip=={pip_version}") - """Runs py.test for a particular project.""" - if os.path.exists("requirements.txt"): - if os.path.exists("constraints.txt"): - session.install("-r", "requirements.txt", "-c", "constraints.txt") - else: - session.install("-r", "requirements.txt") - - if os.path.exists("requirements-test.txt"): - if os.path.exists("constraints-test.txt"): - session.install( - "-r", "requirements-test.txt", "-c", "constraints-test.txt" - ) - else: - session.install("-r", "requirements-test.txt") - - if INSTALL_LIBRARY_FROM_SOURCE: - session.install("-e", _get_repo_root()) - - if post_install: - post_install(session) - - session.run( - "pytest", - *(PYTEST_COMMON_ARGS + session.posargs), - # Pytest will return 5 when no tests are collected. This can happen - # on travis where slow and flaky tests are excluded. - # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html - success_codes=[0, 5], - env=get_pytest_env_vars(), - ) + return + + if TEST_CONFIG["pip_version_override"]: + pip_version = TEST_CONFIG["pip_version_override"] + session.install(f"pip=={pip_version}") + """Runs py.test for a particular project.""" + concurrent_args = [] + if os.path.exists("requirements.txt"): + if os.path.exists("constraints.txt"): + session.install("-r", "requirements.txt", "-c", "constraints.txt") + else: + session.install("-r", "requirements.txt") + with open("requirements.txt") as rfile: + packages = rfile.read() + + if os.path.exists("requirements-test.txt"): + if os.path.exists("constraints-test.txt"): + session.install( + "-r", "requirements-test.txt", "-c", "constraints-test.txt" + ) + else: + session.install("-r", "requirements-test.txt") + with open("requirements-test.txt") as rtfile: + packages += rtfile.read() + + if INSTALL_LIBRARY_FROM_SOURCE: + session.install("-e", _get_repo_root()) + + if post_install: + post_install(session) + + if "pytest-parallel" in packages: + concurrent_args.extend(['--workers', 'auto', '--tests-per-worker', 'auto']) + elif "pytest-xdist" in packages: + concurrent_args.extend(['-n', 'auto']) + + session.run( + "pytest", + *(PYTEST_COMMON_ARGS + session.posargs + concurrent_args), + # Pytest will return 5 when no tests are collected. This can happen + # on travis where slow and flaky tests are excluded. + # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html + success_codes=[0, 5], + env=get_pytest_env_vars(), + ) @nox.session(python=ALL_VERSIONS) From 2a3ff407c1560ddb2f13d0a990e5e76fa1ef4eba Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 5 Mar 2022 17:32:59 +0100 Subject: [PATCH 183/235] chore(deps): update dependency google-cloud-pubsub to v2.10.0 (#382) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index accfa3f52d9c..e1d9dc880f9e 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.1.0 google-cloud-asset==3.8.0 google-cloud-resource-manager==1.4.0 -google-cloud-pubsub==2.9.0 +google-cloud-pubsub==2.10.0 google-cloud-bigquery==2.34.1 From 547efa411ffbc97befa00cdae8ce668ad44d5399 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 7 Mar 2022 22:02:27 +0100 Subject: [PATCH 184/235] chore(deps): update all dependencies (#384) --- asset/snippets/snippets/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index e1d9dc880f9e..a88b3c87be27 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.1.0 -google-cloud-asset==3.8.0 -google-cloud-resource-manager==1.4.0 +google-cloud-asset==3.8.1 +google-cloud-resource-manager==1.4.1 google-cloud-pubsub==2.10.0 -google-cloud-bigquery==2.34.1 +google-cloud-bigquery==2.34.2 From 7630860014a337dd4c66d984d9ad2f1fb2b87ddf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 10 Mar 2022 11:41:56 +0100 Subject: [PATCH 185/235] chore(deps): update dependency google-cloud-pubsub to v2.11.0 (#385) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index a88b3c87be27..d108f50e8b65 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.1.0 google-cloud-asset==3.8.1 google-cloud-resource-manager==1.4.1 -google-cloud-pubsub==2.10.0 +google-cloud-pubsub==2.11.0 google-cloud-bigquery==2.34.2 From 6971d3506713a000c1f8e822e18438c81f504315 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 13 Mar 2022 21:06:25 +0100 Subject: [PATCH 186/235] chore(deps): update dependency pytest to v7.1.0 (#388) --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index c4bb1f1cdc53..67c3304f12f9 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ backoff==1.11.1 flaky==3.7.0 -pytest==7.0.1 +pytest==7.1.0 From abe67d48793e316b0222438adc7e7b9ab49f3b55 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Mar 2022 18:41:50 +0100 Subject: [PATCH 187/235] chore(deps): update dependency google-cloud-storage to v2.2.0 (#389) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d108f50e8b65..e39c97fdb1b7 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==2.1.0 +google-cloud-storage==2.2.0 google-cloud-asset==3.8.1 google-cloud-resource-manager==1.4.1 google-cloud-pubsub==2.11.0 From 7c5f30dcceb250ca6f30a6d2e8894077325a2245 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Mar 2022 21:56:15 +0100 Subject: [PATCH 188/235] chore(deps): update dependency google-cloud-storage to v2.2.1 (#390) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index e39c97fdb1b7..83d8f1afda15 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==2.2.0 +google-cloud-storage==2.2.1 google-cloud-asset==3.8.1 google-cloud-resource-manager==1.4.1 google-cloud-pubsub==2.11.0 From 8f8a28b1d5cd6892aa9ed2825402a820d9f5e837 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 19 Mar 2022 11:16:25 +0100 Subject: [PATCH 189/235] chore(deps): update dependency pytest to v7.1.1 (#391) --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index 67c3304f12f9..8479de711c34 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ backoff==1.11.1 flaky==3.7.0 -pytest==7.1.0 +pytest==7.1.1 From ea5d4b4e45136f4b8777bd606f7512c2240b569e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 23:54:48 +0000 Subject: [PATCH 190/235] chore(python): use black==22.3.0 (#396) Source-Link: https://github.com/googleapis/synthtool/commit/6fab84af09f2cf89a031fd8671d1def6b2931b11 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe --- asset/snippets/snippets/noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 4c808af73ea2..949e0fde9ae1 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -29,7 +29,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING # WARNING - WARNING - WARNING - WARNING - WARNING -BLACK_VERSION = "black==19.10b0" +BLACK_VERSION = "black==22.3.0" # Copy `noxfile_config.py` to your directory and modify it instead. From dde974b9ca83a03484639c92d3703cbdad242014 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 30 Mar 2022 23:52:29 +0200 Subject: [PATCH 191/235] chore(deps): update dependency google-cloud-bigquery to v2.34.3 (#398) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 83d8f1afda15..a4445bcb61b1 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==2.2.1 google-cloud-asset==3.8.1 google-cloud-resource-manager==1.4.1 google-cloud-pubsub==2.11.0 -google-cloud-bigquery==2.34.2 +google-cloud-bigquery==2.34.3 From 80ccf32a6c8c37076f569a033b73ca05c127686b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 31 Mar 2022 01:34:57 +0200 Subject: [PATCH 192/235] chore(deps): update dependency google-cloud-bigquery to v3 (#399) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index a4445bcb61b1..fbb9f509bb03 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==2.2.1 google-cloud-asset==3.8.1 google-cloud-resource-manager==1.4.1 google-cloud-pubsub==2.11.0 -google-cloud-bigquery==2.34.3 +google-cloud-bigquery==3.0.1 From cd977e3c5f17963ef4230f0b2935f113b60c0ce7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Apr 2022 13:13:39 +0200 Subject: [PATCH 193/235] chore(deps): update dependency google-cloud-pubsub to v2.12.0 (#406) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index fbb9f509bb03..4c5ea6ad9cd0 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.2.1 google-cloud-asset==3.8.1 google-cloud-resource-manager==1.4.1 -google-cloud-pubsub==2.11.0 +google-cloud-pubsub==2.12.0 google-cloud-bigquery==3.0.1 From 1c12e2a0a30206b503ac9d3bb869d324956dcd92 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 14 Apr 2022 01:54:07 +0200 Subject: [PATCH 194/235] chore(deps): update dependency google-cloud-storage to v2.3.0 (#410) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 4c5ea6ad9cd0..14b024765449 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==2.2.1 +google-cloud-storage==2.3.0 google-cloud-asset==3.8.1 google-cloud-resource-manager==1.4.1 google-cloud-pubsub==2.12.0 From 81b2c5aa65692cead32a478a7d1aee2647d33d36 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Apr 2022 20:26:00 -0400 Subject: [PATCH 195/235] chore: use gapic-generator-python 0.65.1 (#411) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: use gapic-generator-python 0.65.1 PiperOrigin-RevId: 441524537 Source-Link: https://github.com/googleapis/googleapis/commit/2a273915b3f70fe86c9d2a75470a0b83e48d0abf Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab6756a48c89b5bcb9fb73443cb8e55d574f4643 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWI2NzU2YTQ4Yzg5YjViY2I5ZmI3MzQ0M2NiOGU1NWQ1NzRmNDY0MyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- .../snippet_metadata_asset_v1.json | 1032 ++++++++++++++++- .../snippet_metadata_asset_v1p1beta1.json | 194 +++- .../snippet_metadata_asset_v1p2beta1.json | 408 ++++++- .../snippet_metadata_asset_v1p4beta1.json | 154 ++- .../snippet_metadata_asset_v1p5beta1.json | 82 +- 5 files changed, 1778 insertions(+), 92 deletions(-) diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json index 1d3a68fd5a2d..754794103c35 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json @@ -1,16 +1,57 @@ { + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.asset.v1", + "version": "v1" + } + ], + "language": "PYTHON", + "name": "google-cloud-asset" + }, "snippets": [ { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.analyze_iam_policy_longrunning", "method": { + "fullName": "google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "AnalyzeIamPolicyLongrunning" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "analyze_iam_policy_longrunning" }, + "description": "Sample for AnalyzeIamPolicyLongrunning", "file": "cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async", "segments": [ { @@ -43,18 +84,50 @@ "start": 53, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.analyze_iam_policy_longrunning", "method": { + "fullName": "google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "AnalyzeIamPolicyLongrunning" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "analyze_iam_policy_longrunning" }, + "description": "Sample for AnalyzeIamPolicyLongrunning", "file": "cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync", "segments": [ { @@ -87,19 +160,51 @@ "start": 53, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.analyze_iam_policy", "method": { + "fullName": "google.cloud.asset.v1.AssetService.AnalyzeIamPolicy", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "AnalyzeIamPolicy" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.AnalyzeIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.AnalyzeIamPolicyResponse", + "shortName": "analyze_iam_policy" }, + "description": "Sample for AnalyzeIamPolicy", "file": "cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async", "segments": [ { @@ -132,18 +237,50 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.analyze_iam_policy", "method": { + "fullName": "google.cloud.asset.v1.AssetService.AnalyzeIamPolicy", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "AnalyzeIamPolicy" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.AnalyzeIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.AnalyzeIamPolicyResponse", + "shortName": "analyze_iam_policy" }, + "description": "Sample for AnalyzeIamPolicy", "file": "cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync", "segments": [ { @@ -176,19 +313,51 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.analyze_move", "method": { + "fullName": "google.cloud.asset.v1.AssetService.AnalyzeMove", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "AnalyzeMove" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.AnalyzeMoveRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.AnalyzeMoveResponse", + "shortName": "analyze_move" }, + "description": "Sample for AnalyzeMove", "file": "cloudasset_v1_generated_asset_service_analyze_move_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeMove_async", "segments": [ { @@ -221,18 +390,50 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_analyze_move_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.analyze_move", "method": { + "fullName": "google.cloud.asset.v1.AssetService.AnalyzeMove", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "AnalyzeMove" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.AnalyzeMoveRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.AnalyzeMoveResponse", + "shortName": "analyze_move" }, + "description": "Sample for AnalyzeMove", "file": "cloudasset_v1_generated_asset_service_analyze_move_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeMove_sync", "segments": [ { @@ -265,19 +466,51 @@ "start": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_analyze_move_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.batch_get_assets_history", "method": { + "fullName": "google.cloud.asset.v1.AssetService.BatchGetAssetsHistory", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "BatchGetAssetsHistory" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.BatchGetAssetsHistoryRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.BatchGetAssetsHistoryResponse", + "shortName": "batch_get_assets_history" }, + "description": "Sample for BatchGetAssetsHistory", "file": "cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async", "segments": [ { @@ -310,18 +543,50 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.batch_get_assets_history", "method": { + "fullName": "google.cloud.asset.v1.AssetService.BatchGetAssetsHistory", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "BatchGetAssetsHistory" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.BatchGetAssetsHistoryRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.BatchGetAssetsHistoryResponse", + "shortName": "batch_get_assets_history" }, + "description": "Sample for BatchGetAssetsHistory", "file": "cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync", "segments": [ { @@ -354,19 +619,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.create_feed", "method": { + "fullName": "google.cloud.asset.v1.AssetService.CreateFeed", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "CreateFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.CreateFeedRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.Feed", + "shortName": "create_feed" }, + "description": "Sample for CreateFeed", "file": "cloudasset_v1_generated_asset_service_create_feed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_async", "segments": [ { @@ -399,18 +700,54 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_create_feed_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.create_feed", "method": { + "fullName": "google.cloud.asset.v1.AssetService.CreateFeed", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "CreateFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.CreateFeedRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.Feed", + "shortName": "create_feed" }, + "description": "Sample for CreateFeed", "file": "cloudasset_v1_generated_asset_service_create_feed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_sync", "segments": [ { @@ -443,19 +780,54 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_create_feed_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.delete_feed", "method": { + "fullName": "google.cloud.asset.v1.AssetService.DeleteFeed", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "DeleteFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.DeleteFeedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_feed" }, + "description": "Sample for DeleteFeed", "file": "cloudasset_v1_generated_asset_service_delete_feed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_async", "segments": [ { @@ -486,18 +858,53 @@ "end": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_delete_feed_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.delete_feed", "method": { + "fullName": "google.cloud.asset.v1.AssetService.DeleteFeed", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "DeleteFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.DeleteFeedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_feed" }, + "description": "Sample for DeleteFeed", "file": "cloudasset_v1_generated_asset_service_delete_feed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_sync", "segments": [ { @@ -528,19 +935,51 @@ "end": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_delete_feed_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.export_assets", "method": { + "fullName": "google.cloud.asset.v1.AssetService.ExportAssets", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "ExportAssets" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.ExportAssetsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "export_assets" }, + "description": "Sample for ExportAssets", "file": "cloudasset_v1_generated_asset_service_export_assets_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_async", "segments": [ { @@ -573,18 +1012,50 @@ "start": 50, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_export_assets_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.export_assets", "method": { + "fullName": "google.cloud.asset.v1.AssetService.ExportAssets", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "ExportAssets" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.ExportAssetsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "export_assets" }, + "description": "Sample for ExportAssets", "file": "cloudasset_v1_generated_asset_service_export_assets_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_sync", "segments": [ { @@ -617,19 +1088,55 @@ "start": 50, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_export_assets_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.get_feed", "method": { + "fullName": "google.cloud.asset.v1.AssetService.GetFeed", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "GetFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.GetFeedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.Feed", + "shortName": "get_feed" }, + "description": "Sample for GetFeed", "file": "cloudasset_v1_generated_asset_service_get_feed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_GetFeed_async", "segments": [ { @@ -662,18 +1169,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_get_feed_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.get_feed", "method": { + "fullName": "google.cloud.asset.v1.AssetService.GetFeed", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "GetFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.GetFeedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.Feed", + "shortName": "get_feed" }, + "description": "Sample for GetFeed", "file": "cloudasset_v1_generated_asset_service_get_feed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_GetFeed_sync", "segments": [ { @@ -706,19 +1249,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_get_feed_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.list_assets", "method": { + "fullName": "google.cloud.asset.v1.AssetService.ListAssets", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "ListAssets" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.ListAssetsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.services.asset_service.pagers.ListAssetsAsyncPager", + "shortName": "list_assets" }, + "description": "Sample for ListAssets", "file": "cloudasset_v1_generated_asset_service_list_assets_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_ListAssets_async", "segments": [ { @@ -751,18 +1330,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_list_assets_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.list_assets", "method": { + "fullName": "google.cloud.asset.v1.AssetService.ListAssets", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "ListAssets" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.ListAssetsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.services.asset_service.pagers.ListAssetsPager", + "shortName": "list_assets" }, + "description": "Sample for ListAssets", "file": "cloudasset_v1_generated_asset_service_list_assets_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_ListAssets_sync", "segments": [ { @@ -795,19 +1410,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_list_assets_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.list_feeds", "method": { + "fullName": "google.cloud.asset.v1.AssetService.ListFeeds", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "ListFeeds" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.ListFeedsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.ListFeedsResponse", + "shortName": "list_feeds" }, + "description": "Sample for ListFeeds", "file": "cloudasset_v1_generated_asset_service_list_feeds_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_async", "segments": [ { @@ -840,18 +1491,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_list_feeds_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.list_feeds", "method": { + "fullName": "google.cloud.asset.v1.AssetService.ListFeeds", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "ListFeeds" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.ListFeedsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.ListFeedsResponse", + "shortName": "list_feeds" }, + "description": "Sample for ListFeeds", "file": "cloudasset_v1_generated_asset_service_list_feeds_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_sync", "segments": [ { @@ -884,19 +1571,59 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_list_feeds_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.search_all_iam_policies", "method": { + "fullName": "google.cloud.asset.v1.AssetService.SearchAllIamPolicies", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "SearchAllIamPolicies" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.SearchAllIamPoliciesRequest" + }, + { + "name": "scope", + "type": "str" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.services.asset_service.pagers.SearchAllIamPoliciesAsyncPager", + "shortName": "search_all_iam_policies" }, + "description": "Sample for SearchAllIamPolicies", "file": "cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_SearchAllIamPolicies_async", "segments": [ { @@ -929,18 +1656,58 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.search_all_iam_policies", "method": { + "fullName": "google.cloud.asset.v1.AssetService.SearchAllIamPolicies", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "SearchAllIamPolicies" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.SearchAllIamPoliciesRequest" + }, + { + "name": "scope", + "type": "str" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.services.asset_service.pagers.SearchAllIamPoliciesPager", + "shortName": "search_all_iam_policies" }, + "description": "Sample for SearchAllIamPolicies", "file": "cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync", "segments": [ { @@ -973,19 +1740,63 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.search_all_resources", "method": { + "fullName": "google.cloud.asset.v1.AssetService.SearchAllResources", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "SearchAllResources" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.SearchAllResourcesRequest" + }, + { + "name": "scope", + "type": "str" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "asset_types", + "type": "Sequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.services.asset_service.pagers.SearchAllResourcesAsyncPager", + "shortName": "search_all_resources" }, + "description": "Sample for SearchAllResources", "file": "cloudasset_v1_generated_asset_service_search_all_resources_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_SearchAllResources_async", "segments": [ { @@ -1018,18 +1829,62 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_search_all_resources_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.search_all_resources", "method": { + "fullName": "google.cloud.asset.v1.AssetService.SearchAllResources", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "SearchAllResources" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.SearchAllResourcesRequest" + }, + { + "name": "scope", + "type": "str" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "asset_types", + "type": "Sequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.services.asset_service.pagers.SearchAllResourcesPager", + "shortName": "search_all_resources" }, + "description": "Sample for SearchAllResources", "file": "cloudasset_v1_generated_asset_service_search_all_resources_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_SearchAllResources_sync", "segments": [ { @@ -1062,19 +1917,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_search_all_resources_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.update_feed", "method": { + "fullName": "google.cloud.asset.v1.AssetService.UpdateFeed", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "UpdateFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.UpdateFeedRequest" + }, + { + "name": "feed", + "type": "google.cloud.asset_v1.types.Feed" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.Feed", + "shortName": "update_feed" }, + "description": "Sample for UpdateFeed", "file": "cloudasset_v1_generated_asset_service_update_feed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_UpdateFeed_async", "segments": [ { @@ -1107,18 +1998,54 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_update_feed_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.update_feed", "method": { + "fullName": "google.cloud.asset.v1.AssetService.UpdateFeed", "service": { + "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, "shortName": "UpdateFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.UpdateFeedRequest" + }, + { + "name": "feed", + "type": "google.cloud.asset_v1.types.Feed" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.Feed", + "shortName": "update_feed" }, + "description": "Sample for UpdateFeed", "file": "cloudasset_v1_generated_asset_service_update_feed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1_generated_AssetService_UpdateFeed_sync", "segments": [ { @@ -1151,7 +2078,8 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1_generated_asset_service_update_feed_sync.py" } ] } diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json index f9a3789f2cf1..e621a91dd63b 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json @@ -1,16 +1,65 @@ { + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.asset.v1p1beta1", + "version": "v1p1beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-asset" + }, "snippets": [ { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1p1beta1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1p1beta1.AssetServiceAsyncClient.search_all_iam_policies", "method": { + "fullName": "google.cloud.asset.v1p1beta1.AssetService.SearchAllIamPolicies", "service": { + "fullName": "google.cloud.asset.v1p1beta1.AssetService", "shortName": "AssetService" }, "shortName": "SearchAllIamPolicies" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p1beta1.types.SearchAllIamPoliciesRequest" + }, + { + "name": "scope", + "type": "str" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p1beta1.services.asset_service.pagers.SearchAllIamPoliciesAsyncPager", + "shortName": "search_all_iam_policies" }, + "description": "Sample for SearchAllIamPolicies", "file": "cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_async", "segments": [ { @@ -43,18 +92,58 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1p1beta1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1p1beta1.AssetServiceClient.search_all_iam_policies", "method": { + "fullName": "google.cloud.asset.v1p1beta1.AssetService.SearchAllIamPolicies", "service": { + "fullName": "google.cloud.asset.v1p1beta1.AssetService", "shortName": "AssetService" }, "shortName": "SearchAllIamPolicies" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p1beta1.types.SearchAllIamPoliciesRequest" + }, + { + "name": "scope", + "type": "str" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p1beta1.services.asset_service.pagers.SearchAllIamPoliciesPager", + "shortName": "search_all_iam_policies" }, + "description": "Sample for SearchAllIamPolicies", "file": "cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_sync", "segments": [ { @@ -87,19 +176,63 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1p1beta1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1p1beta1.AssetServiceAsyncClient.search_all_resources", "method": { + "fullName": "google.cloud.asset.v1p1beta1.AssetService.SearchAllResources", "service": { + "fullName": "google.cloud.asset.v1p1beta1.AssetService", "shortName": "AssetService" }, "shortName": "SearchAllResources" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p1beta1.types.SearchAllResourcesRequest" + }, + { + "name": "scope", + "type": "str" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "asset_types", + "type": "Sequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p1beta1.services.asset_service.pagers.SearchAllResourcesAsyncPager", + "shortName": "search_all_resources" }, + "description": "Sample for SearchAllResources", "file": "cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_async", "segments": [ { @@ -132,18 +265,62 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1p1beta1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1p1beta1.AssetServiceClient.search_all_resources", "method": { + "fullName": "google.cloud.asset.v1p1beta1.AssetService.SearchAllResources", "service": { + "fullName": "google.cloud.asset.v1p1beta1.AssetService", "shortName": "AssetService" }, "shortName": "SearchAllResources" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p1beta1.types.SearchAllResourcesRequest" + }, + { + "name": "scope", + "type": "str" + }, + { + "name": "query", + "type": "str" + }, + { + "name": "asset_types", + "type": "Sequence[str]" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p1beta1.services.asset_service.pagers.SearchAllResourcesPager", + "shortName": "search_all_resources" }, + "description": "Sample for SearchAllResources", "file": "cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_sync", "segments": [ { @@ -176,7 +353,8 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py" } ] } diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json index 0c20c26d3c86..f03b7f270f13 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json @@ -1,16 +1,61 @@ { + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.asset.v1p2beta1", + "version": "v1p2beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-asset" + }, "snippets": [ { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient.create_feed", "method": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService.CreateFeed", "service": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService", "shortName": "AssetService" }, "shortName": "CreateFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p2beta1.types.CreateFeedRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p2beta1.types.Feed", + "shortName": "create_feed" }, + "description": "Sample for CreateFeed", "file": "cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p2beta1_generated_AssetService_CreateFeed_async", "segments": [ { @@ -43,18 +88,54 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient.create_feed", "method": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService.CreateFeed", "service": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService", "shortName": "AssetService" }, "shortName": "CreateFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p2beta1.types.CreateFeedRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p2beta1.types.Feed", + "shortName": "create_feed" }, + "description": "Sample for CreateFeed", "file": "cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p2beta1_generated_AssetService_CreateFeed_sync", "segments": [ { @@ -87,19 +168,54 @@ "start": 47, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient.delete_feed", "method": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService.DeleteFeed", "service": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService", "shortName": "AssetService" }, "shortName": "DeleteFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p2beta1.types.DeleteFeedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_feed" }, + "description": "Sample for DeleteFeed", "file": "cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_async", "segments": [ { @@ -130,18 +246,53 @@ "end": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient.delete_feed", "method": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService.DeleteFeed", "service": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService", "shortName": "AssetService" }, "shortName": "DeleteFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p2beta1.types.DeleteFeedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_feed" }, + "description": "Sample for DeleteFeed", "file": "cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_sync", "segments": [ { @@ -172,19 +323,55 @@ "end": 43, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient.get_feed", "method": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService.GetFeed", "service": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService", "shortName": "AssetService" }, "shortName": "GetFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p2beta1.types.GetFeedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p2beta1.types.Feed", + "shortName": "get_feed" }, + "description": "Sample for GetFeed", "file": "cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p2beta1_generated_AssetService_GetFeed_async", "segments": [ { @@ -217,18 +404,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient.get_feed", "method": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService.GetFeed", "service": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService", "shortName": "AssetService" }, "shortName": "GetFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p2beta1.types.GetFeedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p2beta1.types.Feed", + "shortName": "get_feed" }, + "description": "Sample for GetFeed", "file": "cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p2beta1_generated_AssetService_GetFeed_sync", "segments": [ { @@ -261,19 +484,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient.list_feeds", "method": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService.ListFeeds", "service": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService", "shortName": "AssetService" }, "shortName": "ListFeeds" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p2beta1.types.ListFeedsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p2beta1.types.ListFeedsResponse", + "shortName": "list_feeds" }, + "description": "Sample for ListFeeds", "file": "cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p2beta1_generated_AssetService_ListFeeds_async", "segments": [ { @@ -306,18 +565,54 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient.list_feeds", "method": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService.ListFeeds", "service": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService", "shortName": "AssetService" }, "shortName": "ListFeeds" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p2beta1.types.ListFeedsRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p2beta1.types.ListFeedsResponse", + "shortName": "list_feeds" }, + "description": "Sample for ListFeeds", "file": "cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p2beta1_generated_AssetService_ListFeeds_sync", "segments": [ { @@ -350,19 +645,55 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient.update_feed", "method": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService.UpdateFeed", "service": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService", "shortName": "AssetService" }, "shortName": "UpdateFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p2beta1.types.UpdateFeedRequest" + }, + { + "name": "feed", + "type": "google.cloud.asset_v1p2beta1.types.Feed" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p2beta1.types.Feed", + "shortName": "update_feed" }, + "description": "Sample for UpdateFeed", "file": "cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_async", "segments": [ { @@ -395,18 +726,54 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient.update_feed", "method": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService.UpdateFeed", "service": { + "fullName": "google.cloud.asset.v1p2beta1.AssetService", "shortName": "AssetService" }, "shortName": "UpdateFeed" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p2beta1.types.UpdateFeedRequest" + }, + { + "name": "feed", + "type": "google.cloud.asset_v1p2beta1.types.Feed" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p2beta1.types.Feed", + "shortName": "update_feed" }, + "description": "Sample for UpdateFeed", "file": "cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_sync", "segments": [ { @@ -439,7 +806,8 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py" } ] } diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json index a91113b46021..f68b216f9637 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json @@ -1,16 +1,57 @@ { + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.asset.v1p4beta1", + "version": "v1p4beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-asset" + }, "snippets": [ { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1p4beta1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1p4beta1.AssetServiceAsyncClient.analyze_iam_policy", "method": { + "fullName": "google.cloud.asset.v1p4beta1.AssetService.AnalyzeIamPolicy", "service": { + "fullName": "google.cloud.asset.v1p4beta1.AssetService", "shortName": "AssetService" }, "shortName": "AnalyzeIamPolicy" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p4beta1.types.AnalyzeIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p4beta1.types.AnalyzeIamPolicyResponse", + "shortName": "analyze_iam_policy" }, + "description": "Sample for AnalyzeIamPolicy", "file": "cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_async", "segments": [ { @@ -43,18 +84,50 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1p4beta1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1p4beta1.AssetServiceClient.analyze_iam_policy", "method": { + "fullName": "google.cloud.asset.v1p4beta1.AssetService.AnalyzeIamPolicy", "service": { + "fullName": "google.cloud.asset.v1p4beta1.AssetService", "shortName": "AssetService" }, "shortName": "AnalyzeIamPolicy" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p4beta1.types.AnalyzeIamPolicyRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p4beta1.types.AnalyzeIamPolicyResponse", + "shortName": "analyze_iam_policy" }, + "description": "Sample for AnalyzeIamPolicy", "file": "cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_sync", "segments": [ { @@ -87,19 +160,51 @@ "start": 45, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py" }, { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1p4beta1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1p4beta1.AssetServiceAsyncClient.export_iam_policy_analysis", "method": { + "fullName": "google.cloud.asset.v1p4beta1.AssetService.ExportIamPolicyAnalysis", "service": { + "fullName": "google.cloud.asset.v1p4beta1.AssetService", "shortName": "AssetService" }, "shortName": "ExportIamPolicyAnalysis" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p4beta1.types.ExportIamPolicyAnalysisRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "export_iam_policy_analysis" }, + "description": "Sample for ExportIamPolicyAnalysis", "file": "cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_async", "segments": [ { @@ -132,18 +237,50 @@ "start": 53, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1p4beta1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1p4beta1.AssetServiceClient.export_iam_policy_analysis", "method": { + "fullName": "google.cloud.asset.v1p4beta1.AssetService.ExportIamPolicyAnalysis", "service": { + "fullName": "google.cloud.asset.v1p4beta1.AssetService", "shortName": "AssetService" }, "shortName": "ExportIamPolicyAnalysis" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p4beta1.types.ExportIamPolicyAnalysisRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.api_core.operation.Operation", + "shortName": "export_iam_policy_analysis" }, + "description": "Sample for ExportIamPolicyAnalysis", "file": "cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_sync", "segments": [ { @@ -176,7 +313,8 @@ "start": 53, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py" } ] } diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json index 291cde2dd59b..b9a50c2c0698 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json @@ -1,16 +1,57 @@ { + "clientLibrary": { + "apis": [ + { + "id": "google.cloud.asset.v1p5beta1", + "version": "v1p5beta1" + } + ], + "language": "PYTHON", + "name": "google-cloud-asset" + }, "snippets": [ { + "canonical": true, "clientMethod": { "async": true, + "client": { + "fullName": "google.cloud.asset_v1p5beta1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1p5beta1.AssetServiceAsyncClient.list_assets", "method": { + "fullName": "google.cloud.asset.v1p5beta1.AssetService.ListAssets", "service": { + "fullName": "google.cloud.asset.v1p5beta1.AssetService", "shortName": "AssetService" }, "shortName": "ListAssets" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p5beta1.types.ListAssetsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p5beta1.services.asset_service.pagers.ListAssetsAsyncPager", + "shortName": "list_assets" }, + "description": "Sample for ListAssets", "file": "cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p5beta1_generated_AssetService_ListAssets_async", "segments": [ { @@ -43,18 +84,50 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py" }, { + "canonical": true, "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1p5beta1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1p5beta1.AssetServiceClient.list_assets", "method": { + "fullName": "google.cloud.asset.v1p5beta1.AssetService.ListAssets", "service": { + "fullName": "google.cloud.asset.v1p5beta1.AssetService", "shortName": "AssetService" }, "shortName": "ListAssets" - } + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1p5beta1.types.ListAssetsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1p5beta1.services.asset_service.pagers.ListAssetsPager", + "shortName": "list_assets" }, + "description": "Sample for ListAssets", "file": "cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", "regionTag": "cloudasset_v1p5beta1_generated_AssetService_ListAssets_sync", "segments": [ { @@ -87,7 +160,8 @@ "start": 42, "type": "RESPONSE_HANDLING" } - ] + ], + "title": "cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py" } ] } From 26ce0e1a4b952a2ebeef7030164d54b8ab889c53 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 20:10:57 -0400 Subject: [PATCH 196/235] chore(python): add nox session to sort python imports (#412) Source-Link: https://github.com/googleapis/synthtool/commit/1b71c10e20de7ed3f97f692f99a0e3399b67049f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416 Co-authored-by: Owl Bot --- asset/snippets/snippets/noxfile.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 949e0fde9ae1..38bb0a572b81 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -30,6 +30,7 @@ # WARNING - WARNING - WARNING - WARNING - WARNING BLACK_VERSION = "black==22.3.0" +ISORT_VERSION = "isort==5.10.1" # Copy `noxfile_config.py` to your directory and modify it instead. @@ -168,12 +169,32 @@ def lint(session: nox.sessions.Session) -> None: @nox.session def blacken(session: nox.sessions.Session) -> None: + """Run black. Format code to uniform standard.""" session.install(BLACK_VERSION) python_files = [path for path in os.listdir(".") if path.endswith(".py")] session.run("black", *python_files) +# +# format = isort + black +# + +@nox.session +def format(session: nox.sessions.Session) -> None: + """ + Run isort to sort imports. Then run black + to format code to uniform standard. + """ + session.install(BLACK_VERSION, ISORT_VERSION) + python_files = [path for path in os.listdir(".") if path.endswith(".py")] + + # Use the --fss option to sort imports using strict alphabetical order. + # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections + session.run("isort", "--fss", *python_files) + session.run("black", *python_files) + + # # Sample Tests # From da44b45925a57aa3ef49fa9e83ffbbd9496826cd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Apr 2022 17:14:34 +0200 Subject: [PATCH 197/235] chore(deps): update dependency pytest to v7.1.2 (#415) --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index 8479de711c34..bf31abc12909 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ backoff==1.11.1 flaky==3.7.0 -pytest==7.1.1 +pytest==7.1.2 From c123be1fe2ba91f75230cd8792df9c86ffc01f25 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Apr 2022 20:05:59 +0200 Subject: [PATCH 198/235] chore(deps): update dependency backoff to v2 (#417) --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index bf31abc12909..a443e90a9760 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ -backoff==1.11.1 +backoff==2.0.0 flaky==3.7.0 pytest==7.1.2 From 4cfe0f3f0ef3fbb84e7447bac441d55c37475782 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Apr 2022 19:30:41 +0200 Subject: [PATCH 199/235] chore(deps): update dependency backoff to v2.0.1 (#419) --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index a443e90a9760..c78317e3fa35 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ -backoff==2.0.0 +backoff==2.0.1 flaky==3.7.0 pytest==7.1.2 From 7e3c42d35e38810d4c5173d7fd96199fde077a29 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 22:15:21 +0200 Subject: [PATCH 200/235] chore(deps): update dependency google-cloud-bigquery to v3.1.0 (#423) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 14b024765449..e8bcdeedd939 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==2.3.0 google-cloud-asset==3.8.1 google-cloud-resource-manager==1.4.1 google-cloud-pubsub==2.12.0 -google-cloud-bigquery==3.0.1 +google-cloud-bigquery==3.1.0 From 7677e6a185653b524c65b6935c99e3c0ba8d138c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 12 May 2022 20:17:07 +0200 Subject: [PATCH 201/235] chore(deps): update dependency google-cloud-pubsub to v2.12.1 (#424) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index e8bcdeedd939..317e277e0d2f 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.3.0 google-cloud-asset==3.8.1 google-cloud-resource-manager==1.4.1 -google-cloud-pubsub==2.12.0 +google-cloud-pubsub==2.12.1 google-cloud-bigquery==3.1.0 From bbe2d8ebbfa94478fc1898127b3a85553c671354 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 19 May 2022 12:12:12 +0000 Subject: [PATCH 202/235] feat: Add SavedQuery CURD support (#425) - [ ] Regenerate this pull request now. feat: Add tags support feat: Add RelatedAsset and deprecate RelatedAssets for relationship GA *The previous representation of the relationship feature is deprecated and unimplemented. The RelatedAsset message represents the new stable format. PiperOrigin-RevId: 449306805 Source-Link: https://github.com/googleapis/googleapis/commit/3d7bd9d4a8772e0c7e1d39a2763e1914bfb5963d Source-Link: https://github.com/googleapis/googleapis-gen/commit/71a93d05d6076271d04b7592f7fad0d3f0c7a040 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzFhOTNkMDVkNjA3NjI3MWQwNGI3NTkyZjdmYWQwZDNmMGM3YTA0MCJ9 --- ..._batch_get_effective_iam_policies_async.py | 46 + ...e_batch_get_effective_iam_policies_sync.py | 46 + ..._asset_service_create_saved_query_async.py | 46 + ...d_asset_service_create_saved_query_sync.py | 46 + ..._asset_service_delete_saved_query_async.py | 43 + ...d_asset_service_delete_saved_query_sync.py | 43 + ...ted_asset_service_get_saved_query_async.py | 45 + ...ated_asset_service_get_saved_query_sync.py | 45 + ..._asset_service_list_saved_queries_async.py | 46 + ...d_asset_service_list_saved_queries_sync.py | 46 + ..._asset_service_update_saved_query_async.py | 44 + ...d_asset_service_update_saved_query_sync.py | 44 + .../snippet_metadata_asset_v1.json | 1334 ++++++++++++++--- 13 files changed, 1695 insertions(+), 179 deletions(-) create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_sync.py create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_sync.py diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py new file mode 100644 index 000000000000..1b668f585758 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchGetEffectiveIamPolicies +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_async] +from google.cloud import asset_v1 + + +async def sample_batch_get_effective_iam_policies(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.BatchGetEffectiveIamPoliciesRequest( + scope="scope_value", + names=['names_value_1', 'names_value_2'], + ) + + # Make the request + response = await client.batch_get_effective_iam_policies(request=request) + + # Handle the response + print(response) + +# [END cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py new file mode 100644 index 000000000000..82bfbd0d745c --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for BatchGetEffectiveIamPolicies +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync] +from google.cloud import asset_v1 + + +def sample_batch_get_effective_iam_policies(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.BatchGetEffectiveIamPoliciesRequest( + scope="scope_value", + names=['names_value_1', 'names_value_2'], + ) + + # Make the request + response = client.batch_get_effective_iam_policies(request=request) + + # Handle the response + print(response) + +# [END cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_async.py new file mode 100644 index 000000000000..d5edb69cd17a --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateSavedQuery +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_CreateSavedQuery_async] +from google.cloud import asset_v1 + + +async def sample_create_saved_query(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.CreateSavedQueryRequest( + parent="parent_value", + saved_query_id="saved_query_id_value", + ) + + # Make the request + response = await client.create_saved_query(request=request) + + # Handle the response + print(response) + +# [END cloudasset_v1_generated_AssetService_CreateSavedQuery_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_sync.py new file mode 100644 index 000000000000..1601b6ed8d75 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for CreateSavedQuery +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_CreateSavedQuery_sync] +from google.cloud import asset_v1 + + +def sample_create_saved_query(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.CreateSavedQueryRequest( + parent="parent_value", + saved_query_id="saved_query_id_value", + ) + + # Make the request + response = client.create_saved_query(request=request) + + # Handle the response + print(response) + +# [END cloudasset_v1_generated_AssetService_CreateSavedQuery_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_async.py new file mode 100644 index 000000000000..e0013fe806e2 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_async.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteSavedQuery +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_DeleteSavedQuery_async] +from google.cloud import asset_v1 + + +async def sample_delete_saved_query(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.DeleteSavedQueryRequest( + name="name_value", + ) + + # Make the request + await client.delete_saved_query(request=request) + + +# [END cloudasset_v1_generated_AssetService_DeleteSavedQuery_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_sync.py new file mode 100644 index 000000000000..9d6edc66944e --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_sync.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for DeleteSavedQuery +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync] +from google.cloud import asset_v1 + + +def sample_delete_saved_query(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.DeleteSavedQueryRequest( + name="name_value", + ) + + # Make the request + client.delete_saved_query(request=request) + + +# [END cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_async.py new file mode 100644 index 000000000000..7c606c81cd79 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_async.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetSavedQuery +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_GetSavedQuery_async] +from google.cloud import asset_v1 + + +async def sample_get_saved_query(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.GetSavedQueryRequest( + name="name_value", + ) + + # Make the request + response = await client.get_saved_query(request=request) + + # Handle the response + print(response) + +# [END cloudasset_v1_generated_AssetService_GetSavedQuery_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_sync.py new file mode 100644 index 000000000000..ed758e8bc01e --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_sync.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for GetSavedQuery +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_GetSavedQuery_sync] +from google.cloud import asset_v1 + + +def sample_get_saved_query(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.GetSavedQueryRequest( + name="name_value", + ) + + # Make the request + response = client.get_saved_query(request=request) + + # Handle the response + print(response) + +# [END cloudasset_v1_generated_AssetService_GetSavedQuery_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_async.py new file mode 100644 index 000000000000..7bf406c8f052 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListSavedQueries +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_ListSavedQueries_async] +from google.cloud import asset_v1 + + +async def sample_list_saved_queries(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.ListSavedQueriesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_saved_queries(request=request) + + # Handle the response + async for response in page_result: + print(response) + +# [END cloudasset_v1_generated_AssetService_ListSavedQueries_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_sync.py new file mode 100644 index 000000000000..cb0be1471248 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for ListSavedQueries +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_ListSavedQueries_sync] +from google.cloud import asset_v1 + + +def sample_list_saved_queries(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.ListSavedQueriesRequest( + parent="parent_value", + ) + + # Make the request + page_result = client.list_saved_queries(request=request) + + # Handle the response + for response in page_result: + print(response) + +# [END cloudasset_v1_generated_AssetService_ListSavedQueries_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_async.py new file mode 100644 index 000000000000..874aa769bd68 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_async.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateSavedQuery +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_UpdateSavedQuery_async] +from google.cloud import asset_v1 + + +async def sample_update_saved_query(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.UpdateSavedQueryRequest( + ) + + # Make the request + response = await client.update_saved_query(request=request) + + # Handle the response + print(response) + +# [END cloudasset_v1_generated_AssetService_UpdateSavedQuery_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_sync.py new file mode 100644 index 000000000000..0069cc66489d --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_sync.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for UpdateSavedQuery +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync] +from google.cloud import asset_v1 + + +def sample_update_saved_query(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.UpdateSavedQueryRequest( + ) + + # Make the request + response = client.update_saved_query(request=request) + + # Handle the response + print(response) + +# [END cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync] diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json index 754794103c35..239016ebc896 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json @@ -622,6 +622,159 @@ ], "title": "cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py" }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.batch_get_effective_iam_policies", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "BatchGetEffectiveIamPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesResponse", + "shortName": "batch_get_effective_iam_policies" + }, + "description": "Sample for BatchGetEffectiveIamPolicies", + "file": "cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.batch_get_effective_iam_policies", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "BatchGetEffectiveIamPolicies" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesResponse", + "shortName": "batch_get_effective_iam_policies" + }, + "description": "Sample for BatchGetEffectiveIamPolicies", + "file": "cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py" + }, { "canonical": true, "clientMethod": { @@ -632,21 +785,665 @@ }, "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.create_feed", "method": { - "fullName": "google.cloud.asset.v1.AssetService.CreateFeed", + "fullName": "google.cloud.asset.v1.AssetService.CreateFeed", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "CreateFeed" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.CreateFeedRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.Feed", + "shortName": "create_feed" + }, + "description": "Sample for CreateFeed", + "file": "cloudasset_v1_generated_asset_service_create_feed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_async", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_create_feed_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.create_feed", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.CreateFeed", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "CreateFeed" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.CreateFeedRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.Feed", + "shortName": "create_feed" + }, + "description": "Sample for CreateFeed", + "file": "cloudasset_v1_generated_asset_service_create_feed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_sync", + "segments": [ + { + "end": 49, + "start": 27, + "type": "FULL" + }, + { + "end": 49, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 43, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 46, + "start": 44, + "type": "REQUEST_EXECUTION" + }, + { + "end": 50, + "start": 47, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_create_feed_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.create_saved_query", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.CreateSavedQuery", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "CreateSavedQuery" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.CreateSavedQueryRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "saved_query", + "type": "google.cloud.asset_v1.types.SavedQuery" + }, + { + "name": "saved_query_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.SavedQuery", + "shortName": "create_saved_query" + }, + "description": "Sample for CreateSavedQuery", + "file": "cloudasset_v1_generated_asset_service_create_saved_query_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_CreateSavedQuery_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_create_saved_query_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.create_saved_query", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.CreateSavedQuery", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "CreateSavedQuery" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.CreateSavedQueryRequest" + }, + { + "name": "parent", + "type": "str" + }, + { + "name": "saved_query", + "type": "google.cloud.asset_v1.types.SavedQuery" + }, + { + "name": "saved_query_id", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.SavedQuery", + "shortName": "create_saved_query" + }, + "description": "Sample for CreateSavedQuery", + "file": "cloudasset_v1_generated_asset_service_create_saved_query_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_CreateSavedQuery_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_create_saved_query_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.delete_feed", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.DeleteFeed", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "DeleteFeed" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.DeleteFeedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_feed" + }, + "description": "Sample for DeleteFeed", + "file": "cloudasset_v1_generated_asset_service_delete_feed_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_delete_feed_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.delete_feed", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.DeleteFeed", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "DeleteFeed" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.DeleteFeedRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_feed" + }, + "description": "Sample for DeleteFeed", + "file": "cloudasset_v1_generated_asset_service_delete_feed_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_delete_feed_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.delete_saved_query", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.DeleteSavedQuery", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "DeleteSavedQuery" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.DeleteSavedQueryRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_saved_query" + }, + "description": "Sample for DeleteSavedQuery", + "file": "cloudasset_v1_generated_asset_service_delete_saved_query_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_DeleteSavedQuery_async", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_delete_saved_query_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.delete_saved_query", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.DeleteSavedQuery", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "DeleteSavedQuery" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.DeleteSavedQueryRequest" + }, + { + "name": "name", + "type": "str" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "shortName": "delete_saved_query" + }, + "description": "Sample for DeleteSavedQuery", + "file": "cloudasset_v1_generated_asset_service_delete_saved_query_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync", + "segments": [ + { + "end": 42, + "start": 27, + "type": "FULL" + }, + { + "end": 42, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 38, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "start": 39, + "type": "REQUEST_EXECUTION" + }, + { + "end": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_delete_saved_query_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.export_assets", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.ExportAssets", "service": { "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, - "shortName": "CreateFeed" + "shortName": "ExportAssets" }, "parameters": [ { "name": "request", - "type": "google.cloud.asset_v1.types.CreateFeedRequest" - }, - { - "name": "parent", - "type": "str" + "type": "google.cloud.asset_v1.types.ExportAssetsRequest" }, { "name": "retry", @@ -661,22 +1458,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.asset_v1.types.Feed", - "shortName": "create_feed" + "resultType": "google.api_core.operation_async.AsyncOperation", + "shortName": "export_assets" }, - "description": "Sample for CreateFeed", - "file": "cloudasset_v1_generated_asset_service_create_feed_async.py", + "description": "Sample for ExportAssets", + "file": "cloudasset_v1_generated_asset_service_export_assets_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_async", + "regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_async", "segments": [ { - "end": 49, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 52, "start": 27, "type": "SHORT" }, @@ -686,22 +1483,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 49, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "cloudasset_v1_generated_asset_service_create_feed_async.py" + "title": "cloudasset_v1_generated_asset_service_export_assets_async.py" }, { "canonical": true, @@ -710,23 +1507,19 @@ "fullName": "google.cloud.asset_v1.AssetServiceClient", "shortName": "AssetServiceClient" }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.create_feed", + "fullName": "google.cloud.asset_v1.AssetServiceClient.export_assets", "method": { - "fullName": "google.cloud.asset.v1.AssetService.CreateFeed", + "fullName": "google.cloud.asset.v1.AssetService.ExportAssets", "service": { "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, - "shortName": "CreateFeed" + "shortName": "ExportAssets" }, "parameters": [ { "name": "request", - "type": "google.cloud.asset_v1.types.CreateFeedRequest" - }, - { - "name": "parent", - "type": "str" + "type": "google.cloud.asset_v1.types.ExportAssetsRequest" }, { "name": "retry", @@ -741,22 +1534,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.asset_v1.types.Feed", - "shortName": "create_feed" + "resultType": "google.api_core.operation.Operation", + "shortName": "export_assets" }, - "description": "Sample for CreateFeed", - "file": "cloudasset_v1_generated_asset_service_create_feed_sync.py", + "description": "Sample for ExportAssets", + "file": "cloudasset_v1_generated_asset_service_export_assets_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_sync", + "regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_sync", "segments": [ { - "end": 49, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 52, "start": 27, "type": "SHORT" }, @@ -766,22 +1559,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 43, + "end": 42, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 49, + "start": 43, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], - "title": "cloudasset_v1_generated_asset_service_create_feed_sync.py" + "title": "cloudasset_v1_generated_asset_service_export_assets_sync.py" }, { "canonical": true, @@ -791,19 +1584,19 @@ "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", "shortName": "AssetServiceAsyncClient" }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.delete_feed", + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.get_feed", "method": { - "fullName": "google.cloud.asset.v1.AssetService.DeleteFeed", + "fullName": "google.cloud.asset.v1.AssetService.GetFeed", "service": { "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, - "shortName": "DeleteFeed" + "shortName": "GetFeed" }, "parameters": [ { "name": "request", - "type": "google.cloud.asset_v1.types.DeleteFeedRequest" + "type": "google.cloud.asset_v1.types.GetFeedRequest" }, { "name": "name", @@ -822,21 +1615,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "shortName": "delete_feed" + "resultType": "google.cloud.asset_v1.types.Feed", + "shortName": "get_feed" }, - "description": "Sample for DeleteFeed", - "file": "cloudasset_v1_generated_asset_service_delete_feed_async.py", + "description": "Sample for GetFeed", + "file": "cloudasset_v1_generated_asset_service_get_feed_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_async", + "regionTag": "cloudasset_v1_generated_AssetService_GetFeed_async", "segments": [ { - "end": 42, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 44, "start": 27, "type": "SHORT" }, @@ -851,15 +1645,17 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudasset_v1_generated_asset_service_delete_feed_async.py" + "title": "cloudasset_v1_generated_asset_service_get_feed_async.py" }, { "canonical": true, @@ -868,19 +1664,19 @@ "fullName": "google.cloud.asset_v1.AssetServiceClient", "shortName": "AssetServiceClient" }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.delete_feed", + "fullName": "google.cloud.asset_v1.AssetServiceClient.get_feed", "method": { - "fullName": "google.cloud.asset.v1.AssetService.DeleteFeed", + "fullName": "google.cloud.asset.v1.AssetService.GetFeed", "service": { "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, - "shortName": "DeleteFeed" + "shortName": "GetFeed" }, "parameters": [ { "name": "request", - "type": "google.cloud.asset_v1.types.DeleteFeedRequest" + "type": "google.cloud.asset_v1.types.GetFeedRequest" }, { "name": "name", @@ -899,21 +1695,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "shortName": "delete_feed" + "resultType": "google.cloud.asset_v1.types.Feed", + "shortName": "get_feed" }, - "description": "Sample for DeleteFeed", - "file": "cloudasset_v1_generated_asset_service_delete_feed_sync.py", + "description": "Sample for GetFeed", + "file": "cloudasset_v1_generated_asset_service_get_feed_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_sync", + "regionTag": "cloudasset_v1_generated_AssetService_GetFeed_sync", "segments": [ { - "end": 42, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 44, "start": 27, "type": "SHORT" }, @@ -928,15 +1725,17 @@ "type": "REQUEST_INITIALIZATION" }, { + "end": 41, "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudasset_v1_generated_asset_service_delete_feed_sync.py" + "title": "cloudasset_v1_generated_asset_service_get_feed_sync.py" }, { "canonical": true, @@ -946,19 +1745,23 @@ "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", "shortName": "AssetServiceAsyncClient" }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.export_assets", + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.get_saved_query", "method": { - "fullName": "google.cloud.asset.v1.AssetService.ExportAssets", + "fullName": "google.cloud.asset.v1.AssetService.GetSavedQuery", "service": { "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, - "shortName": "ExportAssets" + "shortName": "GetSavedQuery" }, "parameters": [ { "name": "request", - "type": "google.cloud.asset_v1.types.ExportAssetsRequest" + "type": "google.cloud.asset_v1.types.GetSavedQueryRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -973,22 +1776,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "export_assets" + "resultType": "google.cloud.asset_v1.types.SavedQuery", + "shortName": "get_saved_query" }, - "description": "Sample for ExportAssets", - "file": "cloudasset_v1_generated_asset_service_export_assets_async.py", + "description": "Sample for GetSavedQuery", + "file": "cloudasset_v1_generated_asset_service_get_saved_query_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_async", + "regionTag": "cloudasset_v1_generated_AssetService_GetSavedQuery_async", "segments": [ { - "end": 52, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 44, "start": 27, "type": "SHORT" }, @@ -998,22 +1801,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 43, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudasset_v1_generated_asset_service_export_assets_async.py" + "title": "cloudasset_v1_generated_asset_service_get_saved_query_async.py" }, { "canonical": true, @@ -1022,19 +1825,23 @@ "fullName": "google.cloud.asset_v1.AssetServiceClient", "shortName": "AssetServiceClient" }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.export_assets", + "fullName": "google.cloud.asset_v1.AssetServiceClient.get_saved_query", "method": { - "fullName": "google.cloud.asset.v1.AssetService.ExportAssets", + "fullName": "google.cloud.asset.v1.AssetService.GetSavedQuery", "service": { "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, - "shortName": "ExportAssets" + "shortName": "GetSavedQuery" }, "parameters": [ { "name": "request", - "type": "google.cloud.asset_v1.types.ExportAssetsRequest" + "type": "google.cloud.asset_v1.types.GetSavedQueryRequest" + }, + { + "name": "name", + "type": "str" }, { "name": "retry", @@ -1049,22 +1856,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.api_core.operation.Operation", - "shortName": "export_assets" + "resultType": "google.cloud.asset_v1.types.SavedQuery", + "shortName": "get_saved_query" }, - "description": "Sample for ExportAssets", - "file": "cloudasset_v1_generated_asset_service_export_assets_sync.py", + "description": "Sample for GetSavedQuery", + "file": "cloudasset_v1_generated_asset_service_get_saved_query_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_sync", + "regionTag": "cloudasset_v1_generated_AssetService_GetSavedQuery_sync", "segments": [ { - "end": 52, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 44, "start": 27, "type": "SHORT" }, @@ -1074,22 +1881,22 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 42, + "end": 38, "start": 34, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 43, + "end": 41, + "start": 39, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 45, + "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudasset_v1_generated_asset_service_export_assets_sync.py" + "title": "cloudasset_v1_generated_asset_service_get_saved_query_sync.py" }, { "canonical": true, @@ -1099,22 +1906,22 @@ "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", "shortName": "AssetServiceAsyncClient" }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.get_feed", + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.list_assets", "method": { - "fullName": "google.cloud.asset.v1.AssetService.GetFeed", + "fullName": "google.cloud.asset.v1.AssetService.ListAssets", "service": { "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, - "shortName": "GetFeed" + "shortName": "ListAssets" }, "parameters": [ { "name": "request", - "type": "google.cloud.asset_v1.types.GetFeedRequest" + "type": "google.cloud.asset_v1.types.ListAssetsRequest" }, { - "name": "name", + "name": "parent", "type": "str" }, { @@ -1130,22 +1937,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.asset_v1.types.Feed", - "shortName": "get_feed" + "resultType": "google.cloud.asset_v1.services.asset_service.pagers.ListAssetsAsyncPager", + "shortName": "list_assets" }, - "description": "Sample for GetFeed", - "file": "cloudasset_v1_generated_asset_service_get_feed_async.py", + "description": "Sample for ListAssets", + "file": "cloudasset_v1_generated_asset_service_list_assets_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_GetFeed_async", + "regionTag": "cloudasset_v1_generated_AssetService_ListAssets_async", "segments": [ { - "end": 44, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 45, "start": 27, "type": "SHORT" }, @@ -1165,12 +1972,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 45, + "end": 46, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudasset_v1_generated_asset_service_get_feed_async.py" + "title": "cloudasset_v1_generated_asset_service_list_assets_async.py" }, { "canonical": true, @@ -1179,22 +1986,22 @@ "fullName": "google.cloud.asset_v1.AssetServiceClient", "shortName": "AssetServiceClient" }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.get_feed", + "fullName": "google.cloud.asset_v1.AssetServiceClient.list_assets", "method": { - "fullName": "google.cloud.asset.v1.AssetService.GetFeed", + "fullName": "google.cloud.asset.v1.AssetService.ListAssets", "service": { "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, - "shortName": "GetFeed" + "shortName": "ListAssets" }, "parameters": [ { "name": "request", - "type": "google.cloud.asset_v1.types.GetFeedRequest" + "type": "google.cloud.asset_v1.types.ListAssetsRequest" }, { - "name": "name", + "name": "parent", "type": "str" }, { @@ -1210,22 +2017,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.asset_v1.types.Feed", - "shortName": "get_feed" + "resultType": "google.cloud.asset_v1.services.asset_service.pagers.ListAssetsPager", + "shortName": "list_assets" }, - "description": "Sample for GetFeed", - "file": "cloudasset_v1_generated_asset_service_get_feed_sync.py", + "description": "Sample for ListAssets", + "file": "cloudasset_v1_generated_asset_service_list_assets_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_GetFeed_sync", + "regionTag": "cloudasset_v1_generated_AssetService_ListAssets_sync", "segments": [ { - "end": 44, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 45, "start": 27, "type": "SHORT" }, @@ -1245,12 +2052,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 45, + "end": 46, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudasset_v1_generated_asset_service_get_feed_sync.py" + "title": "cloudasset_v1_generated_asset_service_list_assets_sync.py" }, { "canonical": true, @@ -1260,19 +2067,19 @@ "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", "shortName": "AssetServiceAsyncClient" }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.list_assets", + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.list_feeds", "method": { - "fullName": "google.cloud.asset.v1.AssetService.ListAssets", + "fullName": "google.cloud.asset.v1.AssetService.ListFeeds", "service": { "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, - "shortName": "ListAssets" + "shortName": "ListFeeds" }, "parameters": [ { "name": "request", - "type": "google.cloud.asset_v1.types.ListAssetsRequest" + "type": "google.cloud.asset_v1.types.ListFeedsRequest" }, { "name": "parent", @@ -1291,22 +2098,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.asset_v1.services.asset_service.pagers.ListAssetsAsyncPager", - "shortName": "list_assets" + "resultType": "google.cloud.asset_v1.types.ListFeedsResponse", + "shortName": "list_feeds" }, - "description": "Sample for ListAssets", - "file": "cloudasset_v1_generated_asset_service_list_assets_async.py", + "description": "Sample for ListFeeds", + "file": "cloudasset_v1_generated_asset_service_list_feeds_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ListAssets_async", + "regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_async", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -1326,12 +2133,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 46, + "end": 45, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudasset_v1_generated_asset_service_list_assets_async.py" + "title": "cloudasset_v1_generated_asset_service_list_feeds_async.py" }, { "canonical": true, @@ -1340,19 +2147,19 @@ "fullName": "google.cloud.asset_v1.AssetServiceClient", "shortName": "AssetServiceClient" }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.list_assets", + "fullName": "google.cloud.asset_v1.AssetServiceClient.list_feeds", "method": { - "fullName": "google.cloud.asset.v1.AssetService.ListAssets", + "fullName": "google.cloud.asset.v1.AssetService.ListFeeds", "service": { "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, - "shortName": "ListAssets" + "shortName": "ListFeeds" }, "parameters": [ { "name": "request", - "type": "google.cloud.asset_v1.types.ListAssetsRequest" + "type": "google.cloud.asset_v1.types.ListFeedsRequest" }, { "name": "parent", @@ -1371,22 +2178,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.asset_v1.services.asset_service.pagers.ListAssetsPager", - "shortName": "list_assets" + "resultType": "google.cloud.asset_v1.types.ListFeedsResponse", + "shortName": "list_feeds" }, - "description": "Sample for ListAssets", - "file": "cloudasset_v1_generated_asset_service_list_assets_sync.py", + "description": "Sample for ListFeeds", + "file": "cloudasset_v1_generated_asset_service_list_feeds_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ListAssets_sync", + "regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_sync", "segments": [ { - "end": 45, + "end": 44, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 44, "start": 27, "type": "SHORT" }, @@ -1406,12 +2213,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 46, + "end": 45, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudasset_v1_generated_asset_service_list_assets_sync.py" + "title": "cloudasset_v1_generated_asset_service_list_feeds_sync.py" }, { "canonical": true, @@ -1421,19 +2228,19 @@ "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", "shortName": "AssetServiceAsyncClient" }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.list_feeds", + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.list_saved_queries", "method": { - "fullName": "google.cloud.asset.v1.AssetService.ListFeeds", + "fullName": "google.cloud.asset.v1.AssetService.ListSavedQueries", "service": { "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, - "shortName": "ListFeeds" + "shortName": "ListSavedQueries" }, "parameters": [ { "name": "request", - "type": "google.cloud.asset_v1.types.ListFeedsRequest" + "type": "google.cloud.asset_v1.types.ListSavedQueriesRequest" }, { "name": "parent", @@ -1452,22 +2259,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.asset_v1.types.ListFeedsResponse", - "shortName": "list_feeds" + "resultType": "google.cloud.asset_v1.services.asset_service.pagers.ListSavedQueriesAsyncPager", + "shortName": "list_saved_queries" }, - "description": "Sample for ListFeeds", - "file": "cloudasset_v1_generated_asset_service_list_feeds_async.py", + "description": "Sample for ListSavedQueries", + "file": "cloudasset_v1_generated_asset_service_list_saved_queries_async.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_async", + "regionTag": "cloudasset_v1_generated_AssetService_ListSavedQueries_async", "segments": [ { - "end": 44, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 45, "start": 27, "type": "SHORT" }, @@ -1487,12 +2294,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 45, + "end": 46, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudasset_v1_generated_asset_service_list_feeds_async.py" + "title": "cloudasset_v1_generated_asset_service_list_saved_queries_async.py" }, { "canonical": true, @@ -1501,19 +2308,19 @@ "fullName": "google.cloud.asset_v1.AssetServiceClient", "shortName": "AssetServiceClient" }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.list_feeds", + "fullName": "google.cloud.asset_v1.AssetServiceClient.list_saved_queries", "method": { - "fullName": "google.cloud.asset.v1.AssetService.ListFeeds", + "fullName": "google.cloud.asset.v1.AssetService.ListSavedQueries", "service": { "fullName": "google.cloud.asset.v1.AssetService", "shortName": "AssetService" }, - "shortName": "ListFeeds" + "shortName": "ListSavedQueries" }, "parameters": [ { "name": "request", - "type": "google.cloud.asset_v1.types.ListFeedsRequest" + "type": "google.cloud.asset_v1.types.ListSavedQueriesRequest" }, { "name": "parent", @@ -1532,22 +2339,22 @@ "type": "Sequence[Tuple[str, str]" } ], - "resultType": "google.cloud.asset_v1.types.ListFeedsResponse", - "shortName": "list_feeds" + "resultType": "google.cloud.asset_v1.services.asset_service.pagers.ListSavedQueriesPager", + "shortName": "list_saved_queries" }, - "description": "Sample for ListFeeds", - "file": "cloudasset_v1_generated_asset_service_list_feeds_sync.py", + "description": "Sample for ListSavedQueries", + "file": "cloudasset_v1_generated_asset_service_list_saved_queries_sync.py", "language": "PYTHON", "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_sync", + "regionTag": "cloudasset_v1_generated_AssetService_ListSavedQueries_sync", "segments": [ { - "end": 44, + "end": 45, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 45, "start": 27, "type": "SHORT" }, @@ -1567,12 +2374,12 @@ "type": "REQUEST_EXECUTION" }, { - "end": 45, + "end": 46, "start": 42, "type": "RESPONSE_HANDLING" } ], - "title": "cloudasset_v1_generated_asset_service_list_feeds_sync.py" + "title": "cloudasset_v1_generated_asset_service_list_saved_queries_sync.py" }, { "canonical": true, @@ -2080,6 +2887,175 @@ } ], "title": "cloudasset_v1_generated_asset_service_update_feed_sync.py" + }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.update_saved_query", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.UpdateSavedQuery", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "UpdateSavedQuery" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.UpdateSavedQueryRequest" + }, + { + "name": "saved_query", + "type": "google.cloud.asset_v1.types.SavedQuery" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.SavedQuery", + "shortName": "update_saved_query" + }, + "description": "Sample for UpdateSavedQuery", + "file": "cloudasset_v1_generated_asset_service_update_saved_query_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_UpdateSavedQuery_async", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_update_saved_query_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.update_saved_query", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.UpdateSavedQuery", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "UpdateSavedQuery" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.UpdateSavedQueryRequest" + }, + { + "name": "saved_query", + "type": "google.cloud.asset_v1.types.SavedQuery" + }, + { + "name": "update_mask", + "type": "google.protobuf.field_mask_pb2.FieldMask" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.SavedQuery", + "shortName": "update_saved_query" + }, + "description": "Sample for UpdateSavedQuery", + "file": "cloudasset_v1_generated_asset_service_update_saved_query_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync", + "segments": [ + { + "end": 43, + "start": 27, + "type": "FULL" + }, + { + "end": 43, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 37, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 40, + "start": 38, + "type": "REQUEST_EXECUTION" + }, + { + "end": 44, + "start": 41, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_update_saved_query_sync.py" } ] } From 5d2cbd582e6f3d90bd897368de0b7abd9368b4ea Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 May 2022 17:51:18 +0200 Subject: [PATCH 203/235] chore(deps): update all dependencies (#429) --- asset/snippets/snippets/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 317e277e0d2f..3d6a3acdefb4 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.3.0 -google-cloud-asset==3.8.1 -google-cloud-resource-manager==1.4.1 +google-cloud-asset==3.9.0 +google-cloud-resource-manager==1.5.0 google-cloud-pubsub==2.12.1 google-cloud-bigquery==3.1.0 From 20df5db6702fcdcd920a3cb055636879561d623e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 16 Jul 2022 11:07:21 -0400 Subject: [PATCH 204/235] fix: require python 3.7+ (#450) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(python): drop python 3.6 Source-Link: https://github.com/googleapis/synthtool/commit/4f89b13af10d086458f9b379e56a614f9d6dab7b Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c * add api_description to .repo-metadata.json * require python 3.7+ in setup.py * remove python 3.6 sample configs * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 38bb0a572b81..5fcb9d7461f2 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -89,7 +89,7 @@ def get_pytest_env_vars() -> Dict[str, str]: # DO NOT EDIT - automatically generated. # All versions used to test samples. -ALL_VERSIONS = ["3.6", "3.7", "3.8", "3.9", "3.10"] +ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10"] # Any default versions that should be ignored. IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] From 6a847da3efc1ebbc64943231fd7fbdc24683824a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 Jul 2022 15:07:44 +0200 Subject: [PATCH 205/235] chore(deps): update all dependencies (#438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements-test.txt | 2 +- asset/snippets/snippets/requirements.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index c78317e3fa35..d8b655eb13e4 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ -backoff==2.0.1 +backoff==2.1.2 flaky==3.7.0 pytest==7.1.2 diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 3d6a3acdefb4..b6dd10e52535 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.3.0 -google-cloud-asset==3.9.0 -google-cloud-resource-manager==1.5.0 -google-cloud-pubsub==2.12.1 +google-cloud-asset==3.9.1 +google-cloud-resource-manager==1.5.1 +google-cloud-pubsub==2.13.0 google-cloud-bigquery==3.1.0 From c2cb05e71360539c34b8f0fdd39a46a77ff5f6e7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Aug 2022 16:06:13 +0200 Subject: [PATCH 206/235] chore(deps): update all dependencies (#458) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index b6dd10e52535..d685549d48ed 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ -google-cloud-storage==2.3.0 -google-cloud-asset==3.9.1 -google-cloud-resource-manager==1.5.1 -google-cloud-pubsub==2.13.0 -google-cloud-bigquery==3.1.0 +google-cloud-storage==2.4.0 +google-cloud-asset==3.10.0 +google-cloud-resource-manager==1.6.0 +google-cloud-pubsub==2.13.4 +google-cloud-bigquery==3.3.0 From 5c55cf65a7de4ec62d7e012448713ec7f8bc751f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 5 Aug 2022 21:50:11 +0200 Subject: [PATCH 207/235] chore(deps): update all dependencies (#461) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d685549d48ed..d8d6de33c344 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,4 +1,4 @@ -google-cloud-storage==2.4.0 +google-cloud-storage==2.5.0 google-cloud-asset==3.10.0 google-cloud-resource-manager==1.6.0 google-cloud-pubsub==2.13.4 From b7730cae441cbb03a26c79b6a8c3621b3e4713e8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 9 Aug 2022 12:52:08 +0200 Subject: [PATCH 208/235] chore(deps): update all dependencies (#464) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d8d6de33c344..2259ac3f7fbc 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -2,4 +2,4 @@ google-cloud-storage==2.5.0 google-cloud-asset==3.10.0 google-cloud-resource-manager==1.6.0 google-cloud-pubsub==2.13.4 -google-cloud-bigquery==3.3.0 +google-cloud-bigquery==3.3.1 From dbdd6f36b275ec86dbcd18bbb45e378380975c36 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 9 Aug 2022 13:06:17 +0200 Subject: [PATCH 209/235] chore(deps): update all dependencies (#465) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 2259ac3f7fbc..1a9b1960ae62 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.5.0 -google-cloud-asset==3.10.0 +google-cloud-asset==3.11.0 google-cloud-resource-manager==1.6.0 google-cloud-pubsub==2.13.4 google-cloud-bigquery==3.3.1 From 80af279ea9e295cad29d2463bc64ef0a538a82e8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 12 Aug 2022 01:13:17 +0200 Subject: [PATCH 210/235] chore(deps): update dependency google-cloud-pubsub to v2.13.5 (#468) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 1a9b1960ae62..ef9951a5250b 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.5.0 google-cloud-asset==3.11.0 google-cloud-resource-manager==1.6.0 -google-cloud-pubsub==2.13.4 +google-cloud-pubsub==2.13.5 google-cloud-bigquery==3.3.1 From 4a39c56884d90ff08532987811714a6855390ac3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 12 Aug 2022 13:11:18 +0200 Subject: [PATCH 211/235] chore(deps): update dependency google-cloud-pubsub to v2.13.6 (#471) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index ef9951a5250b..83551070b2cc 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.5.0 google-cloud-asset==3.11.0 google-cloud-resource-manager==1.6.0 -google-cloud-pubsub==2.13.5 +google-cloud-pubsub==2.13.6 google-cloud-bigquery==3.3.1 From 1322c02d6d4b018748ea3f3c5ceb31215647358d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 12 Aug 2022 07:36:41 -0400 Subject: [PATCH 212/235] feat: Release of query system (#467) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Release of query system Committer: lvv@ PiperOrigin-RevId: 466748663 Source-Link: https://github.com/googleapis/googleapis/commit/80d630f734c00f627511254d696149d9e0d7b635 Source-Link: https://github.com/googleapis/googleapis-gen/commit/252f5ade18a31a72f12810bbfd1d83d56a8e72e1 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjUyZjVhZGUxOGEzMWE3MmYxMjgxMGJiZmQxZDgzZDU2YThlNzJlMSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * set coverage level to 99% * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- ...erated_asset_service_query_assets_async.py | 46 ++++++ ...nerated_asset_service_query_assets_sync.py | 46 ++++++ .../snippet_metadata_asset_v1.json | 153 ++++++++++++++++++ 3 files changed, 245 insertions(+) create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_async.py create mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_sync.py diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_async.py new file mode 100644 index 000000000000..3806695b8ea5 --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_async.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for QueryAssets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_QueryAssets_async] +from google.cloud import asset_v1 + + +async def sample_query_assets(): + # Create a client + client = asset_v1.AssetServiceAsyncClient() + + # Initialize request argument(s) + request = asset_v1.QueryAssetsRequest( + statement="statement_value", + parent="parent_value", + ) + + # Make the request + response = await client.query_assets(request=request) + + # Handle the response + print(response) + +# [END cloudasset_v1_generated_AssetService_QueryAssets_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_sync.py new file mode 100644 index 000000000000..73e5dee729ad --- /dev/null +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_sync.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2022 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. +# +# Generated code. DO NOT EDIT! +# +# Snippet for QueryAssets +# NOTE: This snippet has been automatically generated for illustrative purposes only. +# It may require modifications to work in your environment. + +# To install the latest published package dependency, execute the following: +# python3 -m pip install google-cloud-asset + + +# [START cloudasset_v1_generated_AssetService_QueryAssets_sync] +from google.cloud import asset_v1 + + +def sample_query_assets(): + # Create a client + client = asset_v1.AssetServiceClient() + + # Initialize request argument(s) + request = asset_v1.QueryAssetsRequest( + statement="statement_value", + parent="parent_value", + ) + + # Make the request + response = client.query_assets(request=request) + + # Handle the response + print(response) + +# [END cloudasset_v1_generated_AssetService_QueryAssets_sync] diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json index 239016ebc896..38bdf7215e2f 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json @@ -2381,6 +2381,159 @@ ], "title": "cloudasset_v1_generated_asset_service_list_saved_queries_sync.py" }, + { + "canonical": true, + "clientMethod": { + "async": true, + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", + "shortName": "AssetServiceAsyncClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.query_assets", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.QueryAssets", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "QueryAssets" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.QueryAssetsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.QueryAssetsResponse", + "shortName": "query_assets" + }, + "description": "Sample for QueryAssets", + "file": "cloudasset_v1_generated_asset_service_query_assets_async.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_QueryAssets_async", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_query_assets_async.py" + }, + { + "canonical": true, + "clientMethod": { + "client": { + "fullName": "google.cloud.asset_v1.AssetServiceClient", + "shortName": "AssetServiceClient" + }, + "fullName": "google.cloud.asset_v1.AssetServiceClient.query_assets", + "method": { + "fullName": "google.cloud.asset.v1.AssetService.QueryAssets", + "service": { + "fullName": "google.cloud.asset.v1.AssetService", + "shortName": "AssetService" + }, + "shortName": "QueryAssets" + }, + "parameters": [ + { + "name": "request", + "type": "google.cloud.asset_v1.types.QueryAssetsRequest" + }, + { + "name": "retry", + "type": "google.api_core.retry.Retry" + }, + { + "name": "timeout", + "type": "float" + }, + { + "name": "metadata", + "type": "Sequence[Tuple[str, str]" + } + ], + "resultType": "google.cloud.asset_v1.types.QueryAssetsResponse", + "shortName": "query_assets" + }, + "description": "Sample for QueryAssets", + "file": "cloudasset_v1_generated_asset_service_query_assets_sync.py", + "language": "PYTHON", + "origin": "API_DEFINITION", + "regionTag": "cloudasset_v1_generated_AssetService_QueryAssets_sync", + "segments": [ + { + "end": 45, + "start": 27, + "type": "FULL" + }, + { + "end": 45, + "start": 27, + "type": "SHORT" + }, + { + "end": 33, + "start": 31, + "type": "CLIENT_INITIALIZATION" + }, + { + "end": 39, + "start": 34, + "type": "REQUEST_INITIALIZATION" + }, + { + "end": 42, + "start": 40, + "type": "REQUEST_EXECUTION" + }, + { + "end": 46, + "start": 43, + "type": "RESPONSE_HANDLING" + } + ], + "title": "cloudasset_v1_generated_asset_service_query_assets_sync.py" + }, { "canonical": true, "clientMethod": { From 8d6d6a4b7a90390c4458844c269b52ec2065f98e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 16:42:42 +0200 Subject: [PATCH 213/235] chore(deps): update all dependencies (#473) --- asset/snippets/snippets/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 83551070b2cc..dc266b739986 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.5.0 -google-cloud-asset==3.11.0 -google-cloud-resource-manager==1.6.0 +google-cloud-asset==3.12.0 +google-cloud-resource-manager==1.6.1 google-cloud-pubsub==2.13.6 google-cloud-bigquery==3.3.1 From 094e6d99e656b79ba8bd44cf9bfd5a727b043fe9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 19 Aug 2022 18:37:29 +0200 Subject: [PATCH 214/235] chore(deps): update all dependencies (#476) --- asset/snippets/snippets/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index dc266b739986..38ffdd4f70f8 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.5.0 -google-cloud-asset==3.12.0 +google-cloud-asset==3.13.0 google-cloud-resource-manager==1.6.1 google-cloud-pubsub==2.13.6 -google-cloud-bigquery==3.3.1 +google-cloud-bigquery==3.3.2 From a08ab035e0566d3edf704ad9ae84d7bb7d4f5a45 Mon Sep 17 00:00:00 2001 From: haozhang-google <111458132+haozhang-google@users.noreply.github.com> Date: Sat, 27 Aug 2022 03:35:41 -0700 Subject: [PATCH 215/235] docs(samples): add batch_get_effective_iam_policies sample code (#480) --- .../quickstart_batchgeteffectiveiampolicy.py | 48 +++++++++++++++++++ ...ckstart_batchgeteffectiveiampolicy_test.py | 31 ++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy.py create mode 100644 asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy_test.py diff --git a/asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy.py b/asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy.py new file mode 100644 index 000000000000..3240c64add32 --- /dev/null +++ b/asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python + +# Copyright 2022 Google LLC. All Rights Reserved. +# +# 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. + + +import argparse + + +def batch_get_effective_iam_policies(resource_names, scope): + # [START asset_quickstart_batch_get_effective_iam_policies] + from google.cloud import asset_v1 + + # TODO scope = 'Scope for resource names' + # TODO resource_names = 'List of resource names' + + client = asset_v1.AssetServiceClient() + + response = client.batch_get_effective_iam_policies( + request={"scope": scope, "names": resource_names} + ) + print(response) + # [END asset_quickstart_batch_get_effective_iam_policies] + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("resource_names", help="Your specified accessible " + "scope, such as a project, " + "folder or organization") + parser.add_argument("scope", help="Your specified list of resource names") + + args = parser.parse_args() + + batch_get_effective_iam_policies(args.resource_names, args.scope) diff --git a/asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy_test.py b/asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy_test.py new file mode 100644 index 000000000000..7fdaaa73742c --- /dev/null +++ b/asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy_test.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +# Copyright 2022 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. + +import os + +import quickstart_batchgeteffectiveiampolicy + +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] + + +def test_batch_get_effective_iam_policies(capsys): + scope = "projects/{}".format(PROJECT) + resource_names = [ + "//cloudresourcemanager.googleapis.com/projects/{}".format(PROJECT)] + quickstart_batchgeteffectiveiampolicy.batch_get_effective_iam_policies( + resource_names, scope) + out, _ = capsys.readouterr() + assert resource_names[0] in out From d77a1683926e1be1c13c5d1ec5968b55cbe00db2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 6 Sep 2022 17:48:59 +0200 Subject: [PATCH 216/235] chore(deps): update dependency pytest to v7.1.3 (#490) --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index d8b655eb13e4..04a57c64bf0b 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ backoff==2.1.2 flaky==3.7.0 -pytest==7.1.2 +pytest==7.1.3 From aca76e0393b6a005b9208e70a24892a41d39718f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 7 Sep 2022 15:20:14 +0000 Subject: [PATCH 217/235] chore: Bump gapic-generator-python version to 1.3.0 (#491) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 472561635 Source-Link: https://github.com/googleapis/googleapis/commit/332ecf599f8e747d8d1213b77ae7db26eff12814 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4313d682880fd9d7247291164d4e9d3d5bd9f177 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDMxM2Q2ODI4ODBmZDlkNzI0NzI5MTE2NGQ0ZTlkM2Q1YmQ5ZjE3NyJ9 --- ..._asset_service_analyze_iam_policy_async.py | 7 + ...ce_analyze_iam_policy_longrunning_async.py | 7 + ...ice_analyze_iam_policy_longrunning_sync.py | 7 + ...d_asset_service_analyze_iam_policy_sync.py | 7 + ...erated_asset_service_analyze_move_async.py | 7 + ...nerated_asset_service_analyze_move_sync.py | 7 + ..._service_batch_get_assets_history_async.py | 7 + ...t_service_batch_get_assets_history_sync.py | 7 + ..._batch_get_effective_iam_policies_async.py | 9 +- ...e_batch_get_effective_iam_policies_sync.py | 9 +- ...nerated_asset_service_create_feed_async.py | 7 + ...enerated_asset_service_create_feed_sync.py | 7 + ..._asset_service_create_saved_query_async.py | 7 + ...d_asset_service_create_saved_query_sync.py | 7 + ...nerated_asset_service_delete_feed_async.py | 7 + ...enerated_asset_service_delete_feed_sync.py | 7 + ..._asset_service_delete_saved_query_async.py | 7 + ...d_asset_service_delete_saved_query_sync.py | 7 + ...rated_asset_service_export_assets_async.py | 7 + ...erated_asset_service_export_assets_sync.py | 7 + ..._generated_asset_service_get_feed_async.py | 7 + ...1_generated_asset_service_get_feed_sync.py | 7 + ...ted_asset_service_get_saved_query_async.py | 7 + ...ated_asset_service_get_saved_query_sync.py | 7 + ...nerated_asset_service_list_assets_async.py | 7 + ...enerated_asset_service_list_assets_sync.py | 7 + ...enerated_asset_service_list_feeds_async.py | 7 + ...generated_asset_service_list_feeds_sync.py | 7 + ..._asset_service_list_saved_queries_async.py | 7 + ...d_asset_service_list_saved_queries_sync.py | 7 + ...erated_asset_service_query_assets_async.py | 7 + ...nerated_asset_service_query_assets_sync.py | 7 + ...t_service_search_all_iam_policies_async.py | 7 + ...et_service_search_all_iam_policies_sync.py | 7 + ...sset_service_search_all_resources_async.py | 7 + ...asset_service_search_all_resources_sync.py | 7 + ...nerated_asset_service_update_feed_async.py | 7 + ...enerated_asset_service_update_feed_sync.py | 7 + ..._asset_service_update_saved_query_async.py | 7 + ...d_asset_service_update_saved_query_sync.py | 7 + ...t_service_search_all_iam_policies_async.py | 7 + ...et_service_search_all_iam_policies_sync.py | 7 + ...sset_service_search_all_resources_async.py | 7 + ...asset_service_search_all_resources_sync.py | 7 + ...nerated_asset_service_create_feed_async.py | 7 + ...enerated_asset_service_create_feed_sync.py | 7 + ...nerated_asset_service_delete_feed_async.py | 7 + ...enerated_asset_service_delete_feed_sync.py | 7 + ..._generated_asset_service_get_feed_async.py | 7 + ...1_generated_asset_service_get_feed_sync.py | 7 + ...enerated_asset_service_list_feeds_async.py | 7 + ...generated_asset_service_list_feeds_sync.py | 7 + ...nerated_asset_service_update_feed_async.py | 7 + ...enerated_asset_service_update_feed_sync.py | 7 + ...nerated_asset_service_list_assets_async.py | 7 + ...enerated_asset_service_list_assets_sync.py | 7 + .../snippet_metadata_asset_v1.json | 784 +++++++++--------- .../snippet_metadata_asset_v1p1beta1.json | 80 +- .../snippet_metadata_asset_v1p2beta1.json | 192 ++--- .../snippet_metadata_asset_v1p5beta1.json | 40 +- 60 files changed, 942 insertions(+), 550 deletions(-) diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py index 46380a92b6e2..f9caabe8e6e1 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py index db412762851d..e1305583a82d 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py index c3aa140669f8..dd4fb419dad4 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py index 9a0a2e54c8b6..3d592e390b7c 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py index 683e076e4859..a8a8ec862353 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_AnalyzeMove_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py index 41e5bd209114..527907dc4e04 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_AnalyzeMove_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py index 36489d63b00e..a54a5e1daafc 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py index 680f02c0f5c7..5df919fe4d72 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py index 1b668f585758..13d9c1330c1f 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 @@ -34,7 +41,7 @@ async def sample_batch_get_effective_iam_policies(): # Initialize request argument(s) request = asset_v1.BatchGetEffectiveIamPoliciesRequest( scope="scope_value", - names=['names_value_1', 'names_value_2'], + names=['names_value1', 'names_value2'], ) # Make the request diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py index 82bfbd0d745c..5f003121dae5 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 @@ -34,7 +41,7 @@ def sample_batch_get_effective_iam_policies(): # Initialize request argument(s) request = asset_v1.BatchGetEffectiveIamPoliciesRequest( scope="scope_value", - names=['names_value_1', 'names_value_2'], + names=['names_value1', 'names_value2'], ) # Make the request diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py index 7a0a5bf4bd01..668903c5ee28 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_CreateFeed_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py index 612e6e13af6f..ce7b974b87fd 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_CreateFeed_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_async.py index d5edb69cd17a..4d5b5286946d 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_CreateSavedQuery_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_sync.py index 1601b6ed8d75..5dd1e4d42d80 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_CreateSavedQuery_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py index 86660f4f2050..0dcea55aade1 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_DeleteFeed_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py index ec710e646bb9..735baf2c1d80 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_DeleteFeed_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_async.py index e0013fe806e2..78856627b06f 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_DeleteSavedQuery_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_sync.py index 9d6edc66944e..f2cbe896265d 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py index aea177ab7ff9..f9ca7f174252 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_ExportAssets_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py index c536997de12c..60816961b550 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_ExportAssets_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py index d9adab2adc00..b5b9a6e1a391 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_GetFeed_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py index 81b3b9adcab1..41d119391094 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_GetFeed_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_async.py index 7c606c81cd79..d6605762670b 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_GetSavedQuery_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_sync.py index ed758e8bc01e..d4a5568297bd 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_GetSavedQuery_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py index 2e48093c8077..65ef19c875f5 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_ListAssets_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py index ed8981813fb8..f2e41b183ba1 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_ListAssets_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py index ec138b7375b1..88f0613f33b1 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_ListFeeds_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py index 2822c78bd066..3ee6b48bdb12 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_ListFeeds_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_async.py index 7bf406c8f052..e3f3b95cc0fb 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_ListSavedQueries_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_sync.py index cb0be1471248..262f82c0a3d4 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_ListSavedQueries_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_async.py index 3806695b8ea5..79714d1b2060 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_QueryAssets_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_sync.py index 73e5dee729ad..593228338727 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_QueryAssets_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py index 282ea53bcbea..367eae93c841 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_SearchAllIamPolicies_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py index 542da876b8d3..ca656c399840 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py index c43226442b15..1757ab26d5b5 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_SearchAllResources_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py index c2bf14027ae4..770ee7670ac6 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_SearchAllResources_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py index 1d8dc82b9a59..fe93ab55ce55 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_UpdateFeed_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py index e48a0b6684f1..320e04de983b 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_UpdateFeed_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_async.py index 874aa769bd68..7ad44fd08838 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_UpdateSavedQuery_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_sync.py index 0069cc66489d..c050a417f716 100644 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py index 2c21eaf26662..1f4595650c6d 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p1beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py index d055c5f050f2..946a0c14d8a1 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p1beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py index ccf3fd821458..6f839c0ad694 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p1beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py index 45a0edf56773..5584a89628eb 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p1beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py index d42eae09b40d..f3c3879c5d6b 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p2beta1_generated_AssetService_CreateFeed_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p2beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py index 85eed9c92129..933431eb2998 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p2beta1_generated_AssetService_CreateFeed_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p2beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py index 1aeaec6cfee0..f00385fdb3a2 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p2beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py index c50ffb1b88a3..74d7912769a3 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p2beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py index 3fcef1440b2c..e55b49dc5af1 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p2beta1_generated_AssetService_GetFeed_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p2beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py index 6daf97d7e4d2..b911870911b3 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p2beta1_generated_AssetService_GetFeed_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p2beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py index b3963d085c31..871b65657c32 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p2beta1_generated_AssetService_ListFeeds_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p2beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py index 50b3dad3e6bf..61620d231562 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p2beta1_generated_AssetService_ListFeeds_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p2beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py index 1f7490f4b2cb..f310678d08e0 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p2beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py index bcd82af3655f..f87e674b5a29 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p2beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py index 2757f9702c14..a9fcadafef91 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py +++ b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p5beta1_generated_AssetService_ListAssets_async] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p5beta1 diff --git a/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py index f983764a378c..413c369c4970 100644 --- a/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py +++ b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py @@ -24,6 +24,13 @@ # [START cloudasset_v1p5beta1_generated_AssetService_ListAssets_sync] +# This snippet 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 as shown in: +# https://googleapis.dev/python/google-api-core/latest/client_options.html from google.cloud import asset_v1p5beta1 diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json index 38bdf7215e2f..9454e4c415ae 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json @@ -55,33 +55,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async", "segments": [ { - "end": 55, + "end": 62, "start": 27, "type": "FULL" }, { - "end": 55, + "end": 62, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 45, - "start": 34, + "end": 52, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 52, - "start": 46, + "end": 59, + "start": 53, "type": "REQUEST_EXECUTION" }, { - "end": 56, - "start": 53, + "end": 63, + "start": 60, "type": "RESPONSE_HANDLING" } ], @@ -131,33 +131,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync", "segments": [ { - "end": 55, + "end": 62, "start": 27, "type": "FULL" }, { - "end": 55, + "end": 62, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 45, - "start": 34, + "end": 52, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 52, - "start": 46, + "end": 59, + "start": 53, "type": "REQUEST_EXECUTION" }, { - "end": 56, - "start": 53, + "end": 63, + "start": 60, "type": "RESPONSE_HANDLING" } ], @@ -208,33 +208,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async", "segments": [ { - "end": 47, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 54, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, - "start": 34, + "end": 48, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], @@ -284,33 +284,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync", "segments": [ { - "end": 47, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 54, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, - "start": 34, + "end": 48, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], @@ -361,33 +361,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeMove_async", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 39, - "start": 34, + "end": 46, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], @@ -437,33 +437,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeMove_sync", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 39, - "start": 34, + "end": 46, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], @@ -514,33 +514,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async", "segments": [ { - "end": 44, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 51, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -590,33 +590,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync", "segments": [ { - "end": 44, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 51, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -667,33 +667,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_async", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 39, - "start": 34, + "end": 46, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], @@ -743,33 +743,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 39, - "start": 34, + "end": 46, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], @@ -824,33 +824,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_async", "segments": [ { - "end": 49, + "end": 56, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 56, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, - "start": 34, + "end": 50, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 53, + "start": 51, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 57, + "start": 54, "type": "RESPONSE_HANDLING" } ], @@ -904,33 +904,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_sync", "segments": [ { - "end": 49, + "end": 56, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 56, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, - "start": 34, + "end": 50, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 53, + "start": 51, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 57, + "start": 54, "type": "RESPONSE_HANDLING" } ], @@ -993,33 +993,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_CreateSavedQuery_async", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 39, - "start": 34, + "end": 46, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], @@ -1081,33 +1081,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_CreateSavedQuery_sync", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 39, - "start": 34, + "end": 46, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], @@ -1161,31 +1161,31 @@ "regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_async", "segments": [ { - "end": 42, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 49, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 50, "type": "RESPONSE_HANDLING" } ], @@ -1238,31 +1238,31 @@ "regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_sync", "segments": [ { - "end": 42, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 49, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 50, "type": "RESPONSE_HANDLING" } ], @@ -1316,31 +1316,31 @@ "regionTag": "cloudasset_v1_generated_AssetService_DeleteSavedQuery_async", "segments": [ { - "end": 42, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 49, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 50, "type": "RESPONSE_HANDLING" } ], @@ -1393,31 +1393,31 @@ "regionTag": "cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync", "segments": [ { - "end": 42, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 49, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 50, "type": "RESPONSE_HANDLING" } ], @@ -1468,33 +1468,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_async", "segments": [ { - "end": 52, + "end": 59, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 59, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, - "start": 34, + "end": 49, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 43, + "end": 56, + "start": 50, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 60, + "start": 57, "type": "RESPONSE_HANDLING" } ], @@ -1544,33 +1544,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_sync", "segments": [ { - "end": 52, + "end": 59, "start": 27, "type": "FULL" }, { - "end": 52, + "end": 59, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 42, - "start": 34, + "end": 49, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 49, - "start": 43, + "end": 56, + "start": 50, "type": "REQUEST_EXECUTION" }, { - "end": 53, - "start": 50, + "end": 60, + "start": 57, "type": "RESPONSE_HANDLING" } ], @@ -1625,33 +1625,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_GetFeed_async", "segments": [ { - "end": 44, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 51, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -1705,33 +1705,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_GetFeed_sync", "segments": [ { - "end": 44, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 51, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -1786,33 +1786,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_GetSavedQuery_async", "segments": [ { - "end": 44, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 51, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -1866,33 +1866,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_GetSavedQuery_sync", "segments": [ { - "end": 44, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 51, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -1947,33 +1947,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_ListAssets_async", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -2027,33 +2027,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_ListAssets_sync", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -2108,33 +2108,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_async", "segments": [ { - "end": 44, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 51, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -2188,33 +2188,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_sync", "segments": [ { - "end": 44, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 51, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -2269,33 +2269,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_ListSavedQueries_async", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -2349,33 +2349,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_ListSavedQueries_sync", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -2426,33 +2426,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_QueryAssets_async", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 39, - "start": 34, + "end": 46, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], @@ -2502,33 +2502,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_QueryAssets_sync", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 39, - "start": 34, + "end": 46, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 42, - "start": 40, + "end": 49, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 43, + "end": 53, + "start": 50, "type": "RESPONSE_HANDLING" } ], @@ -2587,33 +2587,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_SearchAllIamPolicies_async", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -2671,33 +2671,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -2760,33 +2760,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_SearchAllResources_async", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -2848,33 +2848,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_SearchAllResources_sync", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -2929,33 +2929,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_UpdateFeed_async", "segments": [ { - "end": 47, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 54, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, - "start": 34, + "end": 48, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], @@ -3009,33 +3009,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_UpdateFeed_sync", "segments": [ { - "end": 47, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 54, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, - "start": 34, + "end": 48, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], @@ -3094,33 +3094,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_UpdateSavedQuery_async", "segments": [ { - "end": 43, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 50, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 37, - "start": 34, + "end": 44, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 40, - "start": 38, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 44, - "start": 41, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ], @@ -3178,33 +3178,33 @@ "regionTag": "cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync", "segments": [ { - "end": 43, + "end": 50, "start": 27, "type": "FULL" }, { - "end": 43, + "end": 50, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 37, - "start": 34, + "end": 44, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 40, - "start": 38, + "end": 47, + "start": 45, "type": "REQUEST_EXECUTION" }, { - "end": 44, - "start": 41, + "end": 51, + "start": 48, "type": "RESPONSE_HANDLING" } ], diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json index e621a91dd63b..1b348e35102f 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json @@ -63,33 +63,33 @@ "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_async", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -147,33 +147,33 @@ "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_sync", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -236,33 +236,33 @@ "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_async", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -324,33 +324,33 @@ "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_sync", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json index f03b7f270f13..b0bc6aae24a6 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json @@ -59,33 +59,33 @@ "regionTag": "cloudasset_v1p2beta1_generated_AssetService_CreateFeed_async", "segments": [ { - "end": 49, + "end": 56, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 56, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, - "start": 34, + "end": 50, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 53, + "start": 51, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 57, + "start": 54, "type": "RESPONSE_HANDLING" } ], @@ -139,33 +139,33 @@ "regionTag": "cloudasset_v1p2beta1_generated_AssetService_CreateFeed_sync", "segments": [ { - "end": 49, + "end": 56, "start": 27, "type": "FULL" }, { - "end": 49, + "end": 56, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 43, - "start": 34, + "end": 50, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 46, - "start": 44, + "end": 53, + "start": 51, "type": "REQUEST_EXECUTION" }, { - "end": 50, - "start": 47, + "end": 57, + "start": 54, "type": "RESPONSE_HANDLING" } ], @@ -219,31 +219,31 @@ "regionTag": "cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_async", "segments": [ { - "end": 42, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 49, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 50, "type": "RESPONSE_HANDLING" } ], @@ -296,31 +296,31 @@ "regionTag": "cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_sync", "segments": [ { - "end": 42, + "end": 49, "start": 27, "type": "FULL" }, { - "end": 42, + "end": 49, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "start": 39, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 43, + "end": 50, "type": "RESPONSE_HANDLING" } ], @@ -375,33 +375,33 @@ "regionTag": "cloudasset_v1p2beta1_generated_AssetService_GetFeed_async", "segments": [ { - "end": 44, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 51, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -455,33 +455,33 @@ "regionTag": "cloudasset_v1p2beta1_generated_AssetService_GetFeed_sync", "segments": [ { - "end": 44, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 51, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -536,33 +536,33 @@ "regionTag": "cloudasset_v1p2beta1_generated_AssetService_ListFeeds_async", "segments": [ { - "end": 44, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 51, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -616,33 +616,33 @@ "regionTag": "cloudasset_v1p2beta1_generated_AssetService_ListFeeds_sync", "segments": [ { - "end": 44, + "end": 51, "start": 27, "type": "FULL" }, { - "end": 44, + "end": 51, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 45, - "start": 42, + "end": 52, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -697,33 +697,33 @@ "regionTag": "cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_async", "segments": [ { - "end": 47, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 54, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, - "start": 34, + "end": 48, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], @@ -777,33 +777,33 @@ "regionTag": "cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_sync", "segments": [ { - "end": 47, + "end": 54, "start": 27, "type": "FULL" }, { - "end": 47, + "end": 54, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 41, - "start": 34, + "end": 48, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 44, - "start": 42, + "end": 51, + "start": 49, "type": "REQUEST_EXECUTION" }, { - "end": 48, - "start": 45, + "end": 55, + "start": 52, "type": "RESPONSE_HANDLING" } ], diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json index b9a50c2c0698..79f71d8d7491 100644 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json +++ b/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json @@ -55,33 +55,33 @@ "regionTag": "cloudasset_v1p5beta1_generated_AssetService_ListAssets_async", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], @@ -131,33 +131,33 @@ "regionTag": "cloudasset_v1p5beta1_generated_AssetService_ListAssets_sync", "segments": [ { - "end": 45, + "end": 52, "start": 27, "type": "FULL" }, { - "end": 45, + "end": 52, "start": 27, "type": "SHORT" }, { - "end": 33, - "start": 31, + "end": 40, + "start": 38, "type": "CLIENT_INITIALIZATION" }, { - "end": 38, - "start": 34, + "end": 45, + "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 41, - "start": 39, + "end": 48, + "start": 46, "type": "REQUEST_EXECUTION" }, { - "end": 46, - "start": 42, + "end": 53, + "start": 49, "type": "RESPONSE_HANDLING" } ], From 298e3746af43e8bf9f966cc9add0863c213a03b8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 16:14:37 +0000 Subject: [PATCH 218/235] chore: detect samples tests in nested directories (#494) Source-Link: https://github.com/googleapis/synthtool/commit/50db768f450a50d7c1fd62513c113c9bb96fd434 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:e09366bdf0fd9c8976592988390b24d53583dd9f002d476934da43725adbb978 --- asset/snippets/snippets/noxfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 5fcb9d7461f2..0398d72ff690 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -207,8 +207,8 @@ def _session_tests( session: nox.sessions.Session, post_install: Callable = None ) -> None: # check for presence of tests - test_list = glob.glob("*_test.py") + glob.glob("test_*.py") - test_list.extend(glob.glob("tests")) + test_list = glob.glob("**/*_test.py", recursive=True) + glob.glob("**/test_*.py", recursive=True) + test_list.extend(glob.glob("**/tests", recursive=True)) if len(test_list) == 0: print("No tests found, skipping directory.") From d08469e16fbd01fdaaa6636e9c214125b85a0154 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 15 Sep 2022 15:25:21 +0200 Subject: [PATCH 219/235] chore(deps): update dependency google-cloud-asset to v3.13.1 (#495) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 38ffdd4f70f8..87673a1ca1fb 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.5.0 -google-cloud-asset==3.13.0 +google-cloud-asset==3.13.1 google-cloud-resource-manager==1.6.1 google-cloud-pubsub==2.13.6 google-cloud-bigquery==3.3.2 From 5f49971468f1d77c81665477ae47d86950d74a44 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 21 Sep 2022 16:49:28 +0200 Subject: [PATCH 220/235] chore(deps): update dependency google-cloud-asset to v3.14.0 (#498) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 87673a1ca1fb..3d57aa28eb6b 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.5.0 -google-cloud-asset==3.13.1 +google-cloud-asset==3.14.0 google-cloud-resource-manager==1.6.1 google-cloud-pubsub==2.13.6 google-cloud-bigquery==3.3.2 From 31978ff171882bccd8e7c7676a5ef5347a93c481 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 4 Oct 2022 02:59:32 +0200 Subject: [PATCH 221/235] chore(deps): update dependency google-cloud-pubsub to v2.13.7 (#500) Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 3d57aa28eb6b..02330bffdb01 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.5.0 google-cloud-asset==3.14.0 google-cloud-resource-manager==1.6.1 -google-cloud-pubsub==2.13.6 +google-cloud-pubsub==2.13.7 google-cloud-bigquery==3.3.2 From a206216540d97a63dcd41e5843fd22fe21779aa3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 4 Oct 2022 03:17:40 +0200 Subject: [PATCH 222/235] chore(deps): update all dependencies (#504) --- asset/snippets/snippets/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 02330bffdb01..36db083250fd 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.5.0 -google-cloud-asset==3.14.0 -google-cloud-resource-manager==1.6.1 +google-cloud-asset==3.14.1 +google-cloud-resource-manager==1.6.2 google-cloud-pubsub==2.13.7 -google-cloud-bigquery==3.3.2 +google-cloud-bigquery==3.3.3 From 24449b06f94e37f8cb74901c17f2ac7c4870df4e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 6 Oct 2022 15:39:30 +0200 Subject: [PATCH 223/235] chore(deps): update dependency backoff to v2.2.1 (#505) --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index 04a57c64bf0b..c4b79c0304a1 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ -backoff==2.1.2 +backoff==2.2.1 flaky==3.7.0 pytest==7.1.3 From 61ff20ef90f5160bab02d37ddc84efc288e9c669 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 Oct 2022 19:57:50 +0200 Subject: [PATCH 224/235] chore(deps): update dependency google-cloud-resource-manager to v1.6.3 (#512) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 36db083250fd..1bd8a86772ad 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.5.0 google-cloud-asset==3.14.1 -google-cloud-resource-manager==1.6.2 +google-cloud-resource-manager==1.6.3 google-cloud-pubsub==2.13.7 google-cloud-bigquery==3.3.3 From 035b9217213635a103b9aaca7f0b7f304311e546 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 11 Oct 2022 18:28:16 +0200 Subject: [PATCH 225/235] chore(deps): update all dependencies (#513) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-asset](https://togithub.com/googleapis/python-asset) | `==3.14.1` -> `==3.14.2` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.14.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.14.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.14.2/compatibility-slim/3.14.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-asset/3.14.2/confidence-slim/3.14.1)](https://docs.renovatebot.com/merge-confidence/) | | [google-cloud-bigquery](https://togithub.com/googleapis/python-bigquery) | `==3.3.3` -> `==3.3.5` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/3.3.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/3.3.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/3.3.5/compatibility-slim/3.3.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-bigquery/3.3.5/confidence-slim/3.3.3)](https://docs.renovatebot.com/merge-confidence/) | | [google-cloud-pubsub](https://togithub.com/googleapis/python-pubsub) | `==2.13.7` -> `==2.13.9` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-pubsub/2.13.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-pubsub/2.13.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-pubsub/2.13.9/compatibility-slim/2.13.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-pubsub/2.13.9/confidence-slim/2.13.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/python-asset ### [`v3.14.2`](https://togithub.com/googleapis/python-asset/releases/tag/v3.14.2) [Compare Source](https://togithub.com/googleapis/python-asset/compare/v3.14.1...v3.14.2) ## :robot: I have created a release *beep* *boop* #### [3.14.2](https://togithub.com/googleapis/python-asset/compare/v3.14.1...v3.14.2) (2022-10-10) ##### Bug Fixes - **deps:** Allow protobuf 3.19.5 ([#​508](https://togithub.com/googleapis/python-asset/issues/508)) ([818abbb](https://togithub.com/googleapis/python-asset/commit/818abbbcbb829a726d18ba1e7e7e03f997d4256a))
googleapis/python-bigquery ### [`v3.3.5`](https://togithub.com/googleapis/python-bigquery/releases/tag/v3.3.5) [Compare Source](https://togithub.com/googleapis/python-bigquery/compare/v3.3.3...v3.3.5) ##### Bug Fixes - **deps:** Allow protobuf 3.19.5 ([#​1379](https://togithub.com/googleapis/python-bigquery/issues/1379)) ([3e4a074](https://togithub.com/googleapis/python-bigquery/commit/3e4a074a981eb2920c5f9a711c253565d4844858))
googleapis/python-pubsub ### [`v2.13.9`](https://togithub.com/googleapis/python-pubsub/releases/tag/v2.13.9) [Compare Source](https://togithub.com/googleapis/python-pubsub/compare/v2.13.7...v2.13.9) ##### Bug Fixes - **deps:** Allow protobuf 3.19.5 ([#​801](https://togithub.com/googleapis/python-pubsub/issues/801)) ([fa23503](https://togithub.com/googleapis/python-pubsub/commit/fa235033481783c2ec378b2a26b223bdff206461))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/python-asset). --- asset/snippets/snippets/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index 1bd8a86772ad..d7ddd51375ae 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.5.0 -google-cloud-asset==3.14.1 +google-cloud-asset==3.14.2 google-cloud-resource-manager==1.6.3 -google-cloud-pubsub==2.13.7 -google-cloud-bigquery==3.3.3 +google-cloud-pubsub==2.13.9 +google-cloud-bigquery==3.3.5 From 282d7be0d196fc8d39376d6c5ecbeee42a7c3d98 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 18 Oct 2022 15:12:05 +0200 Subject: [PATCH 226/235] chore(deps): update dependency google-cloud-pubsub to v2.13.10 (#514) --- asset/snippets/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d7ddd51375ae..d70d62b2d77e 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ google-cloud-storage==2.5.0 google-cloud-asset==3.14.2 google-cloud-resource-manager==1.6.3 -google-cloud-pubsub==2.13.9 +google-cloud-pubsub==2.13.10 google-cloud-bigquery==3.3.5 From 97dede17c49acb60fbb48b7669e4819aef265e05 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 Oct 2022 12:46:40 +0200 Subject: [PATCH 227/235] chore(deps): update dependency pytest to v7.2.0 (#515) --- asset/snippets/snippets/requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/snippets/requirements-test.txt index c4b79c0304a1..6c0e08f306e8 100644 --- a/asset/snippets/snippets/requirements-test.txt +++ b/asset/snippets/snippets/requirements-test.txt @@ -1,3 +1,3 @@ backoff==2.2.1 flaky==3.7.0 -pytest==7.1.3 +pytest==7.2.0 From 8518cd7a167e5b6b42d5e5386ec16a6b260f0f06 Mon Sep 17 00:00:00 2001 From: jeffreyaiatgoogle <113950621+jeffreyaiatgoogle@users.noreply.github.com> Date: Fri, 18 Nov 2022 13:26:00 -0800 Subject: [PATCH 228/235] chore(samples): Adds code examples to create, get, list, update and delete a SavedQuery (#499) * Change the comment of BatchGetEffectiveIamPolicies to be more accurate. * feat: Adds code examples to create, get, list, update and delete a SavedQuery. * feat: Adds code examples to create, get, list, update and delete a SavedQuery. * Update samples/snippets/quickstart_create_saved_query.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_create_saved_query.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_create_saved_query.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_update_saved_query.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_list_saved_queries_test.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_update_saved_query.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_update_saved_query_test.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_get_saved_query.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_create_saved_query.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_create_saved_query_test.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_create_saved_query_test.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_delete_saved_query.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_delete_saved_query_test.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_get_saved_query.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_get_saved_query.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_get_saved_query_test.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_list_saved_queries.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_list_saved_queries.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * Update samples/snippets/quickstart_list_saved_queries_test.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> * feat: Adds code examples to create, get, list, update and delete a SavedQuery. * feat: Adds code examples to create, get, list, update and delete a SavedQuery. * Update samples/snippets/quickstart_create_saved_query.py Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com> --- asset/snippets/snippets/conftest.py | 35 +++++++++++ .../quickstart_batchgeteffectiveiampolicy.py | 2 +- .../snippets/quickstart_create_saved_query.py | 58 +++++++++++++++++++ .../quickstart_create_saved_query_test.py | 32 ++++++++++ .../snippets/quickstart_delete_saved_query.py | 39 +++++++++++++ .../quickstart_delete_saved_query_test.py | 30 ++++++++++ .../snippets/quickstart_get_saved_query.py | 39 +++++++++++++ .../quickstart_get_saved_query_test.py | 24 ++++++++ .../snippets/quickstart_list_saved_queries.py | 41 +++++++++++++ .../quickstart_list_saved_queries_test.py | 28 +++++++++ .../snippets/quickstart_update_saved_query.py | 49 ++++++++++++++++ .../quickstart_update_saved_query_test.py | 24 ++++++++ 12 files changed, 400 insertions(+), 1 deletion(-) create mode 100644 asset/snippets/snippets/quickstart_create_saved_query.py create mode 100644 asset/snippets/snippets/quickstart_create_saved_query_test.py create mode 100644 asset/snippets/snippets/quickstart_delete_saved_query.py create mode 100644 asset/snippets/snippets/quickstart_delete_saved_query_test.py create mode 100644 asset/snippets/snippets/quickstart_get_saved_query.py create mode 100644 asset/snippets/snippets/quickstart_get_saved_query_test.py create mode 100644 asset/snippets/snippets/quickstart_list_saved_queries.py create mode 100644 asset/snippets/snippets/quickstart_list_saved_queries_test.py create mode 100644 asset/snippets/snippets/quickstart_update_saved_query.py create mode 100644 asset/snippets/snippets/quickstart_update_saved_query_test.py diff --git a/asset/snippets/snippets/conftest.py b/asset/snippets/snippets/conftest.py index d5c895f9d177..7a7577d7d7b6 100644 --- a/asset/snippets/snippets/conftest.py +++ b/asset/snippets/snippets/conftest.py @@ -23,7 +23,9 @@ from google.cloud import pubsub_v1 import pytest +import quickstart_create_saved_query import quickstart_createfeed +import quickstart_delete_saved_query import quickstart_deletefeed @@ -88,3 +90,36 @@ def deleter(): quickstart_deletefeed.delete_feed(feed_name) except NotFound as e: print(f"Ignoring NotFound: {e}") + + +@pytest.fixture(scope="module") +def test_saved_query(): + saved_query_id = f"saved-query-{uuid.uuid4().hex}" + + @backoff.on_exception(backoff.expo, InternalServerError, max_time=60) + def create_saved_query(): + return quickstart_create_saved_query.create_saved_query( + PROJECT, saved_query_id, "description foo" + ) + + saved_query = create_saved_query() + + yield saved_query + + try: + quickstart_delete_saved_query.delete_saved_query(saved_query.name) + except NotFound as e: + print(f"Ignoring NotFound: {e}") + + +@pytest.fixture(scope="module") +def saved_query_deleter(): + saved_querys_to_delete = [] + + yield saved_querys_to_delete + + for saved_query_name in saved_querys_to_delete: + try: + quickstart_delete_saved_query.delete_saved_query(saved_query_name) + except NotFound as e: + print(f"Ignoring NotFound: {e}") diff --git a/asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy.py b/asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy.py index 3240c64add32..379f75a7ff72 100644 --- a/asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy.py +++ b/asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy.py @@ -22,7 +22,7 @@ def batch_get_effective_iam_policies(resource_names, scope): # [START asset_quickstart_batch_get_effective_iam_policies] from google.cloud import asset_v1 - # TODO scope = 'Scope for resource names' + # TODO scope = 'project ID/number, folder number or org number' # TODO resource_names = 'List of resource names' client = asset_v1.AssetServiceClient() diff --git a/asset/snippets/snippets/quickstart_create_saved_query.py b/asset/snippets/snippets/quickstart_create_saved_query.py new file mode 100644 index 000000000000..42ae2b3cbeeb --- /dev/null +++ b/asset/snippets/snippets/quickstart_create_saved_query.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python + +# Copyright 2022 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. + + +import argparse + + +def create_saved_query(project_id, saved_query_id, description): + # [START asset_quickstart_create_saved_query] + from google.cloud import asset_v1 + + # TODO project_id = 'Your Google Cloud Project ID' + # TODO saved_query_id = 'SavedQuery ID you want to create' + client = asset_v1.AssetServiceClient() + parent = f"projects/{project_id}" + saved_query = asset_v1.SavedQuery() + saved_query.description = description + + # TODO: customize your saved query based on the guide below. + # https://cloud.google.com/asset-inventory/docs/reference/rest/v1/savedQueries#IamPolicyAnalysisQuery + saved_query.content.iam_policy_analysis_query.scope = parent + query_access_selector = saved_query.content.iam_policy_analysis_query.access_selector + query_access_selector.permissions.append("iam.serviceAccounts.actAs") + + response = client.create_saved_query( + request={ + "parent": parent, + "saved_query_id": saved_query_id, + "saved_query": saved_query, + } + ) + print(f"saved_query: {response}") + # [END asset_quickstart_create_saved_query] + return response + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("project_id", help="Your Google Cloud project ID") + parser.add_argument("saved_query_id", help="SavedQuery ID you want to create") + parser.add_argument("description", help="The description of the saved_query") + args = parser.parse_args() + create_saved_query(args.project_id, args.saved_query_id, args.description) diff --git a/asset/snippets/snippets/quickstart_create_saved_query_test.py b/asset/snippets/snippets/quickstart_create_saved_query_test.py new file mode 100644 index 000000000000..0cc2d9250c3e --- /dev/null +++ b/asset/snippets/snippets/quickstart_create_saved_query_test.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python + +# Copyright 2022 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. + +import os +import uuid + +import quickstart_create_saved_query + + +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] +SAVED_QUERY_ID = f"saved-query-{uuid.uuid4().hex}" + + +def test_create_saved_query(capsys, saved_query_deleter): + saved_query = quickstart_create_saved_query.create_saved_query( + PROJECT, SAVED_QUERY_ID, "saved query foo") + saved_query_deleter.append(saved_query.name) + expected_resource_name_suffix = f"savedQueries/{SAVED_QUERY_ID}" + assert saved_query.name.endswith(expected_resource_name_suffix) diff --git a/asset/snippets/snippets/quickstart_delete_saved_query.py b/asset/snippets/snippets/quickstart_delete_saved_query.py new file mode 100644 index 000000000000..593156b4046c --- /dev/null +++ b/asset/snippets/snippets/quickstart_delete_saved_query.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python + +# Copyright 2022 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. + + +import argparse + + +def delete_saved_query(saved_query_name): + # [START asset_quickstart_delete_saved_query] + from google.cloud import asset_v1 + + # TODO saved_query_name = 'SavedQuery name you want to delete' + + client = asset_v1.AssetServiceClient() + client.delete_saved_query(request={"name": saved_query_name}) + print("deleted_saved_query") + # [END asset_quickstart_delete_saved_query] + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("saved_query_name", help="SavedQuery name you want to delete") + args = parser.parse_args() + delete_saved_query(args.saved_query_name) diff --git a/asset/snippets/snippets/quickstart_delete_saved_query_test.py b/asset/snippets/snippets/quickstart_delete_saved_query_test.py new file mode 100644 index 000000000000..1fe5e1a1a417 --- /dev/null +++ b/asset/snippets/snippets/quickstart_delete_saved_query_test.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python + +# Copyright 2022 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. + +import os + +import quickstart_delete_saved_query + + +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] + + +def test_delete_saved_query(capsys, test_saved_query): + + quickstart_delete_saved_query.delete_saved_query(test_saved_query.name) + + out, _ = capsys.readouterr() + assert "deleted_saved_query" in out diff --git a/asset/snippets/snippets/quickstart_get_saved_query.py b/asset/snippets/snippets/quickstart_get_saved_query.py new file mode 100644 index 000000000000..0acd8132967a --- /dev/null +++ b/asset/snippets/snippets/quickstart_get_saved_query.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python + +# Copyright 2022 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. + + +import argparse + + +def get_saved_query(saved_query_name): + # [START asset_quickstart_get_saved_query] + from google.cloud import asset_v1 + + # TODO saved_query_name = 'SavedQuery Name you want to get' + + client = asset_v1.AssetServiceClient() + response = client.get_saved_query(request={"name": saved_query_name}) + print(f"gotten_saved_query: {response}") + # [END asset_quickstart_get_saved_query] + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("saved_query_name", help="SavedQuery Name you want to get") + args = parser.parse_args() + get_saved_query(args.saved_query_name) diff --git a/asset/snippets/snippets/quickstart_get_saved_query_test.py b/asset/snippets/snippets/quickstart_get_saved_query_test.py new file mode 100644 index 000000000000..bb7b4147cdc7 --- /dev/null +++ b/asset/snippets/snippets/quickstart_get_saved_query_test.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +# Copyright 2022 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. + +import quickstart_get_saved_query + + +def test_get_saved_query(capsys, test_saved_query): + quickstart_get_saved_query.get_saved_query(test_saved_query.name) + out, _ = capsys.readouterr() + + assert "gotten_saved_query" in out diff --git a/asset/snippets/snippets/quickstart_list_saved_queries.py b/asset/snippets/snippets/quickstart_list_saved_queries.py new file mode 100644 index 000000000000..9f066e2db443 --- /dev/null +++ b/asset/snippets/snippets/quickstart_list_saved_queries.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python + +# Copyright 2022 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. + + +import argparse + + +def list_saved_queries(parent_resource): + # [START asset_quickstart_list_saved_queries] + from google.cloud import asset_v1 + + # TODO parent_resource = 'Parent resource you want to list all saved_queries' + + client = asset_v1.AssetServiceClient() + response = client.list_saved_queries(request={"parent": parent_resource}) + print(f"saved_queries: {response.saved_queries}") + # [END asset_quickstart_list_saved_queries] + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument( + "parent_resource", help="Parent resource you want to list all saved_queries" + ) + args = parser.parse_args() + list_saved_queries(args.parent_resource) diff --git a/asset/snippets/snippets/quickstart_list_saved_queries_test.py b/asset/snippets/snippets/quickstart_list_saved_queries_test.py new file mode 100644 index 000000000000..d09c2c0c1a66 --- /dev/null +++ b/asset/snippets/snippets/quickstart_list_saved_queries_test.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +# Copyright 2022 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. + +import os + +import quickstart_list_saved_queries + +PROJECT = os.environ["GOOGLE_CLOUD_PROJECT"] + + +def test_list_saved_queries(capsys): + parent_resource = f"projects/{PROJECT}" + quickstart_list_saved_queries.list_saved_queries(parent_resource) + out, _ = capsys.readouterr() + assert "saved_queries" in out diff --git a/asset/snippets/snippets/quickstart_update_saved_query.py b/asset/snippets/snippets/quickstart_update_saved_query.py new file mode 100644 index 000000000000..529813998519 --- /dev/null +++ b/asset/snippets/snippets/quickstart_update_saved_query.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python + +# Copyright 2022 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. + + +import argparse + + +def update_saved_query(saved_query_name, description): + # [START asset_quickstart_update_saved_query] + from google.cloud import asset_v1 + from google.protobuf import field_mask_pb2 + + # TODO saved_query_name = 'SavedQuery Name you want to update' + # TODO description = "New description' + + client = asset_v1.AssetServiceClient() + saved_query = asset_v1.SavedQuery() + saved_query.name = saved_query_name + saved_query.description = description + update_mask = field_mask_pb2.FieldMask() + # In this example, we only update description of the saved_query. + # You can update other content of the saved query. + update_mask.paths.append("description") + response = client.update_saved_query(request={"saved_query": saved_query, "update_mask": update_mask}) + print(f"updated_saved_query: {response}") + # [END asset_quickstart_update_saved_query] + + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter + ) + parser.add_argument("saved_query_name", help="SavedQuery Name you want to update") + parser.add_argument("description", help="The description you want to update with") + args = parser.parse_args() + update_saved_query(args.saved_query_name, args.description) diff --git a/asset/snippets/snippets/quickstart_update_saved_query_test.py b/asset/snippets/snippets/quickstart_update_saved_query_test.py new file mode 100644 index 000000000000..734b32198db2 --- /dev/null +++ b/asset/snippets/snippets/quickstart_update_saved_query_test.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +# Copyright 2022 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. + +import quickstart_update_saved_query + + +def test_update_saved_query(capsys, test_saved_query): + quickstart_update_saved_query.update_saved_query(test_saved_query.name, "bar") + out, _ = capsys.readouterr() + + assert "updated_saved_query" in out From afc2e82f531ef6781bd8f8916e8280c4ccc8e059 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Sun, 27 Nov 2022 01:07:33 +0100 Subject: [PATCH 229/235] chore(deps): update all dependencies (#517) Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/snippets/requirements.txt index d70d62b2d77e..48337dda253c 100644 --- a/asset/snippets/snippets/requirements.txt +++ b/asset/snippets/snippets/requirements.txt @@ -1,5 +1,5 @@ -google-cloud-storage==2.5.0 +google-cloud-storage==2.6.0 google-cloud-asset==3.14.2 google-cloud-resource-manager==1.6.3 -google-cloud-pubsub==2.13.10 -google-cloud-bigquery==3.3.5 +google-cloud-pubsub==2.13.11 +google-cloud-bigquery==3.4.0 From 4542d3e1bd75320422a3b3c45dc971a7a16f0c87 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sun, 27 Nov 2022 06:45:55 -0500 Subject: [PATCH 230/235] chore(python): drop flake8-import-order in samples noxfile (#521) Source-Link: https://github.com/googleapis/synthtool/commit/6ed3a831cb9ff69ef8a504c353e098ec0192ad93 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:3abfa0f1886adaf0b83f07cb117b24a639ea1cb9cffe56d43280b977033563eb Co-authored-by: Owl Bot Co-authored-by: Anthonios Partheniou --- asset/snippets/snippets/noxfile.py | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/snippets/noxfile.py index 0398d72ff690..f5c32b22789b 100644 --- a/asset/snippets/snippets/noxfile.py +++ b/asset/snippets/snippets/noxfile.py @@ -18,7 +18,7 @@ import os from pathlib import Path import sys -from typing import Callable, Dict, List, Optional +from typing import Callable, Dict, Optional import nox @@ -109,22 +109,6 @@ def get_pytest_env_vars() -> Dict[str, str]: # -def _determine_local_import_names(start_dir: str) -> List[str]: - """Determines all import names that should be considered "local". - - This is used when running the linter to insure that import order is - properly checked. - """ - file_ext_pairs = [os.path.splitext(path) for path in os.listdir(start_dir)] - return [ - basename - for basename, extension in file_ext_pairs - if extension == ".py" - or os.path.isdir(os.path.join(start_dir, basename)) - and basename not in ("__pycache__") - ] - - # Linting with flake8. # # We ignore the following rules: @@ -139,7 +123,6 @@ def _determine_local_import_names(start_dir: str) -> List[str]: "--show-source", "--builtin=gettext", "--max-complexity=20", - "--import-order-style=google", "--exclude=.nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py", "--ignore=E121,E123,E126,E203,E226,E24,E266,E501,E704,W503,W504,I202", "--max-line-length=88", @@ -149,14 +132,11 @@ def _determine_local_import_names(start_dir: str) -> List[str]: @nox.session def lint(session: nox.sessions.Session) -> None: if not TEST_CONFIG["enforce_type_hints"]: - session.install("flake8", "flake8-import-order") + session.install("flake8") else: - session.install("flake8", "flake8-import-order", "flake8-annotations") + session.install("flake8", "flake8-annotations") - local_names = _determine_local_import_names(".") args = FLAKE8_COMMON_ARGS + [ - "--application-import-names", - ",".join(local_names), ".", ] session.run("flake8", *args) From 61ed071e47a85ae8aacb9b06cd640f337c057764 Mon Sep 17 00:00:00 2001 From: Charlie Engelke Date: Mon, 28 Nov 2022 12:21:15 -0800 Subject: [PATCH 231/235] process: move migrated samples to correct places --- asset/README.rst | 3 - asset/snippets/AUTHORING_GUIDE.md | 1 - asset/snippets/CONTRIBUTING.md | 1 - asset/snippets/{snippets => }/conftest.py | 0 ..._asset_service_analyze_iam_policy_async.py | 55 - ...ce_analyze_iam_policy_longrunning_async.py | 63 - ...ice_analyze_iam_policy_longrunning_sync.py | 63 - ...d_asset_service_analyze_iam_policy_sync.py | 55 - ...erated_asset_service_analyze_move_async.py | 53 - ...nerated_asset_service_analyze_move_sync.py | 53 - ..._service_batch_get_assets_history_async.py | 52 - ...t_service_batch_get_assets_history_sync.py | 52 - ..._batch_get_effective_iam_policies_async.py | 53 - ...e_batch_get_effective_iam_policies_sync.py | 53 - ...nerated_asset_service_create_feed_async.py | 57 - ...enerated_asset_service_create_feed_sync.py | 57 - ..._asset_service_create_saved_query_async.py | 53 - ...d_asset_service_create_saved_query_sync.py | 53 - ...nerated_asset_service_delete_feed_async.py | 50 - ...enerated_asset_service_delete_feed_sync.py | 50 - ..._asset_service_delete_saved_query_async.py | 50 - ...d_asset_service_delete_saved_query_sync.py | 50 - ...rated_asset_service_export_assets_async.py | 60 - ...erated_asset_service_export_assets_sync.py | 60 - ..._generated_asset_service_get_feed_async.py | 52 - ...1_generated_asset_service_get_feed_sync.py | 52 - ...ted_asset_service_get_saved_query_async.py | 52 - ...ated_asset_service_get_saved_query_sync.py | 52 - ...nerated_asset_service_list_assets_async.py | 53 - ...enerated_asset_service_list_assets_sync.py | 53 - ...enerated_asset_service_list_feeds_async.py | 52 - ...generated_asset_service_list_feeds_sync.py | 52 - ..._asset_service_list_saved_queries_async.py | 53 - ...d_asset_service_list_saved_queries_sync.py | 53 - ...erated_asset_service_query_assets_async.py | 53 - ...nerated_asset_service_query_assets_sync.py | 53 - ...t_service_search_all_iam_policies_async.py | 53 - ...et_service_search_all_iam_policies_sync.py | 53 - ...sset_service_search_all_resources_async.py | 53 - ...asset_service_search_all_resources_sync.py | 53 - ...nerated_asset_service_update_feed_async.py | 55 - ...enerated_asset_service_update_feed_sync.py | 55 - ..._asset_service_update_saved_query_async.py | 51 - ...d_asset_service_update_saved_query_sync.py | 51 - ...t_service_search_all_iam_policies_async.py | 53 - ...et_service_search_all_iam_policies_sync.py | 53 - ...sset_service_search_all_resources_async.py | 53 - ...asset_service_search_all_resources_sync.py | 53 - ...nerated_asset_service_create_feed_async.py | 57 - ...enerated_asset_service_create_feed_sync.py | 57 - ...nerated_asset_service_delete_feed_async.py | 50 - ...enerated_asset_service_delete_feed_sync.py | 50 - ..._generated_asset_service_get_feed_async.py | 52 - ...1_generated_asset_service_get_feed_sync.py | 52 - ...enerated_asset_service_list_feeds_async.py | 52 - ...generated_asset_service_list_feeds_sync.py | 52 - ...nerated_asset_service_update_feed_async.py | 55 - ...enerated_asset_service_update_feed_sync.py | 55 - ..._asset_service_analyze_iam_policy_async.py | 48 - ...d_asset_service_analyze_iam_policy_sync.py | 48 - ...ervice_export_iam_policy_analysis_async.py | 56 - ...service_export_iam_policy_analysis_sync.py | 56 - ...nerated_asset_service_list_assets_async.py | 53 - ...enerated_asset_service_list_assets_sync.py | 53 - .../snippet_metadata_asset_v1.json | 3214 ----------------- .../snippet_metadata_asset_v1p1beta1.json | 360 -- .../snippet_metadata_asset_v1p2beta1.json | 813 ----- .../snippet_metadata_asset_v1p4beta1.json | 320 -- .../snippet_metadata_asset_v1p5beta1.json | 167 - asset/snippets/{snippets => }/noxfile.py | 0 .../snippets/{snippets => }/noxfile_config.py | 0 .../quickstart_analyzeiampolicy.py | 0 .../quickstart_analyzeiampolicy_test.py | 0 .../quickstart_analyzeiampolicylongrunning.py | 0 ...kstart_analyzeiampolicylongrunning_test.py | 0 .../quickstart_batchgetassetshistory.py | 0 .../quickstart_batchgetassetshistory_test.py | 0 .../quickstart_batchgeteffectiveiampolicy.py | 0 ...ckstart_batchgeteffectiveiampolicy_test.py | 0 .../quickstart_create_saved_query.py | 0 .../quickstart_create_saved_query_test.py | 0 .../{snippets => }/quickstart_createfeed.py | 0 .../quickstart_createfeed_test.py | 0 .../quickstart_delete_saved_query.py | 0 .../quickstart_delete_saved_query_test.py | 0 .../{snippets => }/quickstart_deletefeed.py | 0 .../quickstart_deletefeed_test.py | 0 .../{snippets => }/quickstart_exportassets.py | 0 .../quickstart_exportassets_test.py | 0 .../quickstart_get_saved_query.py | 0 .../quickstart_get_saved_query_test.py | 0 .../{snippets => }/quickstart_getfeed.py | 0 .../{snippets => }/quickstart_getfeed_test.py | 0 .../quickstart_list_saved_queries.py | 0 .../quickstart_list_saved_queries_test.py | 0 .../{snippets => }/quickstart_listassets.py | 0 .../quickstart_listassets_test.py | 0 .../{snippets => }/quickstart_listfeeds.py | 0 .../quickstart_listfeeds_test.py | 0 .../quickstart_searchalliampolicies.py | 0 .../quickstart_searchalliampolicies_test.py | 0 .../quickstart_searchallresources.py | 0 .../quickstart_searchallresources_test.py | 0 .../quickstart_update_saved_query.py | 0 .../quickstart_update_saved_query_test.py | 0 .../{snippets => }/quickstart_updatefeed.py | 0 .../quickstart_updatefeed_test.py | 0 .../{snippets => }/requirements-test.txt | 0 .../snippets/{snippets => }/requirements.txt | 0 109 files changed, 8083 deletions(-) delete mode 100644 asset/README.rst delete mode 100644 asset/snippets/AUTHORING_GUIDE.md delete mode 100644 asset/snippets/CONTRIBUTING.md rename asset/snippets/{snippets => }/conftest.py (100%) delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py delete mode 100644 asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py delete mode 100644 asset/snippets/generated_samples/snippet_metadata_asset_v1.json delete mode 100644 asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json delete mode 100644 asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json delete mode 100644 asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json delete mode 100644 asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json rename asset/snippets/{snippets => }/noxfile.py (100%) rename asset/snippets/{snippets => }/noxfile_config.py (100%) rename asset/snippets/{snippets => }/quickstart_analyzeiampolicy.py (100%) rename asset/snippets/{snippets => }/quickstart_analyzeiampolicy_test.py (100%) rename asset/snippets/{snippets => }/quickstart_analyzeiampolicylongrunning.py (100%) rename asset/snippets/{snippets => }/quickstart_analyzeiampolicylongrunning_test.py (100%) rename asset/snippets/{snippets => }/quickstart_batchgetassetshistory.py (100%) rename asset/snippets/{snippets => }/quickstart_batchgetassetshistory_test.py (100%) rename asset/snippets/{snippets => }/quickstart_batchgeteffectiveiampolicy.py (100%) rename asset/snippets/{snippets => }/quickstart_batchgeteffectiveiampolicy_test.py (100%) rename asset/snippets/{snippets => }/quickstart_create_saved_query.py (100%) rename asset/snippets/{snippets => }/quickstart_create_saved_query_test.py (100%) rename asset/snippets/{snippets => }/quickstart_createfeed.py (100%) rename asset/snippets/{snippets => }/quickstart_createfeed_test.py (100%) rename asset/snippets/{snippets => }/quickstart_delete_saved_query.py (100%) rename asset/snippets/{snippets => }/quickstart_delete_saved_query_test.py (100%) rename asset/snippets/{snippets => }/quickstart_deletefeed.py (100%) rename asset/snippets/{snippets => }/quickstart_deletefeed_test.py (100%) rename asset/snippets/{snippets => }/quickstart_exportassets.py (100%) rename asset/snippets/{snippets => }/quickstart_exportassets_test.py (100%) rename asset/snippets/{snippets => }/quickstart_get_saved_query.py (100%) rename asset/snippets/{snippets => }/quickstart_get_saved_query_test.py (100%) rename asset/snippets/{snippets => }/quickstart_getfeed.py (100%) rename asset/snippets/{snippets => }/quickstart_getfeed_test.py (100%) rename asset/snippets/{snippets => }/quickstart_list_saved_queries.py (100%) rename asset/snippets/{snippets => }/quickstart_list_saved_queries_test.py (100%) rename asset/snippets/{snippets => }/quickstart_listassets.py (100%) rename asset/snippets/{snippets => }/quickstart_listassets_test.py (100%) rename asset/snippets/{snippets => }/quickstart_listfeeds.py (100%) rename asset/snippets/{snippets => }/quickstart_listfeeds_test.py (100%) rename asset/snippets/{snippets => }/quickstart_searchalliampolicies.py (100%) rename asset/snippets/{snippets => }/quickstart_searchalliampolicies_test.py (100%) rename asset/snippets/{snippets => }/quickstart_searchallresources.py (100%) rename asset/snippets/{snippets => }/quickstart_searchallresources_test.py (100%) rename asset/snippets/{snippets => }/quickstart_update_saved_query.py (100%) rename asset/snippets/{snippets => }/quickstart_update_saved_query_test.py (100%) rename asset/snippets/{snippets => }/quickstart_updatefeed.py (100%) rename asset/snippets/{snippets => }/quickstart_updatefeed_test.py (100%) rename asset/snippets/{snippets => }/requirements-test.txt (100%) rename asset/snippets/{snippets => }/requirements.txt (100%) diff --git a/asset/README.rst b/asset/README.rst deleted file mode 100644 index d0adca59a097..000000000000 --- a/asset/README.rst +++ /dev/null @@ -1,3 +0,0 @@ -These samples have been moved. - -https://github.com/googleapis/python-asset/tree/main/samples diff --git a/asset/snippets/AUTHORING_GUIDE.md b/asset/snippets/AUTHORING_GUIDE.md deleted file mode 100644 index 8249522ffc2d..000000000000 --- a/asset/snippets/AUTHORING_GUIDE.md +++ /dev/null @@ -1 +0,0 @@ -See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md \ No newline at end of file diff --git a/asset/snippets/CONTRIBUTING.md b/asset/snippets/CONTRIBUTING.md deleted file mode 100644 index f5fe2e6baf13..000000000000 --- a/asset/snippets/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/CONTRIBUTING.md \ No newline at end of file diff --git a/asset/snippets/snippets/conftest.py b/asset/snippets/conftest.py similarity index 100% rename from asset/snippets/snippets/conftest.py rename to asset/snippets/conftest.py diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py deleted file mode 100644 index f9caabe8e6e1..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for AnalyzeIamPolicy -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_analyze_iam_policy(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - analysis_query = asset_v1.IamPolicyAnalysisQuery() - analysis_query.scope = "scope_value" - - request = asset_v1.AnalyzeIamPolicyRequest( - analysis_query=analysis_query, - ) - - # Make the request - response = await client.analyze_iam_policy(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py deleted file mode 100644 index e1305583a82d..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py +++ /dev/null @@ -1,63 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for AnalyzeIamPolicyLongrunning -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_analyze_iam_policy_longrunning(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - analysis_query = asset_v1.IamPolicyAnalysisQuery() - analysis_query.scope = "scope_value" - - output_config = asset_v1.IamPolicyAnalysisOutputConfig() - output_config.gcs_destination.uri = "uri_value" - - request = asset_v1.AnalyzeIamPolicyLongrunningRequest( - analysis_query=analysis_query, - output_config=output_config, - ) - - # Make the request - operation = client.analyze_iam_policy_longrunning(request=request) - - print("Waiting for operation to complete...") - - response = await operation.result() - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py deleted file mode 100644 index dd4fb419dad4..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py +++ /dev/null @@ -1,63 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for AnalyzeIamPolicyLongrunning -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_analyze_iam_policy_longrunning(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - analysis_query = asset_v1.IamPolicyAnalysisQuery() - analysis_query.scope = "scope_value" - - output_config = asset_v1.IamPolicyAnalysisOutputConfig() - output_config.gcs_destination.uri = "uri_value" - - request = asset_v1.AnalyzeIamPolicyLongrunningRequest( - analysis_query=analysis_query, - output_config=output_config, - ) - - # Make the request - operation = client.analyze_iam_policy_longrunning(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py deleted file mode 100644 index 3d592e390b7c..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for AnalyzeIamPolicy -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_analyze_iam_policy(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - analysis_query = asset_v1.IamPolicyAnalysisQuery() - analysis_query.scope = "scope_value" - - request = asset_v1.AnalyzeIamPolicyRequest( - analysis_query=analysis_query, - ) - - # Make the request - response = client.analyze_iam_policy(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py deleted file mode 100644 index a8a8ec862353..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_async.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for AnalyzeMove -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_AnalyzeMove_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_analyze_move(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.AnalyzeMoveRequest( - resource="resource_value", - destination_parent="destination_parent_value", - ) - - # Make the request - response = await client.analyze_move(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_AnalyzeMove_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py deleted file mode 100644 index 527907dc4e04..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_analyze_move_sync.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for AnalyzeMove -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_AnalyzeMove_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_analyze_move(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.AnalyzeMoveRequest( - resource="resource_value", - destination_parent="destination_parent_value", - ) - - # Make the request - response = client.analyze_move(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_AnalyzeMove_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py deleted file mode 100644 index a54a5e1daafc..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for BatchGetAssetsHistory -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_batch_get_assets_history(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.BatchGetAssetsHistoryRequest( - parent="parent_value", - ) - - # Make the request - response = await client.batch_get_assets_history(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py deleted file mode 100644 index 5df919fe4d72..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for BatchGetAssetsHistory -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_batch_get_assets_history(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.BatchGetAssetsHistoryRequest( - parent="parent_value", - ) - - # Make the request - response = client.batch_get_assets_history(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py deleted file mode 100644 index 13d9c1330c1f..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for BatchGetEffectiveIamPolicies -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_batch_get_effective_iam_policies(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.BatchGetEffectiveIamPoliciesRequest( - scope="scope_value", - names=['names_value1', 'names_value2'], - ) - - # Make the request - response = await client.batch_get_effective_iam_policies(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py deleted file mode 100644 index 5f003121dae5..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for BatchGetEffectiveIamPolicies -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_batch_get_effective_iam_policies(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.BatchGetEffectiveIamPoliciesRequest( - scope="scope_value", - names=['names_value1', 'names_value2'], - ) - - # Make the request - response = client.batch_get_effective_iam_policies(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py deleted file mode 100644 index 668903c5ee28..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_async.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_CreateFeed_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_create_feed(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - feed = asset_v1.Feed() - feed.name = "name_value" - - request = asset_v1.CreateFeedRequest( - parent="parent_value", - feed_id="feed_id_value", - feed=feed, - ) - - # Make the request - response = await client.create_feed(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_CreateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py deleted file mode 100644 index ce7b974b87fd..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_feed_sync.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_CreateFeed_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_create_feed(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - feed = asset_v1.Feed() - feed.name = "name_value" - - request = asset_v1.CreateFeedRequest( - parent="parent_value", - feed_id="feed_id_value", - feed=feed, - ) - - # Make the request - response = client.create_feed(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_CreateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_async.py deleted file mode 100644 index 4d5b5286946d..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_async.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateSavedQuery -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_CreateSavedQuery_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_create_saved_query(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.CreateSavedQueryRequest( - parent="parent_value", - saved_query_id="saved_query_id_value", - ) - - # Make the request - response = await client.create_saved_query(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_CreateSavedQuery_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_sync.py deleted file mode 100644 index 5dd1e4d42d80..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_create_saved_query_sync.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateSavedQuery -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_CreateSavedQuery_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_create_saved_query(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.CreateSavedQueryRequest( - parent="parent_value", - saved_query_id="saved_query_id_value", - ) - - # Make the request - response = client.create_saved_query(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_CreateSavedQuery_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py deleted file mode 100644 index 0dcea55aade1..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_async.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_DeleteFeed_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_delete_feed(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.DeleteFeedRequest( - name="name_value", - ) - - # Make the request - await client.delete_feed(request=request) - - -# [END cloudasset_v1_generated_AssetService_DeleteFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py deleted file mode 100644 index 735baf2c1d80..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_feed_sync.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_DeleteFeed_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_delete_feed(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.DeleteFeedRequest( - name="name_value", - ) - - # Make the request - client.delete_feed(request=request) - - -# [END cloudasset_v1_generated_AssetService_DeleteFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_async.py deleted file mode 100644 index 78856627b06f..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_async.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteSavedQuery -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_DeleteSavedQuery_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_delete_saved_query(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.DeleteSavedQueryRequest( - name="name_value", - ) - - # Make the request - await client.delete_saved_query(request=request) - - -# [END cloudasset_v1_generated_AssetService_DeleteSavedQuery_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_sync.py deleted file mode 100644 index f2cbe896265d..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_delete_saved_query_sync.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteSavedQuery -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_delete_saved_query(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.DeleteSavedQueryRequest( - name="name_value", - ) - - # Make the request - client.delete_saved_query(request=request) - - -# [END cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py deleted file mode 100644 index f9ca7f174252..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_async.py +++ /dev/null @@ -1,60 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ExportAssets -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_ExportAssets_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_export_assets(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - output_config = asset_v1.OutputConfig() - output_config.gcs_destination.uri = "uri_value" - - request = asset_v1.ExportAssetsRequest( - parent="parent_value", - output_config=output_config, - ) - - # Make the request - operation = client.export_assets(request=request) - - print("Waiting for operation to complete...") - - response = await operation.result() - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_ExportAssets_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py deleted file mode 100644 index 60816961b550..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_export_assets_sync.py +++ /dev/null @@ -1,60 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ExportAssets -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_ExportAssets_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_export_assets(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - output_config = asset_v1.OutputConfig() - output_config.gcs_destination.uri = "uri_value" - - request = asset_v1.ExportAssetsRequest( - parent="parent_value", - output_config=output_config, - ) - - # Make the request - operation = client.export_assets(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_ExportAssets_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py deleted file mode 100644 index b5b9a6e1a391..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_async.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_GetFeed_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_get_feed(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.GetFeedRequest( - name="name_value", - ) - - # Make the request - response = await client.get_feed(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_GetFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py deleted file mode 100644 index 41d119391094..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_feed_sync.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_GetFeed_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_get_feed(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.GetFeedRequest( - name="name_value", - ) - - # Make the request - response = client.get_feed(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_GetFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_async.py deleted file mode 100644 index d6605762670b..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_async.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetSavedQuery -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_GetSavedQuery_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_get_saved_query(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.GetSavedQueryRequest( - name="name_value", - ) - - # Make the request - response = await client.get_saved_query(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_GetSavedQuery_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_sync.py deleted file mode 100644 index d4a5568297bd..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_get_saved_query_sync.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetSavedQuery -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_GetSavedQuery_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_get_saved_query(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.GetSavedQueryRequest( - name="name_value", - ) - - # Make the request - response = client.get_saved_query(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_GetSavedQuery_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py deleted file mode 100644 index 65ef19c875f5..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_async.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListAssets -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_ListAssets_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_list_assets(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.ListAssetsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_assets(request=request) - - # Handle the response - async for response in page_result: - print(response) - -# [END cloudasset_v1_generated_AssetService_ListAssets_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py deleted file mode 100644 index f2e41b183ba1..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_assets_sync.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListAssets -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_ListAssets_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_list_assets(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.ListAssetsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_assets(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END cloudasset_v1_generated_AssetService_ListAssets_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py deleted file mode 100644 index 88f0613f33b1..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListFeeds -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_ListFeeds_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_list_feeds(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.ListFeedsRequest( - parent="parent_value", - ) - - # Make the request - response = await client.list_feeds(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_ListFeeds_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py deleted file mode 100644 index 3ee6b48bdb12..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_sync.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListFeeds -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_ListFeeds_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_list_feeds(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.ListFeedsRequest( - parent="parent_value", - ) - - # Make the request - response = client.list_feeds(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_ListFeeds_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_async.py deleted file mode 100644 index e3f3b95cc0fb..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_async.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListSavedQueries -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_ListSavedQueries_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_list_saved_queries(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.ListSavedQueriesRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_saved_queries(request=request) - - # Handle the response - async for response in page_result: - print(response) - -# [END cloudasset_v1_generated_AssetService_ListSavedQueries_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_sync.py deleted file mode 100644 index 262f82c0a3d4..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_list_saved_queries_sync.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListSavedQueries -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_ListSavedQueries_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_list_saved_queries(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.ListSavedQueriesRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_saved_queries(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END cloudasset_v1_generated_AssetService_ListSavedQueries_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_async.py deleted file mode 100644 index 79714d1b2060..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_async.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for QueryAssets -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_QueryAssets_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_query_assets(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.QueryAssetsRequest( - statement="statement_value", - parent="parent_value", - ) - - # Make the request - response = await client.query_assets(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_QueryAssets_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_sync.py deleted file mode 100644 index 593228338727..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_query_assets_sync.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for QueryAssets -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_QueryAssets_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_query_assets(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.QueryAssetsRequest( - statement="statement_value", - parent="parent_value", - ) - - # Make the request - response = client.query_assets(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_QueryAssets_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py deleted file mode 100644 index 367eae93c841..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for SearchAllIamPolicies -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_SearchAllIamPolicies_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_search_all_iam_policies(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.SearchAllIamPoliciesRequest( - scope="scope_value", - ) - - # Make the request - page_result = client.search_all_iam_policies(request=request) - - # Handle the response - async for response in page_result: - print(response) - -# [END cloudasset_v1_generated_AssetService_SearchAllIamPolicies_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py deleted file mode 100644 index ca656c399840..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for SearchAllIamPolicies -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_search_all_iam_policies(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.SearchAllIamPoliciesRequest( - scope="scope_value", - ) - - # Make the request - page_result = client.search_all_iam_policies(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py deleted file mode 100644 index 1757ab26d5b5..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_async.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for SearchAllResources -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_SearchAllResources_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_search_all_resources(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.SearchAllResourcesRequest( - scope="scope_value", - ) - - # Make the request - page_result = client.search_all_resources(request=request) - - # Handle the response - async for response in page_result: - print(response) - -# [END cloudasset_v1_generated_AssetService_SearchAllResources_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py deleted file mode 100644 index 770ee7670ac6..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_search_all_resources_sync.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for SearchAllResources -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_SearchAllResources_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_search_all_resources(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.SearchAllResourcesRequest( - scope="scope_value", - ) - - # Make the request - page_result = client.search_all_resources(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END cloudasset_v1_generated_AssetService_SearchAllResources_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py deleted file mode 100644 index fe93ab55ce55..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_async.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_UpdateFeed_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_update_feed(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - feed = asset_v1.Feed() - feed.name = "name_value" - - request = asset_v1.UpdateFeedRequest( - feed=feed, - ) - - # Make the request - response = await client.update_feed(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_UpdateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py deleted file mode 100644 index 320e04de983b..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_feed_sync.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_UpdateFeed_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_update_feed(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - feed = asset_v1.Feed() - feed.name = "name_value" - - request = asset_v1.UpdateFeedRequest( - feed=feed, - ) - - # Make the request - response = client.update_feed(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_UpdateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_async.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_async.py deleted file mode 100644 index 7ad44fd08838..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_async.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateSavedQuery -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_UpdateSavedQuery_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -async def sample_update_saved_query(): - # Create a client - client = asset_v1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1.UpdateSavedQueryRequest( - ) - - # Make the request - response = await client.update_saved_query(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_UpdateSavedQuery_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_sync.py b/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_sync.py deleted file mode 100644 index c050a417f716..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1_generated_asset_service_update_saved_query_sync.py +++ /dev/null @@ -1,51 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateSavedQuery -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1 - - -def sample_update_saved_query(): - # Create a client - client = asset_v1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1.UpdateSavedQueryRequest( - ) - - # Make the request - response = client.update_saved_query(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py deleted file mode 100644 index 1f4595650c6d..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for SearchAllIamPolicies -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p1beta1 - - -async def sample_search_all_iam_policies(): - # Create a client - client = asset_v1p1beta1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1p1beta1.SearchAllIamPoliciesRequest( - scope="scope_value", - ) - - # Make the request - page_result = client.search_all_iam_policies(request=request) - - # Handle the response - async for response in page_result: - print(response) - -# [END cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py deleted file mode 100644 index 946a0c14d8a1..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for SearchAllIamPolicies -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p1beta1 - - -def sample_search_all_iam_policies(): - # Create a client - client = asset_v1p1beta1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1p1beta1.SearchAllIamPoliciesRequest( - scope="scope_value", - ) - - # Make the request - page_result = client.search_all_iam_policies(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py deleted file mode 100644 index 6f839c0ad694..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for SearchAllResources -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p1beta1 - - -async def sample_search_all_resources(): - # Create a client - client = asset_v1p1beta1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1p1beta1.SearchAllResourcesRequest( - scope="scope_value", - ) - - # Make the request - page_result = client.search_all_resources(request=request) - - # Handle the response - async for response in page_result: - print(response) - -# [END cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py b/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py deleted file mode 100644 index 5584a89628eb..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for SearchAllResources -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p1beta1 - - -def sample_search_all_resources(): - # Create a client - client = asset_v1p1beta1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1p1beta1.SearchAllResourcesRequest( - scope="scope_value", - ) - - # Make the request - page_result = client.search_all_resources(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py deleted file mode 100644 index f3c3879c5d6b..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p2beta1_generated_AssetService_CreateFeed_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p2beta1 - - -async def sample_create_feed(): - # Create a client - client = asset_v1p2beta1.AssetServiceAsyncClient() - - # Initialize request argument(s) - feed = asset_v1p2beta1.Feed() - feed.name = "name_value" - - request = asset_v1p2beta1.CreateFeedRequest( - parent="parent_value", - feed_id="feed_id_value", - feed=feed, - ) - - # Make the request - response = await client.create_feed(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1p2beta1_generated_AssetService_CreateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py deleted file mode 100644 index 933431eb2998..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py +++ /dev/null @@ -1,57 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for CreateFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p2beta1_generated_AssetService_CreateFeed_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p2beta1 - - -def sample_create_feed(): - # Create a client - client = asset_v1p2beta1.AssetServiceClient() - - # Initialize request argument(s) - feed = asset_v1p2beta1.Feed() - feed.name = "name_value" - - request = asset_v1p2beta1.CreateFeedRequest( - parent="parent_value", - feed_id="feed_id_value", - feed=feed, - ) - - # Make the request - response = client.create_feed(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1p2beta1_generated_AssetService_CreateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py deleted file mode 100644 index f00385fdb3a2..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p2beta1 - - -async def sample_delete_feed(): - # Create a client - client = asset_v1p2beta1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1p2beta1.DeleteFeedRequest( - name="name_value", - ) - - # Make the request - await client.delete_feed(request=request) - - -# [END cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py deleted file mode 100644 index 74d7912769a3..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for DeleteFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p2beta1 - - -def sample_delete_feed(): - # Create a client - client = asset_v1p2beta1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1p2beta1.DeleteFeedRequest( - name="name_value", - ) - - # Make the request - client.delete_feed(request=request) - - -# [END cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py deleted file mode 100644 index e55b49dc5af1..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p2beta1_generated_AssetService_GetFeed_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p2beta1 - - -async def sample_get_feed(): - # Create a client - client = asset_v1p2beta1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1p2beta1.GetFeedRequest( - name="name_value", - ) - - # Make the request - response = await client.get_feed(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1p2beta1_generated_AssetService_GetFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py deleted file mode 100644 index b911870911b3..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for GetFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p2beta1_generated_AssetService_GetFeed_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p2beta1 - - -def sample_get_feed(): - # Create a client - client = asset_v1p2beta1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1p2beta1.GetFeedRequest( - name="name_value", - ) - - # Make the request - response = client.get_feed(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1p2beta1_generated_AssetService_GetFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py deleted file mode 100644 index 871b65657c32..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListFeeds -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p2beta1_generated_AssetService_ListFeeds_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p2beta1 - - -async def sample_list_feeds(): - # Create a client - client = asset_v1p2beta1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1p2beta1.ListFeedsRequest( - parent="parent_value", - ) - - # Make the request - response = await client.list_feeds(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1p2beta1_generated_AssetService_ListFeeds_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py deleted file mode 100644 index 61620d231562..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py +++ /dev/null @@ -1,52 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListFeeds -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p2beta1_generated_AssetService_ListFeeds_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p2beta1 - - -def sample_list_feeds(): - # Create a client - client = asset_v1p2beta1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1p2beta1.ListFeedsRequest( - parent="parent_value", - ) - - # Make the request - response = client.list_feeds(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1p2beta1_generated_AssetService_ListFeeds_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py deleted file mode 100644 index f310678d08e0..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p2beta1 - - -async def sample_update_feed(): - # Create a client - client = asset_v1p2beta1.AssetServiceAsyncClient() - - # Initialize request argument(s) - feed = asset_v1p2beta1.Feed() - feed.name = "name_value" - - request = asset_v1p2beta1.UpdateFeedRequest( - feed=feed, - ) - - # Make the request - response = await client.update_feed(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py b/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py deleted file mode 100644 index f87e674b5a29..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py +++ /dev/null @@ -1,55 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for UpdateFeed -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p2beta1 - - -def sample_update_feed(): - # Create a client - client = asset_v1p2beta1.AssetServiceClient() - - # Initialize request argument(s) - feed = asset_v1p2beta1.Feed() - feed.name = "name_value" - - request = asset_v1p2beta1.UpdateFeedRequest( - feed=feed, - ) - - # Make the request - response = client.update_feed(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py deleted file mode 100644 index d7aed0d43ed7..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for AnalyzeIamPolicy -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_async] -from google.cloud import asset_v1p4beta1 - - -async def sample_analyze_iam_policy(): - # Create a client - client = asset_v1p4beta1.AssetServiceAsyncClient() - - # Initialize request argument(s) - analysis_query = asset_v1p4beta1.IamPolicyAnalysisQuery() - analysis_query.parent = "parent_value" - - request = asset_v1p4beta1.AnalyzeIamPolicyRequest( - analysis_query=analysis_query, - ) - - # Make the request - response = await client.analyze_iam_policy(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py deleted file mode 100644 index 6ce8dda47650..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for AnalyzeIamPolicy -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_sync] -from google.cloud import asset_v1p4beta1 - - -def sample_analyze_iam_policy(): - # Create a client - client = asset_v1p4beta1.AssetServiceClient() - - # Initialize request argument(s) - analysis_query = asset_v1p4beta1.IamPolicyAnalysisQuery() - analysis_query.parent = "parent_value" - - request = asset_v1p4beta1.AnalyzeIamPolicyRequest( - analysis_query=analysis_query, - ) - - # Make the request - response = client.analyze_iam_policy(request=request) - - # Handle the response - print(response) - -# [END cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py deleted file mode 100644 index 2859417cbb2b..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ExportIamPolicyAnalysis -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_async] -from google.cloud import asset_v1p4beta1 - - -async def sample_export_iam_policy_analysis(): - # Create a client - client = asset_v1p4beta1.AssetServiceAsyncClient() - - # Initialize request argument(s) - analysis_query = asset_v1p4beta1.IamPolicyAnalysisQuery() - analysis_query.parent = "parent_value" - - output_config = asset_v1p4beta1.IamPolicyAnalysisOutputConfig() - output_config.gcs_destination.uri = "uri_value" - - request = asset_v1p4beta1.ExportIamPolicyAnalysisRequest( - analysis_query=analysis_query, - output_config=output_config, - ) - - # Make the request - operation = client.export_iam_policy_analysis(request=request) - - print("Waiting for operation to complete...") - - response = await operation.result() - - # Handle the response - print(response) - -# [END cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py b/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py deleted file mode 100644 index 05c73b3eb267..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py +++ /dev/null @@ -1,56 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ExportIamPolicyAnalysis -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_sync] -from google.cloud import asset_v1p4beta1 - - -def sample_export_iam_policy_analysis(): - # Create a client - client = asset_v1p4beta1.AssetServiceClient() - - # Initialize request argument(s) - analysis_query = asset_v1p4beta1.IamPolicyAnalysisQuery() - analysis_query.parent = "parent_value" - - output_config = asset_v1p4beta1.IamPolicyAnalysisOutputConfig() - output_config.gcs_destination.uri = "uri_value" - - request = asset_v1p4beta1.ExportIamPolicyAnalysisRequest( - analysis_query=analysis_query, - output_config=output_config, - ) - - # Make the request - operation = client.export_iam_policy_analysis(request=request) - - print("Waiting for operation to complete...") - - response = operation.result() - - # Handle the response - print(response) - -# [END cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_sync] diff --git a/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py deleted file mode 100644 index a9fcadafef91..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListAssets -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p5beta1_generated_AssetService_ListAssets_async] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p5beta1 - - -async def sample_list_assets(): - # Create a client - client = asset_v1p5beta1.AssetServiceAsyncClient() - - # Initialize request argument(s) - request = asset_v1p5beta1.ListAssetsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_assets(request=request) - - # Handle the response - async for response in page_result: - print(response) - -# [END cloudasset_v1p5beta1_generated_AssetService_ListAssets_async] diff --git a/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py b/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py deleted file mode 100644 index 413c369c4970..000000000000 --- a/asset/snippets/generated_samples/cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py +++ /dev/null @@ -1,53 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright 2022 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. -# -# Generated code. DO NOT EDIT! -# -# Snippet for ListAssets -# NOTE: This snippet has been automatically generated for illustrative purposes only. -# It may require modifications to work in your environment. - -# To install the latest published package dependency, execute the following: -# python3 -m pip install google-cloud-asset - - -# [START cloudasset_v1p5beta1_generated_AssetService_ListAssets_sync] -# This snippet 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 as shown in: -# https://googleapis.dev/python/google-api-core/latest/client_options.html -from google.cloud import asset_v1p5beta1 - - -def sample_list_assets(): - # Create a client - client = asset_v1p5beta1.AssetServiceClient() - - # Initialize request argument(s) - request = asset_v1p5beta1.ListAssetsRequest( - parent="parent_value", - ) - - # Make the request - page_result = client.list_assets(request=request) - - # Handle the response - for response in page_result: - print(response) - -# [END cloudasset_v1p5beta1_generated_AssetService_ListAssets_sync] diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1.json deleted file mode 100644 index 9454e4c415ae..000000000000 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1.json +++ /dev/null @@ -1,3214 +0,0 @@ -{ - "clientLibrary": { - "apis": [ - { - "id": "google.cloud.asset.v1", - "version": "v1" - } - ], - "language": "PYTHON", - "name": "google-cloud-asset" - }, - "snippets": [ - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.analyze_iam_policy_longrunning", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "AnalyzeIamPolicyLongrunning" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "analyze_iam_policy_longrunning" - }, - "description": "Sample for AnalyzeIamPolicyLongrunning", - "file": "cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_async", - "segments": [ - { - "end": 62, - "start": 27, - "type": "FULL" - }, - { - "end": 62, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 52, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 59, - "start": 53, - "type": "REQUEST_EXECUTION" - }, - { - "end": 63, - "start": 60, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.analyze_iam_policy_longrunning", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "AnalyzeIamPolicyLongrunning" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.AnalyzeIamPolicyLongrunningRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.api_core.operation.Operation", - "shortName": "analyze_iam_policy_longrunning" - }, - "description": "Sample for AnalyzeIamPolicyLongrunning", - "file": "cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicyLongrunning_sync", - "segments": [ - { - "end": 62, - "start": 27, - "type": "FULL" - }, - { - "end": 62, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 52, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 59, - "start": 53, - "type": "REQUEST_EXECUTION" - }, - { - "end": 63, - "start": 60, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_analyze_iam_policy_longrunning_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.analyze_iam_policy", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.AnalyzeIamPolicy", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "AnalyzeIamPolicy" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.AnalyzeIamPolicyRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.AnalyzeIamPolicyResponse", - "shortName": "analyze_iam_policy" - }, - "description": "Sample for AnalyzeIamPolicy", - "file": "cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_async", - "segments": [ - { - "end": 54, - "start": 27, - "type": "FULL" - }, - { - "end": 54, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 48, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 51, - "start": 49, - "type": "REQUEST_EXECUTION" - }, - { - "end": 55, - "start": 52, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_analyze_iam_policy_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.analyze_iam_policy", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.AnalyzeIamPolicy", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "AnalyzeIamPolicy" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.AnalyzeIamPolicyRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.AnalyzeIamPolicyResponse", - "shortName": "analyze_iam_policy" - }, - "description": "Sample for AnalyzeIamPolicy", - "file": "cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeIamPolicy_sync", - "segments": [ - { - "end": 54, - "start": 27, - "type": "FULL" - }, - { - "end": 54, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 48, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 51, - "start": 49, - "type": "REQUEST_EXECUTION" - }, - { - "end": 55, - "start": 52, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_analyze_iam_policy_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.analyze_move", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.AnalyzeMove", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "AnalyzeMove" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.AnalyzeMoveRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.AnalyzeMoveResponse", - "shortName": "analyze_move" - }, - "description": "Sample for AnalyzeMove", - "file": "cloudasset_v1_generated_asset_service_analyze_move_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeMove_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_analyze_move_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.analyze_move", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.AnalyzeMove", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "AnalyzeMove" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.AnalyzeMoveRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.AnalyzeMoveResponse", - "shortName": "analyze_move" - }, - "description": "Sample for AnalyzeMove", - "file": "cloudasset_v1_generated_asset_service_analyze_move_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_AnalyzeMove_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_analyze_move_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.batch_get_assets_history", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.BatchGetAssetsHistory", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "BatchGetAssetsHistory" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.BatchGetAssetsHistoryRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.BatchGetAssetsHistoryResponse", - "shortName": "batch_get_assets_history" - }, - "description": "Sample for BatchGetAssetsHistory", - "file": "cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_batch_get_assets_history_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.batch_get_assets_history", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.BatchGetAssetsHistory", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "BatchGetAssetsHistory" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.BatchGetAssetsHistoryRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.BatchGetAssetsHistoryResponse", - "shortName": "batch_get_assets_history" - }, - "description": "Sample for BatchGetAssetsHistory", - "file": "cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_batch_get_assets_history_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.batch_get_effective_iam_policies", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "BatchGetEffectiveIamPolicies" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesResponse", - "shortName": "batch_get_effective_iam_policies" - }, - "description": "Sample for BatchGetEffectiveIamPolicies", - "file": "cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.batch_get_effective_iam_policies", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.BatchGetEffectiveIamPolicies", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "BatchGetEffectiveIamPolicies" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.BatchGetEffectiveIamPoliciesResponse", - "shortName": "batch_get_effective_iam_policies" - }, - "description": "Sample for BatchGetEffectiveIamPolicies", - "file": "cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_BatchGetEffectiveIamPolicies_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_batch_get_effective_iam_policies_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.create_feed", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.CreateFeed", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "CreateFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.CreateFeedRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.Feed", - "shortName": "create_feed" - }, - "description": "Sample for CreateFeed", - "file": "cloudasset_v1_generated_asset_service_create_feed_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_async", - "segments": [ - { - "end": 56, - "start": 27, - "type": "FULL" - }, - { - "end": 56, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 50, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 53, - "start": 51, - "type": "REQUEST_EXECUTION" - }, - { - "end": 57, - "start": 54, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_create_feed_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.create_feed", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.CreateFeed", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "CreateFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.CreateFeedRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.Feed", - "shortName": "create_feed" - }, - "description": "Sample for CreateFeed", - "file": "cloudasset_v1_generated_asset_service_create_feed_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_sync", - "segments": [ - { - "end": 56, - "start": 27, - "type": "FULL" - }, - { - "end": 56, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 50, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 53, - "start": 51, - "type": "REQUEST_EXECUTION" - }, - { - "end": 57, - "start": 54, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_create_feed_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.create_saved_query", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.CreateSavedQuery", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "CreateSavedQuery" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.CreateSavedQueryRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "saved_query", - "type": "google.cloud.asset_v1.types.SavedQuery" - }, - { - "name": "saved_query_id", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.SavedQuery", - "shortName": "create_saved_query" - }, - "description": "Sample for CreateSavedQuery", - "file": "cloudasset_v1_generated_asset_service_create_saved_query_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_CreateSavedQuery_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_create_saved_query_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.create_saved_query", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.CreateSavedQuery", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "CreateSavedQuery" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.CreateSavedQueryRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "saved_query", - "type": "google.cloud.asset_v1.types.SavedQuery" - }, - { - "name": "saved_query_id", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.SavedQuery", - "shortName": "create_saved_query" - }, - "description": "Sample for CreateSavedQuery", - "file": "cloudasset_v1_generated_asset_service_create_saved_query_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_CreateSavedQuery_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_create_saved_query_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.delete_feed", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.DeleteFeed", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "DeleteFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.DeleteFeedRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "shortName": "delete_feed" - }, - "description": "Sample for DeleteFeed", - "file": "cloudasset_v1_generated_asset_service_delete_feed_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_async", - "segments": [ - { - "end": 49, - "start": 27, - "type": "FULL" - }, - { - "end": 49, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_delete_feed_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.delete_feed", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.DeleteFeed", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "DeleteFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.DeleteFeedRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "shortName": "delete_feed" - }, - "description": "Sample for DeleteFeed", - "file": "cloudasset_v1_generated_asset_service_delete_feed_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_sync", - "segments": [ - { - "end": 49, - "start": 27, - "type": "FULL" - }, - { - "end": 49, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_delete_feed_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.delete_saved_query", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.DeleteSavedQuery", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "DeleteSavedQuery" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.DeleteSavedQueryRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "shortName": "delete_saved_query" - }, - "description": "Sample for DeleteSavedQuery", - "file": "cloudasset_v1_generated_asset_service_delete_saved_query_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_DeleteSavedQuery_async", - "segments": [ - { - "end": 49, - "start": 27, - "type": "FULL" - }, - { - "end": 49, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_delete_saved_query_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.delete_saved_query", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.DeleteSavedQuery", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "DeleteSavedQuery" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.DeleteSavedQueryRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "shortName": "delete_saved_query" - }, - "description": "Sample for DeleteSavedQuery", - "file": "cloudasset_v1_generated_asset_service_delete_saved_query_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_DeleteSavedQuery_sync", - "segments": [ - { - "end": 49, - "start": 27, - "type": "FULL" - }, - { - "end": 49, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_delete_saved_query_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.export_assets", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.ExportAssets", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ExportAssets" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.ExportAssetsRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "export_assets" - }, - "description": "Sample for ExportAssets", - "file": "cloudasset_v1_generated_asset_service_export_assets_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_async", - "segments": [ - { - "end": 59, - "start": 27, - "type": "FULL" - }, - { - "end": 59, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 49, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 56, - "start": 50, - "type": "REQUEST_EXECUTION" - }, - { - "end": 60, - "start": 57, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_export_assets_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.export_assets", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.ExportAssets", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ExportAssets" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.ExportAssetsRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.api_core.operation.Operation", - "shortName": "export_assets" - }, - "description": "Sample for ExportAssets", - "file": "cloudasset_v1_generated_asset_service_export_assets_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_sync", - "segments": [ - { - "end": 59, - "start": 27, - "type": "FULL" - }, - { - "end": 59, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 49, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 56, - "start": 50, - "type": "REQUEST_EXECUTION" - }, - { - "end": 60, - "start": 57, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_export_assets_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.get_feed", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.GetFeed", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "GetFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.GetFeedRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.Feed", - "shortName": "get_feed" - }, - "description": "Sample for GetFeed", - "file": "cloudasset_v1_generated_asset_service_get_feed_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_GetFeed_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_get_feed_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.get_feed", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.GetFeed", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "GetFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.GetFeedRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.Feed", - "shortName": "get_feed" - }, - "description": "Sample for GetFeed", - "file": "cloudasset_v1_generated_asset_service_get_feed_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_GetFeed_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_get_feed_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.get_saved_query", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.GetSavedQuery", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "GetSavedQuery" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.GetSavedQueryRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.SavedQuery", - "shortName": "get_saved_query" - }, - "description": "Sample for GetSavedQuery", - "file": "cloudasset_v1_generated_asset_service_get_saved_query_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_GetSavedQuery_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_get_saved_query_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.get_saved_query", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.GetSavedQuery", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "GetSavedQuery" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.GetSavedQueryRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.SavedQuery", - "shortName": "get_saved_query" - }, - "description": "Sample for GetSavedQuery", - "file": "cloudasset_v1_generated_asset_service_get_saved_query_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_GetSavedQuery_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_get_saved_query_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.list_assets", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.ListAssets", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ListAssets" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.ListAssetsRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.services.asset_service.pagers.ListAssetsAsyncPager", - "shortName": "list_assets" - }, - "description": "Sample for ListAssets", - "file": "cloudasset_v1_generated_asset_service_list_assets_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ListAssets_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_list_assets_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.list_assets", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.ListAssets", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ListAssets" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.ListAssetsRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.services.asset_service.pagers.ListAssetsPager", - "shortName": "list_assets" - }, - "description": "Sample for ListAssets", - "file": "cloudasset_v1_generated_asset_service_list_assets_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ListAssets_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_list_assets_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.list_feeds", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.ListFeeds", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ListFeeds" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.ListFeedsRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.ListFeedsResponse", - "shortName": "list_feeds" - }, - "description": "Sample for ListFeeds", - "file": "cloudasset_v1_generated_asset_service_list_feeds_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_list_feeds_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.list_feeds", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.ListFeeds", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ListFeeds" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.ListFeedsRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.ListFeedsResponse", - "shortName": "list_feeds" - }, - "description": "Sample for ListFeeds", - "file": "cloudasset_v1_generated_asset_service_list_feeds_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_list_feeds_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.list_saved_queries", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.ListSavedQueries", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ListSavedQueries" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.ListSavedQueriesRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.services.asset_service.pagers.ListSavedQueriesAsyncPager", - "shortName": "list_saved_queries" - }, - "description": "Sample for ListSavedQueries", - "file": "cloudasset_v1_generated_asset_service_list_saved_queries_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ListSavedQueries_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_list_saved_queries_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.list_saved_queries", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.ListSavedQueries", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ListSavedQueries" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.ListSavedQueriesRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.services.asset_service.pagers.ListSavedQueriesPager", - "shortName": "list_saved_queries" - }, - "description": "Sample for ListSavedQueries", - "file": "cloudasset_v1_generated_asset_service_list_saved_queries_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_ListSavedQueries_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_list_saved_queries_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.query_assets", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.QueryAssets", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "QueryAssets" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.QueryAssetsRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.QueryAssetsResponse", - "shortName": "query_assets" - }, - "description": "Sample for QueryAssets", - "file": "cloudasset_v1_generated_asset_service_query_assets_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_QueryAssets_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_query_assets_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.query_assets", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.QueryAssets", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "QueryAssets" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.QueryAssetsRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.QueryAssetsResponse", - "shortName": "query_assets" - }, - "description": "Sample for QueryAssets", - "file": "cloudasset_v1_generated_asset_service_query_assets_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_QueryAssets_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 46, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 49, - "start": 47, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_query_assets_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.search_all_iam_policies", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.SearchAllIamPolicies", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "SearchAllIamPolicies" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.SearchAllIamPoliciesRequest" - }, - { - "name": "scope", - "type": "str" - }, - { - "name": "query", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.services.asset_service.pagers.SearchAllIamPoliciesAsyncPager", - "shortName": "search_all_iam_policies" - }, - "description": "Sample for SearchAllIamPolicies", - "file": "cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_SearchAllIamPolicies_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_search_all_iam_policies_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.search_all_iam_policies", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.SearchAllIamPolicies", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "SearchAllIamPolicies" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.SearchAllIamPoliciesRequest" - }, - { - "name": "scope", - "type": "str" - }, - { - "name": "query", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.services.asset_service.pagers.SearchAllIamPoliciesPager", - "shortName": "search_all_iam_policies" - }, - "description": "Sample for SearchAllIamPolicies", - "file": "cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_SearchAllIamPolicies_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_search_all_iam_policies_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.search_all_resources", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.SearchAllResources", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "SearchAllResources" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.SearchAllResourcesRequest" - }, - { - "name": "scope", - "type": "str" - }, - { - "name": "query", - "type": "str" - }, - { - "name": "asset_types", - "type": "Sequence[str]" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.services.asset_service.pagers.SearchAllResourcesAsyncPager", - "shortName": "search_all_resources" - }, - "description": "Sample for SearchAllResources", - "file": "cloudasset_v1_generated_asset_service_search_all_resources_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_SearchAllResources_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_search_all_resources_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.search_all_resources", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.SearchAllResources", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "SearchAllResources" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.SearchAllResourcesRequest" - }, - { - "name": "scope", - "type": "str" - }, - { - "name": "query", - "type": "str" - }, - { - "name": "asset_types", - "type": "Sequence[str]" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.services.asset_service.pagers.SearchAllResourcesPager", - "shortName": "search_all_resources" - }, - "description": "Sample for SearchAllResources", - "file": "cloudasset_v1_generated_asset_service_search_all_resources_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_SearchAllResources_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_search_all_resources_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.update_feed", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.UpdateFeed", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "UpdateFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.UpdateFeedRequest" - }, - { - "name": "feed", - "type": "google.cloud.asset_v1.types.Feed" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.Feed", - "shortName": "update_feed" - }, - "description": "Sample for UpdateFeed", - "file": "cloudasset_v1_generated_asset_service_update_feed_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_UpdateFeed_async", - "segments": [ - { - "end": 54, - "start": 27, - "type": "FULL" - }, - { - "end": 54, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 48, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 51, - "start": 49, - "type": "REQUEST_EXECUTION" - }, - { - "end": 55, - "start": 52, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_update_feed_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.update_feed", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.UpdateFeed", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "UpdateFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.UpdateFeedRequest" - }, - { - "name": "feed", - "type": "google.cloud.asset_v1.types.Feed" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.Feed", - "shortName": "update_feed" - }, - "description": "Sample for UpdateFeed", - "file": "cloudasset_v1_generated_asset_service_update_feed_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_UpdateFeed_sync", - "segments": [ - { - "end": 54, - "start": 27, - "type": "FULL" - }, - { - "end": 54, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 48, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 51, - "start": 49, - "type": "REQUEST_EXECUTION" - }, - { - "end": 55, - "start": 52, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_update_feed_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.update_saved_query", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.UpdateSavedQuery", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "UpdateSavedQuery" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.UpdateSavedQueryRequest" - }, - { - "name": "saved_query", - "type": "google.cloud.asset_v1.types.SavedQuery" - }, - { - "name": "update_mask", - "type": "google.protobuf.field_mask_pb2.FieldMask" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.SavedQuery", - "shortName": "update_saved_query" - }, - "description": "Sample for UpdateSavedQuery", - "file": "cloudasset_v1_generated_asset_service_update_saved_query_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_UpdateSavedQuery_async", - "segments": [ - { - "end": 50, - "start": 27, - "type": "FULL" - }, - { - "end": 50, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 44, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 47, - "start": 45, - "type": "REQUEST_EXECUTION" - }, - { - "end": 51, - "start": 48, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_update_saved_query_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1.AssetServiceClient.update_saved_query", - "method": { - "fullName": "google.cloud.asset.v1.AssetService.UpdateSavedQuery", - "service": { - "fullName": "google.cloud.asset.v1.AssetService", - "shortName": "AssetService" - }, - "shortName": "UpdateSavedQuery" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1.types.UpdateSavedQueryRequest" - }, - { - "name": "saved_query", - "type": "google.cloud.asset_v1.types.SavedQuery" - }, - { - "name": "update_mask", - "type": "google.protobuf.field_mask_pb2.FieldMask" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1.types.SavedQuery", - "shortName": "update_saved_query" - }, - "description": "Sample for UpdateSavedQuery", - "file": "cloudasset_v1_generated_asset_service_update_saved_query_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1_generated_AssetService_UpdateSavedQuery_sync", - "segments": [ - { - "end": 50, - "start": 27, - "type": "FULL" - }, - { - "end": 50, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 44, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 47, - "start": 45, - "type": "REQUEST_EXECUTION" - }, - { - "end": 51, - "start": 48, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1_generated_asset_service_update_saved_query_sync.py" - } - ] -} diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json deleted file mode 100644 index 1b348e35102f..000000000000 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p1beta1.json +++ /dev/null @@ -1,360 +0,0 @@ -{ - "clientLibrary": { - "apis": [ - { - "id": "google.cloud.asset.v1p1beta1", - "version": "v1p1beta1" - } - ], - "language": "PYTHON", - "name": "google-cloud-asset" - }, - "snippets": [ - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1p1beta1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1p1beta1.AssetServiceAsyncClient.search_all_iam_policies", - "method": { - "fullName": "google.cloud.asset.v1p1beta1.AssetService.SearchAllIamPolicies", - "service": { - "fullName": "google.cloud.asset.v1p1beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "SearchAllIamPolicies" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p1beta1.types.SearchAllIamPoliciesRequest" - }, - { - "name": "scope", - "type": "str" - }, - { - "name": "query", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p1beta1.services.asset_service.pagers.SearchAllIamPoliciesAsyncPager", - "shortName": "search_all_iam_policies" - }, - "description": "Sample for SearchAllIamPolicies", - "file": "cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1p1beta1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1p1beta1.AssetServiceClient.search_all_iam_policies", - "method": { - "fullName": "google.cloud.asset.v1p1beta1.AssetService.SearchAllIamPolicies", - "service": { - "fullName": "google.cloud.asset.v1p1beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "SearchAllIamPolicies" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p1beta1.types.SearchAllIamPoliciesRequest" - }, - { - "name": "scope", - "type": "str" - }, - { - "name": "query", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p1beta1.services.asset_service.pagers.SearchAllIamPoliciesPager", - "shortName": "search_all_iam_policies" - }, - "description": "Sample for SearchAllIamPolicies", - "file": "cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllIamPolicies_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p1beta1_generated_asset_service_search_all_iam_policies_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1p1beta1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1p1beta1.AssetServiceAsyncClient.search_all_resources", - "method": { - "fullName": "google.cloud.asset.v1p1beta1.AssetService.SearchAllResources", - "service": { - "fullName": "google.cloud.asset.v1p1beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "SearchAllResources" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p1beta1.types.SearchAllResourcesRequest" - }, - { - "name": "scope", - "type": "str" - }, - { - "name": "query", - "type": "str" - }, - { - "name": "asset_types", - "type": "Sequence[str]" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p1beta1.services.asset_service.pagers.SearchAllResourcesAsyncPager", - "shortName": "search_all_resources" - }, - "description": "Sample for SearchAllResources", - "file": "cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p1beta1_generated_asset_service_search_all_resources_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1p1beta1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1p1beta1.AssetServiceClient.search_all_resources", - "method": { - "fullName": "google.cloud.asset.v1p1beta1.AssetService.SearchAllResources", - "service": { - "fullName": "google.cloud.asset.v1p1beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "SearchAllResources" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p1beta1.types.SearchAllResourcesRequest" - }, - { - "name": "scope", - "type": "str" - }, - { - "name": "query", - "type": "str" - }, - { - "name": "asset_types", - "type": "Sequence[str]" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p1beta1.services.asset_service.pagers.SearchAllResourcesPager", - "shortName": "search_all_resources" - }, - "description": "Sample for SearchAllResources", - "file": "cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p1beta1_generated_AssetService_SearchAllResources_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p1beta1_generated_asset_service_search_all_resources_sync.py" - } - ] -} diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json deleted file mode 100644 index b0bc6aae24a6..000000000000 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p2beta1.json +++ /dev/null @@ -1,813 +0,0 @@ -{ - "clientLibrary": { - "apis": [ - { - "id": "google.cloud.asset.v1p2beta1", - "version": "v1p2beta1" - } - ], - "language": "PYTHON", - "name": "google-cloud-asset" - }, - "snippets": [ - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient.create_feed", - "method": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService.CreateFeed", - "service": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "CreateFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p2beta1.types.CreateFeedRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p2beta1.types.Feed", - "shortName": "create_feed" - }, - "description": "Sample for CreateFeed", - "file": "cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p2beta1_generated_AssetService_CreateFeed_async", - "segments": [ - { - "end": 56, - "start": 27, - "type": "FULL" - }, - { - "end": 56, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 50, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 53, - "start": 51, - "type": "REQUEST_EXECUTION" - }, - { - "end": 57, - "start": 54, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p2beta1_generated_asset_service_create_feed_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient.create_feed", - "method": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService.CreateFeed", - "service": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "CreateFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p2beta1.types.CreateFeedRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p2beta1.types.Feed", - "shortName": "create_feed" - }, - "description": "Sample for CreateFeed", - "file": "cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p2beta1_generated_AssetService_CreateFeed_sync", - "segments": [ - { - "end": 56, - "start": 27, - "type": "FULL" - }, - { - "end": 56, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 50, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 53, - "start": 51, - "type": "REQUEST_EXECUTION" - }, - { - "end": 57, - "start": 54, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p2beta1_generated_asset_service_create_feed_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient.delete_feed", - "method": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService.DeleteFeed", - "service": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "DeleteFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p2beta1.types.DeleteFeedRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "shortName": "delete_feed" - }, - "description": "Sample for DeleteFeed", - "file": "cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_async", - "segments": [ - { - "end": 49, - "start": 27, - "type": "FULL" - }, - { - "end": 49, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p2beta1_generated_asset_service_delete_feed_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient.delete_feed", - "method": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService.DeleteFeed", - "service": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "DeleteFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p2beta1.types.DeleteFeedRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "shortName": "delete_feed" - }, - "description": "Sample for DeleteFeed", - "file": "cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p2beta1_generated_AssetService_DeleteFeed_sync", - "segments": [ - { - "end": 49, - "start": 27, - "type": "FULL" - }, - { - "end": 49, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 50, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p2beta1_generated_asset_service_delete_feed_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient.get_feed", - "method": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService.GetFeed", - "service": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "GetFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p2beta1.types.GetFeedRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p2beta1.types.Feed", - "shortName": "get_feed" - }, - "description": "Sample for GetFeed", - "file": "cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p2beta1_generated_AssetService_GetFeed_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p2beta1_generated_asset_service_get_feed_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient.get_feed", - "method": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService.GetFeed", - "service": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "GetFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p2beta1.types.GetFeedRequest" - }, - { - "name": "name", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p2beta1.types.Feed", - "shortName": "get_feed" - }, - "description": "Sample for GetFeed", - "file": "cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p2beta1_generated_AssetService_GetFeed_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p2beta1_generated_asset_service_get_feed_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient.list_feeds", - "method": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService.ListFeeds", - "service": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ListFeeds" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p2beta1.types.ListFeedsRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p2beta1.types.ListFeedsResponse", - "shortName": "list_feeds" - }, - "description": "Sample for ListFeeds", - "file": "cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p2beta1_generated_AssetService_ListFeeds_async", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p2beta1_generated_asset_service_list_feeds_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient.list_feeds", - "method": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService.ListFeeds", - "service": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ListFeeds" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p2beta1.types.ListFeedsRequest" - }, - { - "name": "parent", - "type": "str" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p2beta1.types.ListFeedsResponse", - "shortName": "list_feeds" - }, - "description": "Sample for ListFeeds", - "file": "cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p2beta1_generated_AssetService_ListFeeds_sync", - "segments": [ - { - "end": 51, - "start": 27, - "type": "FULL" - }, - { - "end": 51, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 52, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p2beta1_generated_asset_service_list_feeds_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceAsyncClient.update_feed", - "method": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService.UpdateFeed", - "service": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "UpdateFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p2beta1.types.UpdateFeedRequest" - }, - { - "name": "feed", - "type": "google.cloud.asset_v1p2beta1.types.Feed" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p2beta1.types.Feed", - "shortName": "update_feed" - }, - "description": "Sample for UpdateFeed", - "file": "cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_async", - "segments": [ - { - "end": 54, - "start": 27, - "type": "FULL" - }, - { - "end": 54, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 48, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 51, - "start": 49, - "type": "REQUEST_EXECUTION" - }, - { - "end": 55, - "start": 52, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p2beta1_generated_asset_service_update_feed_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1p2beta1.AssetServiceClient.update_feed", - "method": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService.UpdateFeed", - "service": { - "fullName": "google.cloud.asset.v1p2beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "UpdateFeed" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p2beta1.types.UpdateFeedRequest" - }, - { - "name": "feed", - "type": "google.cloud.asset_v1p2beta1.types.Feed" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p2beta1.types.Feed", - "shortName": "update_feed" - }, - "description": "Sample for UpdateFeed", - "file": "cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p2beta1_generated_AssetService_UpdateFeed_sync", - "segments": [ - { - "end": 54, - "start": 27, - "type": "FULL" - }, - { - "end": 54, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 48, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 51, - "start": 49, - "type": "REQUEST_EXECUTION" - }, - { - "end": 55, - "start": 52, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p2beta1_generated_asset_service_update_feed_sync.py" - } - ] -} diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json deleted file mode 100644 index f68b216f9637..000000000000 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p4beta1.json +++ /dev/null @@ -1,320 +0,0 @@ -{ - "clientLibrary": { - "apis": [ - { - "id": "google.cloud.asset.v1p4beta1", - "version": "v1p4beta1" - } - ], - "language": "PYTHON", - "name": "google-cloud-asset" - }, - "snippets": [ - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1p4beta1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1p4beta1.AssetServiceAsyncClient.analyze_iam_policy", - "method": { - "fullName": "google.cloud.asset.v1p4beta1.AssetService.AnalyzeIamPolicy", - "service": { - "fullName": "google.cloud.asset.v1p4beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "AnalyzeIamPolicy" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p4beta1.types.AnalyzeIamPolicyRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p4beta1.types.AnalyzeIamPolicyResponse", - "shortName": "analyze_iam_policy" - }, - "description": "Sample for AnalyzeIamPolicy", - "file": "cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_async", - "segments": [ - { - "end": 47, - "start": 27, - "type": "FULL" - }, - { - "end": 47, - "start": 27, - "type": "SHORT" - }, - { - "end": 33, - "start": 31, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 41, - "start": 34, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 44, - "start": 42, - "type": "REQUEST_EXECUTION" - }, - { - "end": 48, - "start": 45, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1p4beta1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1p4beta1.AssetServiceClient.analyze_iam_policy", - "method": { - "fullName": "google.cloud.asset.v1p4beta1.AssetService.AnalyzeIamPolicy", - "service": { - "fullName": "google.cloud.asset.v1p4beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "AnalyzeIamPolicy" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p4beta1.types.AnalyzeIamPolicyRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p4beta1.types.AnalyzeIamPolicyResponse", - "shortName": "analyze_iam_policy" - }, - "description": "Sample for AnalyzeIamPolicy", - "file": "cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p4beta1_generated_AssetService_AnalyzeIamPolicy_sync", - "segments": [ - { - "end": 47, - "start": 27, - "type": "FULL" - }, - { - "end": 47, - "start": 27, - "type": "SHORT" - }, - { - "end": 33, - "start": 31, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 41, - "start": 34, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 44, - "start": 42, - "type": "REQUEST_EXECUTION" - }, - { - "end": 48, - "start": 45, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p4beta1_generated_asset_service_analyze_iam_policy_sync.py" - }, - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1p4beta1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1p4beta1.AssetServiceAsyncClient.export_iam_policy_analysis", - "method": { - "fullName": "google.cloud.asset.v1p4beta1.AssetService.ExportIamPolicyAnalysis", - "service": { - "fullName": "google.cloud.asset.v1p4beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ExportIamPolicyAnalysis" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p4beta1.types.ExportIamPolicyAnalysisRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.api_core.operation_async.AsyncOperation", - "shortName": "export_iam_policy_analysis" - }, - "description": "Sample for ExportIamPolicyAnalysis", - "file": "cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_async", - "segments": [ - { - "end": 55, - "start": 27, - "type": "FULL" - }, - { - "end": 55, - "start": 27, - "type": "SHORT" - }, - { - "end": 33, - "start": 31, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 34, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 52, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 56, - "start": 53, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1p4beta1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1p4beta1.AssetServiceClient.export_iam_policy_analysis", - "method": { - "fullName": "google.cloud.asset.v1p4beta1.AssetService.ExportIamPolicyAnalysis", - "service": { - "fullName": "google.cloud.asset.v1p4beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ExportIamPolicyAnalysis" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p4beta1.types.ExportIamPolicyAnalysisRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.api_core.operation.Operation", - "shortName": "export_iam_policy_analysis" - }, - "description": "Sample for ExportIamPolicyAnalysis", - "file": "cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p4beta1_generated_AssetService_ExportIamPolicyAnalysis_sync", - "segments": [ - { - "end": 55, - "start": 27, - "type": "FULL" - }, - { - "end": 55, - "start": 27, - "type": "SHORT" - }, - { - "end": 33, - "start": 31, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 34, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 52, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 56, - "start": 53, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p4beta1_generated_asset_service_export_iam_policy_analysis_sync.py" - } - ] -} diff --git a/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json b/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json deleted file mode 100644 index 79f71d8d7491..000000000000 --- a/asset/snippets/generated_samples/snippet_metadata_asset_v1p5beta1.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "clientLibrary": { - "apis": [ - { - "id": "google.cloud.asset.v1p5beta1", - "version": "v1p5beta1" - } - ], - "language": "PYTHON", - "name": "google-cloud-asset" - }, - "snippets": [ - { - "canonical": true, - "clientMethod": { - "async": true, - "client": { - "fullName": "google.cloud.asset_v1p5beta1.AssetServiceAsyncClient", - "shortName": "AssetServiceAsyncClient" - }, - "fullName": "google.cloud.asset_v1p5beta1.AssetServiceAsyncClient.list_assets", - "method": { - "fullName": "google.cloud.asset.v1p5beta1.AssetService.ListAssets", - "service": { - "fullName": "google.cloud.asset.v1p5beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ListAssets" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p5beta1.types.ListAssetsRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p5beta1.services.asset_service.pagers.ListAssetsAsyncPager", - "shortName": "list_assets" - }, - "description": "Sample for ListAssets", - "file": "cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p5beta1_generated_AssetService_ListAssets_async", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p5beta1_generated_asset_service_list_assets_async.py" - }, - { - "canonical": true, - "clientMethod": { - "client": { - "fullName": "google.cloud.asset_v1p5beta1.AssetServiceClient", - "shortName": "AssetServiceClient" - }, - "fullName": "google.cloud.asset_v1p5beta1.AssetServiceClient.list_assets", - "method": { - "fullName": "google.cloud.asset.v1p5beta1.AssetService.ListAssets", - "service": { - "fullName": "google.cloud.asset.v1p5beta1.AssetService", - "shortName": "AssetService" - }, - "shortName": "ListAssets" - }, - "parameters": [ - { - "name": "request", - "type": "google.cloud.asset_v1p5beta1.types.ListAssetsRequest" - }, - { - "name": "retry", - "type": "google.api_core.retry.Retry" - }, - { - "name": "timeout", - "type": "float" - }, - { - "name": "metadata", - "type": "Sequence[Tuple[str, str]" - } - ], - "resultType": "google.cloud.asset_v1p5beta1.services.asset_service.pagers.ListAssetsPager", - "shortName": "list_assets" - }, - "description": "Sample for ListAssets", - "file": "cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py", - "language": "PYTHON", - "origin": "API_DEFINITION", - "regionTag": "cloudasset_v1p5beta1_generated_AssetService_ListAssets_sync", - "segments": [ - { - "end": 52, - "start": 27, - "type": "FULL" - }, - { - "end": 52, - "start": 27, - "type": "SHORT" - }, - { - "end": 40, - "start": 38, - "type": "CLIENT_INITIALIZATION" - }, - { - "end": 45, - "start": 41, - "type": "REQUEST_INITIALIZATION" - }, - { - "end": 48, - "start": 46, - "type": "REQUEST_EXECUTION" - }, - { - "end": 53, - "start": 49, - "type": "RESPONSE_HANDLING" - } - ], - "title": "cloudasset_v1p5beta1_generated_asset_service_list_assets_sync.py" - } - ] -} diff --git a/asset/snippets/snippets/noxfile.py b/asset/snippets/noxfile.py similarity index 100% rename from asset/snippets/snippets/noxfile.py rename to asset/snippets/noxfile.py diff --git a/asset/snippets/snippets/noxfile_config.py b/asset/snippets/noxfile_config.py similarity index 100% rename from asset/snippets/snippets/noxfile_config.py rename to asset/snippets/noxfile_config.py diff --git a/asset/snippets/snippets/quickstart_analyzeiampolicy.py b/asset/snippets/quickstart_analyzeiampolicy.py similarity index 100% rename from asset/snippets/snippets/quickstart_analyzeiampolicy.py rename to asset/snippets/quickstart_analyzeiampolicy.py diff --git a/asset/snippets/snippets/quickstart_analyzeiampolicy_test.py b/asset/snippets/quickstart_analyzeiampolicy_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_analyzeiampolicy_test.py rename to asset/snippets/quickstart_analyzeiampolicy_test.py diff --git a/asset/snippets/snippets/quickstart_analyzeiampolicylongrunning.py b/asset/snippets/quickstart_analyzeiampolicylongrunning.py similarity index 100% rename from asset/snippets/snippets/quickstart_analyzeiampolicylongrunning.py rename to asset/snippets/quickstart_analyzeiampolicylongrunning.py diff --git a/asset/snippets/snippets/quickstart_analyzeiampolicylongrunning_test.py b/asset/snippets/quickstart_analyzeiampolicylongrunning_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_analyzeiampolicylongrunning_test.py rename to asset/snippets/quickstart_analyzeiampolicylongrunning_test.py diff --git a/asset/snippets/snippets/quickstart_batchgetassetshistory.py b/asset/snippets/quickstart_batchgetassetshistory.py similarity index 100% rename from asset/snippets/snippets/quickstart_batchgetassetshistory.py rename to asset/snippets/quickstart_batchgetassetshistory.py diff --git a/asset/snippets/snippets/quickstart_batchgetassetshistory_test.py b/asset/snippets/quickstart_batchgetassetshistory_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_batchgetassetshistory_test.py rename to asset/snippets/quickstart_batchgetassetshistory_test.py diff --git a/asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy.py b/asset/snippets/quickstart_batchgeteffectiveiampolicy.py similarity index 100% rename from asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy.py rename to asset/snippets/quickstart_batchgeteffectiveiampolicy.py diff --git a/asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy_test.py b/asset/snippets/quickstart_batchgeteffectiveiampolicy_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_batchgeteffectiveiampolicy_test.py rename to asset/snippets/quickstart_batchgeteffectiveiampolicy_test.py diff --git a/asset/snippets/snippets/quickstart_create_saved_query.py b/asset/snippets/quickstart_create_saved_query.py similarity index 100% rename from asset/snippets/snippets/quickstart_create_saved_query.py rename to asset/snippets/quickstart_create_saved_query.py diff --git a/asset/snippets/snippets/quickstart_create_saved_query_test.py b/asset/snippets/quickstart_create_saved_query_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_create_saved_query_test.py rename to asset/snippets/quickstart_create_saved_query_test.py diff --git a/asset/snippets/snippets/quickstart_createfeed.py b/asset/snippets/quickstart_createfeed.py similarity index 100% rename from asset/snippets/snippets/quickstart_createfeed.py rename to asset/snippets/quickstart_createfeed.py diff --git a/asset/snippets/snippets/quickstart_createfeed_test.py b/asset/snippets/quickstart_createfeed_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_createfeed_test.py rename to asset/snippets/quickstart_createfeed_test.py diff --git a/asset/snippets/snippets/quickstart_delete_saved_query.py b/asset/snippets/quickstart_delete_saved_query.py similarity index 100% rename from asset/snippets/snippets/quickstart_delete_saved_query.py rename to asset/snippets/quickstart_delete_saved_query.py diff --git a/asset/snippets/snippets/quickstart_delete_saved_query_test.py b/asset/snippets/quickstart_delete_saved_query_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_delete_saved_query_test.py rename to asset/snippets/quickstart_delete_saved_query_test.py diff --git a/asset/snippets/snippets/quickstart_deletefeed.py b/asset/snippets/quickstart_deletefeed.py similarity index 100% rename from asset/snippets/snippets/quickstart_deletefeed.py rename to asset/snippets/quickstart_deletefeed.py diff --git a/asset/snippets/snippets/quickstart_deletefeed_test.py b/asset/snippets/quickstart_deletefeed_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_deletefeed_test.py rename to asset/snippets/quickstart_deletefeed_test.py diff --git a/asset/snippets/snippets/quickstart_exportassets.py b/asset/snippets/quickstart_exportassets.py similarity index 100% rename from asset/snippets/snippets/quickstart_exportassets.py rename to asset/snippets/quickstart_exportassets.py diff --git a/asset/snippets/snippets/quickstart_exportassets_test.py b/asset/snippets/quickstart_exportassets_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_exportassets_test.py rename to asset/snippets/quickstart_exportassets_test.py diff --git a/asset/snippets/snippets/quickstart_get_saved_query.py b/asset/snippets/quickstart_get_saved_query.py similarity index 100% rename from asset/snippets/snippets/quickstart_get_saved_query.py rename to asset/snippets/quickstart_get_saved_query.py diff --git a/asset/snippets/snippets/quickstart_get_saved_query_test.py b/asset/snippets/quickstart_get_saved_query_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_get_saved_query_test.py rename to asset/snippets/quickstart_get_saved_query_test.py diff --git a/asset/snippets/snippets/quickstart_getfeed.py b/asset/snippets/quickstart_getfeed.py similarity index 100% rename from asset/snippets/snippets/quickstart_getfeed.py rename to asset/snippets/quickstart_getfeed.py diff --git a/asset/snippets/snippets/quickstart_getfeed_test.py b/asset/snippets/quickstart_getfeed_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_getfeed_test.py rename to asset/snippets/quickstart_getfeed_test.py diff --git a/asset/snippets/snippets/quickstart_list_saved_queries.py b/asset/snippets/quickstart_list_saved_queries.py similarity index 100% rename from asset/snippets/snippets/quickstart_list_saved_queries.py rename to asset/snippets/quickstart_list_saved_queries.py diff --git a/asset/snippets/snippets/quickstart_list_saved_queries_test.py b/asset/snippets/quickstart_list_saved_queries_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_list_saved_queries_test.py rename to asset/snippets/quickstart_list_saved_queries_test.py diff --git a/asset/snippets/snippets/quickstart_listassets.py b/asset/snippets/quickstart_listassets.py similarity index 100% rename from asset/snippets/snippets/quickstart_listassets.py rename to asset/snippets/quickstart_listassets.py diff --git a/asset/snippets/snippets/quickstart_listassets_test.py b/asset/snippets/quickstart_listassets_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_listassets_test.py rename to asset/snippets/quickstart_listassets_test.py diff --git a/asset/snippets/snippets/quickstart_listfeeds.py b/asset/snippets/quickstart_listfeeds.py similarity index 100% rename from asset/snippets/snippets/quickstart_listfeeds.py rename to asset/snippets/quickstart_listfeeds.py diff --git a/asset/snippets/snippets/quickstart_listfeeds_test.py b/asset/snippets/quickstart_listfeeds_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_listfeeds_test.py rename to asset/snippets/quickstart_listfeeds_test.py diff --git a/asset/snippets/snippets/quickstart_searchalliampolicies.py b/asset/snippets/quickstart_searchalliampolicies.py similarity index 100% rename from asset/snippets/snippets/quickstart_searchalliampolicies.py rename to asset/snippets/quickstart_searchalliampolicies.py diff --git a/asset/snippets/snippets/quickstart_searchalliampolicies_test.py b/asset/snippets/quickstart_searchalliampolicies_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_searchalliampolicies_test.py rename to asset/snippets/quickstart_searchalliampolicies_test.py diff --git a/asset/snippets/snippets/quickstart_searchallresources.py b/asset/snippets/quickstart_searchallresources.py similarity index 100% rename from asset/snippets/snippets/quickstart_searchallresources.py rename to asset/snippets/quickstart_searchallresources.py diff --git a/asset/snippets/snippets/quickstart_searchallresources_test.py b/asset/snippets/quickstart_searchallresources_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_searchallresources_test.py rename to asset/snippets/quickstart_searchallresources_test.py diff --git a/asset/snippets/snippets/quickstart_update_saved_query.py b/asset/snippets/quickstart_update_saved_query.py similarity index 100% rename from asset/snippets/snippets/quickstart_update_saved_query.py rename to asset/snippets/quickstart_update_saved_query.py diff --git a/asset/snippets/snippets/quickstart_update_saved_query_test.py b/asset/snippets/quickstart_update_saved_query_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_update_saved_query_test.py rename to asset/snippets/quickstart_update_saved_query_test.py diff --git a/asset/snippets/snippets/quickstart_updatefeed.py b/asset/snippets/quickstart_updatefeed.py similarity index 100% rename from asset/snippets/snippets/quickstart_updatefeed.py rename to asset/snippets/quickstart_updatefeed.py diff --git a/asset/snippets/snippets/quickstart_updatefeed_test.py b/asset/snippets/quickstart_updatefeed_test.py similarity index 100% rename from asset/snippets/snippets/quickstart_updatefeed_test.py rename to asset/snippets/quickstart_updatefeed_test.py diff --git a/asset/snippets/snippets/requirements-test.txt b/asset/snippets/requirements-test.txt similarity index 100% rename from asset/snippets/snippets/requirements-test.txt rename to asset/snippets/requirements-test.txt diff --git a/asset/snippets/snippets/requirements.txt b/asset/snippets/requirements.txt similarity index 100% rename from asset/snippets/snippets/requirements.txt rename to asset/snippets/requirements.txt From dbb25a2032688722c92da18163b89366e3ec59ad Mon Sep 17 00:00:00 2001 From: Charlie Engelke Date: Mon, 28 Nov 2022 14:53:40 -0800 Subject: [PATCH 232/235] process: update ownership --- .github/CODEOWNERS | 1 + .github/blunderbuss.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d81e1d1483b3..41b99e2fc7ac 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -19,6 +19,7 @@ /appengine/standard/django/**/* @glasnt @GoogleCloudPlatform/aap-dpes @GoogleCloudPlatform/python-samples-reviewers /appengine/flexible/django_cloudsql/**/* @glasnt @GoogleCloudPlatform/aap-dpes @GoogleCloudPlatform/python-samples-reviewers /appengine/standard_python3/spanner/* @GoogleCloudPlatform/api-spanner-python @GoogleCloudPlatform/python-samples-reviewers +/asset/**/* @GoogleCloudPlatform/python-samples-reviewers /auth/**/* @arithmetic1728 @GoogleCloudPlatform/python-samples-reviewers /automl/**/* @GoogleCloudPlatform/ml-apis @GoogleCloudPlatform/python-samples-reviewers /batch/**/* @m-strzelczyk @GoogleCloudPlatform/dee-infra @GoogleCloudPlatform/python-samples-reviewers diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml index cb3aa087fe7c..8f3aa5a62869 100644 --- a/.github/blunderbuss.yml +++ b/.github/blunderbuss.yml @@ -156,6 +156,7 @@ assign_issues_by: to: - GoogleCloudPlatform/cloud-native-db-dpes - labels: + - 'api: asset' - 'api: datacatalog' - 'api: dataproc' - 'api: clouderrorreporting' From d70f32c709dc75fb40f3c5e46e1c915badd836cf Mon Sep 17 00:00:00 2001 From: Charlie Engelke Date: Mon, 28 Nov 2022 14:59:53 -0800 Subject: [PATCH 233/235] fix: region tag closure --- asset/snippets/quickstart_getfeed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/quickstart_getfeed.py b/asset/snippets/quickstart_getfeed.py index aebe76217333..cefcd04d9dc0 100644 --- a/asset/snippets/quickstart_getfeed.py +++ b/asset/snippets/quickstart_getfeed.py @@ -27,7 +27,7 @@ def get_feed(feed_name): client = asset_v1.AssetServiceClient() response = client.get_feed(request={"name": feed_name}) print("gotten_feed: {}".format(response)) - # [START asset_quickstart_get_feed] + # [END asset_quickstart_get_feed] if __name__ == "__main__": From af084bed3a7ca3eddec5bff083e8ec918b49512c Mon Sep 17 00:00:00 2001 From: Charlie Engelke Date: Mon, 28 Nov 2022 15:35:15 -0800 Subject: [PATCH 234/235] fix: no py2.7 testing --- asset/snippets/noxfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asset/snippets/noxfile.py b/asset/snippets/noxfile.py index f5c32b22789b..137ca791f47d 100644 --- a/asset/snippets/noxfile.py +++ b/asset/snippets/noxfile.py @@ -41,7 +41,7 @@ TEST_CONFIG = { # You can opt out from the test for specific Python versions. - "ignored_versions": [], + "ignored_versions": ["2.7"], # Old samples are opted out of enforcing Python type hints # All new samples should feature them "enforce_type_hints": False, From 07e8b8145670fc1f9f9ed99e348d8fe28ca2ca7e Mon Sep 17 00:00:00 2001 From: Charlie Engelke Date: Tue, 29 Nov 2022 09:55:38 -0800 Subject: [PATCH 235/235] fix: remove local noxfile copy --- asset/snippets/noxfile.py | 292 -------------------------------------- 1 file changed, 292 deletions(-) delete mode 100644 asset/snippets/noxfile.py diff --git a/asset/snippets/noxfile.py b/asset/snippets/noxfile.py deleted file mode 100644 index 137ca791f47d..000000000000 --- a/asset/snippets/noxfile.py +++ /dev/null @@ -1,292 +0,0 @@ -# Copyright 2019 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. - -from __future__ import print_function - -import glob -import os -from pathlib import Path -import sys -from typing import Callable, Dict, Optional - -import nox - - -# WARNING - WARNING - WARNING - WARNING - WARNING -# WARNING - WARNING - WARNING - WARNING - WARNING -# DO NOT EDIT THIS FILE EVER! -# WARNING - WARNING - WARNING - WARNING - WARNING -# WARNING - WARNING - WARNING - WARNING - WARNING - -BLACK_VERSION = "black==22.3.0" -ISORT_VERSION = "isort==5.10.1" - -# Copy `noxfile_config.py` to your directory and modify it instead. - -# `TEST_CONFIG` dict is a configuration hook that allows users to -# modify the test configurations. The values here should be in sync -# with `noxfile_config.py`. Users will copy `noxfile_config.py` into -# their directory and modify it. - -TEST_CONFIG = { - # You can opt out from the test for specific Python versions. - "ignored_versions": ["2.7"], - # Old samples are opted out of enforcing Python type hints - # All new samples should feature them - "enforce_type_hints": False, - # An envvar key for determining the project id to use. Change it - # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a - # build specific Cloud project. You can also use your own string - # to use your own Cloud project. - "gcloud_project_env": "GOOGLE_CLOUD_PROJECT", - # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', - # If you need to use a specific version of pip, - # change pip_version_override to the string representation - # of the version number, for example, "20.2.4" - "pip_version_override": None, - # A dictionary you want to inject into your test. Don't put any - # secrets here. These values will override predefined values. - "envs": {}, -} - - -try: - # Ensure we can import noxfile_config in the project's directory. - sys.path.append(".") - from noxfile_config import TEST_CONFIG_OVERRIDE -except ImportError as e: - print("No user noxfile_config found: detail: {}".format(e)) - TEST_CONFIG_OVERRIDE = {} - -# Update the TEST_CONFIG with the user supplied values. -TEST_CONFIG.update(TEST_CONFIG_OVERRIDE) - - -def get_pytest_env_vars() -> Dict[str, str]: - """Returns a dict for pytest invocation.""" - ret = {} - - # Override the GCLOUD_PROJECT and the alias. - env_key = TEST_CONFIG["gcloud_project_env"] - # This should error out if not set. - ret["GOOGLE_CLOUD_PROJECT"] = os.environ[env_key] - - # Apply user supplied envs. - ret.update(TEST_CONFIG["envs"]) - return ret - - -# DO NOT EDIT - automatically generated. -# All versions used to test samples. -ALL_VERSIONS = ["3.7", "3.8", "3.9", "3.10"] - -# Any default versions that should be ignored. -IGNORED_VERSIONS = TEST_CONFIG["ignored_versions"] - -TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) - -INSTALL_LIBRARY_FROM_SOURCE = os.environ.get("INSTALL_LIBRARY_FROM_SOURCE", False) in ( - "True", - "true", -) - -# Error if a python version is missing -nox.options.error_on_missing_interpreters = True - -# -# Style Checks -# - - -# Linting with flake8. -# -# We ignore the following rules: -# E203: whitespace before ‘:’ -# E266: too many leading ‘#’ for block comment -# E501: line too long -# I202: Additional newline in a section of imports -# -# We also need to specify the rules which are ignored by default: -# ['E226', 'W504', 'E126', 'E123', 'W503', 'E24', 'E704', 'E121'] -FLAKE8_COMMON_ARGS = [ - "--show-source", - "--builtin=gettext", - "--max-complexity=20", - "--exclude=.nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py", - "--ignore=E121,E123,E126,E203,E226,E24,E266,E501,E704,W503,W504,I202", - "--max-line-length=88", -] - - -@nox.session -def lint(session: nox.sessions.Session) -> None: - if not TEST_CONFIG["enforce_type_hints"]: - session.install("flake8") - else: - session.install("flake8", "flake8-annotations") - - args = FLAKE8_COMMON_ARGS + [ - ".", - ] - session.run("flake8", *args) - - -# -# Black -# - - -@nox.session -def blacken(session: nox.sessions.Session) -> None: - """Run black. Format code to uniform standard.""" - session.install(BLACK_VERSION) - python_files = [path for path in os.listdir(".") if path.endswith(".py")] - - session.run("black", *python_files) - - -# -# format = isort + black -# - -@nox.session -def format(session: nox.sessions.Session) -> None: - """ - Run isort to sort imports. Then run black - to format code to uniform standard. - """ - session.install(BLACK_VERSION, ISORT_VERSION) - python_files = [path for path in os.listdir(".") if path.endswith(".py")] - - # Use the --fss option to sort imports using strict alphabetical order. - # See https://pycqa.github.io/isort/docs/configuration/options.html#force-sort-within-sections - session.run("isort", "--fss", *python_files) - session.run("black", *python_files) - - -# -# Sample Tests -# - - -PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] - - -def _session_tests( - session: nox.sessions.Session, post_install: Callable = None -) -> None: - # check for presence of tests - test_list = glob.glob("**/*_test.py", recursive=True) + glob.glob("**/test_*.py", recursive=True) - test_list.extend(glob.glob("**/tests", recursive=True)) - - if len(test_list) == 0: - print("No tests found, skipping directory.") - return - - if TEST_CONFIG["pip_version_override"]: - pip_version = TEST_CONFIG["pip_version_override"] - session.install(f"pip=={pip_version}") - """Runs py.test for a particular project.""" - concurrent_args = [] - if os.path.exists("requirements.txt"): - if os.path.exists("constraints.txt"): - session.install("-r", "requirements.txt", "-c", "constraints.txt") - else: - session.install("-r", "requirements.txt") - with open("requirements.txt") as rfile: - packages = rfile.read() - - if os.path.exists("requirements-test.txt"): - if os.path.exists("constraints-test.txt"): - session.install( - "-r", "requirements-test.txt", "-c", "constraints-test.txt" - ) - else: - session.install("-r", "requirements-test.txt") - with open("requirements-test.txt") as rtfile: - packages += rtfile.read() - - if INSTALL_LIBRARY_FROM_SOURCE: - session.install("-e", _get_repo_root()) - - if post_install: - post_install(session) - - if "pytest-parallel" in packages: - concurrent_args.extend(['--workers', 'auto', '--tests-per-worker', 'auto']) - elif "pytest-xdist" in packages: - concurrent_args.extend(['-n', 'auto']) - - session.run( - "pytest", - *(PYTEST_COMMON_ARGS + session.posargs + concurrent_args), - # Pytest will return 5 when no tests are collected. This can happen - # on travis where slow and flaky tests are excluded. - # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html - success_codes=[0, 5], - env=get_pytest_env_vars(), - ) - - -@nox.session(python=ALL_VERSIONS) -def py(session: nox.sessions.Session) -> None: - """Runs py.test for a sample using the specified version of Python.""" - if session.python in TESTED_VERSIONS: - _session_tests(session) - else: - session.skip( - "SKIPPED: {} tests are disabled for this sample.".format(session.python) - ) - - -# -# Readmegen -# - - -def _get_repo_root() -> Optional[str]: - """ Returns the root folder of the project. """ - # Get root of this repository. Assume we don't have directories nested deeper than 10 items. - p = Path(os.getcwd()) - for i in range(10): - if p is None: - break - if Path(p / ".git").exists(): - return str(p) - # .git is not available in repos cloned via Cloud Build - # setup.py is always in the library's root, so use that instead - # https://github.com/googleapis/synthtool/issues/792 - if Path(p / "setup.py").exists(): - return str(p) - p = p.parent - raise Exception("Unable to detect repository root.") - - -GENERATED_READMES = sorted([x for x in Path(".").rglob("*.rst.in")]) - - -@nox.session -@nox.parametrize("path", GENERATED_READMES) -def readmegen(session: nox.sessions.Session, path: str) -> None: - """(Re-)generates the readme for a sample.""" - session.install("jinja2", "pyyaml") - dir_ = os.path.dirname(path) - - if os.path.exists(os.path.join(dir_, "requirements.txt")): - session.install("-r", os.path.join(dir_, "requirements.txt")) - - in_file = os.path.join(dir_, "README.rst.in") - session.run( - "python", _get_repo_root() + "/scripts/readme-gen/readme_gen.py", in_file - )