Skip to content

Commit

Permalink
chore: use gapic-generator-python 0.63.1 (#365)
Browse files Browse the repository at this point in the history
- [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
gcf-owl-bot[bot] authored and dandhlee committed Nov 29, 2022
1 parent 0fc1ab6 commit 626a4a9
Show file tree
Hide file tree
Showing 52 changed files with 4,168 additions and 1 deletion.
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]
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]
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]
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]
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]
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]
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]
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]
Loading

0 comments on commit 626a4a9

Please sign in to comment.