-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: googleapis/googleapis@9ebabfa Source-Link: googleapis/googleapis-gen@a881752 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTg4MTc1MjYzZTYwYTFkNDVkM2E0NDc4NDg2NTJiMGY2NzBiMmNiOCJ9 Closes: #285
- Loading branch information
1 parent
0fc1ab6
commit 626a4a9
Showing
52 changed files
with
4,168 additions
and
1 deletion.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
...generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
54 changes: 54 additions & 0 deletions
54
...mples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
54 changes: 54 additions & 0 deletions
54
...amples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_longrunning_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
48 changes: 48 additions & 0 deletions
48
.../generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_iam_policy_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
46 changes: 46 additions & 0 deletions
46
...ppets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
46 changes: 46 additions & 0 deletions
46
...ippets/generated_samples/cloudasset_generated_asset_v1_asset_service_analyze_move_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
45 changes: 45 additions & 0 deletions
45
...ted_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
45 changes: 45 additions & 0 deletions
45
...ated_samples/cloudasset_generated_asset_v1_asset_service_batch_get_assets_history_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |
Oops, something went wrong.