Skip to content
Permalink
Browse files
feat: Release of relationships in v1, Add content type Relationship t…
…o support relationship export (#851)

PiperOrigin-RevId: 391065985

Source-Link: googleapis/googleapis@b9e69f8

Source-Link: https://github.com/googleapis/googleapis-gen/commit/6d0f250faeeb6f1458268235858cb245ace43063
  • Loading branch information
gcf-owl-bot[bot] committed Aug 24, 2021
1 parent f7b473c commit 2beae390e5de368605220e6074136aa76f2f78a1
Showing with 7,267 additions and 365 deletions.
  1. +9 −0 google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java
  2. +1 −0 google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java
  3. +12 −0 google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java
  4. +12 −12 ...e-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java
  5. +3 −3 ...sset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java
  6. +290 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java
  7. +38 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java
  8. +174 −119 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java
  9. +249 −228 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java
  10. +480 −0 ...o-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java
  11. +111 −0 ...cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java
  12. +22 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java
  13. +458 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java
  14. +107 −0 ...o-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java
  15. +471 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java
  16. +111 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java
  17. +458 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java
  18. +107 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java
  19. +1,207 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java
  20. +156 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetOrBuilder.java
  21. +1,229 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java
  22. +112 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetsOrBuilder.java
  23. +1,181 −0 proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java
  24. +127 −0 ...oogle-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributesOrBuilder.java
  25. +75 −3 proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto
  26. +67 −0 proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto
@@ -54,6 +54,7 @@
* .addAllAssetNames(new ArrayList<String>())
* .setContentType(ContentType.forNumber(0))
* .setReadTimeWindow(TimeWindow.newBuilder().build())
* .addAllRelationshipTypes(new ArrayList<String>())
* .build();
* BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
* }
@@ -190,6 +191,7 @@ public final OperationsClient getOperationsClient() {
* .addAllAssetTypes(new ArrayList<String>())
* .setContentType(ContentType.forNumber(0))
* .setOutputConfig(OutputConfig.newBuilder().build())
* .addAllRelationshipTypes(new ArrayList<String>())
* .build();
* ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get();
* }
@@ -225,6 +227,7 @@ public final OperationFuture<ExportAssetsResponse, ExportAssetsRequest> exportAs
* .addAllAssetTypes(new ArrayList<String>())
* .setContentType(ContentType.forNumber(0))
* .setOutputConfig(OutputConfig.newBuilder().build())
* .addAllRelationshipTypes(new ArrayList<String>())
* .build();
* OperationFuture<ExportAssetsResponse, ExportAssetsRequest> future =
* assetServiceClient.exportAssetsOperationCallable().futureCall(request);
@@ -260,6 +263,7 @@ public final OperationFuture<ExportAssetsResponse, ExportAssetsRequest> exportAs
* .addAllAssetTypes(new ArrayList<String>())
* .setContentType(ContentType.forNumber(0))
* .setOutputConfig(OutputConfig.newBuilder().build())
* .addAllRelationshipTypes(new ArrayList<String>())
* .build();
* ApiFuture<Operation> future = assetServiceClient.exportAssetsCallable().futureCall(request);
* // Do something.
@@ -340,6 +344,7 @@ public final ListAssetsPagedResponse listAssets(String parent) {
* .setContentType(ContentType.forNumber(0))
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .addAllRelationshipTypes(new ArrayList<String>())
* .build();
* for (Asset element : assetServiceClient.listAssets(request).iterateAll()) {
* // doThingsWith(element);
@@ -370,6 +375,7 @@ public final ListAssetsPagedResponse listAssets(ListAssetsRequest request) {
* .setContentType(ContentType.forNumber(0))
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .addAllRelationshipTypes(new ArrayList<String>())
* .build();
* ApiFuture<Asset> future = assetServiceClient.listAssetsPagedCallable().futureCall(request);
* // Do something.
@@ -399,6 +405,7 @@ public final UnaryCallable<ListAssetsRequest, ListAssetsPagedResponse> listAsset
* .setContentType(ContentType.forNumber(0))
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .addAllRelationshipTypes(new ArrayList<String>())
* .build();
* while (true) {
* ListAssetsResponse response = assetServiceClient.listAssetsCallable().call(request);
@@ -437,6 +444,7 @@ public final UnaryCallable<ListAssetsRequest, ListAssetsResponse> listAssetsCall
* .addAllAssetNames(new ArrayList<String>())
* .setContentType(ContentType.forNumber(0))
* .setReadTimeWindow(TimeWindow.newBuilder().build())
* .addAllRelationshipTypes(new ArrayList<String>())
* .build();
* BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
* }
@@ -468,6 +476,7 @@ public final BatchGetAssetsHistoryResponse batchGetAssetsHistory(
* .addAllAssetNames(new ArrayList<String>())
* .setContentType(ContentType.forNumber(0))
* .setReadTimeWindow(TimeWindow.newBuilder().build())
* .addAllRelationshipTypes(new ArrayList<String>())
* .build();
* ApiFuture<BatchGetAssetsHistoryResponse> future =
* assetServiceClient.batchGetAssetsHistoryCallable().futureCall(request);
@@ -31,6 +31,7 @@
* .addAllAssetNames(new ArrayList<String>())
* .setContentType(ContentType.forNumber(0))
* .setReadTimeWindow(TimeWindow.newBuilder().build())
* .addAllRelationshipTypes(new ArrayList<String>())
* .build();
* BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request);
* }
@@ -113,6 +113,7 @@ public void exportAssetsTest() throws Exception {
.addAllAssetTypes(new ArrayList<String>())
.setContentType(ContentType.forNumber(0))
.setOutputConfig(OutputConfig.newBuilder().build())
.addAllRelationshipTypes(new ArrayList<String>())
.build();

ExportAssetsResponse actualResponse = client.exportAssetsAsync(request).get();
@@ -127,6 +128,8 @@ public void exportAssetsTest() throws Exception {
Assert.assertEquals(request.getAssetTypesList(), actualRequest.getAssetTypesList());
Assert.assertEquals(request.getContentType(), actualRequest.getContentType());
Assert.assertEquals(request.getOutputConfig(), actualRequest.getOutputConfig());
Assert.assertEquals(
request.getRelationshipTypesList(), actualRequest.getRelationshipTypesList());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -146,6 +149,7 @@ public void exportAssetsExceptionTest() throws Exception {
.addAllAssetTypes(new ArrayList<String>())
.setContentType(ContentType.forNumber(0))
.setOutputConfig(OutputConfig.newBuilder().build())
.addAllRelationshipTypes(new ArrayList<String>())
.build();
client.exportAssetsAsync(request).get();
Assert.fail("No exception raised");
@@ -258,6 +262,7 @@ public void batchGetAssetsHistoryTest() throws Exception {
.addAllAssetNames(new ArrayList<String>())
.setContentType(ContentType.forNumber(0))
.setReadTimeWindow(TimeWindow.newBuilder().build())
.addAllRelationshipTypes(new ArrayList<String>())
.build();

BatchGetAssetsHistoryResponse actualResponse = client.batchGetAssetsHistory(request);
@@ -272,6 +277,8 @@ public void batchGetAssetsHistoryTest() throws Exception {
Assert.assertEquals(request.getAssetNamesList(), actualRequest.getAssetNamesList());
Assert.assertEquals(request.getContentType(), actualRequest.getContentType());
Assert.assertEquals(request.getReadTimeWindow(), actualRequest.getReadTimeWindow());
Assert.assertEquals(
request.getRelationshipTypesList(), actualRequest.getRelationshipTypesList());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -290,6 +297,7 @@ public void batchGetAssetsHistoryExceptionTest() throws Exception {
.addAllAssetNames(new ArrayList<String>())
.setContentType(ContentType.forNumber(0))
.setReadTimeWindow(TimeWindow.newBuilder().build())
.addAllRelationshipTypes(new ArrayList<String>())
.build();
client.batchGetAssetsHistory(request);
Assert.fail("No exception raised");
@@ -308,6 +316,7 @@ public void createFeedTest() throws Exception {
.setContentType(ContentType.forNumber(0))
.setFeedOutputConfig(FeedOutputConfig.newBuilder().build())
.setCondition(Expr.newBuilder().build())
.addAllRelationshipTypes(new ArrayList<String>())
.build();
mockAssetService.addResponse(expectedResponse);

@@ -351,6 +360,7 @@ public void getFeedTest() throws Exception {
.setContentType(ContentType.forNumber(0))
.setFeedOutputConfig(FeedOutputConfig.newBuilder().build())
.setCondition(Expr.newBuilder().build())
.addAllRelationshipTypes(new ArrayList<String>())
.build();
mockAssetService.addResponse(expectedResponse);

@@ -394,6 +404,7 @@ public void getFeedTest2() throws Exception {
.setContentType(ContentType.forNumber(0))
.setFeedOutputConfig(FeedOutputConfig.newBuilder().build())
.setCondition(Expr.newBuilder().build())
.addAllRelationshipTypes(new ArrayList<String>())
.build();
mockAssetService.addResponse(expectedResponse);

@@ -473,6 +484,7 @@ public void updateFeedTest() throws Exception {
.setContentType(ContentType.forNumber(0))
.setFeedOutputConfig(FeedOutputConfig.newBuilder().build())
.setCondition(Expr.newBuilder().build())
.addAllRelationshipTypes(new ArrayList<String>())
.build();
mockAssetService.addResponse(expectedResponse);

@@ -126,7 +126,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>.google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -142,7 +142,7 @@ public boolean hasCreateTime() {
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>.google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -158,7 +158,7 @@ public com.google.protobuf.Timestamp getCreateTime() {
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>.google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -514,7 +514,7 @@ public Builder mergeFrom(
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>
@@ -530,7 +530,7 @@ public boolean hasCreateTime() {
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>
@@ -552,7 +552,7 @@ public com.google.protobuf.Timestamp getCreateTime() {
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>
@@ -576,7 +576,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) {
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>
@@ -597,7 +597,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>
@@ -623,7 +623,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>
@@ -645,7 +645,7 @@ public Builder clearCreateTime() {
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>
@@ -661,7 +661,7 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>
@@ -681,7 +681,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>
@@ -27,7 +27,7 @@
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>.google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -40,7 +40,7 @@
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>.google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
@@ -53,7 +53,7 @@
*
*
* <pre>
* The time the operation was created.
* Output only. The time the operation was created.
* </pre>
*
* <code>.google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

0 comments on commit 2beae39

Please sign in to comment.