diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java index 17ca174a0..af1cc6dd1 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java @@ -54,6 +54,7 @@ * .addAllAssetNames(new ArrayList()) * .setContentType(ContentType.forNumber(0)) * .setReadTimeWindow(TimeWindow.newBuilder().build()) + * .addAllRelationshipTypes(new ArrayList()) * .build(); * BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request); * } @@ -190,6 +191,7 @@ public final OperationsClient getOperationsClient() { * .addAllAssetTypes(new ArrayList()) * .setContentType(ContentType.forNumber(0)) * .setOutputConfig(OutputConfig.newBuilder().build()) + * .addAllRelationshipTypes(new ArrayList()) * .build(); * ExportAssetsResponse response = assetServiceClient.exportAssetsAsync(request).get(); * } @@ -225,6 +227,7 @@ public final OperationFuture exportAs * .addAllAssetTypes(new ArrayList()) * .setContentType(ContentType.forNumber(0)) * .setOutputConfig(OutputConfig.newBuilder().build()) + * .addAllRelationshipTypes(new ArrayList()) * .build(); * OperationFuture future = * assetServiceClient.exportAssetsOperationCallable().futureCall(request); @@ -260,6 +263,7 @@ public final OperationFuture exportAs * .addAllAssetTypes(new ArrayList()) * .setContentType(ContentType.forNumber(0)) * .setOutputConfig(OutputConfig.newBuilder().build()) + * .addAllRelationshipTypes(new ArrayList()) * .build(); * ApiFuture 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()) * .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()) * .build(); * ApiFuture future = assetServiceClient.listAssetsPagedCallable().futureCall(request); * // Do something. @@ -399,6 +405,7 @@ public final UnaryCallable listAsset * .setContentType(ContentType.forNumber(0)) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .addAllRelationshipTypes(new ArrayList()) * .build(); * while (true) { * ListAssetsResponse response = assetServiceClient.listAssetsCallable().call(request); @@ -437,6 +444,7 @@ public final UnaryCallable listAssetsCall * .addAllAssetNames(new ArrayList()) * .setContentType(ContentType.forNumber(0)) * .setReadTimeWindow(TimeWindow.newBuilder().build()) + * .addAllRelationshipTypes(new ArrayList()) * .build(); * BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request); * } @@ -468,6 +476,7 @@ public final BatchGetAssetsHistoryResponse batchGetAssetsHistory( * .addAllAssetNames(new ArrayList()) * .setContentType(ContentType.forNumber(0)) * .setReadTimeWindow(TimeWindow.newBuilder().build()) + * .addAllRelationshipTypes(new ArrayList()) * .build(); * ApiFuture future = * assetServiceClient.batchGetAssetsHistoryCallable().futureCall(request); diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java index 27db247ed..d07bbc1fb 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/package-info.java @@ -31,6 +31,7 @@ * .addAllAssetNames(new ArrayList()) * .setContentType(ContentType.forNumber(0)) * .setReadTimeWindow(TimeWindow.newBuilder().build()) + * .addAllRelationshipTypes(new ArrayList()) * .build(); * BatchGetAssetsHistoryResponse response = assetServiceClient.batchGetAssetsHistory(request); * } diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java index 982809397..41f50cea3 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java @@ -113,6 +113,7 @@ public void exportAssetsTest() throws Exception { .addAllAssetTypes(new ArrayList()) .setContentType(ContentType.forNumber(0)) .setOutputConfig(OutputConfig.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) .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()) .setContentType(ContentType.forNumber(0)) .setOutputConfig(OutputConfig.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) .build(); client.exportAssetsAsync(request).get(); Assert.fail("No exception raised"); @@ -258,6 +262,7 @@ public void batchGetAssetsHistoryTest() throws Exception { .addAllAssetNames(new ArrayList()) .setContentType(ContentType.forNumber(0)) .setReadTimeWindow(TimeWindow.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) .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()) .setContentType(ContentType.forNumber(0)) .setReadTimeWindow(TimeWindow.newBuilder().build()) + .addAllRelationshipTypes(new ArrayList()) .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()) .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()) .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()) .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()) .build(); mockAssetService.addResponse(expectedResponse); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java index 6d95a0a16..df824b67a 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadata.java @@ -126,7 +126,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * The time the operation was created.
+   * Output only. The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -142,7 +142,7 @@ public boolean hasCreateTime() { * * *
-   * The time the operation was created.
+   * Output only. The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -158,7 +158,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *
-   * The time the operation was created.
+   * Output only. The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -514,7 +514,7 @@ public Builder mergeFrom( * * *
-     * The time the operation was created.
+     * Output only. The time the operation was created.
      * 
* * @@ -530,7 +530,7 @@ public boolean hasCreateTime() { * * *
-     * The time the operation was created.
+     * Output only. The time the operation was created.
      * 
* * @@ -552,7 +552,7 @@ public com.google.protobuf.Timestamp getCreateTime() { * * *
-     * The time the operation was created.
+     * Output only. The time the operation was created.
      * 
* * @@ -576,7 +576,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * The time the operation was created.
+     * Output only. The time the operation was created.
      * 
* * @@ -597,7 +597,7 @@ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * The time the operation was created.
+     * Output only. The time the operation was created.
      * 
* * @@ -623,7 +623,7 @@ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { * * *
-     * The time the operation was created.
+     * Output only. The time the operation was created.
      * 
* * @@ -645,7 +645,7 @@ public Builder clearCreateTime() { * * *
-     * The time the operation was created.
+     * Output only. The time the operation was created.
      * 
* * @@ -661,7 +661,7 @@ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { * * *
-     * The time the operation was created.
+     * Output only. The time the operation was created.
      * 
* * @@ -681,7 +681,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { * * *
-     * The time the operation was created.
+     * Output only. The time the operation was created.
      * 
* * diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java index 149071532..5b3153957 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningMetadataOrBuilder.java @@ -27,7 +27,7 @@ public interface AnalyzeIamPolicyLongrunningMetadataOrBuilder * * *
-   * The time the operation was created.
+   * Output only. The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -40,7 +40,7 @@ public interface AnalyzeIamPolicyLongrunningMetadataOrBuilder * * *
-   * The time the operation was created.
+   * Output only. The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -53,7 +53,7 @@ public interface AnalyzeIamPolicyLongrunningMetadataOrBuilder * * *
-   * The time the operation was created.
+   * Output only. The time the operation was created.
    * 
* * .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java index 01823f3fd..5f1e1c7f2 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java @@ -240,6 +240,22 @@ private Asset( osInventory_ = subBuilder.buildPartial(); } + break; + } + case 106: + { + com.google.cloud.asset.v1.RelatedAssets.Builder subBuilder = null; + if (relatedAssets_ != null) { + subBuilder = relatedAssets_.toBuilder(); + } + relatedAssets_ = + input.readMessage( + com.google.cloud.asset.v1.RelatedAssets.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(relatedAssets_); + relatedAssets_ = subBuilder.buildPartial(); + } + break; } default: @@ -911,6 +927,57 @@ public com.google.cloud.osconfig.v1.InventoryOrBuilder getOsInventoryOrBuilder() return getOsInventory(); } + public static final int RELATED_ASSETS_FIELD_NUMBER = 13; + private com.google.cloud.asset.v1.RelatedAssets relatedAssets_; + /** + * + * + *
+   * The related assets of the asset of one relationship type.
+   * One asset only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + * + * @return Whether the relatedAssets field is set. + */ + @java.lang.Override + public boolean hasRelatedAssets() { + return relatedAssets_ != null; + } + /** + * + * + *
+   * The related assets of the asset of one relationship type.
+   * One asset only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + * + * @return The relatedAssets. + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssets getRelatedAssets() { + return relatedAssets_ == null + ? com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance() + : relatedAssets_; + } + /** + * + * + *
+   * The related assets of the asset of one relationship type.
+   * One asset only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder() { + return getRelatedAssets(); + } + public static final int ANCESTORS_FIELD_NUMBER = 10; private com.google.protobuf.LazyStringList ancestors_; /** @@ -1046,6 +1113,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (osInventory_ != null) { output.writeMessage(12, getOsInventory()); } + if (relatedAssets_ != null) { + output.writeMessage(13, getRelatedAssets()); + } unknownFields.writeTo(output); } @@ -1100,6 +1170,9 @@ public int getSerializedSize() { if (osInventory_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getOsInventory()); } + if (relatedAssets_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getRelatedAssets()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -1134,6 +1207,10 @@ public boolean equals(final java.lang.Object obj) { if (hasOsInventory()) { if (!getOsInventory().equals(other.getOsInventory())) return false; } + if (hasRelatedAssets() != other.hasRelatedAssets()) return false; + if (hasRelatedAssets()) { + if (!getRelatedAssets().equals(other.getRelatedAssets())) return false; + } if (!getAncestorsList().equals(other.getAncestorsList())) return false; if (!getAccessContextPolicyCase().equals(other.getAccessContextPolicyCase())) return false; switch (accessContextPolicyCase_) { @@ -1184,6 +1261,10 @@ public int hashCode() { hash = (37 * hash) + OS_INVENTORY_FIELD_NUMBER; hash = (53 * hash) + getOsInventory().hashCode(); } + if (hasRelatedAssets()) { + hash = (37 * hash) + RELATED_ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getRelatedAssets().hashCode(); + } if (getAncestorsCount() > 0) { hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; hash = (53 * hash) + getAncestorsList().hashCode(); @@ -1391,6 +1472,12 @@ public Builder clear() { osInventory_ = null; osInventoryBuilder_ = null; } + if (relatedAssetsBuilder_ == null) { + relatedAssets_ = null; + } else { + relatedAssets_ = null; + relatedAssetsBuilder_ = null; + } ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); accessContextPolicyCase_ = 0; @@ -1474,6 +1561,11 @@ public com.google.cloud.asset.v1.Asset buildPartial() { } else { result.osInventory_ = osInventoryBuilder_.build(); } + if (relatedAssetsBuilder_ == null) { + result.relatedAssets_ = relatedAssets_; + } else { + result.relatedAssets_ = relatedAssetsBuilder_.build(); + } if (((bitField0_ & 0x00000002) != 0)) { ancestors_ = ancestors_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); @@ -1576,6 +1668,9 @@ public Builder mergeFrom(com.google.cloud.asset.v1.Asset other) { if (other.hasOsInventory()) { mergeOsInventory(other.getOsInventory()); } + if (other.hasRelatedAssets()) { + mergeRelatedAssets(other.getRelatedAssets()); + } if (!other.ancestors_.isEmpty()) { if (ancestors_.isEmpty()) { ancestors_ = other.ancestors_; @@ -3806,6 +3901,201 @@ public com.google.cloud.osconfig.v1.InventoryOrBuilder getOsInventoryOrBuilder() return osInventoryBuilder_; } + private com.google.cloud.asset.v1.RelatedAssets relatedAssets_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAssets, + com.google.cloud.asset.v1.RelatedAssets.Builder, + com.google.cloud.asset.v1.RelatedAssetsOrBuilder> + relatedAssetsBuilder_; + /** + * + * + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + * + * @return Whether the relatedAssets field is set. + */ + public boolean hasRelatedAssets() { + return relatedAssetsBuilder_ != null || relatedAssets_ != null; + } + /** + * + * + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + * + * @return The relatedAssets. + */ + public com.google.cloud.asset.v1.RelatedAssets getRelatedAssets() { + if (relatedAssetsBuilder_ == null) { + return relatedAssets_ == null + ? com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance() + : relatedAssets_; + } else { + return relatedAssetsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + */ + public Builder setRelatedAssets(com.google.cloud.asset.v1.RelatedAssets value) { + if (relatedAssetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relatedAssets_ = value; + onChanged(); + } else { + relatedAssetsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + */ + public Builder setRelatedAssets( + com.google.cloud.asset.v1.RelatedAssets.Builder builderForValue) { + if (relatedAssetsBuilder_ == null) { + relatedAssets_ = builderForValue.build(); + onChanged(); + } else { + relatedAssetsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + */ + public Builder mergeRelatedAssets(com.google.cloud.asset.v1.RelatedAssets value) { + if (relatedAssetsBuilder_ == null) { + if (relatedAssets_ != null) { + relatedAssets_ = + com.google.cloud.asset.v1.RelatedAssets.newBuilder(relatedAssets_) + .mergeFrom(value) + .buildPartial(); + } else { + relatedAssets_ = value; + } + onChanged(); + } else { + relatedAssetsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + */ + public Builder clearRelatedAssets() { + if (relatedAssetsBuilder_ == null) { + relatedAssets_ = null; + onChanged(); + } else { + relatedAssets_ = null; + relatedAssetsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + */ + public com.google.cloud.asset.v1.RelatedAssets.Builder getRelatedAssetsBuilder() { + + onChanged(); + return getRelatedAssetsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + */ + public com.google.cloud.asset.v1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder() { + if (relatedAssetsBuilder_ != null) { + return relatedAssetsBuilder_.getMessageOrBuilder(); + } else { + return relatedAssets_ == null + ? com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance() + : relatedAssets_; + } + } + /** + * + * + *
+     * The related assets of the asset of one relationship type.
+     * One asset only represents one type of relationship.
+     * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAssets, + com.google.cloud.asset.v1.RelatedAssets.Builder, + com.google.cloud.asset.v1.RelatedAssetsOrBuilder> + getRelatedAssetsFieldBuilder() { + if (relatedAssetsBuilder_ == null) { + relatedAssetsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAssets, + com.google.cloud.asset.v1.RelatedAssets.Builder, + com.google.cloud.asset.v1.RelatedAssetsOrBuilder>( + getRelatedAssets(), getParentForChildren(), isClean()); + relatedAssets_ = null; + } + return relatedAssetsBuilder_; + } + private com.google.protobuf.LazyStringList ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java index bce5bd96b..3eed55856 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java @@ -442,6 +442,44 @@ public interface AssetOrBuilder */ com.google.cloud.osconfig.v1.InventoryOrBuilder getOsInventoryOrBuilder(); + /** + * + * + *
+   * The related assets of the asset of one relationship type.
+   * One asset only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + * + * @return Whether the relatedAssets field is set. + */ + boolean hasRelatedAssets(); + /** + * + * + *
+   * The related assets of the asset of one relationship type.
+   * One asset only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + * + * @return The relatedAssets. + */ + com.google.cloud.asset.v1.RelatedAssets getRelatedAssets(); + /** + * + * + *
+   * The related assets of the asset of one relationship type.
+   * One asset only represents one type of relationship.
+   * 
+ * + * .google.cloud.asset.v1.RelatedAssets related_assets = 13; + */ + com.google.cloud.asset.v1.RelatedAssetsOrBuilder getRelatedAssetsOrBuilder(); + /** * * diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java index 7074bdc02..df9f30b51 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java @@ -43,6 +43,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_asset_v1_Resource_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_asset_v1_Resource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_RelatedAssets_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_RelationshipAttributes_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_RelatedAsset_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -129,118 +141,131 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "scontextmanager/v1/access_policy.proto\032(" + "google/cloud/osconfig/v1/inventory.proto" + "\032?google/identity/accesscontextmanager/v" - + "1/service_perimeter.proto\032\034google/protob" - + "uf/struct.proto\032\037google/protobuf/timesta" - + "mp.proto\032\025google/rpc/code.proto\"\365\002\n\rTemp" - + "oralAsset\0221\n\006window\030\001 \001(\0132!.google.cloud" - + ".asset.v1.TimeWindow\022\017\n\007deleted\030\002 \001(\010\022+\n" - + "\005asset\030\003 \001(\0132\034.google.cloud.asset.v1.Ass" - + "et\022O\n\021prior_asset_state\030\004 \001(\01624.google.c" - + "loud.asset.v1.TemporalAsset.PriorAssetSt" - + "ate\0221\n\013prior_asset\030\005 \001(\0132\034.google.cloud." - + "asset.v1.Asset\"o\n\017PriorAssetState\022!\n\035PRI" - + "OR_ASSET_STATE_UNSPECIFIED\020\000\022\013\n\007PRESENT\020" - + "\001\022\013\n\007INVALID\020\002\022\022\n\016DOES_NOT_EXIST\020\003\022\013\n\007DE" - + "LETED\020\004\"j\n\nTimeWindow\022.\n\nstart_time\030\001 \001(" - + "\0132\032.google.protobuf.Timestamp\022,\n\010end_tim" - + "e\030\002 \001(\0132\032.google.protobuf.Timestamp\"\365\004\n\005" - + "Asset\022/\n\013update_time\030\013 \001(\0132\032.google.prot" - + "obuf.Timestamp\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_ty" - + "pe\030\002 \001(\t\0221\n\010resource\030\003 \001(\0132\037.google.clou" - + "d.asset.v1.Resource\022)\n\niam_policy\030\004 \001(\0132" - + "\025.google.iam.v1.Policy\0225\n\norg_policy\030\006 \003" - + "(\0132!.google.cloud.orgpolicy.v1.Policy\022N\n" - + "\raccess_policy\030\007 \001(\01325.google.identity.a" - + "ccesscontextmanager.v1.AccessPolicyH\000\022L\n" - + "\014access_level\030\010 \001(\01324.google.identity.ac" - + "cesscontextmanager.v1.AccessLevelH\000\022V\n\021s" - + "ervice_perimeter\030\t \001(\01329.google.identity" - + ".accesscontextmanager.v1.ServicePerimete" - + "rH\000\0229\n\014os_inventory\030\014 \001(\0132#.google.cloud" - + ".osconfig.v1.Inventory\022\021\n\tancestors\030\n \003(" - + "\t:\'\352A$\n\037cloudasset.googleapis.com/Asset\022" - + "\001*B\027\n\025access_context_policy\"\262\001\n\010Resource" - + "\022\017\n\007version\030\001 \001(\t\022\036\n\026discovery_document_" - + "uri\030\002 \001(\t\022\026\n\016discovery_name\030\003 \001(\t\022\024\n\014res" - + "ource_url\030\004 \001(\t\022\016\n\006parent\030\005 \001(\t\022%\n\004data\030" - + "\006 \001(\0132\027.google.protobuf.Struct\022\020\n\010locati" - + "on\030\010 \001(\t\"\277\005\n\024ResourceSearchResult\022\014\n\004nam" - + "e\030\001 \001(\t\022\022\n\nasset_type\030\002 \001(\t\022\017\n\007project\030\003" - + " \001(\t\022\017\n\007folders\030\021 \003(\t\022\024\n\014organization\030\022 " - + "\001(\t\022\024\n\014display_name\030\004 \001(\t\022\023\n\013description" - + "\030\005 \001(\t\022\020\n\010location\030\006 \001(\t\022G\n\006labels\030\007 \003(\013" - + "27.google.cloud.asset.v1.ResourceSearchR" - + "esult.LabelsEntry\022\024\n\014network_tags\030\010 \003(\t\022" - + "\017\n\007kms_key\030\n \001(\t\022/\n\013create_time\030\013 \001(\0132\032." - + "google.protobuf.Timestamp\022/\n\013update_time" - + "\030\014 \001(\0132\032.google.protobuf.Timestamp\022\r\n\005st" - + "ate\030\r \001(\t\0226\n\025additional_attributes\030\t \001(\013" - + "2\027.google.protobuf.Struct\022!\n\031parent_full" - + "_resource_name\030\023 \001(\t\022E\n\023versioned_resour" - + "ces\030\020 \003(\0132(.google.cloud.asset.v1.Versio" - + "nedResource\022C\n\022attached_resources\030\024 \003(\0132" - + "\'.google.cloud.asset.v1.AttachedResource" - + "\022\031\n\021parent_asset_type\030g \001(\t\032-\n\013LabelsEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"O\n\021Ve" - + "rsionedResource\022\017\n\007version\030\001 \001(\t\022)\n\010reso" - + "urce\030\002 \001(\0132\027.google.protobuf.Struct\"m\n\020A" - + "ttachedResource\022\022\n\nasset_type\030\001 \001(\t\022E\n\023v" - + "ersioned_resources\030\003 \003(\0132(.google.cloud." - + "asset.v1.VersionedResource\"\217\004\n\025IamPolicy" - + "SearchResult\022\020\n\010resource\030\001 \001(\t\022\022\n\nasset_" - + "type\030\005 \001(\t\022\017\n\007project\030\002 \001(\t\022\017\n\007folders\030\006" - + " \003(\t\022\024\n\014organization\030\007 \001(\t\022%\n\006policy\030\003 \001" - + "(\0132\025.google.iam.v1.Policy\022M\n\013explanation" - + "\030\004 \001(\01328.google.cloud.asset.v1.IamPolicy" - + "SearchResult.Explanation\032\241\002\n\013Explanation" - + "\022m\n\023matched_permissions\030\001 \003(\0132P.google.c" - + "loud.asset.v1.IamPolicySearchResult.Expl" - + "anation.MatchedPermissionsEntry\032\"\n\013Permi" - + "ssions\022\023\n\013permissions\030\001 \003(\t\032\177\n\027MatchedPe" - + "rmissionsEntry\022\013\n\003key\030\001 \001(\t\022S\n\005value\030\002 \001" - + "(\0132D.google.cloud.asset.v1.IamPolicySear" - + "chResult.Explanation.Permissions:\0028\001\"G\n\026" - + "IamPolicyAnalysisState\022\036\n\004code\030\001 \001(\0162\020.g" - + "oogle.rpc.Code\022\r\n\005cause\030\002 \001(\t\"\306\001\n\023Condit" - + "ionEvaluation\022T\n\020evaluation_value\030\001 \001(\0162" - + ":.google.cloud.asset.v1.ConditionEvaluat" - + "ion.EvaluationValue\"Y\n\017EvaluationValue\022 " - + "\n\034EVALUATION_VALUE_UNSPECIFIED\020\000\022\010\n\004TRUE" - + "\020\001\022\t\n\005FALSE\020\002\022\017\n\013CONDITIONAL\020\003\"\253\t\n\027IamPo" - + "licyAnalysisResult\022#\n\033attached_resource_" - + "full_name\030\001 \001(\t\022+\n\013iam_binding\030\002 \001(\0132\026.g" - + "oogle.iam.v1.Binding\022^\n\024access_control_l" - + "ists\030\003 \003(\0132@.google.cloud.asset.v1.IamPo" - + "licyAnalysisResult.AccessControlList\022R\n\r" - + "identity_list\030\004 \001(\0132;.google.cloud.asset" - + ".v1.IamPolicyAnalysisResult.IdentityList" - + "\022\026\n\016fully_explored\030\005 \001(\010\032m\n\010Resource\022\032\n\022" - + "full_resource_name\030\001 \001(\t\022E\n\016analysis_sta" - + "te\030\002 \001(\0132-.google.cloud.asset.v1.IamPoli" - + "cyAnalysisState\032\205\001\n\006Access\022\016\n\004role\030\001 \001(\t" - + "H\000\022\024\n\npermission\030\002 \001(\tH\000\022E\n\016analysis_sta" - + "te\030\003 \001(\0132-.google.cloud.asset.v1.IamPoli" - + "cyAnalysisStateB\016\n\014oneof_access\032_\n\010Ident" - + "ity\022\014\n\004name\030\001 \001(\t\022E\n\016analysis_state\030\002 \001(" - + "\0132-.google.cloud.asset.v1.IamPolicyAnaly" - + "sisState\0320\n\004Edge\022\023\n\013source_node\030\001 \001(\t\022\023\n" - + "\013target_node\030\002 \001(\t\032\277\002\n\021AccessControlList" - + "\022J\n\tresources\030\001 \003(\01327.google.cloud.asset" - + ".v1.IamPolicyAnalysisResult.Resource\022G\n\010" - + "accesses\030\002 \003(\01325.google.cloud.asset.v1.I" - + "amPolicyAnalysisResult.Access\022K\n\016resourc" - + "e_edges\030\003 \003(\01323.google.cloud.asset.v1.Ia" - + "mPolicyAnalysisResult.Edge\022H\n\024condition_" - + "evaluation\030\004 \001(\0132*.google.cloud.asset.v1" - + ".ConditionEvaluation\032\245\001\n\014IdentityList\022K\n" - + "\nidentities\030\001 \003(\01327.google.cloud.asset.v" - + "1.IamPolicyAnalysisResult.Identity\022H\n\013gr" - + "oup_edges\030\002 \003(\01323.google.cloud.asset.v1." - + "IamPolicyAnalysisResult.EdgeB\230\001\n\031com.goo" - + "gle.cloud.asset.v1B\nAssetProtoP\001Z:google" - + ".golang.org/genproto/googleapis/cloud/as" - + "set/v1;asset\370\001\001\252\002\025Google.Cloud.Asset.V1\312" - + "\002\025Google\\Cloud\\Asset\\V1b\006proto3" + + "1/service_perimeter.proto\032\031google/protob" + + "uf/any.proto\032\034google/protobuf/struct.pro" + + "to\032\037google/protobuf/timestamp.proto\032\025goo" + + "gle/rpc/code.proto\032\034google/api/annotatio" + + "ns.proto\"\365\002\n\rTemporalAsset\0221\n\006window\030\001 \001" + + "(\0132!.google.cloud.asset.v1.TimeWindow\022\017\n" + + "\007deleted\030\002 \001(\010\022+\n\005asset\030\003 \001(\0132\034.google.c" + + "loud.asset.v1.Asset\022O\n\021prior_asset_state" + + "\030\004 \001(\01624.google.cloud.asset.v1.TemporalA" + + "sset.PriorAssetState\0221\n\013prior_asset\030\005 \001(" + + "\0132\034.google.cloud.asset.v1.Asset\"o\n\017Prior" + + "AssetState\022!\n\035PRIOR_ASSET_STATE_UNSPECIF" + + "IED\020\000\022\013\n\007PRESENT\020\001\022\013\n\007INVALID\020\002\022\022\n\016DOES_" + + "NOT_EXIST\020\003\022\013\n\007DELETED\020\004\"j\n\nTimeWindow\022." + + "\n\nstart_time\030\001 \001(\0132\032.google.protobuf.Tim" + + "estamp\022,\n\010end_time\030\002 \001(\0132\032.google.protob" + + "uf.Timestamp\"\263\005\n\005Asset\022/\n\013update_time\030\013 " + + "\001(\0132\032.google.protobuf.Timestamp\022\014\n\004name\030" + + "\001 \001(\t\022\022\n\nasset_type\030\002 \001(\t\0221\n\010resource\030\003 " + + "\001(\0132\037.google.cloud.asset.v1.Resource\022)\n\n" + + "iam_policy\030\004 \001(\0132\025.google.iam.v1.Policy\022" + + "5\n\norg_policy\030\006 \003(\0132!.google.cloud.orgpo" + + "licy.v1.Policy\022N\n\raccess_policy\030\007 \001(\01325." + + "google.identity.accesscontextmanager.v1." + + "AccessPolicyH\000\022L\n\014access_level\030\010 \001(\01324.g" + + "oogle.identity.accesscontextmanager.v1.A" + + "ccessLevelH\000\022V\n\021service_perimeter\030\t \001(\0132" + + "9.google.identity.accesscontextmanager.v" + + "1.ServicePerimeterH\000\0229\n\014os_inventory\030\014 \001" + + "(\0132#.google.cloud.osconfig.v1.Inventory\022" + + "<\n\016related_assets\030\r \001(\0132$.google.cloud.a" + + "sset.v1.RelatedAssets\022\021\n\tancestors\030\n \003(\t" + + ":\'\352A$\n\037cloudasset.googleapis.com/Asset\022\001" + + "*B\027\n\025access_context_policy\"\262\001\n\010Resource\022" + + "\017\n\007version\030\001 \001(\t\022\036\n\026discovery_document_u" + + "ri\030\002 \001(\t\022\026\n\016discovery_name\030\003 \001(\t\022\024\n\014reso" + + "urce_url\030\004 \001(\t\022\016\n\006parent\030\005 \001(\t\022%\n\004data\030\006" + + " \001(\0132\027.google.protobuf.Struct\022\020\n\010locatio" + + "n\030\010 \001(\t\"\224\001\n\rRelatedAssets\022N\n\027relationshi" + + "p_attributes\030\001 \001(\0132-.google.cloud.asset." + + "v1.RelationshipAttributes\0223\n\006assets\030\002 \003(" + + "\0132#.google.cloud.asset.v1.RelatedAsset\"r" + + "\n\026RelationshipAttributes\022\014\n\004type\030\004 \001(\t\022\034" + + "\n\024source_resource_type\030\001 \001(\t\022\034\n\024target_r" + + "esource_type\030\002 \001(\t\022\016\n\006action\030\003 \001(\t\"j\n\014Re" + + "latedAsset\0223\n\005asset\030\001 \001(\tB$\372A!\n\037cloudass" + + "et.googleapis.com/Asset\022\022\n\nasset_type\030\002 " + + "\001(\t\022\021\n\tancestors\030\003 \003(\t\"\277\005\n\024ResourceSearc" + + "hResult\022\014\n\004name\030\001 \001(\t\022\022\n\nasset_type\030\002 \001(" + + "\t\022\017\n\007project\030\003 \001(\t\022\017\n\007folders\030\021 \003(\t\022\024\n\014o" + + "rganization\030\022 \001(\t\022\024\n\014display_name\030\004 \001(\t\022" + + "\023\n\013description\030\005 \001(\t\022\020\n\010location\030\006 \001(\t\022G" + + "\n\006labels\030\007 \003(\01327.google.cloud.asset.v1.R" + + "esourceSearchResult.LabelsEntry\022\024\n\014netwo" + + "rk_tags\030\010 \003(\t\022\017\n\007kms_key\030\n \001(\t\022/\n\013create" + + "_time\030\013 \001(\0132\032.google.protobuf.Timestamp\022" + + "/\n\013update_time\030\014 \001(\0132\032.google.protobuf.T" + + "imestamp\022\r\n\005state\030\r \001(\t\0226\n\025additional_at" + + "tributes\030\t \001(\0132\027.google.protobuf.Struct\022" + + "!\n\031parent_full_resource_name\030\023 \001(\t\022E\n\023ve" + + "rsioned_resources\030\020 \003(\0132(.google.cloud.a" + + "sset.v1.VersionedResource\022C\n\022attached_re" + + "sources\030\024 \003(\0132\'.google.cloud.asset.v1.At" + + "tachedResource\022\031\n\021parent_asset_type\030g \001(" + + "\t\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" + + " \001(\t:\0028\001\"O\n\021VersionedResource\022\017\n\007version" + + "\030\001 \001(\t\022)\n\010resource\030\002 \001(\0132\027.google.protob" + + "uf.Struct\"m\n\020AttachedResource\022\022\n\nasset_t" + + "ype\030\001 \001(\t\022E\n\023versioned_resources\030\003 \003(\0132(" + + ".google.cloud.asset.v1.VersionedResource" + + "\"\217\004\n\025IamPolicySearchResult\022\020\n\010resource\030\001" + + " \001(\t\022\022\n\nasset_type\030\005 \001(\t\022\017\n\007project\030\002 \001(" + + "\t\022\017\n\007folders\030\006 \003(\t\022\024\n\014organization\030\007 \001(\t" + + "\022%\n\006policy\030\003 \001(\0132\025.google.iam.v1.Policy\022" + + "M\n\013explanation\030\004 \001(\01328.google.cloud.asse" + + "t.v1.IamPolicySearchResult.Explanation\032\241" + + "\002\n\013Explanation\022m\n\023matched_permissions\030\001 " + + "\003(\0132P.google.cloud.asset.v1.IamPolicySea" + + "rchResult.Explanation.MatchedPermissions" + + "Entry\032\"\n\013Permissions\022\023\n\013permissions\030\001 \003(" + + "\t\032\177\n\027MatchedPermissionsEntry\022\013\n\003key\030\001 \001(" + + "\t\022S\n\005value\030\002 \001(\0132D.google.cloud.asset.v1" + + ".IamPolicySearchResult.Explanation.Permi" + + "ssions:\0028\001\"G\n\026IamPolicyAnalysisState\022\036\n\004" + + "code\030\001 \001(\0162\020.google.rpc.Code\022\r\n\005cause\030\002 " + + "\001(\t\"\306\001\n\023ConditionEvaluation\022T\n\020evaluatio" + + "n_value\030\001 \001(\0162:.google.cloud.asset.v1.Co" + + "nditionEvaluation.EvaluationValue\"Y\n\017Eva" + + "luationValue\022 \n\034EVALUATION_VALUE_UNSPECI" + + "FIED\020\000\022\010\n\004TRUE\020\001\022\t\n\005FALSE\020\002\022\017\n\013CONDITION" + + "AL\020\003\"\253\t\n\027IamPolicyAnalysisResult\022#\n\033atta" + + "ched_resource_full_name\030\001 \001(\t\022+\n\013iam_bin" + + "ding\030\002 \001(\0132\026.google.iam.v1.Binding\022^\n\024ac" + + "cess_control_lists\030\003 \003(\0132@.google.cloud." + + "asset.v1.IamPolicyAnalysisResult.AccessC" + + "ontrolList\022R\n\ridentity_list\030\004 \001(\0132;.goog" + + "le.cloud.asset.v1.IamPolicyAnalysisResul" + + "t.IdentityList\022\026\n\016fully_explored\030\005 \001(\010\032m" + + "\n\010Resource\022\032\n\022full_resource_name\030\001 \001(\t\022E" + + "\n\016analysis_state\030\002 \001(\0132-.google.cloud.as" + + "set.v1.IamPolicyAnalysisState\032\205\001\n\006Access" + + "\022\016\n\004role\030\001 \001(\tH\000\022\024\n\npermission\030\002 \001(\tH\000\022E" + + "\n\016analysis_state\030\003 \001(\0132-.google.cloud.as" + + "set.v1.IamPolicyAnalysisStateB\016\n\014oneof_a" + + "ccess\032_\n\010Identity\022\014\n\004name\030\001 \001(\t\022E\n\016analy" + + "sis_state\030\002 \001(\0132-.google.cloud.asset.v1." + + "IamPolicyAnalysisState\0320\n\004Edge\022\023\n\013source" + + "_node\030\001 \001(\t\022\023\n\013target_node\030\002 \001(\t\032\277\002\n\021Acc" + + "essControlList\022J\n\tresources\030\001 \003(\01327.goog" + + "le.cloud.asset.v1.IamPolicyAnalysisResul" + + "t.Resource\022G\n\010accesses\030\002 \003(\01325.google.cl" + + "oud.asset.v1.IamPolicyAnalysisResult.Acc" + + "ess\022K\n\016resource_edges\030\003 \003(\01323.google.clo" + + "ud.asset.v1.IamPolicyAnalysisResult.Edge" + + "\022H\n\024condition_evaluation\030\004 \001(\0132*.google." + + "cloud.asset.v1.ConditionEvaluation\032\245\001\n\014I" + + "dentityList\022K\n\nidentities\030\001 \003(\01327.google" + + ".cloud.asset.v1.IamPolicyAnalysisResult." + + "Identity\022H\n\013group_edges\030\002 \003(\01323.google.c" + + "loud.asset.v1.IamPolicyAnalysisResult.Ed" + + "geB\230\001\n\031com.google.cloud.asset.v1B\nAssetP" + + "rotoP\001Z:google.golang.org/genproto/googl" + + "eapis/cloud/asset/v1;asset\370\001\001\252\002\025Google.C" + + "loud.Asset.V1\312\002\025Google\\Cloud\\Asset\\V1b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -253,9 +278,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(), com.google.cloud.osconfig.v1.Inventories.getDescriptor(), com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(), + com.google.protobuf.AnyProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.rpc.CodeProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), }); internal_static_google_cloud_asset_v1_TemporalAsset_descriptor = getDescriptor().getMessageTypes().get(0); @@ -289,6 +316,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AccessLevel", "ServicePerimeter", "OsInventory", + "RelatedAssets", "Ancestors", "AccessContextPolicy", }); @@ -306,8 +334,32 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Data", "Location", }); - internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor = + internal_static_google_cloud_asset_v1_RelatedAssets_descriptor = getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_asset_v1_RelatedAssets_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_RelatedAssets_descriptor, + new java.lang.String[] { + "RelationshipAttributes", "Assets", + }); + internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_asset_v1_RelationshipAttributes_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor, + new java.lang.String[] { + "Type", "SourceResourceType", "TargetResourceType", "Action", + }); + internal_static_google_cloud_asset_v1_RelatedAsset_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_asset_v1_RelatedAsset_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_RelatedAsset_descriptor, + new java.lang.String[] { + "Asset", "AssetType", "Ancestors", + }); + internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor = + getDescriptor().getMessageTypes().get(7); internal_static_google_cloud_asset_v1_ResourceSearchResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_ResourceSearchResult_descriptor, @@ -343,7 +395,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_asset_v1_VersionedResource_descriptor = - getDescriptor().getMessageTypes().get(5); + getDescriptor().getMessageTypes().get(8); internal_static_google_cloud_asset_v1_VersionedResource_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_VersionedResource_descriptor, @@ -351,7 +403,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Version", "Resource", }); internal_static_google_cloud_asset_v1_AttachedResource_descriptor = - getDescriptor().getMessageTypes().get(6); + getDescriptor().getMessageTypes().get(9); internal_static_google_cloud_asset_v1_AttachedResource_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_AttachedResource_descriptor, @@ -359,7 +411,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "AssetType", "VersionedResources", }); internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(10); internal_static_google_cloud_asset_v1_IamPolicySearchResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_IamPolicySearchResult_descriptor, @@ -403,7 +455,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Key", "Value", }); internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(11); internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor, @@ -411,7 +463,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Code", "Cause", }); internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(12); internal_static_google_cloud_asset_v1_ConditionEvaluation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_ConditionEvaluation_descriptor, @@ -419,7 +471,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "EvaluationValue", }); internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(13); internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor, @@ -493,6 +545,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.ResourceProto.getDescriptor(); @@ -502,9 +555,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.identity.accesscontextmanager.v1.PolicyProto.getDescriptor(); com.google.cloud.osconfig.v1.Inventories.getDescriptor(); com.google.identity.accesscontextmanager.v1.ServicePerimeterProto.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.rpc.CodeProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java index b848896dd..46520dceb 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceProto.java @@ -229,237 +229,241 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "estamp.proto\032\027google/rpc/status.proto\032\026g" + "oogle/type/expr.proto\"[\n#AnalyzeIamPolic" + "yLongrunningMetadata\0224\n\013create_time\030\001 \001(" - + "\0132\032.google.protobuf.TimestampB\003\340A\003\"\215\002\n\023E" + + "\0132\032.google.protobuf.TimestampB\003\340A\003\"\251\002\n\023E" + "xportAssetsRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372" + "A!\022\037cloudasset.googleapis.com/Asset\022-\n\tr" + "ead_time\030\002 \001(\0132\032.google.protobuf.Timesta" + "mp\022\023\n\013asset_types\030\003 \003(\t\0228\n\014content_type\030" + "\004 \001(\0162\".google.cloud.asset.v1.ContentTyp" + "e\022?\n\routput_config\030\005 \001(\0132#.google.cloud." - + "asset.v1.OutputConfigB\003\340A\002\"\275\001\n\024ExportAss" - + "etsResponse\022-\n\tread_time\030\001 \001(\0132\032.google." - + "protobuf.Timestamp\022:\n\routput_config\030\002 \001(" - + "\0132#.google.cloud.asset.v1.OutputConfig\022:" - + "\n\routput_result\030\003 \001(\0132#.google.cloud.ass" - + "et.v1.OutputResult\"\361\001\n\021ListAssetsRequest" - + "\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudasset.goo" - + "gleapis.com/Asset\022-\n\tread_time\030\002 \001(\0132\032.g" - + "oogle.protobuf.Timestamp\022\023\n\013asset_types\030" - + "\003 \003(\t\0228\n\014content_type\030\004 \001(\0162\".google.clo" - + "ud.asset.v1.ContentType\022\021\n\tpage_size\030\005 \001" - + "(\005\022\022\n\npage_token\030\006 \001(\t\"\212\001\n\022ListAssetsRes" - + "ponse\022-\n\tread_time\030\001 \001(\0132\032.google.protob" - + "uf.Timestamp\022,\n\006assets\030\002 \003(\0132\034.google.cl" - + "oud.asset.v1.Asset\022\027\n\017next_page_token\030\003 " - + "\001(\t\"\355\001\n\034BatchGetAssetsHistoryRequest\0227\n\006" - + "parent\030\001 \001(\tB\'\340A\002\372A!\022\037cloudasset.googlea" - + "pis.com/Asset\022\023\n\013asset_names\030\002 \003(\t\022=\n\014co" - + "ntent_type\030\003 \001(\0162\".google.cloud.asset.v1" - + ".ContentTypeB\003\340A\001\022@\n\020read_time_window\030\004 " - + "\001(\0132!.google.cloud.asset.v1.TimeWindowB\003" - + "\340A\001\"U\n\035BatchGetAssetsHistoryResponse\0224\n\006" - + "assets\030\001 \003(\0132$.google.cloud.asset.v1.Tem" - + "poralAsset\"n\n\021CreateFeedRequest\022\023\n\006paren" - + "t\030\001 \001(\tB\003\340A\002\022\024\n\007feed_id\030\002 \001(\tB\003\340A\002\022.\n\004fe" - + "ed\030\003 \001(\0132\033.google.cloud.asset.v1.FeedB\003\340" - + "A\002\"F\n\016GetFeedRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372" - + "A \n\036cloudasset.googleapis.com/Feed\"\'\n\020Li" - + "stFeedsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\"?\n\021L" - + "istFeedsResponse\022*\n\005feeds\030\001 \003(\0132\033.google" - + ".cloud.asset.v1.Feed\"y\n\021UpdateFeedReques" - + "t\022.\n\004feed\030\001 \001(\0132\033.google.cloud.asset.v1." - + "FeedB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google." - + "protobuf.FieldMaskB\003\340A\002\"I\n\021DeleteFeedReq" - + "uest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036cloudasset.g" - + "oogleapis.com/Feed\"\253\001\n\014OutputConfig\022@\n\017g" - + "cs_destination\030\001 \001(\0132%.google.cloud.asse" - + "t.v1.GcsDestinationH\000\022J\n\024bigquery_destin" - + "ation\030\002 \001(\0132*.google.cloud.asset.v1.BigQ" - + "ueryDestinationH\000B\r\n\013destination\"V\n\014Outp" - + "utResult\022<\n\ngcs_result\030\001 \001(\0132&.google.cl" - + "oud.asset.v1.GcsOutputResultH\000B\010\n\006result" - + "\"\037\n\017GcsOutputResult\022\014\n\004uris\030\001 \003(\t\"C\n\016Gcs" - + "Destination\022\r\n\003uri\030\001 \001(\tH\000\022\024\n\nuri_prefix" - + "\030\002 \001(\tH\000B\014\n\nobject_uri\"\264\001\n\023BigQueryDesti" - + "nation\022\024\n\007dataset\030\001 \001(\tB\003\340A\002\022\022\n\005table\030\002 " - + "\001(\tB\003\340A\002\022\r\n\005force\030\003 \001(\010\022<\n\016partition_spe" - + "c\030\004 \001(\0132$.google.cloud.asset.v1.Partitio" - + "nSpec\022&\n\036separate_tables_per_asset_type\030" - + "\005 \001(\010\"\251\001\n\rPartitionSpec\022H\n\rpartition_key" - + "\030\001 \001(\01621.google.cloud.asset.v1.Partition" - + "Spec.PartitionKey\"N\n\014PartitionKey\022\035\n\031PAR" - + "TITION_KEY_UNSPECIFIED\020\000\022\r\n\tREAD_TIME\020\001\022" - + "\020\n\014REQUEST_TIME\020\002\"\"\n\021PubsubDestination\022\r" - + "\n\005topic\030\001 \001(\t\"i\n\020FeedOutputConfig\022F\n\022pub" - + "sub_destination\030\001 \001(\0132(.google.cloud.ass" - + "et.v1.PubsubDestinationH\000B\r\n\013destination" - + "\"\201\003\n\004Feed\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\023\n\013asset_na" - + "mes\030\002 \003(\t\022\023\n\013asset_types\030\003 \003(\t\0228\n\014conten" - + "t_type\030\004 \001(\0162\".google.cloud.asset.v1.Con" - + "tentType\022H\n\022feed_output_config\030\005 \001(\0132\'.g" - + "oogle.cloud.asset.v1.FeedOutputConfigB\003\340" - + "A\002\022$\n\tcondition\030\006 \001(\0132\021.google.type.Expr" - + ":\221\001\352A\215\001\n\036cloudasset.googleapis.com/Feed\022" - + "\037projects/{project}/feeds/{feed}\022\035folder" - + "s/{folder}/feeds/{feed}\022)organizations/{" - + "organization}/feeds/{feed} \001\"\331\001\n\031SearchA" - + "llResourcesRequest\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022\022" - + "\n\005query\030\002 \001(\tB\003\340A\001\022\030\n\013asset_types\030\003 \003(\tB" - + "\003\340A\001\022\026\n\tpage_size\030\004 \001(\005B\003\340A\001\022\027\n\npage_tok" - + "en\030\005 \001(\tB\003\340A\001\022\025\n\010order_by\030\006 \001(\tB\003\340A\001\0222\n\t" - + "read_mask\030\010 \001(\0132\032.google.protobuf.FieldM" - + "askB\003\340A\001\"s\n\032SearchAllResourcesResponse\022<" - + "\n\007results\030\001 \003(\0132+.google.cloud.asset.v1." - + "ResourceSearchResult\022\027\n\017next_page_token\030" - + "\002 \001(\t\"\247\001\n\033SearchAllIamPoliciesRequest\022\022\n" - + "\005scope\030\001 \001(\tB\003\340A\002\022\022\n\005query\030\002 \001(\tB\003\340A\001\022\026\n" - + "\tpage_size\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(" - + "\tB\003\340A\001\022\030\n\013asset_types\030\005 \003(\tB\003\340A\001\022\025\n\010orde" - + "r_by\030\007 \001(\tB\003\340A\001\"v\n\034SearchAllIamPoliciesR" - + "esponse\022=\n\007results\030\001 \003(\0132,.google.cloud." - + "asset.v1.IamPolicySearchResult\022\027\n\017next_p" - + "age_token\030\002 \001(\t\"\306\007\n\026IamPolicyAnalysisQue" - + "ry\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022^\n\021resource_selec" - + "tor\030\002 \001(\0132>.google.cloud.asset.v1.IamPol" - + "icyAnalysisQuery.ResourceSelectorB\003\340A\001\022^" - + "\n\021identity_selector\030\003 \001(\0132>.google.cloud" - + ".asset.v1.IamPolicyAnalysisQuery.Identit" - + "ySelectorB\003\340A\001\022Z\n\017access_selector\030\004 \001(\0132" - + "<.google.cloud.asset.v1.IamPolicyAnalysi" - + "sQuery.AccessSelectorB\003\340A\001\022K\n\007options\030\005 " - + "\001(\01325.google.cloud.asset.v1.IamPolicyAna" - + "lysisQuery.OptionsB\003\340A\001\022^\n\021condition_con" - + "text\030\006 \001(\0132>.google.cloud.asset.v1.IamPo" - + "licyAnalysisQuery.ConditionContextB\003\340A\001\032" - + "3\n\020ResourceSelector\022\037\n\022full_resource_nam" - + "e\030\001 \001(\tB\003\340A\002\032)\n\020IdentitySelector\022\025\n\010iden" - + "tity\030\001 \001(\tB\003\340A\002\032>\n\016AccessSelector\022\022\n\005rol" - + "es\030\001 \003(\tB\003\340A\001\022\030\n\013permissions\030\002 \003(\tB\003\340A\001\032" - + "\330\001\n\007Options\022\032\n\rexpand_groups\030\001 \001(\010B\003\340A\001\022" - + "\031\n\014expand_roles\030\002 \001(\010B\003\340A\001\022\035\n\020expand_res" - + "ources\030\003 \001(\010B\003\340A\001\022\"\n\025output_resource_edg" - + "es\030\004 \001(\010B\003\340A\001\022\037\n\022output_group_edges\030\005 \001(" - + "\010B\003\340A\001\0222\n%analyze_service_account_impers" - + "onation\030\006 \001(\010B\003\340A\001\032T\n\020ConditionContext\0221" - + "\n\013access_time\030\001 \001(\0132\032.google.protobuf.Ti" - + "mestampH\000B\r\n\013TimeContext\"\240\001\n\027AnalyzeIamP" - + "olicyRequest\022J\n\016analysis_query\030\001 \001(\0132-.g" + + "asset.v1.OutputConfigB\003\340A\002\022\032\n\022relationsh" + + "ip_types\030\006 \003(\t\"\275\001\n\024ExportAssetsResponse\022" + + "-\n\tread_time\030\001 \001(\0132\032.google.protobuf.Tim" + + "estamp\022:\n\routput_config\030\002 \001(\0132#.google.c" + + "loud.asset.v1.OutputConfig\022:\n\routput_res" + + "ult\030\003 \001(\0132#.google.cloud.asset.v1.Output" + + "Result\"\215\002\n\021ListAssetsRequest\0227\n\006parent\030\001" + + " \001(\tB\'\340A\002\372A!\022\037cloudasset.googleapis.com/" + + "Asset\022-\n\tread_time\030\002 \001(\0132\032.google.protob" + + "uf.Timestamp\022\023\n\013asset_types\030\003 \003(\t\0228\n\014con" + + "tent_type\030\004 \001(\0162\".google.cloud.asset.v1." + + "ContentType\022\021\n\tpage_size\030\005 \001(\005\022\022\n\npage_t" + + "oken\030\006 \001(\t\022\032\n\022relationship_types\030\007 \003(\t\"\212" + + "\001\n\022ListAssetsResponse\022-\n\tread_time\030\001 \001(\013" + + "2\032.google.protobuf.Timestamp\022,\n\006assets\030\002" + + " \003(\0132\034.google.cloud.asset.v1.Asset\022\027\n\017ne" + + "xt_page_token\030\003 \001(\t\"\216\002\n\034BatchGetAssetsHi" + + "storyRequest\0227\n\006parent\030\001 \001(\tB\'\340A\002\372A!\022\037cl" + + "oudasset.googleapis.com/Asset\022\023\n\013asset_n" + + "ames\030\002 \003(\t\022=\n\014content_type\030\003 \001(\0162\".googl" + + "e.cloud.asset.v1.ContentTypeB\003\340A\001\022@\n\020rea" + + "d_time_window\030\004 \001(\0132!.google.cloud.asset" + + ".v1.TimeWindowB\003\340A\001\022\037\n\022relationship_type" + + "s\030\005 \003(\tB\003\340A\001\"U\n\035BatchGetAssetsHistoryRes" + + "ponse\0224\n\006assets\030\001 \003(\0132$.google.cloud.ass" + + "et.v1.TemporalAsset\"n\n\021CreateFeedRequest" + + "\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\024\n\007feed_id\030\002 \001(\tB\003" + + "\340A\002\022.\n\004feed\030\003 \001(\0132\033.google.cloud.asset.v" + + "1.FeedB\003\340A\002\"F\n\016GetFeedRequest\0224\n\004name\030\001 " + + "\001(\tB&\340A\002\372A \n\036cloudasset.googleapis.com/F" + + "eed\"\'\n\020ListFeedsRequest\022\023\n\006parent\030\001 \001(\tB" + + "\003\340A\002\"?\n\021ListFeedsResponse\022*\n\005feeds\030\001 \003(\013" + + "2\033.google.cloud.asset.v1.Feed\"y\n\021UpdateF" + + "eedRequest\022.\n\004feed\030\001 \001(\0132\033.google.cloud." + + "asset.v1.FeedB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132" + + "\032.google.protobuf.FieldMaskB\003\340A\002\"I\n\021Dele" + + "teFeedRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036clo" + + "udasset.googleapis.com/Feed\"\253\001\n\014OutputCo" + + "nfig\022@\n\017gcs_destination\030\001 \001(\0132%.google.c" + + "loud.asset.v1.GcsDestinationH\000\022J\n\024bigque" + + "ry_destination\030\002 \001(\0132*.google.cloud.asse" + + "t.v1.BigQueryDestinationH\000B\r\n\013destinatio" + + "n\"V\n\014OutputResult\022<\n\ngcs_result\030\001 \001(\0132&." + + "google.cloud.asset.v1.GcsOutputResultH\000B" + + "\010\n\006result\"\037\n\017GcsOutputResult\022\014\n\004uris\030\001 \003" + + "(\t\"C\n\016GcsDestination\022\r\n\003uri\030\001 \001(\tH\000\022\024\n\nu" + + "ri_prefix\030\002 \001(\tH\000B\014\n\nobject_uri\"\264\001\n\023BigQ" + + "ueryDestination\022\024\n\007dataset\030\001 \001(\tB\003\340A\002\022\022\n" + + "\005table\030\002 \001(\tB\003\340A\002\022\r\n\005force\030\003 \001(\010\022<\n\016part" + + "ition_spec\030\004 \001(\0132$.google.cloud.asset.v1" + + ".PartitionSpec\022&\n\036separate_tables_per_as" + + "set_type\030\005 \001(\010\"\251\001\n\rPartitionSpec\022H\n\rpart" + + "ition_key\030\001 \001(\01621.google.cloud.asset.v1." + + "PartitionSpec.PartitionKey\"N\n\014PartitionK" + + "ey\022\035\n\031PARTITION_KEY_UNSPECIFIED\020\000\022\r\n\tREA" + + "D_TIME\020\001\022\020\n\014REQUEST_TIME\020\002\"\"\n\021PubsubDest" + + "ination\022\r\n\005topic\030\001 \001(\t\"i\n\020FeedOutputConf" + + "ig\022F\n\022pubsub_destination\030\001 \001(\0132(.google." + + "cloud.asset.v1.PubsubDestinationH\000B\r\n\013de" + + "stination\"\235\003\n\004Feed\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\023\n" + + "\013asset_names\030\002 \003(\t\022\023\n\013asset_types\030\003 \003(\t\022" + + "8\n\014content_type\030\004 \001(\0162\".google.cloud.ass" + + "et.v1.ContentType\022H\n\022feed_output_config\030" + + "\005 \001(\0132\'.google.cloud.asset.v1.FeedOutput" + + "ConfigB\003\340A\002\022$\n\tcondition\030\006 \001(\0132\021.google." + + "type.Expr\022\032\n\022relationship_types\030\007 \003(\t:\221\001" + + "\352A\215\001\n\036cloudasset.googleapis.com/Feed\022\037pr" + + "ojects/{project}/feeds/{feed}\022\035folders/{" + + "folder}/feeds/{feed}\022)organizations/{org" + + "anization}/feeds/{feed} \001\"\331\001\n\031SearchAllR" + + "esourcesRequest\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022\022\n\005q" + + "uery\030\002 \001(\tB\003\340A\001\022\030\n\013asset_types\030\003 \003(\tB\003\340A" + + "\001\022\026\n\tpage_size\030\004 \001(\005B\003\340A\001\022\027\n\npage_token\030" + + "\005 \001(\tB\003\340A\001\022\025\n\010order_by\030\006 \001(\tB\003\340A\001\0222\n\trea" + + "d_mask\030\010 \001(\0132\032.google.protobuf.FieldMask" + + "B\003\340A\001\"s\n\032SearchAllResourcesResponse\022<\n\007r" + + "esults\030\001 \003(\0132+.google.cloud.asset.v1.Res" + + "ourceSearchResult\022\027\n\017next_page_token\030\002 \001" + + "(\t\"\247\001\n\033SearchAllIamPoliciesRequest\022\022\n\005sc" + + "ope\030\001 \001(\tB\003\340A\002\022\022\n\005query\030\002 \001(\tB\003\340A\001\022\026\n\tpa" + + "ge_size\030\003 \001(\005B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003" + + "\340A\001\022\030\n\013asset_types\030\005 \003(\tB\003\340A\001\022\025\n\010order_b" + + "y\030\007 \001(\tB\003\340A\001\"v\n\034SearchAllIamPoliciesResp" + + "onse\022=\n\007results\030\001 \003(\0132,.google.cloud.ass" + + "et.v1.IamPolicySearchResult\022\027\n\017next_page" + + "_token\030\002 \001(\t\"\306\007\n\026IamPolicyAnalysisQuery\022" + + "\022\n\005scope\030\001 \001(\tB\003\340A\002\022^\n\021resource_selector" + + "\030\002 \001(\0132>.google.cloud.asset.v1.IamPolicy" + + "AnalysisQuery.ResourceSelectorB\003\340A\001\022^\n\021i" + + "dentity_selector\030\003 \001(\0132>.google.cloud.as" + + "set.v1.IamPolicyAnalysisQuery.IdentitySe" + + "lectorB\003\340A\001\022Z\n\017access_selector\030\004 \001(\0132<.g" + "oogle.cloud.asset.v1.IamPolicyAnalysisQu" - + "eryB\003\340A\002\0229\n\021execution_timeout\030\002 \001(\0132\031.go" - + "ogle.protobuf.DurationB\003\340A\001\"\212\004\n\030AnalyzeI" - + "amPolicyResponse\022X\n\rmain_analysis\030\001 \001(\0132" - + "A.google.cloud.asset.v1.AnalyzeIamPolicy" - + "Response.IamPolicyAnalysis\022q\n&service_ac" - + "count_impersonation_analysis\030\002 \003(\0132A.goo" - + "gle.cloud.asset.v1.AnalyzeIamPolicyRespo" - + "nse.IamPolicyAnalysis\022\026\n\016fully_explored\030" - + "\003 \001(\010\032\210\002\n\021IamPolicyAnalysis\022E\n\016analysis_" - + "query\030\001 \001(\0132-.google.cloud.asset.v1.IamP" - + "olicyAnalysisQuery\022H\n\020analysis_results\030\002" - + " \003(\0132..google.cloud.asset.v1.IamPolicyAn" - + "alysisResult\022\026\n\016fully_explored\030\003 \001(\010\022J\n\023" - + "non_critical_errors\030\005 \003(\0132-.google.cloud" - + ".asset.v1.IamPolicyAnalysisState\"\264\004\n\035Iam" - + "PolicyAnalysisOutputConfig\022^\n\017gcs_destin" - + "ation\030\001 \001(\0132C.google.cloud.asset.v1.IamP" - + "olicyAnalysisOutputConfig.GcsDestination" - + "H\000\022h\n\024bigquery_destination\030\002 \001(\0132H.googl" - + "e.cloud.asset.v1.IamPolicyAnalysisOutput" - + "Config.BigQueryDestinationH\000\032\"\n\016GcsDesti" - + "nation\022\020\n\003uri\030\001 \001(\tB\003\340A\002\032\225\002\n\023BigQueryDes" - + "tination\022\024\n\007dataset\030\001 \001(\tB\003\340A\002\022\031\n\014table_" - + "prefix\030\002 \001(\tB\003\340A\002\022l\n\rpartition_key\030\003 \001(\016" - + "2U.google.cloud.asset.v1.IamPolicyAnalys" - + "isOutputConfig.BigQueryDestination.Parti" - + "tionKey\022\036\n\021write_disposition\030\004 \001(\tB\003\340A\001\"" - + "?\n\014PartitionKey\022\035\n\031PARTITION_KEY_UNSPECI" - + "FIED\020\000\022\020\n\014REQUEST_TIME\020\001B\r\n\013destination\"" - + "\302\001\n\"AnalyzeIamPolicyLongrunningRequest\022J" - + "\n\016analysis_query\030\001 \001(\0132-.google.cloud.as" - + "set.v1.IamPolicyAnalysisQueryB\003\340A\002\022P\n\rou" - + "tput_config\030\002 \001(\01324.google.cloud.asset.v" - + "1.IamPolicyAnalysisOutputConfigB\003\340A\002\"%\n#" - + "AnalyzeIamPolicyLongrunningResponse\"\326\001\n\022" - + "AnalyzeMoveRequest\022\025\n\010resource\030\001 \001(\tB\003\340A" - + "\002\022\037\n\022destination_parent\030\002 \001(\tB\003\340A\002\022D\n\004vi" - + "ew\030\003 \001(\01626.google.cloud.asset.v1.Analyze" - + "MoveRequest.AnalysisView\"B\n\014AnalysisView" - + "\022\035\n\031ANALYSIS_VIEW_UNSPECIFIED\020\000\022\010\n\004FULL\020" - + "\001\022\t\n\005BASIC\020\002\"Q\n\023AnalyzeMoveResponse\022:\n\rm" - + "ove_analysis\030\001 \003(\0132#.google.cloud.asset." - + "v1.MoveAnalysis\"\222\001\n\014MoveAnalysis\022\024\n\014disp" - + "lay_name\030\001 \001(\t\022=\n\010analysis\030\002 \001(\0132).googl" - + "e.cloud.asset.v1.MoveAnalysisResultH\000\022#\n" - + "\005error\030\003 \001(\0132\022.google.rpc.StatusH\000B\010\n\006re" - + "sult\"~\n\022MoveAnalysisResult\0223\n\010blockers\030\001" - + " \003(\0132!.google.cloud.asset.v1.MoveImpact\022" - + "3\n\010warnings\030\002 \003(\0132!.google.cloud.asset.v" - + "1.MoveImpact\"\034\n\nMoveImpact\022\016\n\006detail\030\001 \001" - + "(\t*~\n\013ContentType\022\034\n\030CONTENT_TYPE_UNSPEC" - + "IFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n\nIAM_POLICY\020\002\022\016\n" - + "\nORG_POLICY\020\004\022\021\n\rACCESS_POLICY\020\005\022\020\n\014OS_I" - + "NVENTORY\020\0062\367\021\n\014AssetService\022\336\001\n\014ExportAs" - + "sets\022*.google.cloud.asset.v1.ExportAsset" - + "sRequest\032\035.google.longrunning.Operation\"" - + "\202\001\202\323\344\223\002\"\"\035/v1/{parent=*/*}:exportAssets:" - + "\001*\312AW\n*google.cloud.asset.v1.ExportAsset" - + "sResponse\022)google.cloud.asset.v1.ExportA" - + "ssetsRequest\022\213\001\n\nListAssets\022(.google.clo" - + "ud.asset.v1.ListAssetsRequest\032).google.c" - + "loud.asset.v1.ListAssetsResponse\"(\202\323\344\223\002\031" - + "\022\027/v1/{parent=*/*}/assets\332A\006parent\022\262\001\n\025B" - + "atchGetAssetsHistory\0223.google.cloud.asse" - + "t.v1.BatchGetAssetsHistoryRequest\0324.goog" - + "le.cloud.asset.v1.BatchGetAssetsHistoryR" - + "esponse\".\202\323\344\223\002(\022&/v1/{parent=*/*}:batchG" - + "etAssetsHistory\022\177\n\nCreateFeed\022(.google.c" - + "loud.asset.v1.CreateFeedRequest\032\033.google" - + ".cloud.asset.v1.Feed\"*\202\323\344\223\002\033\"\026/v1/{paren" - + "t=*/*}/feeds:\001*\332A\006parent\022t\n\007GetFeed\022%.go" - + "ogle.cloud.asset.v1.GetFeedRequest\032\033.goo" - + "gle.cloud.asset.v1.Feed\"%\202\323\344\223\002\030\022\026/v1/{na" - + "me=*/*/feeds/*}\332A\004name\022\207\001\n\tListFeeds\022\'.g" - + "oogle.cloud.asset.v1.ListFeedsRequest\032(." - + "google.cloud.asset.v1.ListFeedsResponse\"" - + "\'\202\323\344\223\002\030\022\026/v1/{parent=*/*}/feeds\332A\006parent" - + "\022\202\001\n\nUpdateFeed\022(.google.cloud.asset.v1." - + "UpdateFeedRequest\032\033.google.cloud.asset.v" - + "1.Feed\"-\202\323\344\223\002 2\033/v1/{feed.name=*/*/feeds" - + "/*}:\001*\332A\004feed\022u\n\nDeleteFeed\022(.google.clo" - + "ud.asset.v1.DeleteFeedRequest\032\026.google.p" - + "rotobuf.Empty\"%\202\323\344\223\002\030*\026/v1/{name=*/*/fee" - + "ds/*}\332A\004name\022\277\001\n\022SearchAllResources\0220.go" - + "ogle.cloud.asset.v1.SearchAllResourcesRe" - + "quest\0321.google.cloud.asset.v1.SearchAllR" - + "esourcesResponse\"D\202\323\344\223\002$\022\"/v1/{scope=*/*" - + "}:searchAllResources\332A\027scope,query,asset" - + "_types\022\273\001\n\024SearchAllIamPolicies\0222.google" - + ".cloud.asset.v1.SearchAllIamPoliciesRequ" - + "est\0323.google.cloud.asset.v1.SearchAllIam" - + "PoliciesResponse\":\202\323\344\223\002&\022$/v1/{scope=*/*" - + "}:searchAllIamPolicies\332A\013scope,query\022\254\001\n" - + "\020AnalyzeIamPolicy\022..google.cloud.asset.v" - + "1.AnalyzeIamPolicyRequest\032/.google.cloud" - + ".asset.v1.AnalyzeIamPolicyResponse\"7\202\323\344\223" - + "\0021\022//v1/{analysis_query.scope=*/*}:analy" - + "zeIamPolicy\022\270\002\n\033AnalyzeIamPolicyLongrunn" - + "ing\0229.google.cloud.asset.v1.AnalyzeIamPo" - + "licyLongrunningRequest\032\035.google.longrunn" - + "ing.Operation\"\276\001\202\323\344\223\002?\":/v1/{analysis_qu" - + "ery.scope=*/*}:analyzeIamPolicyLongrunni" - + "ng:\001*\312Av\n9google.cloud.asset.v1.AnalyzeI" - + "amPolicyLongrunningResponse\0229google.clou" - + "d.asset.v1.AnalyzeIamPolicyLongrunningMe" - + "tadata\022\214\001\n\013AnalyzeMove\022).google.cloud.as" - + "set.v1.AnalyzeMoveRequest\032*.google.cloud" - + ".asset.v1.AnalyzeMoveResponse\"&\202\323\344\223\002 \022\036/" - + "v1/{resource=*/*}:analyzeMove\032M\312A\031clouda" - + "sset.googleapis.com\322A.https://www.google" - + "apis.com/auth/cloud-platformB\234\001\n\031com.goo" - + "gle.cloud.asset.v1B\021AssetServiceProtoP\001Z" - + ":google.golang.org/genproto/googleapis/c" - + "loud/asset/v1;asset\252\002\025Google.Cloud.Asset" - + ".V1\312\002\025Google\\Cloud\\Asset\\V1b\006proto3" + + "ery.AccessSelectorB\003\340A\001\022K\n\007options\030\005 \001(\013" + + "25.google.cloud.asset.v1.IamPolicyAnalys" + + "isQuery.OptionsB\003\340A\001\022^\n\021condition_contex" + + "t\030\006 \001(\0132>.google.cloud.asset.v1.IamPolic" + + "yAnalysisQuery.ConditionContextB\003\340A\001\0323\n\020" + + "ResourceSelector\022\037\n\022full_resource_name\030\001" + + " \001(\tB\003\340A\002\032)\n\020IdentitySelector\022\025\n\010identit" + + "y\030\001 \001(\tB\003\340A\002\032>\n\016AccessSelector\022\022\n\005roles\030" + + "\001 \003(\tB\003\340A\001\022\030\n\013permissions\030\002 \003(\tB\003\340A\001\032\330\001\n" + + "\007Options\022\032\n\rexpand_groups\030\001 \001(\010B\003\340A\001\022\031\n\014" + + "expand_roles\030\002 \001(\010B\003\340A\001\022\035\n\020expand_resour" + + "ces\030\003 \001(\010B\003\340A\001\022\"\n\025output_resource_edges\030" + + "\004 \001(\010B\003\340A\001\022\037\n\022output_group_edges\030\005 \001(\010B\003" + + "\340A\001\0222\n%analyze_service_account_impersona" + + "tion\030\006 \001(\010B\003\340A\001\032T\n\020ConditionContext\0221\n\013a" + + "ccess_time\030\001 \001(\0132\032.google.protobuf.Times" + + "tampH\000B\r\n\013TimeContext\"\240\001\n\027AnalyzeIamPoli" + + "cyRequest\022J\n\016analysis_query\030\001 \001(\0132-.goog" + + "le.cloud.asset.v1.IamPolicyAnalysisQuery" + + "B\003\340A\002\0229\n\021execution_timeout\030\002 \001(\0132\031.googl" + + "e.protobuf.DurationB\003\340A\001\"\212\004\n\030AnalyzeIamP" + + "olicyResponse\022X\n\rmain_analysis\030\001 \001(\0132A.g" + + "oogle.cloud.asset.v1.AnalyzeIamPolicyRes" + + "ponse.IamPolicyAnalysis\022q\n&service_accou" + + "nt_impersonation_analysis\030\002 \003(\0132A.google" + + ".cloud.asset.v1.AnalyzeIamPolicyResponse" + + ".IamPolicyAnalysis\022\026\n\016fully_explored\030\003 \001" + + "(\010\032\210\002\n\021IamPolicyAnalysis\022E\n\016analysis_que" + + "ry\030\001 \001(\0132-.google.cloud.asset.v1.IamPoli" + + "cyAnalysisQuery\022H\n\020analysis_results\030\002 \003(" + + "\0132..google.cloud.asset.v1.IamPolicyAnaly" + + "sisResult\022\026\n\016fully_explored\030\003 \001(\010\022J\n\023non" + + "_critical_errors\030\005 \003(\0132-.google.cloud.as" + + "set.v1.IamPolicyAnalysisState\"\264\004\n\035IamPol" + + "icyAnalysisOutputConfig\022^\n\017gcs_destinati" + + "on\030\001 \001(\0132C.google.cloud.asset.v1.IamPoli" + + "cyAnalysisOutputConfig.GcsDestinationH\000\022" + + "h\n\024bigquery_destination\030\002 \001(\0132H.google.c" + + "loud.asset.v1.IamPolicyAnalysisOutputCon" + + "fig.BigQueryDestinationH\000\032\"\n\016GcsDestinat" + + "ion\022\020\n\003uri\030\001 \001(\tB\003\340A\002\032\225\002\n\023BigQueryDestin" + + "ation\022\024\n\007dataset\030\001 \001(\tB\003\340A\002\022\031\n\014table_pre" + + "fix\030\002 \001(\tB\003\340A\002\022l\n\rpartition_key\030\003 \001(\0162U." + + "google.cloud.asset.v1.IamPolicyAnalysisO" + + "utputConfig.BigQueryDestination.Partitio" + + "nKey\022\036\n\021write_disposition\030\004 \001(\tB\003\340A\001\"?\n\014" + + "PartitionKey\022\035\n\031PARTITION_KEY_UNSPECIFIE" + + "D\020\000\022\020\n\014REQUEST_TIME\020\001B\r\n\013destination\"\302\001\n" + + "\"AnalyzeIamPolicyLongrunningRequest\022J\n\016a" + + "nalysis_query\030\001 \001(\0132-.google.cloud.asset" + + ".v1.IamPolicyAnalysisQueryB\003\340A\002\022P\n\routpu" + + "t_config\030\002 \001(\01324.google.cloud.asset.v1.I" + + "amPolicyAnalysisOutputConfigB\003\340A\002\"%\n#Ana" + + "lyzeIamPolicyLongrunningResponse\"\326\001\n\022Ana" + + "lyzeMoveRequest\022\025\n\010resource\030\001 \001(\tB\003\340A\002\022\037" + + "\n\022destination_parent\030\002 \001(\tB\003\340A\002\022D\n\004view\030" + + "\003 \001(\01626.google.cloud.asset.v1.AnalyzeMov" + + "eRequest.AnalysisView\"B\n\014AnalysisView\022\035\n" + + "\031ANALYSIS_VIEW_UNSPECIFIED\020\000\022\010\n\004FULL\020\001\022\t" + + "\n\005BASIC\020\002\"Q\n\023AnalyzeMoveResponse\022:\n\rmove" + + "_analysis\030\001 \003(\0132#.google.cloud.asset.v1." + + "MoveAnalysis\"\222\001\n\014MoveAnalysis\022\024\n\014display" + + "_name\030\001 \001(\t\022=\n\010analysis\030\002 \001(\0132).google.c" + + "loud.asset.v1.MoveAnalysisResultH\000\022#\n\005er" + + "ror\030\003 \001(\0132\022.google.rpc.StatusH\000B\010\n\006resul" + + "t\"~\n\022MoveAnalysisResult\0223\n\010blockers\030\001 \003(" + + "\0132!.google.cloud.asset.v1.MoveImpact\0223\n\010" + + "warnings\030\002 \003(\0132!.google.cloud.asset.v1.M" + + "oveImpact\"\034\n\nMoveImpact\022\016\n\006detail\030\001 \001(\t*" + + "\220\001\n\013ContentType\022\034\n\030CONTENT_TYPE_UNSPECIF" + + "IED\020\000\022\014\n\010RESOURCE\020\001\022\016\n\nIAM_POLICY\020\002\022\016\n\nO" + + "RG_POLICY\020\004\022\021\n\rACCESS_POLICY\020\005\022\020\n\014OS_INV" + + "ENTORY\020\006\022\020\n\014RELATIONSHIP\020\0072\367\021\n\014AssetServ" + + "ice\022\336\001\n\014ExportAssets\022*.google.cloud.asse" + + "t.v1.ExportAssetsRequest\032\035.google.longru" + + "nning.Operation\"\202\001\202\323\344\223\002\"\"\035/v1/{parent=*/" + + "*}:exportAssets:\001*\312AW\n*google.cloud.asse" + + "t.v1.ExportAssetsResponse\022)google.cloud." + + "asset.v1.ExportAssetsRequest\022\213\001\n\nListAss" + + "ets\022(.google.cloud.asset.v1.ListAssetsRe" + + "quest\032).google.cloud.asset.v1.ListAssets" + + "Response\"(\202\323\344\223\002\031\022\027/v1/{parent=*/*}/asset" + + "s\332A\006parent\022\262\001\n\025BatchGetAssetsHistory\0223.g" + + "oogle.cloud.asset.v1.BatchGetAssetsHisto" + + "ryRequest\0324.google.cloud.asset.v1.BatchG" + + "etAssetsHistoryResponse\".\202\323\344\223\002(\022&/v1/{pa" + + "rent=*/*}:batchGetAssetsHistory\022\177\n\nCreat" + + "eFeed\022(.google.cloud.asset.v1.CreateFeed" + + "Request\032\033.google.cloud.asset.v1.Feed\"*\202\323" + + "\344\223\002\033\"\026/v1/{parent=*/*}/feeds:\001*\332A\006parent" + + "\022t\n\007GetFeed\022%.google.cloud.asset.v1.GetF" + + "eedRequest\032\033.google.cloud.asset.v1.Feed\"" + + "%\202\323\344\223\002\030\022\026/v1/{name=*/*/feeds/*}\332A\004name\022\207" + + "\001\n\tListFeeds\022\'.google.cloud.asset.v1.Lis" + + "tFeedsRequest\032(.google.cloud.asset.v1.Li" + + "stFeedsResponse\"\'\202\323\344\223\002\030\022\026/v1/{parent=*/*" + + "}/feeds\332A\006parent\022\202\001\n\nUpdateFeed\022(.google" + + ".cloud.asset.v1.UpdateFeedRequest\032\033.goog" + + "le.cloud.asset.v1.Feed\"-\202\323\344\223\002 2\033/v1/{fee" + + "d.name=*/*/feeds/*}:\001*\332A\004feed\022u\n\nDeleteF" + + "eed\022(.google.cloud.asset.v1.DeleteFeedRe" + + "quest\032\026.google.protobuf.Empty\"%\202\323\344\223\002\030*\026/" + + "v1/{name=*/*/feeds/*}\332A\004name\022\277\001\n\022SearchA" + + "llResources\0220.google.cloud.asset.v1.Sear" + + "chAllResourcesRequest\0321.google.cloud.ass" + + "et.v1.SearchAllResourcesResponse\"D\202\323\344\223\002$" + + "\022\"/v1/{scope=*/*}:searchAllResources\332A\027s" + + "cope,query,asset_types\022\273\001\n\024SearchAllIamP" + + "olicies\0222.google.cloud.asset.v1.SearchAl" + + "lIamPoliciesRequest\0323.google.cloud.asset" + + ".v1.SearchAllIamPoliciesResponse\":\202\323\344\223\002&" + + "\022$/v1/{scope=*/*}:searchAllIamPolicies\332A" + + "\013scope,query\022\254\001\n\020AnalyzeIamPolicy\022..goog" + + "le.cloud.asset.v1.AnalyzeIamPolicyReques" + + "t\032/.google.cloud.asset.v1.AnalyzeIamPoli" + + "cyResponse\"7\202\323\344\223\0021\022//v1/{analysis_query." + + "scope=*/*}:analyzeIamPolicy\022\270\002\n\033AnalyzeI" + + "amPolicyLongrunning\0229.google.cloud.asset" + + ".v1.AnalyzeIamPolicyLongrunningRequest\032\035" + + ".google.longrunning.Operation\"\276\001\202\323\344\223\002?\":" + + "/v1/{analysis_query.scope=*/*}:analyzeIa" + + "mPolicyLongrunning:\001*\312Av\n9google.cloud.a" + + "sset.v1.AnalyzeIamPolicyLongrunningRespo" + + "nse\0229google.cloud.asset.v1.AnalyzeIamPol" + + "icyLongrunningMetadata\022\214\001\n\013AnalyzeMove\022)" + + ".google.cloud.asset.v1.AnalyzeMoveReques" + + "t\032*.google.cloud.asset.v1.AnalyzeMoveRes" + + "ponse\"&\202\323\344\223\002 \022\036/v1/{resource=*/*}:analyz" + + "eMove\032M\312A\031cloudasset.googleapis.com\322A.ht" + + "tps://www.googleapis.com/auth/cloud-plat" + + "formB\234\001\n\031com.google.cloud.asset.v1B\021Asse" + + "tServiceProtoP\001Z:google.golang.org/genpr" + + "oto/googleapis/cloud/asset/v1;asset\252\002\025Go" + + "ogle.Cloud.Asset.V1\312\002\025Google\\Cloud\\Asset" + + "\\V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -493,7 +497,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_ExportAssetsRequest_descriptor, new java.lang.String[] { - "Parent", "ReadTime", "AssetTypes", "ContentType", "OutputConfig", + "Parent", + "ReadTime", + "AssetTypes", + "ContentType", + "OutputConfig", + "RelationshipTypes", }); internal_static_google_cloud_asset_v1_ExportAssetsResponse_descriptor = getDescriptor().getMessageTypes().get(2); @@ -509,7 +518,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_ListAssetsRequest_descriptor, new java.lang.String[] { - "Parent", "ReadTime", "AssetTypes", "ContentType", "PageSize", "PageToken", + "Parent", + "ReadTime", + "AssetTypes", + "ContentType", + "PageSize", + "PageToken", + "RelationshipTypes", }); internal_static_google_cloud_asset_v1_ListAssetsResponse_descriptor = getDescriptor().getMessageTypes().get(4); @@ -525,7 +540,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryRequest_descriptor, new java.lang.String[] { - "Parent", "AssetNames", "ContentType", "ReadTimeWindow", + "Parent", "AssetNames", "ContentType", "ReadTimeWindow", "RelationshipTypes", }); internal_static_google_cloud_asset_v1_BatchGetAssetsHistoryResponse_descriptor = getDescriptor().getMessageTypes().get(6); @@ -653,7 +668,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_asset_v1_Feed_descriptor, new java.lang.String[] { - "Name", "AssetNames", "AssetTypes", "ContentType", "FeedOutputConfig", "Condition", + "Name", + "AssetNames", + "AssetTypes", + "ContentType", + "FeedOutputConfig", + "Condition", + "RelationshipTypes", }); internal_static_google_cloud_asset_v1_SearchAllResourcesRequest_descriptor = getDescriptor().getMessageTypes().get(22); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java index 1979583bc..b68b33b38 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequest.java @@ -41,6 +41,7 @@ private BatchGetAssetsHistoryRequest() { parent_ = ""; assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; contentType_ = 0; + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @@ -111,6 +112,16 @@ private BatchGetAssetsHistoryRequest( readTimeWindow_ = subBuilder.buildPartial(); } + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + relationshipTypes_.add(s); break; } default: @@ -130,6 +141,9 @@ private BatchGetAssetsHistoryRequest( if (((mutable_bitField0_ & 0x00000001) != 0)) { assetNames_ = assetNames_.getUnmodifiableView(); } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -397,6 +411,127 @@ public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder( return getReadTimeWindow(); } + public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList relationshipTypes_; + /** + * + * + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList getRelationshipTypesList() { + return relationshipTypes_; + } + /** + * + * + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + * + * + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + * + * + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -424,6 +559,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (readTimeWindow_ != null) { output.writeMessage(4, getReadTimeWindow()); } + for (int i = 0; i < relationshipTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, relationshipTypes_.getRaw(i)); + } unknownFields.writeTo(output); } @@ -451,6 +589,14 @@ public int getSerializedSize() { if (readTimeWindow_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getReadTimeWindow()); } + { + int dataSize = 0; + for (int i = 0; i < relationshipTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelationshipTypesList().size(); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -474,6 +620,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReadTimeWindow()) { if (!getReadTimeWindow().equals(other.getReadTimeWindow())) return false; } + if (!getRelationshipTypesList().equals(other.getRelationshipTypesList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -497,6 +644,10 @@ public int hashCode() { hash = (37 * hash) + READ_TIME_WINDOW_FIELD_NUMBER; hash = (53 * hash) + getReadTimeWindow().hashCode(); } + if (getRelationshipTypesCount() > 0) { + hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipTypesList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -655,6 +806,8 @@ public Builder clear() { readTimeWindow_ = null; readTimeWindowBuilder_ = null; } + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -695,6 +848,11 @@ public com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest buildPartial() { } else { result.readTimeWindow_ = readTimeWindowBuilder_.build(); } + if (((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.relationshipTypes_ = relationshipTypes_; onBuilt(); return result; } @@ -765,6 +923,16 @@ public Builder mergeFrom(com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest if (other.hasReadTimeWindow()) { mergeReadTimeWindow(other.getReadTimeWindow()); } + if (!other.relationshipTypes_.isEmpty()) { + if (relationshipTypes_.isEmpty()) { + relationshipTypes_ = other.relationshipTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRelationshipTypesIsMutable(); + relationshipTypes_.addAll(other.relationshipTypes_); + } + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1485,6 +1653,318 @@ public com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder( return readTimeWindowBuilder_; } + private com.google.protobuf.LazyStringList relationshipTypes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureRelationshipTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList getRelationshipTypesList() { + return relationshipTypes_.getUnmodifiableView(); + } + /** + * + * + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + * + * + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + * + * + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + /** + * + * + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The relationshipTypes to set. + * @return This builder for chaining. + */ + public Builder setRelationshipTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addAllRelationshipTypes(java.lang.Iterable values) { + ensureRelationshipTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relationshipTypes_); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRelationshipTypes() { + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationships' history on the [asset_names]. It
+     * returns an error if any of the [relationship_types] doesn't belong to the
+     * supported relationship types of the [asset_names] or if any of the
+     * [asset_names]'s types doesn't belong to the source types of the
+     * [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships' history on the [asset_names] or
+     * returns an error if any of the [asset_names]'s types has no relationship
+     * support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java index c68722c91..eec143169 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/BatchGetAssetsHistoryRequestOrBuilder.java @@ -211,4 +211,115 @@ public interface BatchGetAssetsHistoryRequestOrBuilder *
*/ com.google.cloud.asset.v1.TimeWindowOrBuilder getReadTimeWindowOrBuilder(); + + /** + * + * + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the relationshipTypes. + */ + java.util.List getRelationshipTypesList(); + /** + * + * + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of relationshipTypes. + */ + int getRelationshipTypesCount(); + /** + * + * + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + java.lang.String getRelationshipTypes(int index); + /** + * + * + *
+   * Optional. A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationships' history on the [asset_names]. It
+   * returns an error if any of the [relationship_types] doesn't belong to the
+   * supported relationship types of the [asset_names] or if any of the
+   * [asset_names]'s types doesn't belong to the source types of the
+   * [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships' history on the [asset_names] or
+   * returns an error if any of the [asset_names]'s types has no relationship
+   * support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + com.google.protobuf.ByteString getRelationshipTypesBytes(int index); } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java index 47f841d3e..973207d89 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ContentType.java @@ -88,6 +88,16 @@ public enum ContentType implements com.google.protobuf.ProtocolMessageEnum { * OS_INVENTORY = 6; */ OS_INVENTORY(6), + /** + * + * + *
+   * The related resources.
+   * 
+ * + * RELATIONSHIP = 7; + */ + RELATIONSHIP(7), UNRECOGNIZED(-1), ; @@ -151,6 +161,16 @@ public enum ContentType implements com.google.protobuf.ProtocolMessageEnum { * OS_INVENTORY = 6; */ public static final int OS_INVENTORY_VALUE = 6; + /** + * + * + *
+   * The related resources.
+   * 
+ * + * RELATIONSHIP = 7; + */ + public static final int RELATIONSHIP_VALUE = 7; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -188,6 +208,8 @@ public static ContentType forNumber(int value) { return ACCESS_POLICY; case 6: return OS_INVENTORY; + case 7: + return RELATIONSHIP; default: return null; } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java index 6ee6f354b..ce2f3b4f4 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequest.java @@ -41,6 +41,7 @@ private ExportAssetsRequest() { parent_ = ""; assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; contentType_ = 0; + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @@ -126,6 +127,16 @@ private ExportAssetsRequest( outputConfig_ = subBuilder.buildPartial(); } + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + relationshipTypes_.add(s); break; } default: @@ -145,6 +156,9 @@ private ExportAssetsRequest( if (((mutable_bitField0_ & 0x00000001) != 0)) { assetTypes_ = assetTypes_.getUnmodifiableView(); } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -487,6 +501,123 @@ public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder( return getOutputConfig(); } + public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList relationshipTypes_; + /** + * + * + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList getRelationshipTypesList() { + return relationshipTypes_; + } + /** + * + * + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + * + * + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + * + * + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -517,6 +648,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (outputConfig_ != null) { output.writeMessage(5, getOutputConfig()); } + for (int i = 0; i < relationshipTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, relationshipTypes_.getRaw(i)); + } unknownFields.writeTo(output); } @@ -547,6 +681,14 @@ public int getSerializedSize() { if (outputConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOutputConfig()); } + { + int dataSize = 0; + for (int i = 0; i < relationshipTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelationshipTypesList().size(); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -574,6 +716,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOutputConfig()) { if (!getOutputConfig().equals(other.getOutputConfig())) return false; } + if (!getRelationshipTypesList().equals(other.getRelationshipTypesList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -601,6 +744,10 @@ public int hashCode() { hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getOutputConfig().hashCode(); } + if (getRelationshipTypesCount() > 0) { + hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipTypesList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -764,6 +911,8 @@ public Builder clear() { outputConfig_ = null; outputConfigBuilder_ = null; } + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -809,6 +958,11 @@ public com.google.cloud.asset.v1.ExportAssetsRequest buildPartial() { } else { result.outputConfig_ = outputConfigBuilder_.build(); } + if (((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.relationshipTypes_ = relationshipTypes_; onBuilt(); return result; } @@ -881,6 +1035,16 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ExportAssetsRequest other) { if (other.hasOutputConfig()) { mergeOutputConfig(other.getOutputConfig()); } + if (!other.relationshipTypes_.isEmpty()) { + if (relationshipTypes_.isEmpty()) { + relationshipTypes_ = other.relationshipTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRelationshipTypesIsMutable(); + relationshipTypes_.addAll(other.relationshipTypes_); + } + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1842,6 +2006,300 @@ public com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder( return outputConfigBuilder_; } + private com.google.protobuf.LazyStringList relationshipTypes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureRelationshipTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList getRelationshipTypesList() { + return relationshipTypes_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + * + * + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + * + * + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + /** + * + * + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * + * @param index The index to set the value at. + * @param value The relationshipTypes to set. + * @return This builder for chaining. + */ + public Builder setRelationshipTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * + * @param value The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * + * @param values The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addAllRelationshipTypes(java.lang.Iterable values) { + ensureRelationshipTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relationshipTypes_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * + * @return This builder for chaining. + */ + public Builder clearRelationshipTypes() { + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of relationship types to export, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+     * supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 6; + * + * @param value The bytes of the relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java index 059192137..870a0fdc9 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java @@ -275,4 +275,111 @@ public interface ExportAssetsRequestOrBuilder *
*/ com.google.cloud.asset.v1.OutputConfigOrBuilder getOutputConfigOrBuilder(); + + /** + * + * + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * + * @return A list containing the relationshipTypes. + */ + java.util.List getRelationshipTypesList(); + /** + * + * + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * + * @return The count of relationshipTypes. + */ + int getRelationshipTypesCount(); + /** + * + * + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + java.lang.String getRelationshipTypes(int index); + /** + * + * + *
+   * A list of relationship types to export, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all
+   * supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 6; + * + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + com.google.protobuf.ByteString getRelationshipTypesBytes(int index); } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java index e51ab4968..ddbc7b3df 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java @@ -46,6 +46,7 @@ private Feed() { assetNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; contentType_ = 0; + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @@ -140,6 +141,16 @@ private Feed( condition_ = subBuilder.buildPartial(); } + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + relationshipTypes_.add(s); break; } default: @@ -162,6 +173,9 @@ private Feed( if (((mutable_bitField0_ & 0x00000002) != 0)) { assetTypes_ = assetTypes_.getUnmodifiableView(); } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -585,6 +599,127 @@ public com.google.type.ExprOrBuilder getConditionOrBuilder() { return getCondition(); } + public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList relationshipTypes_; + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList getRelationshipTypesList() { + return relationshipTypes_; + } + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -618,6 +753,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (condition_ != null) { output.writeMessage(6, getCondition()); } + for (int i = 0; i < relationshipTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, relationshipTypes_.getRaw(i)); + } unknownFields.writeTo(output); } @@ -656,6 +794,14 @@ public int getSerializedSize() { if (condition_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getCondition()); } + { + int dataSize = 0; + for (int i = 0; i < relationshipTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelationshipTypesList().size(); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -683,6 +829,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCondition()) { if (!getCondition().equals(other.getCondition())) return false; } + if (!getRelationshipTypesList().equals(other.getRelationshipTypesList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -714,6 +861,10 @@ public int hashCode() { hash = (37 * hash) + CONDITION_FIELD_NUMBER; hash = (53 * hash) + getCondition().hashCode(); } + if (getRelationshipTypesCount() > 0) { + hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipTypesList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -881,6 +1032,8 @@ public Builder clear() { condition_ = null; conditionBuilder_ = null; } + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -930,6 +1083,11 @@ public com.google.cloud.asset.v1.Feed buildPartial() { } else { result.condition_ = conditionBuilder_.build(); } + if (((bitField0_ & 0x00000004) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.relationshipTypes_ = relationshipTypes_; onBuilt(); return result; } @@ -1012,6 +1170,16 @@ public Builder mergeFrom(com.google.cloud.asset.v1.Feed other) { if (other.hasCondition()) { mergeCondition(other.getCondition()); } + if (!other.relationshipTypes_.isEmpty()) { + if (relationshipTypes_.isEmpty()) { + relationshipTypes_ = other.relationshipTypes_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureRelationshipTypesIsMutable(); + relationshipTypes_.addAll(other.relationshipTypes_); + } + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -2198,6 +2366,309 @@ public com.google.type.ExprOrBuilder getConditionOrBuilder() { return conditionBuilder_; } + private com.google.protobuf.LazyStringList relationshipTypes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureRelationshipTypesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList getRelationshipTypesList() { + return relationshipTypes_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index to set the value at. + * @param value The relationshipTypes to set. + * @return This builder for chaining. + */ + public Builder setRelationshipTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @param value The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @param values The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addAllRelationshipTypes(java.lang.Iterable values) { + ensureRelationshipTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relationshipTypes_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @return This builder for chaining. + */ + public Builder clearRelationshipTypes() { + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it outputs specified relationship updates on the [asset_names] or the
+     * [asset_types]. It returns an error if any of the [relationship_types]
+     * doesn't belong to the supported relationship types of the [asset_names] or
+     * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+     * belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it outputs the supported relationships of the types of [asset_names] and
+     * [asset_types] or returns an error if any of the [asset_names] or the
+     * [asset_types] has no replationship support.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @param value The bytes of the relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java index 2af5a690f..08a47f655 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java @@ -347,4 +347,115 @@ public interface FeedOrBuilder * .google.type.Expr condition = 6; */ com.google.type.ExprOrBuilder getConditionOrBuilder(); + + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @return A list containing the relationshipTypes. + */ + java.util.List getRelationshipTypesList(); + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @return The count of relationshipTypes. + */ + int getRelationshipTypesCount(); + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + java.lang.String getRelationshipTypes(int index); + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it outputs specified relationship updates on the [asset_names] or the
+   * [asset_types]. It returns an error if any of the [relationship_types]
+   * doesn't belong to the supported relationship types of the [asset_names] or
+   * [asset_types], or any of the [asset_names] or the [asset_types] doesn't
+   * belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it outputs the supported relationships of the types of [asset_names] and
+   * [asset_types] or returns an error if any of the [asset_names] or the
+   * [asset_types] has no replationship support.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + com.google.protobuf.ByteString getRelationshipTypesBytes(int index); } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java index bc275f5d8..4f9404d2a 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequest.java @@ -42,6 +42,7 @@ private ListAssetsRequest() { assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; contentType_ = 0; pageToken_ = ""; + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @@ -125,6 +126,16 @@ private ListAssetsRequest( pageToken_ = s; break; } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + relationshipTypes_.add(s); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -142,6 +153,9 @@ private ListAssetsRequest( if (((mutable_bitField0_ & 0x00000001) != 0)) { assetTypes_ = assetTypes_.getUnmodifiableView(); } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -502,6 +516,123 @@ public com.google.protobuf.ByteString getPageTokenBytes() { } } + public static final int RELATIONSHIP_TYPES_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList relationshipTypes_; + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList getRelationshipTypesList() { + return relationshipTypes_; + } + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -535,6 +666,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!getPageTokenBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); } + for (int i = 0; i < relationshipTypes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, relationshipTypes_.getRaw(i)); + } unknownFields.writeTo(output); } @@ -568,6 +702,14 @@ public int getSerializedSize() { if (!getPageTokenBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); } + { + int dataSize = 0; + for (int i = 0; i < relationshipTypes_.size(); i++) { + dataSize += computeStringSizeNoTag(relationshipTypes_.getRaw(i)); + } + size += dataSize; + size += 1 * getRelationshipTypesList().size(); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -593,6 +735,7 @@ public boolean equals(final java.lang.Object obj) { if (contentType_ != other.contentType_) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (!getRelationshipTypesList().equals(other.getRelationshipTypesList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -620,6 +763,10 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + if (getRelationshipTypesCount() > 0) { + hash = (37 * hash) + RELATIONSHIP_TYPES_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipTypesList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -781,6 +928,8 @@ public Builder clear() { pageToken_ = ""; + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -823,6 +972,11 @@ public com.google.cloud.asset.v1.ListAssetsRequest buildPartial() { result.contentType_ = contentType_; result.pageSize_ = pageSize_; result.pageToken_ = pageToken_; + if (((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = relationshipTypes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.relationshipTypes_ = relationshipTypes_; onBuilt(); return result; } @@ -899,6 +1053,16 @@ public Builder mergeFrom(com.google.cloud.asset.v1.ListAssetsRequest other) { pageToken_ = other.pageToken_; onChanged(); } + if (!other.relationshipTypes_.isEmpty()) { + if (relationshipTypes_.isEmpty()) { + relationshipTypes_ = other.relationshipTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRelationshipTypesIsMutable(); + relationshipTypes_.addAll(other.relationshipTypes_); + } + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -1828,6 +1992,300 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.LazyStringList relationshipTypes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureRelationshipTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + relationshipTypes_ = new com.google.protobuf.LazyStringArrayList(relationshipTypes_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @return A list containing the relationshipTypes. + */ + public com.google.protobuf.ProtocolStringList getRelationshipTypesList() { + return relationshipTypes_.getUnmodifiableView(); + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @return The count of relationshipTypes. + */ + public int getRelationshipTypesCount() { + return relationshipTypes_.size(); + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + public java.lang.String getRelationshipTypes(int index) { + return relationshipTypes_.get(index); + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + public com.google.protobuf.ByteString getRelationshipTypesBytes(int index) { + return relationshipTypes_.getByteString(index); + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index to set the value at. + * @param value The relationshipTypes to set. + * @return This builder for chaining. + */ + public Builder setRelationshipTypes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @param value The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @param values The relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addAllRelationshipTypes(java.lang.Iterable values) { + ensureRelationshipTypesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, relationshipTypes_); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @return This builder for chaining. + */ + public Builder clearRelationshipTypes() { + relationshipTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * A list of relationship types to output, for example:
+     * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+     * content_type=RELATIONSHIP.
+     * * If specified:
+     * it snapshots specified relationships. It returns an error if
+     * any of the [relationship_types] doesn't belong to the supported
+     * relationship types of the [asset_types] or if any of the [asset_types]
+     * doesn't belong to the source types of the [relationship_types].
+     * * Otherwise:
+     * it snapshots the supported relationships for all [asset_types] or returns
+     * an error if any of the [asset_types] has no relationship support.
+     * An unspecified asset types field means all supported asset_types.
+     * See [Introduction to Cloud Asset
+     * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+     * for all supported asset types and relationship types.
+     * 
+ * + * repeated string relationship_types = 7; + * + * @param value The bytes of the relationshipTypes to add. + * @return This builder for chaining. + */ + public Builder addRelationshipTypesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRelationshipTypesIsMutable(); + relationshipTypes_.add(value); + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java index f446c5877..a7932287a 100644 --- a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListAssetsRequestOrBuilder.java @@ -277,4 +277,111 @@ public interface ListAssetsRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @return A list containing the relationshipTypes. + */ + java.util.List getRelationshipTypesList(); + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @return The count of relationshipTypes. + */ + int getRelationshipTypesCount(); + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index of the element to return. + * @return The relationshipTypes at the given index. + */ + java.lang.String getRelationshipTypes(int index); + /** + * + * + *
+   * A list of relationship types to output, for example:
+   * `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if
+   * content_type=RELATIONSHIP.
+   * * If specified:
+   * it snapshots specified relationships. It returns an error if
+   * any of the [relationship_types] doesn't belong to the supported
+   * relationship types of the [asset_types] or if any of the [asset_types]
+   * doesn't belong to the source types of the [relationship_types].
+   * * Otherwise:
+   * it snapshots the supported relationships for all [asset_types] or returns
+   * an error if any of the [asset_types] has no relationship support.
+   * An unspecified asset types field means all supported asset_types.
+   * See [Introduction to Cloud Asset
+   * Inventory](https://cloud.google.com/asset-inventory/docs/overview)
+   * for all supported asset types and relationship types.
+   * 
+ * + * repeated string relationship_types = 7; + * + * @param index The index of the value to return. + * @return The bytes of the relationshipTypes at the given index. + */ + com.google.protobuf.ByteString getRelationshipTypesBytes(int index); } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java new file mode 100644 index 000000000..bbfb60ddf --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAsset.java @@ -0,0 +1,1207 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
+ * An asset identify in Google Cloud which contains its name, type and
+ * ancestors. An asset can be any resource in the Google Cloud [resource
+ * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+ * a resource outside the Google Cloud resource hierarchy (such as Google
+ * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
+ * See [Supported asset
+ * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+ * for more information.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedAsset} + */ +public final class RelatedAsset extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelatedAsset) + RelatedAssetOrBuilder { + private static final long serialVersionUID = 0L; + // Use RelatedAsset.newBuilder() to construct. + private RelatedAsset(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RelatedAsset() { + asset_ = ""; + assetType_ = ""; + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RelatedAsset(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RelatedAsset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + asset_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ancestors_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedAsset.class, + com.google.cloud.asset.v1.RelatedAsset.Builder.class); + } + + public static final int ASSET_FIELD_NUMBER = 1; + private volatile java.lang.Object asset_; + /** + * + * + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The asset. + */ + @java.lang.Override + public java.lang.String getAsset() { + java.lang.Object ref = asset_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + asset_ = s; + return s; + } + } + /** + * + * + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for asset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssetBytes() { + java.lang.Object ref = asset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + asset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASSET_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object assetType_; + /** + * + * + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * + * @return The assetType. + */ + @java.lang.Override + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } + } + /** + * + * + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * + * @return The bytes for assetType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANCESTORS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList ancestors_; + /** + * + * + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList getAncestorsList() { + return ancestors_; + } + /** + * + * + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + * + * + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + * + * + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getAssetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, asset_); + } + if (!getAssetTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_); + } + for (int i = 0; i < ancestors_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ancestors_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAssetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, asset_); + } + if (!getAssetTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_); + } + { + int dataSize = 0; + for (int i = 0; i < ancestors_.size(); i++) { + dataSize += computeStringSizeNoTag(ancestors_.getRaw(i)); + } + size += dataSize; + size += 1 * getAncestorsList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.RelatedAsset)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.RelatedAsset other = (com.google.cloud.asset.v1.RelatedAsset) obj; + + if (!getAsset().equals(other.getAsset())) return false; + if (!getAssetType().equals(other.getAssetType())) return false; + if (!getAncestorsList().equals(other.getAncestorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ASSET_FIELD_NUMBER; + hash = (53 * hash) + getAsset().hashCode(); + hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getAssetType().hashCode(); + if (getAncestorsCount() > 0) { + hash = (37 * hash) + ANCESTORS_FIELD_NUMBER; + hash = (53 * hash) + getAncestorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.RelatedAsset parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedAsset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedAsset parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedAsset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelatedAsset parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelatedAsset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.asset.v1.RelatedAsset prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An asset identify in Google Cloud which contains its name, type and
+   * ancestors. An asset can be any resource in the Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * a resource outside the Google Cloud resource hierarchy (such as Google
+   * Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy).
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedAsset} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelatedAsset) + com.google.cloud.asset.v1.RelatedAssetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedAsset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedAsset.class, + com.google.cloud.asset.v1.RelatedAsset.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.RelatedAsset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + asset_ = ""; + + assetType_ = ""; + + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedAsset_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAsset getDefaultInstanceForType() { + return com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAsset build() { + com.google.cloud.asset.v1.RelatedAsset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAsset buildPartial() { + com.google.cloud.asset.v1.RelatedAsset result = + new com.google.cloud.asset.v1.RelatedAsset(this); + int from_bitField0_ = bitField0_; + result.asset_ = asset_; + result.assetType_ = assetType_; + if (((bitField0_ & 0x00000001) != 0)) { + ancestors_ = ancestors_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ancestors_ = ancestors_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.RelatedAsset) { + return mergeFrom((com.google.cloud.asset.v1.RelatedAsset) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.RelatedAsset other) { + if (other == com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance()) return this; + if (!other.getAsset().isEmpty()) { + asset_ = other.asset_; + onChanged(); + } + if (!other.getAssetType().isEmpty()) { + assetType_ = other.assetType_; + onChanged(); + } + if (!other.ancestors_.isEmpty()) { + if (ancestors_.isEmpty()) { + ancestors_ = other.ancestors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAncestorsIsMutable(); + ancestors_.addAll(other.ancestors_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.RelatedAsset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.RelatedAsset) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object asset_ = ""; + /** + * + * + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The asset. + */ + public java.lang.String getAsset() { + java.lang.Object ref = asset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + asset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for asset. + */ + public com.google.protobuf.ByteString getAssetBytes() { + java.lang.Object ref = asset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + asset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The asset to set. + * @return This builder for chaining. + */ + public Builder setAsset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + asset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearAsset() { + + asset_ = getDefaultInstance().getAsset(); + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the asset. Example:
+     * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+     * See [Resource
+     * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * for more information.
+     * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for asset to set. + * @return This builder for chaining. + */ + public Builder setAssetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + asset_ = value; + onChanged(); + return this; + } + + private java.lang.Object assetType_ = ""; + /** + * + * + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * + * @return The assetType. + */ + public java.lang.String getAssetType() { + java.lang.Object ref = assetType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + assetType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * + * @return The bytes for assetType. + */ + public com.google.protobuf.ByteString getAssetTypeBytes() { + java.lang.Object ref = assetType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + assetType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * + * @param value The assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + assetType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearAssetType() { + + assetType_ = getDefaultInstance().getAssetType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the asset. Example: `compute.googleapis.com/Disk`
+     * See [Supported asset
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+     * for more information.
+     * 
+ * + * string asset_type = 2; + * + * @param value The bytes for assetType to set. + * @return This builder for chaining. + */ + public Builder setAssetTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + assetType_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList ancestors_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAncestorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ancestors_ = new com.google.protobuf.LazyStringArrayList(ancestors_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * + * @return A list containing the ancestors. + */ + public com.google.protobuf.ProtocolStringList getAncestorsList() { + return ancestors_.getUnmodifiableView(); + } + /** + * + * + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * + * @return The count of ancestors. + */ + public int getAncestorsCount() { + return ancestors_.size(); + } + /** + * + * + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + public java.lang.String getAncestors(int index) { + return ancestors_.get(index); + } + /** + * + * + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + public com.google.protobuf.ByteString getAncestorsBytes(int index) { + return ancestors_.getByteString(index); + } + /** + * + * + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * + * @param index The index to set the value at. + * @param value The ancestors to set. + * @return This builder for chaining. + */ + public Builder setAncestors(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * + * @param value The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestors(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * + * @param values The ancestors to add. + * @return This builder for chaining. + */ + public Builder addAllAncestors(java.lang.Iterable values) { + ensureAncestorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ancestors_); + onChanged(); + return this; + } + /** + * + * + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * + * @return This builder for chaining. + */ + public Builder clearAncestors() { + ancestors_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The ancestors of an asset in Google Cloud [resource
+     * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+     * represented as a list of relative resource names. An ancestry path starts
+     * with the closest ancestor in the hierarchy and ends at root.
+     * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+     * 
+ * + * repeated string ancestors = 3; + * + * @param value The bytes of the ancestors to add. + * @return This builder for chaining. + */ + public Builder addAncestorsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAncestorsIsMutable(); + ancestors_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelatedAsset) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelatedAsset) + private static final com.google.cloud.asset.v1.RelatedAsset DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelatedAsset(); + } + + public static com.google.cloud.asset.v1.RelatedAsset getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedAsset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelatedAsset(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAsset getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetOrBuilder.java new file mode 100644 index 000000000..0d01700c8 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetOrBuilder.java @@ -0,0 +1,156 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface RelatedAssetOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelatedAsset) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The asset. + */ + java.lang.String getAsset(); + /** + * + * + *
+   * The full name of the asset. Example:
+   * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`
+   * See [Resource
+   * names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+   * for more information.
+   * 
+ * + * string asset = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for asset. + */ + com.google.protobuf.ByteString getAssetBytes(); + + /** + * + * + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * + * @return The assetType. + */ + java.lang.String getAssetType(); + /** + * + * + *
+   * The type of the asset. Example: `compute.googleapis.com/Disk`
+   * See [Supported asset
+   * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types)
+   * for more information.
+   * 
+ * + * string asset_type = 2; + * + * @return The bytes for assetType. + */ + com.google.protobuf.ByteString getAssetTypeBytes(); + + /** + * + * + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * + * @return A list containing the ancestors. + */ + java.util.List getAncestorsList(); + /** + * + * + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * + * @return The count of ancestors. + */ + int getAncestorsCount(); + /** + * + * + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * + * @param index The index of the element to return. + * @return The ancestors at the given index. + */ + java.lang.String getAncestors(int index); + /** + * + * + *
+   * The ancestors of an asset in Google Cloud [resource
+   * hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy),
+   * represented as a list of relative resource names. An ancestry path starts
+   * with the closest ancestor in the hierarchy and ends at root.
+   * Example: `["projects/123456789", "folders/5432", "organizations/1234"]`
+   * 
+ * + * repeated string ancestors = 3; + * + * @param index The index of the value to return. + * @return The bytes of the ancestors at the given index. + */ + com.google.protobuf.ByteString getAncestorsBytes(int index); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java new file mode 100644 index 000000000..15bfdf12f --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssets.java @@ -0,0 +1,1229 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
+ * The detailed related assets with the `relationship_type`.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedAssets} + */ +public final class RelatedAssets extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelatedAssets) + RelatedAssetsOrBuilder { + private static final long serialVersionUID = 0L; + // Use RelatedAssets.newBuilder() to construct. + private RelatedAssets(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RelatedAssets() { + assets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RelatedAssets(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RelatedAssets( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.asset.v1.RelationshipAttributes.Builder subBuilder = null; + if (relationshipAttributes_ != null) { + subBuilder = relationshipAttributes_.toBuilder(); + } + relationshipAttributes_ = + input.readMessage( + com.google.cloud.asset.v1.RelationshipAttributes.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(relationshipAttributes_); + relationshipAttributes_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assets_.add( + input.readMessage( + com.google.cloud.asset.v1.RelatedAsset.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedAssets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedAssets.class, + com.google.cloud.asset.v1.RelatedAssets.Builder.class); + } + + public static final int RELATIONSHIP_ATTRIBUTES_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.RelationshipAttributes relationshipAttributes_; + /** + * + * + *
+   * The detailed relationship attributes.
+   * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + * + * @return Whether the relationshipAttributes field is set. + */ + @java.lang.Override + public boolean hasRelationshipAttributes() { + return relationshipAttributes_ != null; + } + /** + * + * + *
+   * The detailed relationship attributes.
+   * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + * + * @return The relationshipAttributes. + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelationshipAttributes getRelationshipAttributes() { + return relationshipAttributes_ == null + ? com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance() + : relationshipAttributes_; + } + /** + * + * + *
+   * The detailed relationship attributes.
+   * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelationshipAttributesOrBuilder + getRelationshipAttributesOrBuilder() { + return getRelationshipAttributes(); + } + + public static final int ASSETS_FIELD_NUMBER = 2; + private java.util.List assets_; + /** + * + * + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + @java.lang.Override + public java.util.List getAssetsList() { + return assets_; + } + /** + * + * + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + @java.lang.Override + public java.util.List + getAssetsOrBuilderList() { + return assets_; + } + /** + * + * + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + @java.lang.Override + public int getAssetsCount() { + return assets_.size(); + } + /** + * + * + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAsset getAssets(int index) { + return assets_.get(index); + } + /** + * + * + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssetOrBuilder getAssetsOrBuilder(int index) { + return assets_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (relationshipAttributes_ != null) { + output.writeMessage(1, getRelationshipAttributes()); + } + for (int i = 0; i < assets_.size(); i++) { + output.writeMessage(2, assets_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (relationshipAttributes_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getRelationshipAttributes()); + } + for (int i = 0; i < assets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, assets_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.RelatedAssets)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.RelatedAssets other = (com.google.cloud.asset.v1.RelatedAssets) obj; + + if (hasRelationshipAttributes() != other.hasRelationshipAttributes()) return false; + if (hasRelationshipAttributes()) { + if (!getRelationshipAttributes().equals(other.getRelationshipAttributes())) return false; + } + if (!getAssetsList().equals(other.getAssetsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRelationshipAttributes()) { + hash = (37 * hash) + RELATIONSHIP_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getRelationshipAttributes().hashCode(); + } + if (getAssetsCount() > 0) { + hash = (37 * hash) + ASSETS_FIELD_NUMBER; + hash = (53 * hash) + getAssetsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.RelatedAssets parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedAssets parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedAssets parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedAssets parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelatedAssets parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelatedAssets parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.asset.v1.RelatedAssets prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The detailed related assets with the `relationship_type`.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelatedAssets} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelatedAssets) + com.google.cloud.asset.v1.RelatedAssetsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedAssets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelatedAssets.class, + com.google.cloud.asset.v1.RelatedAssets.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.RelatedAssets.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAssetsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (relationshipAttributesBuilder_ == null) { + relationshipAttributes_ = null; + } else { + relationshipAttributes_ = null; + relationshipAttributesBuilder_ = null; + } + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + assetsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelatedAssets_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssets getDefaultInstanceForType() { + return com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssets build() { + com.google.cloud.asset.v1.RelatedAssets result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssets buildPartial() { + com.google.cloud.asset.v1.RelatedAssets result = + new com.google.cloud.asset.v1.RelatedAssets(this); + int from_bitField0_ = bitField0_; + if (relationshipAttributesBuilder_ == null) { + result.relationshipAttributes_ = relationshipAttributes_; + } else { + result.relationshipAttributes_ = relationshipAttributesBuilder_.build(); + } + if (assetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + assets_ = java.util.Collections.unmodifiableList(assets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.assets_ = assets_; + } else { + result.assets_ = assetsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.RelatedAssets) { + return mergeFrom((com.google.cloud.asset.v1.RelatedAssets) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.RelatedAssets other) { + if (other == com.google.cloud.asset.v1.RelatedAssets.getDefaultInstance()) return this; + if (other.hasRelationshipAttributes()) { + mergeRelationshipAttributes(other.getRelationshipAttributes()); + } + if (assetsBuilder_ == null) { + if (!other.assets_.isEmpty()) { + if (assets_.isEmpty()) { + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAssetsIsMutable(); + assets_.addAll(other.assets_); + } + onChanged(); + } + } else { + if (!other.assets_.isEmpty()) { + if (assetsBuilder_.isEmpty()) { + assetsBuilder_.dispose(); + assetsBuilder_ = null; + assets_ = other.assets_; + bitField0_ = (bitField0_ & ~0x00000001); + assetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAssetsFieldBuilder() + : null; + } else { + assetsBuilder_.addAllMessages(other.assets_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.RelatedAssets parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.RelatedAssets) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.asset.v1.RelationshipAttributes relationshipAttributes_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelationshipAttributes, + com.google.cloud.asset.v1.RelationshipAttributes.Builder, + com.google.cloud.asset.v1.RelationshipAttributesOrBuilder> + relationshipAttributesBuilder_; + /** + * + * + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + * + * @return Whether the relationshipAttributes field is set. + */ + public boolean hasRelationshipAttributes() { + return relationshipAttributesBuilder_ != null || relationshipAttributes_ != null; + } + /** + * + * + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + * + * @return The relationshipAttributes. + */ + public com.google.cloud.asset.v1.RelationshipAttributes getRelationshipAttributes() { + if (relationshipAttributesBuilder_ == null) { + return relationshipAttributes_ == null + ? com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance() + : relationshipAttributes_; + } else { + return relationshipAttributesBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + public Builder setRelationshipAttributes( + com.google.cloud.asset.v1.RelationshipAttributes value) { + if (relationshipAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relationshipAttributes_ = value; + onChanged(); + } else { + relationshipAttributesBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + public Builder setRelationshipAttributes( + com.google.cloud.asset.v1.RelationshipAttributes.Builder builderForValue) { + if (relationshipAttributesBuilder_ == null) { + relationshipAttributes_ = builderForValue.build(); + onChanged(); + } else { + relationshipAttributesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + public Builder mergeRelationshipAttributes( + com.google.cloud.asset.v1.RelationshipAttributes value) { + if (relationshipAttributesBuilder_ == null) { + if (relationshipAttributes_ != null) { + relationshipAttributes_ = + com.google.cloud.asset.v1.RelationshipAttributes.newBuilder(relationshipAttributes_) + .mergeFrom(value) + .buildPartial(); + } else { + relationshipAttributes_ = value; + } + onChanged(); + } else { + relationshipAttributesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + public Builder clearRelationshipAttributes() { + if (relationshipAttributesBuilder_ == null) { + relationshipAttributes_ = null; + onChanged(); + } else { + relationshipAttributes_ = null; + relationshipAttributesBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + public com.google.cloud.asset.v1.RelationshipAttributes.Builder + getRelationshipAttributesBuilder() { + + onChanged(); + return getRelationshipAttributesFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + public com.google.cloud.asset.v1.RelationshipAttributesOrBuilder + getRelationshipAttributesOrBuilder() { + if (relationshipAttributesBuilder_ != null) { + return relationshipAttributesBuilder_.getMessageOrBuilder(); + } else { + return relationshipAttributes_ == null + ? com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance() + : relationshipAttributes_; + } + } + /** + * + * + *
+     * The detailed relationship attributes.
+     * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelationshipAttributes, + com.google.cloud.asset.v1.RelationshipAttributes.Builder, + com.google.cloud.asset.v1.RelationshipAttributesOrBuilder> + getRelationshipAttributesFieldBuilder() { + if (relationshipAttributesBuilder_ == null) { + relationshipAttributesBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.RelationshipAttributes, + com.google.cloud.asset.v1.RelationshipAttributes.Builder, + com.google.cloud.asset.v1.RelationshipAttributesOrBuilder>( + getRelationshipAttributes(), getParentForChildren(), isClean()); + relationshipAttributes_ = null; + } + return relationshipAttributesBuilder_; + } + + private java.util.List assets_ = + java.util.Collections.emptyList(); + + private void ensureAssetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + assets_ = new java.util.ArrayList(assets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAsset, + com.google.cloud.asset.v1.RelatedAsset.Builder, + com.google.cloud.asset.v1.RelatedAssetOrBuilder> + assetsBuilder_; + + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public java.util.List getAssetsList() { + if (assetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(assets_); + } else { + return assetsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public int getAssetsCount() { + if (assetsBuilder_ == null) { + return assets_.size(); + } else { + return assetsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1.RelatedAsset getAssets(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder setAssets(int index, com.google.cloud.asset.v1.RelatedAsset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.set(index, value); + onChanged(); + } else { + assetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder setAssets( + int index, com.google.cloud.asset.v1.RelatedAsset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.set(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder addAssets(com.google.cloud.asset.v1.RelatedAsset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(value); + onChanged(); + } else { + assetsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder addAssets(int index, com.google.cloud.asset.v1.RelatedAsset value) { + if (assetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssetsIsMutable(); + assets_.add(index, value); + onChanged(); + } else { + assetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder addAssets(com.google.cloud.asset.v1.RelatedAsset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder addAssets( + int index, com.google.cloud.asset.v1.RelatedAsset.Builder builderForValue) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.add(index, builderForValue.build()); + onChanged(); + } else { + assetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder addAllAssets( + java.lang.Iterable values) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, assets_); + onChanged(); + } else { + assetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder clearAssets() { + if (assetsBuilder_ == null) { + assets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + assetsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public Builder removeAssets(int index) { + if (assetsBuilder_ == null) { + ensureAssetsIsMutable(); + assets_.remove(index); + onChanged(); + } else { + assetsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1.RelatedAsset.Builder getAssetsBuilder(int index) { + return getAssetsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1.RelatedAssetOrBuilder getAssetsOrBuilder(int index) { + if (assetsBuilder_ == null) { + return assets_.get(index); + } else { + return assetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public java.util.List + getAssetsOrBuilderList() { + if (assetsBuilder_ != null) { + return assetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(assets_); + } + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1.RelatedAsset.Builder addAssetsBuilder() { + return getAssetsFieldBuilder() + .addBuilder(com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance()); + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public com.google.cloud.asset.v1.RelatedAsset.Builder addAssetsBuilder(int index) { + return getAssetsFieldBuilder() + .addBuilder(index, com.google.cloud.asset.v1.RelatedAsset.getDefaultInstance()); + } + /** + * + * + *
+     * The peer resources of the relationship.
+     * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + public java.util.List getAssetsBuilderList() { + return getAssetsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAsset, + com.google.cloud.asset.v1.RelatedAsset.Builder, + com.google.cloud.asset.v1.RelatedAssetOrBuilder> + getAssetsFieldBuilder() { + if (assetsBuilder_ == null) { + assetsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.RelatedAsset, + com.google.cloud.asset.v1.RelatedAsset.Builder, + com.google.cloud.asset.v1.RelatedAssetOrBuilder>( + assets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + assets_ = null; + } + return assetsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelatedAssets) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelatedAssets) + private static final com.google.cloud.asset.v1.RelatedAssets DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelatedAssets(); + } + + public static com.google.cloud.asset.v1.RelatedAssets getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelatedAssets parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelatedAssets(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelatedAssets getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetsOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetsOrBuilder.java new file mode 100644 index 000000000..a610c3da6 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelatedAssetsOrBuilder.java @@ -0,0 +1,112 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface RelatedAssetsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelatedAssets) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The detailed relationship attributes.
+   * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + * + * @return Whether the relationshipAttributes field is set. + */ + boolean hasRelationshipAttributes(); + /** + * + * + *
+   * The detailed relationship attributes.
+   * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + * + * @return The relationshipAttributes. + */ + com.google.cloud.asset.v1.RelationshipAttributes getRelationshipAttributes(); + /** + * + * + *
+   * The detailed relationship attributes.
+   * 
+ * + * .google.cloud.asset.v1.RelationshipAttributes relationship_attributes = 1; + */ + com.google.cloud.asset.v1.RelationshipAttributesOrBuilder getRelationshipAttributesOrBuilder(); + + /** + * + * + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + java.util.List getAssetsList(); + /** + * + * + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + com.google.cloud.asset.v1.RelatedAsset getAssets(int index); + /** + * + * + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + int getAssetsCount(); + /** + * + * + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + java.util.List + getAssetsOrBuilderList(); + /** + * + * + *
+   * The peer resources of the relationship.
+   * 
+ * + * repeated .google.cloud.asset.v1.RelatedAsset assets = 2; + */ + com.google.cloud.asset.v1.RelatedAssetOrBuilder getAssetsOrBuilder(int index); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java new file mode 100644 index 000000000..959c5b918 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributes.java @@ -0,0 +1,1181 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
+ * The relationship attributes which include  `type`, `source_resource_type`,
+ * `target_resource_type` and `action`.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelationshipAttributes} + */ +public final class RelationshipAttributes extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.RelationshipAttributes) + RelationshipAttributesOrBuilder { + private static final long serialVersionUID = 0L; + // Use RelationshipAttributes.newBuilder() to construct. + private RelationshipAttributes(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RelationshipAttributes() { + type_ = ""; + sourceResourceType_ = ""; + targetResourceType_ = ""; + action_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RelationshipAttributes(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RelationshipAttributes( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + sourceResourceType_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetResourceType_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + action_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + type_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelationshipAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelationshipAttributes.class, + com.google.cloud.asset.v1.RelationshipAttributes.Builder.class); + } + + public static final int TYPE_FIELD_NUMBER = 4; + private volatile java.lang.Object type_; + /** + * + * + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string type = 4; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string type = 4; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SOURCE_RESOURCE_TYPE_FIELD_NUMBER = 1; + private volatile java.lang.Object sourceResourceType_; + /** + * + * + *
+   * The source asset type. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string source_resource_type = 1; + * + * @return The sourceResourceType. + */ + @java.lang.Override + public java.lang.String getSourceResourceType() { + java.lang.Object ref = sourceResourceType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceResourceType_ = s; + return s; + } + } + /** + * + * + *
+   * The source asset type. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string source_resource_type = 1; + * + * @return The bytes for sourceResourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceResourceTypeBytes() { + java.lang.Object ref = sourceResourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceResourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_RESOURCE_TYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object targetResourceType_; + /** + * + * + *
+   * The target asset type. Example: `compute.googleapis.com/Disk`
+   * 
+ * + * string target_resource_type = 2; + * + * @return The targetResourceType. + */ + @java.lang.Override + public java.lang.String getTargetResourceType() { + java.lang.Object ref = targetResourceType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetResourceType_ = s; + return s; + } + } + /** + * + * + *
+   * The target asset type. Example: `compute.googleapis.com/Disk`
+   * 
+ * + * string target_resource_type = 2; + * + * @return The bytes for targetResourceType. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetResourceTypeBytes() { + java.lang.Object ref = targetResourceType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetResourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACTION_FIELD_NUMBER = 3; + private volatile java.lang.Object action_; + /** + * + * + *
+   * The detail of the relationship, e.g. `contains`, `attaches`
+   * 
+ * + * string action = 3; + * + * @return The action. + */ + @java.lang.Override + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } + } + /** + * + * + *
+   * The detail of the relationship, e.g. `contains`, `attaches`
+   * 
+ * + * string action = 3; + * + * @return The bytes for action. + */ + @java.lang.Override + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getSourceResourceTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceResourceType_); + } + if (!getTargetResourceTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetResourceType_); + } + if (!getActionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, action_); + } + if (!getTypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSourceResourceTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceResourceType_); + } + if (!getTargetResourceTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetResourceType_); + } + if (!getActionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, action_); + } + if (!getTypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.asset.v1.RelationshipAttributes)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.RelationshipAttributes other = + (com.google.cloud.asset.v1.RelationshipAttributes) obj; + + if (!getType().equals(other.getType())) return false; + if (!getSourceResourceType().equals(other.getSourceResourceType())) return false; + if (!getTargetResourceType().equals(other.getTargetResourceType())) return false; + if (!getAction().equals(other.getAction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + SOURCE_RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getSourceResourceType().hashCode(); + hash = (37 * hash) + TARGET_RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getTargetResourceType().hashCode(); + hash = (37 * hash) + ACTION_FIELD_NUMBER; + hash = (53 * hash) + getAction().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.asset.v1.RelationshipAttributes prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The relationship attributes which include  `type`, `source_resource_type`,
+   * `target_resource_type` and `action`.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.RelationshipAttributes} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.RelationshipAttributes) + com.google.cloud.asset.v1.RelationshipAttributesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelationshipAttributes_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.RelationshipAttributes.class, + com.google.cloud.asset.v1.RelationshipAttributes.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.RelationshipAttributes.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + type_ = ""; + + sourceResourceType_ = ""; + + targetResourceType_ = ""; + + action_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_RelationshipAttributes_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelationshipAttributes getDefaultInstanceForType() { + return com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelationshipAttributes build() { + com.google.cloud.asset.v1.RelationshipAttributes result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelationshipAttributes buildPartial() { + com.google.cloud.asset.v1.RelationshipAttributes result = + new com.google.cloud.asset.v1.RelationshipAttributes(this); + result.type_ = type_; + result.sourceResourceType_ = sourceResourceType_; + result.targetResourceType_ = targetResourceType_; + result.action_ = action_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.asset.v1.RelationshipAttributes) { + return mergeFrom((com.google.cloud.asset.v1.RelationshipAttributes) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.RelationshipAttributes other) { + if (other == com.google.cloud.asset.v1.RelationshipAttributes.getDefaultInstance()) + return this; + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getSourceResourceType().isEmpty()) { + sourceResourceType_ = other.sourceResourceType_; + onChanged(); + } + if (!other.getTargetResourceType().isEmpty()) { + targetResourceType_ = other.targetResourceType_; + onChanged(); + } + if (!other.getAction().isEmpty()) { + action_ = other.action_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.asset.v1.RelationshipAttributes parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.RelationshipAttributes) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The unique identifier of the relationship type. Example:
+     * `INSTANCE_TO_INSTANCEGROUP`
+     * 
+ * + * string type = 4; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object sourceResourceType_ = ""; + /** + * + * + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * + * @return The sourceResourceType. + */ + public java.lang.String getSourceResourceType() { + java.lang.Object ref = sourceResourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceResourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * + * @return The bytes for sourceResourceType. + */ + public com.google.protobuf.ByteString getSourceResourceTypeBytes() { + java.lang.Object ref = sourceResourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceResourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * + * @param value The sourceResourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceResourceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceResourceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceResourceType() { + + sourceResourceType_ = getDefaultInstance().getSourceResourceType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The source asset type. Example: `compute.googleapis.com/Instance`
+     * 
+ * + * string source_resource_type = 1; + * + * @param value The bytes for sourceResourceType to set. + * @return This builder for chaining. + */ + public Builder setSourceResourceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceResourceType_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetResourceType_ = ""; + /** + * + * + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * + * @return The targetResourceType. + */ + public java.lang.String getTargetResourceType() { + java.lang.Object ref = targetResourceType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetResourceType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * + * @return The bytes for targetResourceType. + */ + public com.google.protobuf.ByteString getTargetResourceTypeBytes() { + java.lang.Object ref = targetResourceType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetResourceType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * + * @param value The targetResourceType to set. + * @return This builder for chaining. + */ + public Builder setTargetResourceType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetResourceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearTargetResourceType() { + + targetResourceType_ = getDefaultInstance().getTargetResourceType(); + onChanged(); + return this; + } + /** + * + * + *
+     * The target asset type. Example: `compute.googleapis.com/Disk`
+     * 
+ * + * string target_resource_type = 2; + * + * @param value The bytes for targetResourceType to set. + * @return This builder for chaining. + */ + public Builder setTargetResourceTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetResourceType_ = value; + onChanged(); + return this; + } + + private java.lang.Object action_ = ""; + /** + * + * + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * + * @return The action. + */ + public java.lang.String getAction() { + java.lang.Object ref = action_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + action_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * + * @return The bytes for action. + */ + public com.google.protobuf.ByteString getActionBytes() { + java.lang.Object ref = action_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + action_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * + * @param value The action to set. + * @return This builder for chaining. + */ + public Builder setAction(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + action_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * + * @return This builder for chaining. + */ + public Builder clearAction() { + + action_ = getDefaultInstance().getAction(); + onChanged(); + return this; + } + /** + * + * + *
+     * The detail of the relationship, e.g. `contains`, `attaches`
+     * 
+ * + * string action = 3; + * + * @param value The bytes for action to set. + * @return This builder for chaining. + */ + public Builder setActionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + action_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1.RelationshipAttributes) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.RelationshipAttributes) + private static final com.google.cloud.asset.v1.RelationshipAttributes DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.RelationshipAttributes(); + } + + public static com.google.cloud.asset.v1.RelationshipAttributes getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelationshipAttributes parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RelationshipAttributes(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1.RelationshipAttributes getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributesOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributesOrBuilder.java new file mode 100644 index 000000000..1aaf3e542 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/RelationshipAttributesOrBuilder.java @@ -0,0 +1,127 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/asset/v1/assets.proto + +package com.google.cloud.asset.v1; + +public interface RelationshipAttributesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.RelationshipAttributes) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string type = 4; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * The unique identifier of the relationship type. Example:
+   * `INSTANCE_TO_INSTANCEGROUP`
+   * 
+ * + * string type = 4; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * The source asset type. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string source_resource_type = 1; + * + * @return The sourceResourceType. + */ + java.lang.String getSourceResourceType(); + /** + * + * + *
+   * The source asset type. Example: `compute.googleapis.com/Instance`
+   * 
+ * + * string source_resource_type = 1; + * + * @return The bytes for sourceResourceType. + */ + com.google.protobuf.ByteString getSourceResourceTypeBytes(); + + /** + * + * + *
+   * The target asset type. Example: `compute.googleapis.com/Disk`
+   * 
+ * + * string target_resource_type = 2; + * + * @return The targetResourceType. + */ + java.lang.String getTargetResourceType(); + /** + * + * + *
+   * The target asset type. Example: `compute.googleapis.com/Disk`
+   * 
+ * + * string target_resource_type = 2; + * + * @return The bytes for targetResourceType. + */ + com.google.protobuf.ByteString getTargetResourceTypeBytes(); + + /** + * + * + *
+   * The detail of the relationship, e.g. `contains`, `attaches`
+   * 
+ * + * string action = 3; + * + * @return The action. + */ + java.lang.String getAction(); + /** + * + * + *
+   * The detail of the relationship, e.g. `contains`, `attaches`
+   * 
+ * + * string action = 3; + * + * @return The bytes for action. + */ + com.google.protobuf.ByteString getActionBytes(); +} diff --git a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto index 73ffa9e47..80a3da247 100644 --- a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto +++ b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/asset_service.proto @@ -193,9 +193,8 @@ service AssetService { // Represents the metadata of the longrunning operation for the // AnalyzeIamPolicyLongrunning rpc. message AnalyzeIamPolicyLongrunningMetadata { - // The time the operation was created. - google.protobuf.Timestamp create_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Export asset request. @@ -244,6 +243,23 @@ message ExportAssetsRequest { // Required. Output configuration indicating where the results will be output to. OutputConfig output_config = 5 [(google.api.field_behavior) = REQUIRED]; + + // A list of relationship types to export, for example: + // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + // content_type=RELATIONSHIP. + // * If specified: + // it snapshots specified relationships. It returns an error if + // any of the [relationship_types] doesn't belong to the supported + // relationship types of the [asset_types] or if any of the [asset_types] + // doesn't belong to the source types of the [relationship_types]. + // * Otherwise: + // it snapshots the supported relationships for all [asset_types] or returns + // an error if any of the [asset_types] has no relationship support. + // An unspecified asset types field means all supported asset_types. + // See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + // supported asset types and relationship types. + repeated string relationship_types = 6; } // The export asset response. This message is returned by the @@ -316,6 +332,23 @@ message ListAssetsRequest { // unspecified for the first `ListAssetsRequest`. It is a continuation of a // prior `ListAssets` call, and the API should return the next page of assets. string page_token = 6; + + // A list of relationship types to output, for example: + // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + // content_type=RELATIONSHIP. + // * If specified: + // it snapshots specified relationships. It returns an error if + // any of the [relationship_types] doesn't belong to the supported + // relationship types of the [asset_types] or if any of the [asset_types] + // doesn't belong to the source types of the [relationship_types]. + // * Otherwise: + // it snapshots the supported relationships for all [asset_types] or returns + // an error if any of the [asset_types] has no relationship support. + // An unspecified asset types field means all supported asset_types. + // See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) + // for all supported asset types and relationship types. + repeated string relationship_types = 7; } // ListAssets response. @@ -364,6 +397,24 @@ message BatchGetAssetsHistoryRequest { // returned. The returned results contain all temporal assets whose time // window overlap with read_time_window. TimeWindow read_time_window = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A list of relationship types to output, for example: + // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + // content_type=RELATIONSHIP. + // * If specified: + // it outputs specified relationships' history on the [asset_names]. It + // returns an error if any of the [relationship_types] doesn't belong to the + // supported relationship types of the [asset_names] or if any of the + // [asset_names]'s types doesn't belong to the source types of the + // [relationship_types]. + // * Otherwise: + // it outputs the supported relationships' history on the [asset_names] or + // returns an error if any of the [asset_names]'s types has no relationship + // support. + // See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) for all + // supported asset types and relationship types. + repeated string relationship_types = 5 [(google.api.field_behavior) = OPTIONAL]; } // Batch get assets history response. @@ -682,6 +733,24 @@ message Feed { // guide](https://cloud.google.com/asset-inventory/docs/monitoring-asset-changes-with-condition) // for detailed instructions. google.type.Expr condition = 6; + + // A list of relationship types to output, for example: + // `INSTANCE_TO_INSTANCEGROUP`. This field should only be specified if + // content_type=RELATIONSHIP. + // * If specified: + // it outputs specified relationship updates on the [asset_names] or the + // [asset_types]. It returns an error if any of the [relationship_types] + // doesn't belong to the supported relationship types of the [asset_names] or + // [asset_types], or any of the [asset_names] or the [asset_types] doesn't + // belong to the source types of the [relationship_types]. + // * Otherwise: + // it outputs the supported relationships of the types of [asset_names] and + // [asset_types] or returns an error if any of the [asset_names] or the + // [asset_types] has no replationship support. + // See [Introduction to Cloud Asset + // Inventory](https://cloud.google.com/asset-inventory/docs/overview) + // for all supported asset types and relationship types. + repeated string relationship_types = 7; } // Search all resources request. @@ -1353,4 +1422,7 @@ enum ContentType { // The runtime OS Inventory information. OS_INVENTORY = 6; + + // The related resources. + RELATIONSHIP = 7; } diff --git a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto index 7a9d47df0..97bc4872d 100644 --- a/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto +++ b/proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto @@ -23,9 +23,11 @@ import "google/identity/accesscontextmanager/v1/access_level.proto"; import "google/identity/accesscontextmanager/v1/access_policy.proto"; import "google/cloud/osconfig/v1/inventory.proto"; import "google/identity/accesscontextmanager/v1/service_perimeter.proto"; +import "google/protobuf/any.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/rpc/code.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Asset.V1"; @@ -158,6 +160,10 @@ message Asset { // for more information. google.cloud.osconfig.v1.Inventory os_inventory = 12; + // The related assets of the asset of one relationship type. + // One asset only represents one type of relationship. + RelatedAssets related_assets = 13; + // The ancestry path of an asset in Google Cloud [resource // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), // represented as a list of relative resource names. An ancestry path starts @@ -219,6 +225,67 @@ message Resource { string location = 8; } +// The detailed related assets with the `relationship_type`. +message RelatedAssets { + // The detailed relationship attributes. + RelationshipAttributes relationship_attributes = 1; + + // The peer resources of the relationship. + repeated RelatedAsset assets = 2; +} + +// The relationship attributes which include `type`, `source_resource_type`, +// `target_resource_type` and `action`. +message RelationshipAttributes { + // The unique identifier of the relationship type. Example: + // `INSTANCE_TO_INSTANCEGROUP` + string type = 4; + + // The source asset type. Example: `compute.googleapis.com/Instance` + string source_resource_type = 1; + + // The target asset type. Example: `compute.googleapis.com/Disk` + string target_resource_type = 2; + + // The detail of the relationship, e.g. `contains`, `attaches` + string action = 3; +} + +// An asset identify in Google Cloud which contains its name, type and +// ancestors. An asset can be any resource in the Google Cloud [resource +// hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), +// a resource outside the Google Cloud resource hierarchy (such as Google +// Kubernetes Engine clusters and objects), or a policy (e.g. Cloud IAM policy). +// See [Supported asset +// types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) +// for more information. +message RelatedAsset { + // The full name of the asset. Example: + // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` + // + // See [Resource + // names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // for more information. + string asset = 1 [(google.api.resource_reference) = { + type: "cloudasset.googleapis.com/Asset" + }]; + + // The type of the asset. Example: `compute.googleapis.com/Disk` + // + // See [Supported asset + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) + // for more information. + string asset_type = 2; + + // The ancestors of an asset in Google Cloud [resource + // hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), + // represented as a list of relative resource names. An ancestry path starts + // with the closest ancestor in the hierarchy and ends at root. + // + // Example: `["projects/123456789", "folders/5432", "organizations/1234"]` + repeated string ancestors = 3; +} + // A result of Resource Search, containing information of a cloud resource. message ResourceSearchResult { // The full resource name of this resource. Example: