Skip to content

Commit 25db1c6

Browse files
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: https://github.com/googleapis/googleapis-gen/commit/a88175263e60a1d45d3a447848652b0f670b2cb8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTg4MTc1MjYzZTYwYTFkNDVkM2E0NDc4NDg2NTJiMGY2NzBiMmNiOCJ9 Closes: #285
1 parent c2b9350 commit 25db1c6

File tree

52 files changed

+4168
-1
lines changed

Some content is hidden

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

52 files changed

+4168
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for AnalyzeIamPolicy
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-asset
24+
25+
26+
# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async]
27+
from google.cloud import asset_v1
28+
29+
30+
async def sample_analyze_iam_policy():
31+
# Create a client
32+
client = asset_v1.AssetServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
analysis_query = asset_v1.IamPolicyAnalysisQuery()
36+
analysis_query.scope = "scope_value"
37+
38+
request = asset_v1.AnalyzeIamPolicyRequest(
39+
analysis_query=analysis_query,
40+
)
41+
42+
# Make the request
43+
response = await client.analyze_iam_policy(request=request)
44+
45+
# Handle response
46+
print(response)
47+
48+
# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for AnalyzeIamPolicyLongrunning
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-asset
24+
25+
26+
# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async]
27+
from google.cloud import asset_v1
28+
29+
30+
async def sample_analyze_iam_policy_longrunning():
31+
# Create a client
32+
client = asset_v1.AssetServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
analysis_query = asset_v1.IamPolicyAnalysisQuery()
36+
analysis_query.scope = "scope_value"
37+
38+
output_config = asset_v1.IamPolicyAnalysisOutputConfig()
39+
output_config.gcs_destination.uri = "uri_value"
40+
41+
request = asset_v1.AnalyzeIamPolicyLongrunningRequest(
42+
analysis_query=analysis_query,
43+
output_config=output_config,
44+
)
45+
46+
# Make the request
47+
operation = client.analyze_iam_policy_longrunning(request=request)
48+
49+
print("Waiting for operation to complete...")
50+
51+
response = await operation.result()
52+
print(response)
53+
54+
# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for AnalyzeIamPolicyLongrunning
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-asset
24+
25+
26+
# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync]
27+
from google.cloud import asset_v1
28+
29+
30+
def sample_analyze_iam_policy_longrunning():
31+
# Create a client
32+
client = asset_v1.AssetServiceClient()
33+
34+
# Initialize request argument(s)
35+
analysis_query = asset_v1.IamPolicyAnalysisQuery()
36+
analysis_query.scope = "scope_value"
37+
38+
output_config = asset_v1.IamPolicyAnalysisOutputConfig()
39+
output_config.gcs_destination.uri = "uri_value"
40+
41+
request = asset_v1.AnalyzeIamPolicyLongrunningRequest(
42+
analysis_query=analysis_query,
43+
output_config=output_config,
44+
)
45+
46+
# Make the request
47+
operation = client.analyze_iam_policy_longrunning(request=request)
48+
49+
print("Waiting for operation to complete...")
50+
51+
response = operation.result()
52+
print(response)
53+
54+
# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicyLongrunning_sync]
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for AnalyzeIamPolicy
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-asset
24+
25+
26+
# [START cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync]
27+
from google.cloud import asset_v1
28+
29+
30+
def sample_analyze_iam_policy():
31+
# Create a client
32+
client = asset_v1.AssetServiceClient()
33+
34+
# Initialize request argument(s)
35+
analysis_query = asset_v1.IamPolicyAnalysisQuery()
36+
analysis_query.scope = "scope_value"
37+
38+
request = asset_v1.AnalyzeIamPolicyRequest(
39+
analysis_query=analysis_query,
40+
)
41+
42+
# Make the request
43+
response = client.analyze_iam_policy(request=request)
44+
45+
# Handle response
46+
print(response)
47+
48+
# [END cloudasset_generated_asset_v1_AssetService_AnalyzeIamPolicy_sync]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for AnalyzeMove
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-asset
24+
25+
26+
# [START cloudasset_generated_asset_v1_AssetService_AnalyzeMove_async]
27+
from google.cloud import asset_v1
28+
29+
30+
async def sample_analyze_move():
31+
# Create a client
32+
client = asset_v1.AssetServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = asset_v1.AnalyzeMoveRequest(
36+
resource="resource_value",
37+
destination_parent="destination_parent_value",
38+
)
39+
40+
# Make the request
41+
response = await client.analyze_move(request=request)
42+
43+
# Handle response
44+
print(response)
45+
46+
# [END cloudasset_generated_asset_v1_AssetService_AnalyzeMove_async]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for AnalyzeMove
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-asset
24+
25+
26+
# [START cloudasset_generated_asset_v1_AssetService_AnalyzeMove_sync]
27+
from google.cloud import asset_v1
28+
29+
30+
def sample_analyze_move():
31+
# Create a client
32+
client = asset_v1.AssetServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = asset_v1.AnalyzeMoveRequest(
36+
resource="resource_value",
37+
destination_parent="destination_parent_value",
38+
)
39+
40+
# Make the request
41+
response = client.analyze_move(request=request)
42+
43+
# Handle response
44+
print(response)
45+
46+
# [END cloudasset_generated_asset_v1_AssetService_AnalyzeMove_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for BatchGetAssetsHistory
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-asset
24+
25+
26+
# [START cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async]
27+
from google.cloud import asset_v1
28+
29+
30+
async def sample_batch_get_assets_history():
31+
# Create a client
32+
client = asset_v1.AssetServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = asset_v1.BatchGetAssetsHistoryRequest(
36+
parent="parent_value",
37+
)
38+
39+
# Make the request
40+
response = await client.batch_get_assets_history(request=request)
41+
42+
# Handle response
43+
print(response)
44+
45+
# [END cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for BatchGetAssetsHistory
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-asset
24+
25+
26+
# [START cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync]
27+
from google.cloud import asset_v1
28+
29+
30+
def sample_batch_get_assets_history():
31+
# Create a client
32+
client = asset_v1.AssetServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = asset_v1.BatchGetAssetsHistoryRequest(
36+
parent="parent_value",
37+
)
38+
39+
# Make the request
40+
response = client.batch_get_assets_history(request=request)
41+
42+
# Handle response
43+
print(response)
44+
45+
# [END cloudasset_generated_asset_v1_AssetService_BatchGetAssetsHistory_sync]

0 commit comments

Comments
 (0)