Skip to content

Commit 15bf823

Browse files
peter-zheng-gNeenu1995averikitschgcf-owl-bot[bot]
authored andcommitted
CloudAsset: Update asset lib to v1 for ListAssets sample code (#760)
* CloudAsset: Update asset lib to v1 for ListAssets sample code * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Neenu Shaji <[email protected]> Co-authored-by: Averi Kitsch <[email protected]> Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent a96e1de commit 15bf823

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

asset/src/main/java/com/example/asset/ListAssetsExample.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616

1717
package com.example.asset;
1818

19-
// [START asset_quickstart_list_assets]
20-
// Imports the Google Cloud client library
21-
19+
import com.google.cloud.asset.v1.AssetServiceClient;
20+
import com.google.cloud.asset.v1.AssetServiceClient.ListAssetsPagedResponse;
21+
import com.google.cloud.asset.v1.ContentType;
22+
import com.google.cloud.asset.v1.ListAssetsRequest;
2223
import com.google.cloud.asset.v1.ProjectName;
23-
import com.google.cloud.asset.v1p5beta1.AssetServiceClient;
24-
import com.google.cloud.asset.v1p5beta1.AssetServiceClient.ListAssetsPagedResponse;
25-
import com.google.cloud.asset.v1p5beta1.ContentType;
26-
import com.google.cloud.asset.v1p5beta1.ListAssetsRequest;
2724
import java.util.Arrays;
2825

26+
// [START asset_quickstart_list_assets]
27+
// Imports the Google Cloud client library
28+
2929
public class ListAssetsExample {
3030

3131
public static void listAssets() throws Exception {
@@ -38,7 +38,7 @@ public static void listAssets() throws Exception {
3838
String[] assetTypes = {"YOUR_ASSET_TYPES_TO_LIST"};
3939
// The asset content type to list. E.g., ContentType.CONTENT_TYPE_UNSPECIFIED.
4040
// See full list of content types at
41-
// https://cloud.google.com/asset-inventory/docs/reference/rpc/google.cloud.asset.v1p5beta1#contenttype
41+
// https://cloud.google.com/asset-inventory/docs/reference/rpc/google.cloud.asset.v1#contenttype
4242
ContentType contentType = ContentType.CONTENT_TYPE_UNSPECIFIED;
4343
listAssets(projectId, assetTypes, contentType);
4444
}

asset/src/test/java/com/example/asset/ListAssets.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import static com.google.common.truth.Truth.assertThat;
2020

2121
import com.google.cloud.ServiceOptions;
22-
import com.google.cloud.asset.v1p5beta1.ContentType;
22+
import com.google.cloud.asset.v1.ContentType;
2323
import java.io.ByteArrayOutputStream;
2424
import java.io.PrintStream;
2525
import org.junit.After;

0 commit comments

Comments
 (0)