16
16
17
17
package com .example .asset ;
18
18
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 ;
22
23
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 ;
27
24
import java .util .Arrays ;
28
25
26
+ // [START asset_quickstart_list_assets]
27
+ // Imports the Google Cloud client library
28
+
29
29
public class ListAssetsExample {
30
30
31
31
public static void listAssets () throws Exception {
@@ -38,7 +38,7 @@ public static void listAssets() throws Exception {
38
38
String [] assetTypes = {"YOUR_ASSET_TYPES_TO_LIST" };
39
39
// The asset content type to list. E.g., ContentType.CONTENT_TYPE_UNSPECIFIED.
40
40
// 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
42
42
ContentType contentType = ContentType .CONTENT_TYPE_UNSPECIFIED ;
43
43
listAssets (projectId , assetTypes , contentType );
44
44
}
0 commit comments