Skip to content

Commit

Permalink
feat: Release of query system (#467)
Browse files Browse the repository at this point in the history
* feat: Release of query system
Committer: lvv@

PiperOrigin-RevId: 466748663

Source-Link: googleapis/googleapis@80d630f

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 <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people authored Aug 12, 2022
1 parent b01e774 commit de947a1
Show file tree
Hide file tree
Showing 3 changed files with 245 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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]
Original file line number Diff line number Diff line change
@@ -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]
153 changes: 153 additions & 0 deletions asset/snippets/generated_samples/snippet_metadata_asset_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit de947a1

Please sign in to comment.