Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add snippet metadata file #1084

Merged
merged 11 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions baselines/asset/.jsdoc.js.baseline
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// 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.
Expand Down Expand Up @@ -40,7 +40,7 @@ module.exports = {
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2021 Google LLC',
copyright: 'Copyright 2022 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/asset',
Expand Down
2 changes: 1 addition & 1 deletion baselines/asset/.mocharc.js.baseline
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// 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.
Expand Down
2 changes: 1 addition & 1 deletion baselines/asset/.prettierrc.js.baseline
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,335 @@
{
"clientLibrary": {
"name": "nodejs-asset",
"version": "0.1.0",
"language": "TYPESCRIPT",
"apis": [
{
"id": "AssetService",
"version": "v1"
}
]
},
"snippets": [
{
"regionTag": "cloudasset_v1_generated_AssetService_ExportAssets_async",
"title": "AssetService exportAssets Sample",
"origin": "API_DEFINITION",
"description": " Exports assets with time and resource types to a given Cloud Storage location. The output format is newline-delimited JSON. This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep track of the export.",
"canonical": true,
"file": "asset_service.export_assets.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 20,
"end": 76,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "ExportAssets",
"fullName": "google.cloud.asset.v1.ExportAssets",
"async": true,
"parameters": [
{
"name": "parent",
"type": "TYPE_STRING"
},
{
"name": "read_time",
"type": ".google.protobuf.Timestamp"
},
{
"name": "asset_types",
"type": "TYPE_STRING[]"
},
{
"name": "content_type",
"type": ".google.cloud.asset.v1.ContentType"
},
{
"name": "output_config",
"type": ".google.cloud.asset.v1.OutputConfig"
}
],
"resultType": ".google.longrunning.Operation",
"client": {
"shortName": "AssetServiceClient",
"fullName": "google.cloud.asset.v1.AssetServiceClient"
},
"method": {
"shortName": "ExportAssets",
"fullName": "google.cloud.asset.v1.ExportAssets",
"service": {
"shortName": "AssetService",
"fullName": "google.cloud.asset.v1.AssetService"
}
}
}
},
{
"regionTag": "cloudasset_v1_generated_AssetService_BatchGetAssetsHistory_async",
"title": "AssetService batchGetAssetsHistory Sample",
"origin": "API_DEFINITION",
"description": " Batch gets the update history of assets that overlap a time window. For RESOURCE content, this API outputs history with asset in both non-delete or deleted status. For IAM_POLICY content, this API outputs history when the asset and its attached IAM POLICY both exist. This can create gaps in the output history. If a specified asset does not exist, this API returns an INVALID_ARGUMENT error.",
"canonical": true,
"file": "asset_service.batch_get_assets_history.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 20,
"end": 72,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "BatchGetAssetsHistory",
"fullName": "google.cloud.asset.v1.BatchGetAssetsHistory",
"async": true,
"parameters": [
{
"name": "parent",
"type": "TYPE_STRING"
},
{
"name": "asset_names",
"type": "TYPE_STRING[]"
},
{
"name": "content_type",
"type": ".google.cloud.asset.v1.ContentType"
},
{
"name": "read_time_window",
"type": ".google.cloud.asset.v1.TimeWindow"
}
],
"resultType": ".google.cloud.asset.v1.BatchGetAssetsHistoryResponse",
"client": {
"shortName": "AssetServiceClient",
"fullName": "google.cloud.asset.v1.AssetServiceClient"
},
"method": {
"shortName": "BatchGetAssetsHistory",
"fullName": "google.cloud.asset.v1.BatchGetAssetsHistory",
"service": {
"shortName": "AssetService",
"fullName": "google.cloud.asset.v1.AssetService"
}
}
}
},
{
"regionTag": "cloudasset_v1_generated_AssetService_CreateFeed_async",
"title": "AssetService createFeed Sample",
"origin": "API_DEFINITION",
"description": " Creates a feed in a parent project/folder/organization to listen to its asset updates.",
"canonical": true,
"file": "asset_service.create_feed.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 20,
"end": 64,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "CreateFeed",
"fullName": "google.cloud.asset.v1.CreateFeed",
"async": true,
"parameters": [
{
"name": "parent",
"type": "TYPE_STRING"
},
{
"name": "feed_id",
"type": "TYPE_STRING"
},
{
"name": "feed",
"type": ".google.cloud.asset.v1.Feed"
}
],
"resultType": ".google.cloud.asset.v1.Feed",
"client": {
"shortName": "AssetServiceClient",
"fullName": "google.cloud.asset.v1.AssetServiceClient"
},
"method": {
"shortName": "CreateFeed",
"fullName": "google.cloud.asset.v1.CreateFeed",
"service": {
"shortName": "AssetService",
"fullName": "google.cloud.asset.v1.AssetService"
}
}
}
},
{
"regionTag": "cloudasset_v1_generated_AssetService_GetFeed_async",
"title": "AssetService getFeed Sample",
"origin": "API_DEFINITION",
"description": " Gets details about an asset feed.",
"canonical": true,
"file": "asset_service.get_feed.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 20,
"end": 48,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "GetFeed",
"fullName": "google.cloud.asset.v1.GetFeed",
"async": true,
"parameters": [
{
"name": "name",
"type": "TYPE_STRING"
}
],
"resultType": ".google.cloud.asset.v1.Feed",
"client": {
"shortName": "AssetServiceClient",
"fullName": "google.cloud.asset.v1.AssetServiceClient"
},
"method": {
"shortName": "GetFeed",
"fullName": "google.cloud.asset.v1.GetFeed",
"service": {
"shortName": "AssetService",
"fullName": "google.cloud.asset.v1.AssetService"
}
}
}
},
{
"regionTag": "cloudasset_v1_generated_AssetService_ListFeeds_async",
"title": "AssetService listFeeds Sample",
"origin": "API_DEFINITION",
"description": " Lists all asset feeds in a parent project/folder/organization.",
"canonical": true,
"file": "asset_service.list_feeds.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 20,
"end": 47,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "ListFeeds",
"fullName": "google.cloud.asset.v1.ListFeeds",
"async": true,
"parameters": [
{
"name": "parent",
"type": "TYPE_STRING"
}
],
"resultType": ".google.cloud.asset.v1.ListFeedsResponse",
"client": {
"shortName": "AssetServiceClient",
"fullName": "google.cloud.asset.v1.AssetServiceClient"
},
"method": {
"shortName": "ListFeeds",
"fullName": "google.cloud.asset.v1.ListFeeds",
"service": {
"shortName": "AssetService",
"fullName": "google.cloud.asset.v1.AssetService"
}
}
}
},
{
"regionTag": "cloudasset_v1_generated_AssetService_UpdateFeed_async",
"title": "AssetService updateFeed Sample",
"origin": "API_DEFINITION",
"description": " Updates an asset feed configuration.",
"canonical": true,
"file": "asset_service.update_feed.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 20,
"end": 56,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "UpdateFeed",
"fullName": "google.cloud.asset.v1.UpdateFeed",
"async": true,
"parameters": [
{
"name": "feed",
"type": ".google.cloud.asset.v1.Feed"
},
{
"name": "update_mask",
"type": ".google.protobuf.FieldMask"
}
],
"resultType": ".google.cloud.asset.v1.Feed",
"client": {
"shortName": "AssetServiceClient",
"fullName": "google.cloud.asset.v1.AssetServiceClient"
},
"method": {
"shortName": "UpdateFeed",
"fullName": "google.cloud.asset.v1.UpdateFeed",
"service": {
"shortName": "AssetService",
"fullName": "google.cloud.asset.v1.AssetService"
}
}
}
},
{
"regionTag": "cloudasset_v1_generated_AssetService_DeleteFeed_async",
"title": "AssetService deleteFeed Sample",
"origin": "API_DEFINITION",
"description": " Deletes an asset feed.",
"canonical": true,
"file": "asset_service.delete_feed.js",
"language": "JAVASCRIPT",
"segments": [
{
"start": 20,
"end": 48,
"type": "FULL"
}
],
"clientMethod": {
"shortName": "DeleteFeed",
"fullName": "google.cloud.asset.v1.DeleteFeed",
"async": true,
"parameters": [
{
"name": "name",
"type": "TYPE_STRING"
}
],
"resultType": ".google.protobuf.Empty",
"client": {
"shortName": "AssetServiceClient",
"fullName": "google.cloud.asset.v1.AssetServiceClient"
},
"method": {
"shortName": "DeleteFeed",
"fullName": "google.cloud.asset.v1.DeleteFeed",
"service": {
"shortName": "AssetService",
"fullName": "google.cloud.asset.v1.AssetService"
}
}
}
}
]
}
2 changes: 1 addition & 1 deletion baselines/asset/src/index.ts.baseline
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// 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.
Expand Down
2 changes: 1 addition & 1 deletion baselines/asset/src/v1/asset_service_client.ts.baseline
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// 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.
Expand Down
2 changes: 1 addition & 1 deletion baselines/asset/src/v1/index.ts.baseline
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// 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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// 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.
Expand Down
2 changes: 1 addition & 1 deletion baselines/asset/system-test/install.ts.baseline
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// 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.
Expand Down
Loading