Skip to content

Commit 1322c02

Browse files
gcf-owl-bot[bot]parthea
authored andcommitted
feat: Release of query system (#467)
* feat: Release of query system Committer: lvv@ PiperOrigin-RevId: 466748663 Source-Link: googleapis/googleapis@80d630f Source-Link: googleapis/googleapis-gen@252f5ad 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 <[email protected]>
1 parent 4a39c56 commit 1322c02

3 files changed

+245
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 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 QueryAssets
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_v1_generated_AssetService_QueryAssets_async]
27+
from google.cloud import asset_v1
28+
29+
30+
async def sample_query_assets():
31+
# Create a client
32+
client = asset_v1.AssetServiceAsyncClient()
33+
34+
# Initialize request argument(s)
35+
request = asset_v1.QueryAssetsRequest(
36+
statement="statement_value",
37+
parent="parent_value",
38+
)
39+
40+
# Make the request
41+
response = await client.query_assets(request=request)
42+
43+
# Handle the response
44+
print(response)
45+
46+
# [END cloudasset_v1_generated_AssetService_QueryAssets_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 2022 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 QueryAssets
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_v1_generated_AssetService_QueryAssets_sync]
27+
from google.cloud import asset_v1
28+
29+
30+
def sample_query_assets():
31+
# Create a client
32+
client = asset_v1.AssetServiceClient()
33+
34+
# Initialize request argument(s)
35+
request = asset_v1.QueryAssetsRequest(
36+
statement="statement_value",
37+
parent="parent_value",
38+
)
39+
40+
# Make the request
41+
response = client.query_assets(request=request)
42+
43+
# Handle the response
44+
print(response)
45+
46+
# [END cloudasset_v1_generated_AssetService_QueryAssets_sync]

asset/snippets/generated_samples/snippet_metadata_asset_v1.json

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2381,6 +2381,159 @@
23812381
],
23822382
"title": "cloudasset_v1_generated_asset_service_list_saved_queries_sync.py"
23832383
},
2384+
{
2385+
"canonical": true,
2386+
"clientMethod": {
2387+
"async": true,
2388+
"client": {
2389+
"fullName": "google.cloud.asset_v1.AssetServiceAsyncClient",
2390+
"shortName": "AssetServiceAsyncClient"
2391+
},
2392+
"fullName": "google.cloud.asset_v1.AssetServiceAsyncClient.query_assets",
2393+
"method": {
2394+
"fullName": "google.cloud.asset.v1.AssetService.QueryAssets",
2395+
"service": {
2396+
"fullName": "google.cloud.asset.v1.AssetService",
2397+
"shortName": "AssetService"
2398+
},
2399+
"shortName": "QueryAssets"
2400+
},
2401+
"parameters": [
2402+
{
2403+
"name": "request",
2404+
"type": "google.cloud.asset_v1.types.QueryAssetsRequest"
2405+
},
2406+
{
2407+
"name": "retry",
2408+
"type": "google.api_core.retry.Retry"
2409+
},
2410+
{
2411+
"name": "timeout",
2412+
"type": "float"
2413+
},
2414+
{
2415+
"name": "metadata",
2416+
"type": "Sequence[Tuple[str, str]"
2417+
}
2418+
],
2419+
"resultType": "google.cloud.asset_v1.types.QueryAssetsResponse",
2420+
"shortName": "query_assets"
2421+
},
2422+
"description": "Sample for QueryAssets",
2423+
"file": "cloudasset_v1_generated_asset_service_query_assets_async.py",
2424+
"language": "PYTHON",
2425+
"origin": "API_DEFINITION",
2426+
"regionTag": "cloudasset_v1_generated_AssetService_QueryAssets_async",
2427+
"segments": [
2428+
{
2429+
"end": 45,
2430+
"start": 27,
2431+
"type": "FULL"
2432+
},
2433+
{
2434+
"end": 45,
2435+
"start": 27,
2436+
"type": "SHORT"
2437+
},
2438+
{
2439+
"end": 33,
2440+
"start": 31,
2441+
"type": "CLIENT_INITIALIZATION"
2442+
},
2443+
{
2444+
"end": 39,
2445+
"start": 34,
2446+
"type": "REQUEST_INITIALIZATION"
2447+
},
2448+
{
2449+
"end": 42,
2450+
"start": 40,
2451+
"type": "REQUEST_EXECUTION"
2452+
},
2453+
{
2454+
"end": 46,
2455+
"start": 43,
2456+
"type": "RESPONSE_HANDLING"
2457+
}
2458+
],
2459+
"title": "cloudasset_v1_generated_asset_service_query_assets_async.py"
2460+
},
2461+
{
2462+
"canonical": true,
2463+
"clientMethod": {
2464+
"client": {
2465+
"fullName": "google.cloud.asset_v1.AssetServiceClient",
2466+
"shortName": "AssetServiceClient"
2467+
},
2468+
"fullName": "google.cloud.asset_v1.AssetServiceClient.query_assets",
2469+
"method": {
2470+
"fullName": "google.cloud.asset.v1.AssetService.QueryAssets",
2471+
"service": {
2472+
"fullName": "google.cloud.asset.v1.AssetService",
2473+
"shortName": "AssetService"
2474+
},
2475+
"shortName": "QueryAssets"
2476+
},
2477+
"parameters": [
2478+
{
2479+
"name": "request",
2480+
"type": "google.cloud.asset_v1.types.QueryAssetsRequest"
2481+
},
2482+
{
2483+
"name": "retry",
2484+
"type": "google.api_core.retry.Retry"
2485+
},
2486+
{
2487+
"name": "timeout",
2488+
"type": "float"
2489+
},
2490+
{
2491+
"name": "metadata",
2492+
"type": "Sequence[Tuple[str, str]"
2493+
}
2494+
],
2495+
"resultType": "google.cloud.asset_v1.types.QueryAssetsResponse",
2496+
"shortName": "query_assets"
2497+
},
2498+
"description": "Sample for QueryAssets",
2499+
"file": "cloudasset_v1_generated_asset_service_query_assets_sync.py",
2500+
"language": "PYTHON",
2501+
"origin": "API_DEFINITION",
2502+
"regionTag": "cloudasset_v1_generated_AssetService_QueryAssets_sync",
2503+
"segments": [
2504+
{
2505+
"end": 45,
2506+
"start": 27,
2507+
"type": "FULL"
2508+
},
2509+
{
2510+
"end": 45,
2511+
"start": 27,
2512+
"type": "SHORT"
2513+
},
2514+
{
2515+
"end": 33,
2516+
"start": 31,
2517+
"type": "CLIENT_INITIALIZATION"
2518+
},
2519+
{
2520+
"end": 39,
2521+
"start": 34,
2522+
"type": "REQUEST_INITIALIZATION"
2523+
},
2524+
{
2525+
"end": 42,
2526+
"start": 40,
2527+
"type": "REQUEST_EXECUTION"
2528+
},
2529+
{
2530+
"end": 46,
2531+
"start": 43,
2532+
"type": "RESPONSE_HANDLING"
2533+
}
2534+
],
2535+
"title": "cloudasset_v1_generated_asset_service_query_assets_sync.py"
2536+
},
23842537
{
23852538
"canonical": true,
23862539
"clientMethod": {

0 commit comments

Comments
 (0)