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 eac122de1..c0a50dfae 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 @@ -1021,6 +1021,155 @@ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies( return stub.searchAllIamPoliciesCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Analyzes IAM policies to answer which identities have what accesses on which resources. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
+   *   AnalyzeIamPolicyRequest request = AnalyzeIamPolicyRequest.newBuilder()
+   *     .setAnalysisQuery(analysisQuery)
+   *     .build();
+   *   AnalyzeIamPolicyResponse response = assetServiceClient.analyzeIamPolicy(request);
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final AnalyzeIamPolicyResponse analyzeIamPolicy(AnalyzeIamPolicyRequest request) { + return analyzeIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Analyzes IAM policies to answer which identities have what accesses on which resources. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
+   *   AnalyzeIamPolicyRequest request = AnalyzeIamPolicyRequest.newBuilder()
+   *     .setAnalysisQuery(analysisQuery)
+   *     .build();
+   *   ApiFuture<AnalyzeIamPolicyResponse> future = assetServiceClient.analyzeIamPolicyCallable().futureCall(request);
+   *   // Do something
+   *   AnalyzeIamPolicyResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + analyzeIamPolicyCallable() { + return stub.analyzeIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports the answers of which identities have what accesses on which resources to a Google Cloud + * Storage or a BigQuery destination. For Cloud Storage destination, the output format is the JSON + * format that represents a + * [google.cloud.asset.v1.AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. + * This method implements the [google.longrunning.Operation][google.longrunning.Operation], which + * allows you to track the export status. We recommend intervals of at least 2 seconds with + * exponential retry to poll the export operation result. The metadata contains the request to + * help callers to map responses to requests. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
+   *   IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
+   *   ExportIamPolicyAnalysisRequest request = ExportIamPolicyAnalysisRequest.newBuilder()
+   *     .setAnalysisQuery(analysisQuery)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   ExportIamPolicyAnalysisResponse response = assetServiceClient.exportIamPolicyAnalysisAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + exportIamPolicyAnalysisAsync(ExportIamPolicyAnalysisRequest request) { + return exportIamPolicyAnalysisOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports the answers of which identities have what accesses on which resources to a Google Cloud + * Storage or a BigQuery destination. For Cloud Storage destination, the output format is the JSON + * format that represents a + * [google.cloud.asset.v1.AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. + * This method implements the [google.longrunning.Operation][google.longrunning.Operation], which + * allows you to track the export status. We recommend intervals of at least 2 seconds with + * exponential retry to poll the export operation result. The metadata contains the request to + * help callers to map responses to requests. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
+   *   IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
+   *   ExportIamPolicyAnalysisRequest request = ExportIamPolicyAnalysisRequest.newBuilder()
+   *     .setAnalysisQuery(analysisQuery)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   OperationFuture<ExportIamPolicyAnalysisResponse, ExportIamPolicyAnalysisRequest> future = assetServiceClient.exportIamPolicyAnalysisOperationCallable().futureCall(request);
+   *   // Do something
+   *   ExportIamPolicyAnalysisResponse response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationCallable() { + return stub.exportIamPolicyAnalysisOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports the answers of which identities have what accesses on which resources to a Google Cloud + * Storage or a BigQuery destination. For Cloud Storage destination, the output format is the JSON + * format that represents a + * [google.cloud.asset.v1.AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. + * This method implements the [google.longrunning.Operation][google.longrunning.Operation], which + * allows you to track the export status. We recommend intervals of at least 2 seconds with + * exponential retry to poll the export operation result. The metadata contains the request to + * help callers to map responses to requests. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
+   *   IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
+   *   ExportIamPolicyAnalysisRequest request = ExportIamPolicyAnalysisRequest.newBuilder()
+   *     .setAnalysisQuery(analysisQuery)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   ApiFuture<Operation> future = assetServiceClient.exportIamPolicyAnalysisCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + exportIamPolicyAnalysisCallable() { + return stub.exportIamPolicyAnalysisCallable(); + } + @Override public final void close() { stub.close(); diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java index cbb837570..2d3a1bd44 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceSettings.java @@ -131,6 +131,30 @@ public UnaryCallSettings deleteFeedSettings() { return ((AssetServiceStubSettings) getStubSettings()).searchAllIamPoliciesSettings(); } + /** Returns the object with the settings used for calls to analyzeIamPolicy. */ + public UnaryCallSettings + analyzeIamPolicySettings() { + return ((AssetServiceStubSettings) getStubSettings()).analyzeIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to exportIamPolicyAnalysis. */ + public UnaryCallSettings + exportIamPolicyAnalysisSettings() { + return ((AssetServiceStubSettings) getStubSettings()).exportIamPolicyAnalysisSettings(); + } + + /** Returns the object with the settings used for calls to exportIamPolicyAnalysis. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationSettings() { + return ((AssetServiceStubSettings) getStubSettings()) + .exportIamPolicyAnalysisOperationSettings(); + } + public static final AssetServiceSettings create(AssetServiceStubSettings stub) throws IOException { return new AssetServiceSettings.Builder(stub.toBuilder()).build(); @@ -289,6 +313,29 @@ public UnaryCallSettings.Builder deleteFeedSettings() return getStubSettingsBuilder().searchAllIamPoliciesSettings(); } + /** Returns the builder for the settings used for calls to analyzeIamPolicy. */ + public UnaryCallSettings.Builder + analyzeIamPolicySettings() { + return getStubSettingsBuilder().analyzeIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to exportIamPolicyAnalysis. */ + public UnaryCallSettings.Builder + exportIamPolicyAnalysisSettings() { + return getStubSettingsBuilder().exportIamPolicyAnalysisSettings(); + } + + /** Returns the builder for the settings used for calls to exportIamPolicyAnalysis. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationSettings() { + return getStubSettingsBuilder().exportIamPolicyAnalysisOperationSettings(); + } + @Override public AssetServiceSettings build() throws IOException { return new AssetServiceSettings(this); diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java index 58873ddc3..9ef6ed1a2 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStub.java @@ -22,12 +22,16 @@ import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; import com.google.cloud.asset.v1.CreateFeedRequest; import com.google.cloud.asset.v1.DeleteFeedRequest; import com.google.cloud.asset.v1.ExportAssetsRequest; import com.google.cloud.asset.v1.ExportAssetsResponse; +import com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest; +import com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse; import com.google.cloud.asset.v1.Feed; import com.google.cloud.asset.v1.GetFeedRequest; import com.google.cloud.asset.v1.ListFeedsRequest; @@ -112,6 +116,26 @@ public UnaryCallable deleteFeedCallable() { throw new UnsupportedOperationException("Not implemented: searchAllIamPoliciesCallable()"); } + public UnaryCallable + analyzeIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: analyzeIamPolicyCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: exportIamPolicyAnalysisOperationCallable()"); + } + + public UnaryCallable + exportIamPolicyAnalysisCallable() { + throw new UnsupportedOperationException("Not implemented: exportIamPolicyAnalysisCallable()"); + } + @Override public abstract void close(); } diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java index 0906a1ad7..215b80b26 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/AssetServiceStubSettings.java @@ -44,12 +44,16 @@ import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; import com.google.cloud.asset.v1.CreateFeedRequest; import com.google.cloud.asset.v1.DeleteFeedRequest; import com.google.cloud.asset.v1.ExportAssetsRequest; import com.google.cloud.asset.v1.ExportAssetsResponse; +import com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest; +import com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse; import com.google.cloud.asset.v1.Feed; import com.google.cloud.asset.v1.GetFeedRequest; import com.google.cloud.asset.v1.IamPolicySearchResult; @@ -129,6 +133,15 @@ public class AssetServiceStubSettings extends StubSettings searchAllIamPoliciesSettings; + private final UnaryCallSettings + analyzeIamPolicySettings; + private final UnaryCallSettings + exportIamPolicyAnalysisSettings; + private final OperationCallSettings< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationSettings; /** Returns the object with the settings used for calls to exportAssets. */ public UnaryCallSettings exportAssetsSettings() { @@ -189,6 +202,28 @@ public UnaryCallSettings deleteFeedSettings() { return searchAllIamPoliciesSettings; } + /** Returns the object with the settings used for calls to analyzeIamPolicy. */ + public UnaryCallSettings + analyzeIamPolicySettings() { + return analyzeIamPolicySettings; + } + + /** Returns the object with the settings used for calls to exportIamPolicyAnalysis. */ + public UnaryCallSettings + exportIamPolicyAnalysisSettings() { + return exportIamPolicyAnalysisSettings; + } + + /** Returns the object with the settings used for calls to exportIamPolicyAnalysis. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationSettings() { + return exportIamPolicyAnalysisOperationSettings; + } + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public AssetServiceStub createStub() throws IOException { if (getTransportChannelProvider() @@ -268,6 +303,10 @@ protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { deleteFeedSettings = settingsBuilder.deleteFeedSettings().build(); searchAllResourcesSettings = settingsBuilder.searchAllResourcesSettings().build(); searchAllIamPoliciesSettings = settingsBuilder.searchAllIamPoliciesSettings().build(); + analyzeIamPolicySettings = settingsBuilder.analyzeIamPolicySettings().build(); + exportIamPolicyAnalysisSettings = settingsBuilder.exportIamPolicyAnalysisSettings().build(); + exportIamPolicyAnalysisOperationSettings = + settingsBuilder.exportIamPolicyAnalysisOperationSettings().build(); } private static final PagedListDescriptor< @@ -424,6 +463,15 @@ public static class Builder extends StubSettings.Builder searchAllIamPoliciesSettings; + private final UnaryCallSettings.Builder + analyzeIamPolicySettings; + private final UnaryCallSettings.Builder + exportIamPolicyAnalysisSettings; + private final OperationCallSettings.Builder< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -437,6 +485,9 @@ public static class Builder extends StubSettings.BuildernewArrayList( StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + definitions.put( + "retry_policy_3_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); definitions.put( "retry_policy_2_codes", ImmutableSet.copyOf( @@ -474,6 +525,17 @@ public static class Builder extends StubSettings.Builder>of( exportAssetsSettings, @@ -525,7 +593,9 @@ protected Builder(ClientContext clientContext) { updateFeedSettings, deleteFeedSettings, searchAllResourcesSettings, - searchAllIamPoliciesSettings); + searchAllIamPoliciesSettings, + analyzeIamPolicySettings, + exportIamPolicyAnalysisSettings); initDefaults(this); } @@ -585,6 +655,16 @@ private static Builder initDefaults(Builder builder) { .searchAllIamPoliciesSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); + + builder + .analyzeIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_3_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_3_params")); + + builder + .exportIamPolicyAnalysisSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .exportAssetsOperationSettings() .setInitialCallSettings( @@ -608,6 +688,31 @@ private static Builder initDefaults(Builder builder) { .setMaxRpcTimeout(Duration.ZERO) // ignored .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .exportIamPolicyAnalysisOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ExportIamPolicyAnalysisResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ExportIamPolicyAnalysisRequest.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); return builder; } @@ -625,6 +730,10 @@ protected Builder(AssetServiceStubSettings settings) { deleteFeedSettings = settings.deleteFeedSettings.toBuilder(); searchAllResourcesSettings = settings.searchAllResourcesSettings.toBuilder(); searchAllIamPoliciesSettings = settings.searchAllIamPoliciesSettings.toBuilder(); + analyzeIamPolicySettings = settings.analyzeIamPolicySettings.toBuilder(); + exportIamPolicyAnalysisSettings = settings.exportIamPolicyAnalysisSettings.toBuilder(); + exportIamPolicyAnalysisOperationSettings = + settings.exportIamPolicyAnalysisOperationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -636,7 +745,9 @@ protected Builder(AssetServiceStubSettings settings) { updateFeedSettings, deleteFeedSettings, searchAllResourcesSettings, - searchAllIamPoliciesSettings); + searchAllIamPoliciesSettings, + analyzeIamPolicySettings, + exportIamPolicyAnalysisSettings); } // NEXT_MAJOR_VER: remove 'throws Exception' @@ -716,6 +827,29 @@ public UnaryCallSettings.Builder deleteFeedSettings() return searchAllIamPoliciesSettings; } + /** Returns the builder for the settings used for calls to analyzeIamPolicy. */ + public UnaryCallSettings.Builder + analyzeIamPolicySettings() { + return analyzeIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to exportIamPolicyAnalysis. */ + public UnaryCallSettings.Builder + exportIamPolicyAnalysisSettings() { + return exportIamPolicyAnalysisSettings; + } + + /** Returns the builder for the settings used for calls to exportIamPolicyAnalysis. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationSettings() { + return exportIamPolicyAnalysisOperationSettings; + } + @Override public AssetServiceStubSettings build() throws IOException { return new AssetServiceStubSettings(this); diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java index 7ce7c50bb..d8dd74fc8 100644 --- a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java @@ -27,12 +27,16 @@ import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.RequestParamsExtractor; import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1.AnalyzeIamPolicyRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyResponse; import com.google.cloud.asset.v1.BatchGetAssetsHistoryRequest; import com.google.cloud.asset.v1.BatchGetAssetsHistoryResponse; import com.google.cloud.asset.v1.CreateFeedRequest; import com.google.cloud.asset.v1.DeleteFeedRequest; import com.google.cloud.asset.v1.ExportAssetsRequest; import com.google.cloud.asset.v1.ExportAssetsResponse; +import com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest; +import com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse; import com.google.cloud.asset.v1.Feed; import com.google.cloud.asset.v1.GetFeedRequest; import com.google.cloud.asset.v1.ListFeedsRequest; @@ -137,6 +141,25 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setResponseMarshaller( ProtoUtils.marshaller(SearchAllIamPoliciesResponse.getDefaultInstance())) .build(); + private static final MethodDescriptor + analyzeIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeIamPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(AnalyzeIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AnalyzeIamPolicyResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + exportIamPolicyAnalysisMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/ExportIamPolicyAnalysis") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportIamPolicyAnalysisRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -159,6 +182,15 @@ public class GrpcAssetServiceStub extends AssetServiceStub { searchAllIamPoliciesCallable; private final UnaryCallable searchAllIamPoliciesPagedCallable; + private final UnaryCallable + analyzeIamPolicyCallable; + private final UnaryCallable + exportIamPolicyAnalysisCallable; + private final OperationCallable< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationCallable; private final GrpcStubCallableFactory callableFactory; @@ -321,6 +353,38 @@ public Map extract(SearchAllIamPoliciesRequest request) { } }) .build(); + GrpcCallSettings + analyzeIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(analyzeIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(AnalyzeIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "analysis_query.scope", + String.valueOf(request.getAnalysisQuery().getScope())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + exportIamPolicyAnalysisTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportIamPolicyAnalysisMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExportIamPolicyAnalysisRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "analysis_query.scope", + String.valueOf(request.getAnalysisQuery().getScope())); + return params.build(); + } + }) + .build(); this.exportAssetsCallable = callableFactory.createUnaryCallable( @@ -371,6 +435,20 @@ public Map extract(SearchAllIamPoliciesRequest request) { searchAllIamPoliciesTransportSettings, settings.searchAllIamPoliciesSettings(), clientContext); + this.analyzeIamPolicyCallable = + callableFactory.createUnaryCallable( + analyzeIamPolicyTransportSettings, settings.analyzeIamPolicySettings(), clientContext); + this.exportIamPolicyAnalysisCallable = + callableFactory.createUnaryCallable( + exportIamPolicyAnalysisTransportSettings, + settings.exportIamPolicyAnalysisSettings(), + clientContext); + this.exportIamPolicyAnalysisOperationCallable = + callableFactory.createOperationCallable( + exportIamPolicyAnalysisTransportSettings, + settings.exportIamPolicyAnalysisOperationSettings(), + clientContext, + this.operationsStub); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @@ -435,6 +513,25 @@ public UnaryCallable deleteFeedCallable() { return searchAllIamPoliciesCallable; } + public UnaryCallable + analyzeIamPolicyCallable() { + return analyzeIamPolicyCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationCallable() { + return exportIamPolicyAnalysisOperationCallable; + } + + public UnaryCallable + exportIamPolicyAnalysisCallable() { + return exportIamPolicyAnalysisCallable; + } + @Override public final void close() { shutdown(); 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 feaf938e2..1a969edd6 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 @@ -485,4 +485,111 @@ public void searchAllIamPoliciesExceptionTest() throws Exception { // Expected exception } } + + @Test + @SuppressWarnings("all") + public void analyzeIamPolicyTest() { + boolean fullyExplored = true; + AnalyzeIamPolicyResponse expectedResponse = + AnalyzeIamPolicyResponse.newBuilder().setFullyExplored(fullyExplored).build(); + mockAssetService.addResponse(expectedResponse); + + IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build(); + AnalyzeIamPolicyRequest request = + AnalyzeIamPolicyRequest.newBuilder().setAnalysisQuery(analysisQuery).build(); + + AnalyzeIamPolicyResponse actualResponse = client.analyzeIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AnalyzeIamPolicyRequest actualRequest = (AnalyzeIamPolicyRequest) actualRequests.get(0); + + Assert.assertEquals(analysisQuery, actualRequest.getAnalysisQuery()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void analyzeIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build(); + AnalyzeIamPolicyRequest request = + AnalyzeIamPolicyRequest.newBuilder().setAnalysisQuery(analysisQuery).build(); + + client.analyzeIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void exportIamPolicyAnalysisTest() throws Exception { + ExportIamPolicyAnalysisResponse expectedResponse = + ExportIamPolicyAnalysisResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportIamPolicyAnalysisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAssetService.addResponse(resultOperation); + + IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build(); + IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build(); + ExportIamPolicyAnalysisRequest request = + ExportIamPolicyAnalysisRequest.newBuilder() + .setAnalysisQuery(analysisQuery) + .setOutputConfig(outputConfig) + .build(); + + ExportIamPolicyAnalysisResponse actualResponse = + client.exportIamPolicyAnalysisAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportIamPolicyAnalysisRequest actualRequest = + (ExportIamPolicyAnalysisRequest) actualRequests.get(0); + + Assert.assertEquals(analysisQuery, actualRequest.getAnalysisQuery()); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void exportIamPolicyAnalysisExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build(); + IamPolicyAnalysisOutputConfig outputConfig = + IamPolicyAnalysisOutputConfig.newBuilder().build(); + ExportIamPolicyAnalysisRequest request = + ExportIamPolicyAnalysisRequest.newBuilder() + .setAnalysisQuery(analysisQuery) + .setOutputConfig(outputConfig) + .build(); + + client.exportIamPolicyAnalysisAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } } diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java index 14a7b94fb..c609a98ae 100644 --- a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java @@ -191,4 +191,34 @@ public void searchAllIamPolicies( responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); } } + + @Override + public void analyzeIamPolicy( + AnalyzeIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof AnalyzeIamPolicyResponse) { + requests.add(request); + responseObserver.onNext((AnalyzeIamPolicyResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void exportIamPolicyAnalysis( + ExportIamPolicyAnalysisRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } } diff --git a/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java b/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java index f08ad07b2..5aba4445c 100644 --- a/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java +++ b/grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java @@ -426,6 +426,102 @@ private AssetServiceGrpc() {} return getSearchAllIamPoliciesMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse> + getAnalyzeIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AnalyzeIamPolicy", + requestType = com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.class, + responseType = com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse> + getAnalyzeIamPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse> + getAnalyzeIamPolicyMethod; + if ((getAnalyzeIamPolicyMethod = AssetServiceGrpc.getAnalyzeIamPolicyMethod) == null) { + synchronized (AssetServiceGrpc.class) { + if ((getAnalyzeIamPolicyMethod = AssetServiceGrpc.getAnalyzeIamPolicyMethod) == null) { + AssetServiceGrpc.getAnalyzeIamPolicyMethod = + getAnalyzeIamPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnalyzeIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AssetServiceMethodDescriptorSupplier("AnalyzeIamPolicy")) + .build(); + } + } + } + return getAnalyzeIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest, + com.google.longrunning.Operation> + getExportIamPolicyAnalysisMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportIamPolicyAnalysis", + requestType = com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest, + com.google.longrunning.Operation> + getExportIamPolicyAnalysisMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest, + com.google.longrunning.Operation> + getExportIamPolicyAnalysisMethod; + if ((getExportIamPolicyAnalysisMethod = AssetServiceGrpc.getExportIamPolicyAnalysisMethod) + == null) { + synchronized (AssetServiceGrpc.class) { + if ((getExportIamPolicyAnalysisMethod = AssetServiceGrpc.getExportIamPolicyAnalysisMethod) + == null) { + AssetServiceGrpc.getExportIamPolicyAnalysisMethod = + getExportIamPolicyAnalysisMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ExportIamPolicyAnalysis")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AssetServiceMethodDescriptorSupplier("ExportIamPolicyAnalysis")) + .build(); + } + } + } + return getExportIamPolicyAnalysisMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static AssetServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -618,6 +714,42 @@ public void searchAllIamPolicies( asyncUnimplementedUnaryCall(getSearchAllIamPoliciesMethod(), responseObserver); } + /** + * + * + *
+     * Analyzes IAM policies to answer which identities have what accesses on
+     * which resources.
+     * 
+ */ + public void analyzeIamPolicy( + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getAnalyzeIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Exports the answers of which identities have what accesses on which
+     * resources to a Google Cloud Storage or a BigQuery destination. For Cloud
+     * Storage destination, the output format is the JSON format that represents a
+     * [google.cloud.asset.v1.AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse].
+     * This method implements the
+     * [google.longrunning.Operation][google.longrunning.Operation], which allows
+     * you to track the export status. We recommend intervals of at least 2
+     * seconds with exponential retry to poll the export operation result. The
+     * metadata contains the request to help callers to map responses to requests.
+     * 
+ */ + public void exportIamPolicyAnalysis( + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getExportIamPolicyAnalysisMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -678,6 +810,19 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.asset.v1.SearchAllIamPoliciesRequest, com.google.cloud.asset.v1.SearchAllIamPoliciesResponse>( this, METHODID_SEARCH_ALL_IAM_POLICIES))) + .addMethod( + getAnalyzeIamPolicyMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse>( + this, METHODID_ANALYZE_IAM_POLICY))) + .addMethod( + getExportIamPolicyAnalysisMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest, + com.google.longrunning.Operation>(this, METHODID_EXPORT_IAM_POLICY_ANALYSIS))) .build(); } } @@ -858,6 +1003,48 @@ public void searchAllIamPolicies( request, responseObserver); } + + /** + * + * + *
+     * Analyzes IAM policies to answer which identities have what accesses on
+     * which resources.
+     * 
+ */ + public void analyzeIamPolicy( + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getAnalyzeIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Exports the answers of which identities have what accesses on which
+     * resources to a Google Cloud Storage or a BigQuery destination. For Cloud
+     * Storage destination, the output format is the JSON format that represents a
+     * [google.cloud.asset.v1.AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse].
+     * This method implements the
+     * [google.longrunning.Operation][google.longrunning.Operation], which allows
+     * you to track the export status. We recommend intervals of at least 2
+     * seconds with exponential retry to poll the export operation result. The
+     * metadata contains the request to help callers to map responses to requests.
+     * 
+ */ + public void exportIamPolicyAnalysis( + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getExportIamPolicyAnalysisMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -1011,6 +1198,41 @@ public com.google.cloud.asset.v1.SearchAllIamPoliciesResponse searchAllIamPolici return blockingUnaryCall( getChannel(), getSearchAllIamPoliciesMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * Analyzes IAM policies to answer which identities have what accesses on
+     * which resources.
+     * 
+ */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse analyzeIamPolicy( + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest request) { + return blockingUnaryCall( + getChannel(), getAnalyzeIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports the answers of which identities have what accesses on which
+     * resources to a Google Cloud Storage or a BigQuery destination. For Cloud
+     * Storage destination, the output format is the JSON format that represents a
+     * [google.cloud.asset.v1.AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse].
+     * This method implements the
+     * [google.longrunning.Operation][google.longrunning.Operation], which allows
+     * you to track the export status. We recommend intervals of at least 2
+     * seconds with exponential retry to poll the export operation result. The
+     * metadata contains the request to help callers to map responses to requests.
+     * 
+ */ + public com.google.longrunning.Operation exportIamPolicyAnalysis( + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest request) { + return blockingUnaryCall( + getChannel(), getExportIamPolicyAnalysisMethod(), getCallOptions(), request); + } } /** @@ -1172,6 +1394,42 @@ public com.google.common.util.concurrent.ListenableFuture + * Analyzes IAM policies to answer which identities have what accesses on + * which resources. + * + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse> + analyzeIamPolicy(com.google.cloud.asset.v1.AnalyzeIamPolicyRequest request) { + return futureUnaryCall( + getChannel().newCall(getAnalyzeIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports the answers of which identities have what accesses on which
+     * resources to a Google Cloud Storage or a BigQuery destination. For Cloud
+     * Storage destination, the output format is the JSON format that represents a
+     * [google.cloud.asset.v1.AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse].
+     * This method implements the
+     * [google.longrunning.Operation][google.longrunning.Operation], which allows
+     * you to track the export status. We recommend intervals of at least 2
+     * seconds with exponential retry to poll the export operation result. The
+     * metadata contains the request to help callers to map responses to requests.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportIamPolicyAnalysis(com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest request) { + return futureUnaryCall( + getChannel().newCall(getExportIamPolicyAnalysisMethod(), getCallOptions()), request); + } } private static final int METHODID_EXPORT_ASSETS = 0; @@ -1183,6 +1441,8 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1250,6 +1510,17 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_ANALYZE_IAM_POLICY: + serviceImpl.analyzeIamPolicy( + (com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_EXPORT_IAM_POLICY_ANALYSIS: + serviceImpl.exportIamPolicyAnalysis( + (com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -1323,6 +1594,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteFeedMethod()) .addMethod(getSearchAllResourcesMethod()) .addMethod(getSearchAllIamPoliciesMethod()) + .addMethod(getAnalyzeIamPolicyMethod()) + .addMethod(getExportIamPolicyAnalysisMethod()) .build(); } } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java new file mode 100644 index 000000000..0db237741 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java @@ -0,0 +1,1312 @@ +/* + * 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/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
+ * A request message for
+ * [google.cloud.asset.v1.AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyRequest} + */ +public final class AnalyzeIamPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyRequest) + AnalyzeIamPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalyzeIamPolicyRequest.newBuilder() to construct. + private AnalyzeIamPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalyzeIamPolicyRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalyzeIamPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnalyzeIamPolicyRequest( + 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: + { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; + if (analysisQuery_ != null) { + subBuilder = analysisQuery_.toBuilder(); + } + analysisQuery_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisQuery_); + analysisQuery_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Duration.Builder subBuilder = null; + if (executionTimeout_ != null) { + subBuilder = executionTimeout_.toBuilder(); + } + executionTimeout_ = + input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(executionTimeout_); + executionTimeout_ = subBuilder.buildPartial(); + } + + 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.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.class, + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.Builder.class); + } + + public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + /** + * + * + *
+   * The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the analysisQuery field is set. + */ + @java.lang.Override + public boolean hasAnalysisQuery() { + return analysisQuery_ != null; + } + /** + * + * + *
+   * The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysisQuery. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { + return analysisQuery_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } + /** + * + * + *
+   * The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { + return getAnalysisQuery(); + } + + public static final int EXECUTION_TIMEOUT_FIELD_NUMBER = 2; + private com.google.protobuf.Duration executionTimeout_; + /** + * + * + *
+   * Amount of time executable has to complete.  See JSON representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   * If this field is set with a value less than the RPC deadline, and the
+   * execution of your query hasn't finished in the specified
+   * execution timeout,  you will get a response with partial result.
+   * Otherwise, your query's execution will continue until the RPC deadline.
+   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+   * Default is empty.
+   * (-- We had discussion of whether we should have this field in the    --)
+   * (-- request or use the RPC deadline instead. We finally choose this  --)
+   * (-- approach for the following reasons (detailed in                  --)
+   * (-- go/analyze-iam-policy-deadlines):                                --)
+   * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+   * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+   * (--   only implemented in the C++ HTTP server library.               --)
+   * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+   * (--   communicate its max waiting time to the server. This deadline  --)
+   * (--   could be further propagated to the downstream servers. It is   --)
+   * (--   mainly used for servers to cancel the request processing       --)
+   * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+   * (--   other purposes could make our backend system harder to reason  --)
+   * (--   about.                                                         --)
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the executionTimeout field is set. + */ + @java.lang.Override + public boolean hasExecutionTimeout() { + return executionTimeout_ != null; + } + /** + * + * + *
+   * Amount of time executable has to complete.  See JSON representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   * If this field is set with a value less than the RPC deadline, and the
+   * execution of your query hasn't finished in the specified
+   * execution timeout,  you will get a response with partial result.
+   * Otherwise, your query's execution will continue until the RPC deadline.
+   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+   * Default is empty.
+   * (-- We had discussion of whether we should have this field in the    --)
+   * (-- request or use the RPC deadline instead. We finally choose this  --)
+   * (-- approach for the following reasons (detailed in                  --)
+   * (-- go/analyze-iam-policy-deadlines):                                --)
+   * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+   * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+   * (--   only implemented in the C++ HTTP server library.               --)
+   * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+   * (--   communicate its max waiting time to the server. This deadline  --)
+   * (--   could be further propagated to the downstream servers. It is   --)
+   * (--   mainly used for servers to cancel the request processing       --)
+   * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+   * (--   other purposes could make our backend system harder to reason  --)
+   * (--   about.                                                         --)
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The executionTimeout. + */ + @java.lang.Override + public com.google.protobuf.Duration getExecutionTimeout() { + return executionTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : executionTimeout_; + } + /** + * + * + *
+   * Amount of time executable has to complete.  See JSON representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   * If this field is set with a value less than the RPC deadline, and the
+   * execution of your query hasn't finished in the specified
+   * execution timeout,  you will get a response with partial result.
+   * Otherwise, your query's execution will continue until the RPC deadline.
+   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+   * Default is empty.
+   * (-- We had discussion of whether we should have this field in the    --)
+   * (-- request or use the RPC deadline instead. We finally choose this  --)
+   * (-- approach for the following reasons (detailed in                  --)
+   * (-- go/analyze-iam-policy-deadlines):                                --)
+   * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+   * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+   * (--   only implemented in the C++ HTTP server library.               --)
+   * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+   * (--   communicate its max waiting time to the server. This deadline  --)
+   * (--   could be further propagated to the downstream servers. It is   --)
+   * (--   mainly used for servers to cancel the request processing       --)
+   * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+   * (--   other purposes could make our backend system harder to reason  --)
+   * (--   about.                                                         --)
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder() { + return getExecutionTimeout(); + } + + 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 (analysisQuery_ != null) { + output.writeMessage(1, getAnalysisQuery()); + } + if (executionTimeout_ != null) { + output.writeMessage(2, getExecutionTimeout()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (analysisQuery_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAnalysisQuery()); + } + if (executionTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getExecutionTimeout()); + } + 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.AnalyzeIamPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest other = + (com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) obj; + + if (hasAnalysisQuery() != other.hasAnalysisQuery()) return false; + if (hasAnalysisQuery()) { + if (!getAnalysisQuery().equals(other.getAnalysisQuery())) return false; + } + if (hasExecutionTimeout() != other.hasExecutionTimeout()) return false; + if (hasExecutionTimeout()) { + if (!getExecutionTimeout().equals(other.getExecutionTimeout())) 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 (hasAnalysisQuery()) { + hash = (37 * hash) + ANALYSIS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisQuery().hashCode(); + } + if (hasExecutionTimeout()) { + hash = (37 * hash) + EXECUTION_TIMEOUT_FIELD_NUMBER; + hash = (53 * hash) + getExecutionTimeout().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest 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.AnalyzeIamPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest 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.AnalyzeIamPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest 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.AnalyzeIamPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest 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.AnalyzeIamPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest 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.AnalyzeIamPolicyRequest 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.AnalyzeIamPolicyRequest 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.AnalyzeIamPolicyRequest 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; + } + /** + * + * + *
+   * A request message for
+   * [google.cloud.asset.v1.AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyRequest) + com.google.cloud.asset.v1.AnalyzeIamPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.class, + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.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(); + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + if (executionTimeoutBuilder_ == null) { + executionTimeout_ = null; + } else { + executionTimeout_ = null; + executionTimeoutBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyRequest build() { + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyRequest buildPartial() { + com.google.cloud.asset.v1.AnalyzeIamPolicyRequest result = + new com.google.cloud.asset.v1.AnalyzeIamPolicyRequest(this); + if (analysisQueryBuilder_ == null) { + result.analysisQuery_ = analysisQuery_; + } else { + result.analysisQuery_ = analysisQueryBuilder_.build(); + } + if (executionTimeoutBuilder_ == null) { + result.executionTimeout_ = executionTimeout_; + } else { + result.executionTimeout_ = executionTimeoutBuilder_.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.AnalyzeIamPolicyRequest) { + return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyRequest other) { + if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyRequest.getDefaultInstance()) + return this; + if (other.hasAnalysisQuery()) { + mergeAnalysisQuery(other.getAnalysisQuery()); + } + if (other.hasExecutionTimeout()) { + mergeExecutionTimeout(other.getExecutionTimeout()); + } + 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.AnalyzeIamPolicyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.AnalyzeIamPolicyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> + analysisQueryBuilder_; + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the analysisQuery field is set. + */ + public boolean hasAnalysisQuery() { + return analysisQueryBuilder_ != null || analysisQuery_ != null; + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysisQuery. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + return analysisQuery_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } else { + return analysisQueryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisQuery_ = value; + onChanged(); + } else { + analysisQueryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnalysisQuery( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder builderForValue) { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = builderForValue.build(); + onChanged(); + } else { + analysisQueryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (analysisQuery_ != null) { + analysisQuery_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder(analysisQuery_) + .mergeFrom(value) + .buildPartial(); + } else { + analysisQuery_ = value; + } + onChanged(); + } else { + analysisQueryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + onChanged(); + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder getAnalysisQueryBuilder() { + + onChanged(); + return getAnalysisQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { + if (analysisQueryBuilder_ != null) { + return analysisQueryBuilder_.getMessageOrBuilder(); + } else { + return analysisQuery_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> + getAnalysisQueryFieldBuilder() { + if (analysisQueryBuilder_ == null) { + analysisQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder>( + getAnalysisQuery(), getParentForChildren(), isClean()); + analysisQuery_ = null; + } + return analysisQueryBuilder_; + } + + private com.google.protobuf.Duration executionTimeout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + executionTimeoutBuilder_; + /** + * + * + *
+     * Amount of time executable has to complete.  See JSON representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * (-- We had discussion of whether we should have this field in the    --)
+     * (-- request or use the RPC deadline instead. We finally choose this  --)
+     * (-- approach for the following reasons (detailed in                  --)
+     * (-- go/analyze-iam-policy-deadlines):                                --)
+     * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+     * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+     * (--   only implemented in the C++ HTTP server library.               --)
+     * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+     * (--   communicate its max waiting time to the server. This deadline  --)
+     * (--   could be further propagated to the downstream servers. It is   --)
+     * (--   mainly used for servers to cancel the request processing       --)
+     * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+     * (--   other purposes could make our backend system harder to reason  --)
+     * (--   about.                                                         --)
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the executionTimeout field is set. + */ + public boolean hasExecutionTimeout() { + return executionTimeoutBuilder_ != null || executionTimeout_ != null; + } + /** + * + * + *
+     * Amount of time executable has to complete.  See JSON representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * (-- We had discussion of whether we should have this field in the    --)
+     * (-- request or use the RPC deadline instead. We finally choose this  --)
+     * (-- approach for the following reasons (detailed in                  --)
+     * (-- go/analyze-iam-policy-deadlines):                                --)
+     * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+     * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+     * (--   only implemented in the C++ HTTP server library.               --)
+     * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+     * (--   communicate its max waiting time to the server. This deadline  --)
+     * (--   could be further propagated to the downstream servers. It is   --)
+     * (--   mainly used for servers to cancel the request processing       --)
+     * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+     * (--   other purposes could make our backend system harder to reason  --)
+     * (--   about.                                                         --)
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The executionTimeout. + */ + public com.google.protobuf.Duration getExecutionTimeout() { + if (executionTimeoutBuilder_ == null) { + return executionTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : executionTimeout_; + } else { + return executionTimeoutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Amount of time executable has to complete.  See JSON representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * (-- We had discussion of whether we should have this field in the    --)
+     * (-- request or use the RPC deadline instead. We finally choose this  --)
+     * (-- approach for the following reasons (detailed in                  --)
+     * (-- go/analyze-iam-policy-deadlines):                                --)
+     * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+     * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+     * (--   only implemented in the C++ HTTP server library.               --)
+     * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+     * (--   communicate its max waiting time to the server. This deadline  --)
+     * (--   could be further propagated to the downstream servers. It is   --)
+     * (--   mainly used for servers to cancel the request processing       --)
+     * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+     * (--   other purposes could make our backend system harder to reason  --)
+     * (--   about.                                                         --)
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExecutionTimeout(com.google.protobuf.Duration value) { + if (executionTimeoutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionTimeout_ = value; + onChanged(); + } else { + executionTimeoutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Amount of time executable has to complete.  See JSON representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * (-- We had discussion of whether we should have this field in the    --)
+     * (-- request or use the RPC deadline instead. We finally choose this  --)
+     * (-- approach for the following reasons (detailed in                  --)
+     * (-- go/analyze-iam-policy-deadlines):                                --)
+     * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+     * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+     * (--   only implemented in the C++ HTTP server library.               --)
+     * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+     * (--   communicate its max waiting time to the server. This deadline  --)
+     * (--   could be further propagated to the downstream servers. It is   --)
+     * (--   mainly used for servers to cancel the request processing       --)
+     * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+     * (--   other purposes could make our backend system harder to reason  --)
+     * (--   about.                                                         --)
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExecutionTimeout(com.google.protobuf.Duration.Builder builderForValue) { + if (executionTimeoutBuilder_ == null) { + executionTimeout_ = builderForValue.build(); + onChanged(); + } else { + executionTimeoutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Amount of time executable has to complete.  See JSON representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * (-- We had discussion of whether we should have this field in the    --)
+     * (-- request or use the RPC deadline instead. We finally choose this  --)
+     * (-- approach for the following reasons (detailed in                  --)
+     * (-- go/analyze-iam-policy-deadlines):                                --)
+     * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+     * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+     * (--   only implemented in the C++ HTTP server library.               --)
+     * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+     * (--   communicate its max waiting time to the server. This deadline  --)
+     * (--   could be further propagated to the downstream servers. It is   --)
+     * (--   mainly used for servers to cancel the request processing       --)
+     * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+     * (--   other purposes could make our backend system harder to reason  --)
+     * (--   about.                                                         --)
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeExecutionTimeout(com.google.protobuf.Duration value) { + if (executionTimeoutBuilder_ == null) { + if (executionTimeout_ != null) { + executionTimeout_ = + com.google.protobuf.Duration.newBuilder(executionTimeout_) + .mergeFrom(value) + .buildPartial(); + } else { + executionTimeout_ = value; + } + onChanged(); + } else { + executionTimeoutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Amount of time executable has to complete.  See JSON representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * (-- We had discussion of whether we should have this field in the    --)
+     * (-- request or use the RPC deadline instead. We finally choose this  --)
+     * (-- approach for the following reasons (detailed in                  --)
+     * (-- go/analyze-iam-policy-deadlines):                                --)
+     * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+     * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+     * (--   only implemented in the C++ HTTP server library.               --)
+     * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+     * (--   communicate its max waiting time to the server. This deadline  --)
+     * (--   could be further propagated to the downstream servers. It is   --)
+     * (--   mainly used for servers to cancel the request processing       --)
+     * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+     * (--   other purposes could make our backend system harder to reason  --)
+     * (--   about.                                                         --)
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExecutionTimeout() { + if (executionTimeoutBuilder_ == null) { + executionTimeout_ = null; + onChanged(); + } else { + executionTimeout_ = null; + executionTimeoutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Amount of time executable has to complete.  See JSON representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * (-- We had discussion of whether we should have this field in the    --)
+     * (-- request or use the RPC deadline instead. We finally choose this  --)
+     * (-- approach for the following reasons (detailed in                  --)
+     * (-- go/analyze-iam-policy-deadlines):                                --)
+     * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+     * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+     * (--   only implemented in the C++ HTTP server library.               --)
+     * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+     * (--   communicate its max waiting time to the server. This deadline  --)
+     * (--   could be further propagated to the downstream servers. It is   --)
+     * (--   mainly used for servers to cancel the request processing       --)
+     * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+     * (--   other purposes could make our backend system harder to reason  --)
+     * (--   about.                                                         --)
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getExecutionTimeoutBuilder() { + + onChanged(); + return getExecutionTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Amount of time executable has to complete.  See JSON representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * (-- We had discussion of whether we should have this field in the    --)
+     * (-- request or use the RPC deadline instead. We finally choose this  --)
+     * (-- approach for the following reasons (detailed in                  --)
+     * (-- go/analyze-iam-policy-deadlines):                                --)
+     * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+     * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+     * (--   only implemented in the C++ HTTP server library.               --)
+     * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+     * (--   communicate its max waiting time to the server. This deadline  --)
+     * (--   could be further propagated to the downstream servers. It is   --)
+     * (--   mainly used for servers to cancel the request processing       --)
+     * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+     * (--   other purposes could make our backend system harder to reason  --)
+     * (--   about.                                                         --)
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder() { + if (executionTimeoutBuilder_ != null) { + return executionTimeoutBuilder_.getMessageOrBuilder(); + } else { + return executionTimeout_ == null + ? com.google.protobuf.Duration.getDefaultInstance() + : executionTimeout_; + } + } + /** + * + * + *
+     * Amount of time executable has to complete.  See JSON representation of
+     * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+     * If this field is set with a value less than the RPC deadline, and the
+     * execution of your query hasn't finished in the specified
+     * execution timeout,  you will get a response with partial result.
+     * Otherwise, your query's execution will continue until the RPC deadline.
+     * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+     * Default is empty.
+     * (-- We had discussion of whether we should have this field in the    --)
+     * (-- request or use the RPC deadline instead. We finally choose this  --)
+     * (-- approach for the following reasons (detailed in                  --)
+     * (-- go/analyze-iam-policy-deadlines):                                --)
+     * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+     * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+     * (--   only implemented in the C++ HTTP server library.               --)
+     * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+     * (--   communicate its max waiting time to the server. This deadline  --)
+     * (--   could be further propagated to the downstream servers. It is   --)
+     * (--   mainly used for servers to cancel the request processing       --)
+     * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+     * (--   other purposes could make our backend system harder to reason  --)
+     * (--   about.                                                         --)
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder> + getExecutionTimeoutFieldBuilder() { + if (executionTimeoutBuilder_ == null) { + executionTimeoutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, + com.google.protobuf.Duration.Builder, + com.google.protobuf.DurationOrBuilder>( + getExecutionTimeout(), getParentForChildren(), isClean()); + executionTimeout_ = null; + } + return executionTimeoutBuilder_; + } + + @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.AnalyzeIamPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyRequest) + private static final com.google.cloud.asset.v1.AnalyzeIamPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyRequest(); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeIamPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalyzeIamPolicyRequest(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.AnalyzeIamPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java new file mode 100644 index 000000000..09b773da2 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java @@ -0,0 +1,170 @@ +/* + * 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/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface AnalyzeIamPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the analysisQuery field is set. + */ + boolean hasAnalysisQuery(); + /** + * + * + *
+   * The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysisQuery. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery(); + /** + * + * + *
+   * The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); + + /** + * + * + *
+   * Amount of time executable has to complete.  See JSON representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   * If this field is set with a value less than the RPC deadline, and the
+   * execution of your query hasn't finished in the specified
+   * execution timeout,  you will get a response with partial result.
+   * Otherwise, your query's execution will continue until the RPC deadline.
+   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+   * Default is empty.
+   * (-- We had discussion of whether we should have this field in the    --)
+   * (-- request or use the RPC deadline instead. We finally choose this  --)
+   * (-- approach for the following reasons (detailed in                  --)
+   * (-- go/analyze-iam-policy-deadlines):                                --)
+   * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+   * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+   * (--   only implemented in the C++ HTTP server library.               --)
+   * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+   * (--   communicate its max waiting time to the server. This deadline  --)
+   * (--   could be further propagated to the downstream servers. It is   --)
+   * (--   mainly used for servers to cancel the request processing       --)
+   * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+   * (--   other purposes could make our backend system harder to reason  --)
+   * (--   about.                                                         --)
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the executionTimeout field is set. + */ + boolean hasExecutionTimeout(); + /** + * + * + *
+   * Amount of time executable has to complete.  See JSON representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   * If this field is set with a value less than the RPC deadline, and the
+   * execution of your query hasn't finished in the specified
+   * execution timeout,  you will get a response with partial result.
+   * Otherwise, your query's execution will continue until the RPC deadline.
+   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+   * Default is empty.
+   * (-- We had discussion of whether we should have this field in the    --)
+   * (-- request or use the RPC deadline instead. We finally choose this  --)
+   * (-- approach for the following reasons (detailed in                  --)
+   * (-- go/analyze-iam-policy-deadlines):                                --)
+   * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+   * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+   * (--   only implemented in the C++ HTTP server library.               --)
+   * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+   * (--   communicate its max waiting time to the server. This deadline  --)
+   * (--   could be further propagated to the downstream servers. It is   --)
+   * (--   mainly used for servers to cancel the request processing       --)
+   * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+   * (--   other purposes could make our backend system harder to reason  --)
+   * (--   about.                                                         --)
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The executionTimeout. + */ + com.google.protobuf.Duration getExecutionTimeout(); + /** + * + * + *
+   * Amount of time executable has to complete.  See JSON representation of
+   * [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json).
+   * If this field is set with a value less than the RPC deadline, and the
+   * execution of your query hasn't finished in the specified
+   * execution timeout,  you will get a response with partial result.
+   * Otherwise, your query's execution will continue until the RPC deadline.
+   * If it's not finished until then, you will get a  DEADLINE_EXCEEDED error.
+   * Default is empty.
+   * (-- We had discussion of whether we should have this field in the    --)
+   * (-- request or use the RPC deadline instead. We finally choose this  --)
+   * (-- approach for the following reasons (detailed in                  --)
+   * (-- go/analyze-iam-policy-deadlines):                                --)
+   * (-- * HTTP clients have very limited support of the RPC deadline.    --)
+   * (--   There is an X-Server-Timeout header introduced in 2019/09, but --)
+   * (--   only implemented in the C++ HTTP server library.               --)
+   * (-- * The purpose of the RPC deadline is for RPC clients to          --)
+   * (--   communicate its max waiting time to the server. This deadline  --)
+   * (--   could be further propagated to the downstream servers. It is   --)
+   * (--   mainly used for servers to cancel the request processing       --)
+   * (--   to avoid resource wasting. Overloading the RPC deadline for    --)
+   * (--   other purposes could make our backend system harder to reason  --)
+   * (--   about.                                                         --)
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder(); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java new file mode 100644 index 000000000..85be9ecfd --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java @@ -0,0 +1,5981 @@ +/* + * 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/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
+ * A response message for
+ * [google.cloud.asset.v1.AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse} + */ +public final class AnalyzeIamPolicyResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse) + AnalyzeIamPolicyResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalyzeIamPolicyResponse.newBuilder() to construct. + private AnalyzeIamPolicyResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalyzeIamPolicyResponse() { + serviceAccountImpersonationAnalysis_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalyzeIamPolicyResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnalyzeIamPolicyResponse( + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + subBuilder = null; + if (mainAnalysis_ != null) { + subBuilder = mainAnalysis_.toBuilder(); + } + mainAnalysis_ = + input.readMessage( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(mainAnalysis_); + mainAnalysis_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + serviceAccountImpersonationAnalysis_ = + new java.util.ArrayList< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis>(); + mutable_bitField0_ |= 0x00000001; + } + serviceAccountImpersonationAnalysis_.add( + input.readMessage( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.parser(), + extensionRegistry)); + break; + } + case 24: + { + fullyExplored_ = input.readBool(); + 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)) { + serviceAccountImpersonationAnalysis_ = + java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.class, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.Builder.class); + } + + public interface IamPolicyAnalysisOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + * + * @return Whether the analysisQuery field is set. + */ + boolean hasAnalysisQuery(); + /** + * + * + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + * + * @return The analysisQuery. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery(); + /** + * + * + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); + + /** + * + * + *
+     * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + java.util.List getAnalysisResultsList(); + /** + * + * + *
+     * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult getAnalysisResults(int index); + /** + * + * + *
+     * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + int getAnalysisResultsCount(); + /** + * + * + *
+     * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + java.util.List + getAnalysisResultsOrBuilderList(); + /** + * + * + *
+     * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder getAnalysisResultsOrBuilder( + int index); + + /** + * + * + *
+     * Represents whether all entries in the
+     * [analysis_results][analysis_results] have been fully explored to answer
+     * the query.
+     * 
+ * + * bool fully_explored = 3; + * + * @return The fullyExplored. + */ + boolean getFullyExplored(); + + /** + * + * + *
+     * The stats of how the analysis has been explored.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + java.util.List + getStatsList(); + /** + * + * + *
+     * The stats of how the analysis has been explored.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats getStats(int index); + /** + * + * + *
+     * The stats of how the analysis has been explored.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + int getStatsCount(); + /** + * + * + *
+     * The stats of how the analysis has been explored.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.StatsOrBuilder> + getStatsOrBuilderList(); + /** + * + * + *
+     * The stats of how the analysis has been explored.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.StatsOrBuilder + getStatsOrBuilder(int index); + + /** + * + * + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + java.util.List getNonCriticalErrorsList(); + /** + * + * + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisState getNonCriticalErrors(int index); + /** + * + * + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + int getNonCriticalErrorsCount(); + /** + * + * + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + java.util.List + getNonCriticalErrorsOrBuilderList(); + /** + * + * + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getNonCriticalErrorsOrBuilder( + int index); + } + /** + * + * + *
+   * An analysis message to group the query and results.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis} + */ + public static final class IamPolicyAnalysis extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + IamPolicyAnalysisOrBuilder { + private static final long serialVersionUID = 0L; + // Use IamPolicyAnalysis.newBuilder() to construct. + private IamPolicyAnalysis(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IamPolicyAnalysis() { + analysisResults_ = java.util.Collections.emptyList(); + stats_ = java.util.Collections.emptyList(); + nonCriticalErrors_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IamPolicyAnalysis(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IamPolicyAnalysis( + 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.IamPolicyAnalysisQuery.Builder subBuilder = null; + if (analysisQuery_ != null) { + subBuilder = analysisQuery_.toBuilder(); + } + analysisQuery_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisQuery_); + analysisQuery_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + analysisResults_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + analysisResults_.add( + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.parser(), + extensionRegistry)); + break; + } + case 24: + { + fullyExplored_ = input.readBool(); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + stats_ = + new java.util.ArrayList< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .Stats>(); + mutable_bitField0_ |= 0x00000002; + } + stats_.add( + input.readMessage( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + .parser(), + extensionRegistry)); + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + nonCriticalErrors_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + nonCriticalErrors_.add( + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisState.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)) { + analysisResults_ = java.util.Collections.unmodifiableList(analysisResults_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + stats_ = java.util.Collections.unmodifiableList(stats_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + nonCriticalErrors_ = java.util.Collections.unmodifiableList(nonCriticalErrors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.class, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder.class); + } + + public interface StatsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Node type.
+       * 
+ * + * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType node_type = 1; + * + * + * @return The enum numeric value on the wire for nodeType. + */ + int getNodeTypeValue(); + /** + * + * + *
+       * Node type.
+       * 
+ * + * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType node_type = 1; + * + * + * @return The nodeType. + */ + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType + getNodeType(); + + /** + * + * + *
+       * The subtype of a node, such as:
+       * * For Identity: Group, User, ServiceAccount etc.
+       * * For Resource: resource type name, such as
+       * cloudresourcemanager.googleapis.com/Organization, etc.
+       * * For Access: Role or Permission
+       * 
+ * + * string node_subtype = 2; + * + * @return The nodeSubtype. + */ + java.lang.String getNodeSubtype(); + /** + * + * + *
+       * The subtype of a node, such as:
+       * * For Identity: Group, User, ServiceAccount etc.
+       * * For Resource: resource type name, such as
+       * cloudresourcemanager.googleapis.com/Organization, etc.
+       * * For Access: Role or Permission
+       * 
+ * + * string node_subtype = 2; + * + * @return The bytes for nodeSubtype. + */ + com.google.protobuf.ByteString getNodeSubtypeBytes(); + + /** + * + * + *
+       * The count of discovered nodes.
+       * 
+ * + * int32 discovered_node_count = 3; + * + * @return The discoveredNodeCount. + */ + int getDiscoveredNodeCount(); + + /** + * + * + *
+       * The count of nodes that match the query. These nodes form a sub-graph
+       * of discovered nodes.
+       * 
+ * + * int32 matched_node_count = 4; + * + * @return The matchedNodeCount. + */ + int getMatchedNodeCount(); + + /** + * + * + *
+       * The count of explored nodes.
+       * 
+ * + * int32 explored_node_count = 5; + * + * @return The exploredNodeCount. + */ + int getExploredNodeCount(); + + /** + * + * + *
+       * The count of nodes that get explored, but are capped by max fanout
+       * setting.
+       * 
+ * + * int32 capped_node_count = 6; + * + * @return The cappedNodeCount. + */ + int getCappedNodeCount(); + + /** + * + * + *
+       * The count of unexplored nodes caused by permission denied error.
+       * 
+ * + * int32 permision_denied_node_count = 7; + * + * @return The permisionDeniedNodeCount. + */ + int getPermisionDeniedNodeCount(); + + /** + * + * + *
+       * The count of unexplored nodes caused by execution timeout.
+       * 
+ * + * int32 execution_timeout_node_count = 8; + * + * @return The executionTimeoutNodeCount. + */ + int getExecutionTimeoutNodeCount(); + } + /** + * + * + *
+     * A stats message that contains a set of analysis metrics.
+     * Here are some equations to show relationships of the explicitly specified
+     * metrics with other implicit metrics:
+     * * node_count = discovered_node_count + undiscovered_node_count(implicit)
+     * * discovered_node_count = explored_node_count +
+     * unexplored_node_count(implicit)
+     * * explored_node_count = capped_node_count + uncapped_node_count(implicit)
+     * * unexplored_node_count(implicit) = permission_denied_node_count +
+     * execution_timeout_node_count + other_unexplored_node_count(implicit)
+     * * discovered_node_count = matched_node_count +
+     * unmatched_node_count(implicit)
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats} + */ + public static final class Stats extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats) + StatsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Stats.newBuilder() to construct. + private Stats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Stats() { + nodeType_ = 0; + nodeSubtype_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Stats(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Stats( + 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 8: + { + int rawValue = input.readEnum(); + + nodeType_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nodeSubtype_ = s; + break; + } + case 24: + { + discoveredNodeCount_ = input.readInt32(); + break; + } + case 32: + { + matchedNodeCount_ = input.readInt32(); + break; + } + case 40: + { + exploredNodeCount_ = input.readInt32(); + break; + } + case 48: + { + cappedNodeCount_ = input.readInt32(); + break; + } + case 56: + { + permisionDeniedNodeCount_ = input.readInt32(); + break; + } + case 64: + { + executionTimeoutNodeCount_ = input.readInt32(); + 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.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_Stats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_Stats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.class, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.Builder + .class); + } + + /** + * + * + *
+       * Type of the node.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType} + */ + public enum NodeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * Unspecified node type.
+         * 
+ * + * NODE_TYPE_UNSPECIFIED = 0; + */ + NODE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+         * IAM Policy Binding node type.
+         * 
+ * + * BINDING = 1; + */ + BINDING(1), + /** + * + * + *
+         * Identity node type.
+         * 
+ * + * IDENTITY = 2; + */ + IDENTITY(2), + /** + * + * + *
+         * Resource node type.
+         * 
+ * + * RESOURCE = 3; + */ + RESOURCE(3), + /** + * + * + *
+         * Access node type.
+         * 
+ * + * ACCESS = 4; + */ + ACCESS(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * Unspecified node type.
+         * 
+ * + * NODE_TYPE_UNSPECIFIED = 0; + */ + public static final int NODE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * IAM Policy Binding node type.
+         * 
+ * + * BINDING = 1; + */ + public static final int BINDING_VALUE = 1; + /** + * + * + *
+         * Identity node type.
+         * 
+ * + * IDENTITY = 2; + */ + public static final int IDENTITY_VALUE = 2; + /** + * + * + *
+         * Resource node type.
+         * 
+ * + * RESOURCE = 3; + */ + public static final int RESOURCE_VALUE = 3; + /** + * + * + *
+         * Access node type.
+         * 
+ * + * ACCESS = 4; + */ + public static final int ACCESS_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NodeType valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static NodeType forNumber(int value) { + switch (value) { + case 0: + return NODE_TYPE_UNSPECIFIED; + case 1: + return BINDING; + case 2: + return IDENTITY; + case 3: + return RESOURCE; + case 4: + return ACCESS; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public NodeType findValueByNumber(int number) { + return NodeType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final NodeType[] VALUES = values(); + + public static NodeType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private NodeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType) + } + + public static final int NODE_TYPE_FIELD_NUMBER = 1; + private int nodeType_; + /** + * + * + *
+       * Node type.
+       * 
+ * + * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType node_type = 1; + * + * + * @return The enum numeric value on the wire for nodeType. + */ + @java.lang.Override + public int getNodeTypeValue() { + return nodeType_; + } + /** + * + * + *
+       * Node type.
+       * 
+ * + * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType node_type = 1; + * + * + * @return The nodeType. + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType + getNodeType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType result = + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType + .valueOf(nodeType_); + return result == null + ? com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType + .UNRECOGNIZED + : result; + } + + public static final int NODE_SUBTYPE_FIELD_NUMBER = 2; + private volatile java.lang.Object nodeSubtype_; + /** + * + * + *
+       * The subtype of a node, such as:
+       * * For Identity: Group, User, ServiceAccount etc.
+       * * For Resource: resource type name, such as
+       * cloudresourcemanager.googleapis.com/Organization, etc.
+       * * For Access: Role or Permission
+       * 
+ * + * string node_subtype = 2; + * + * @return The nodeSubtype. + */ + @java.lang.Override + public java.lang.String getNodeSubtype() { + java.lang.Object ref = nodeSubtype_; + 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(); + nodeSubtype_ = s; + return s; + } + } + /** + * + * + *
+       * The subtype of a node, such as:
+       * * For Identity: Group, User, ServiceAccount etc.
+       * * For Resource: resource type name, such as
+       * cloudresourcemanager.googleapis.com/Organization, etc.
+       * * For Access: Role or Permission
+       * 
+ * + * string node_subtype = 2; + * + * @return The bytes for nodeSubtype. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNodeSubtypeBytes() { + java.lang.Object ref = nodeSubtype_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nodeSubtype_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISCOVERED_NODE_COUNT_FIELD_NUMBER = 3; + private int discoveredNodeCount_; + /** + * + * + *
+       * The count of discovered nodes.
+       * 
+ * + * int32 discovered_node_count = 3; + * + * @return The discoveredNodeCount. + */ + @java.lang.Override + public int getDiscoveredNodeCount() { + return discoveredNodeCount_; + } + + public static final int MATCHED_NODE_COUNT_FIELD_NUMBER = 4; + private int matchedNodeCount_; + /** + * + * + *
+       * The count of nodes that match the query. These nodes form a sub-graph
+       * of discovered nodes.
+       * 
+ * + * int32 matched_node_count = 4; + * + * @return The matchedNodeCount. + */ + @java.lang.Override + public int getMatchedNodeCount() { + return matchedNodeCount_; + } + + public static final int EXPLORED_NODE_COUNT_FIELD_NUMBER = 5; + private int exploredNodeCount_; + /** + * + * + *
+       * The count of explored nodes.
+       * 
+ * + * int32 explored_node_count = 5; + * + * @return The exploredNodeCount. + */ + @java.lang.Override + public int getExploredNodeCount() { + return exploredNodeCount_; + } + + public static final int CAPPED_NODE_COUNT_FIELD_NUMBER = 6; + private int cappedNodeCount_; + /** + * + * + *
+       * The count of nodes that get explored, but are capped by max fanout
+       * setting.
+       * 
+ * + * int32 capped_node_count = 6; + * + * @return The cappedNodeCount. + */ + @java.lang.Override + public int getCappedNodeCount() { + return cappedNodeCount_; + } + + public static final int PERMISION_DENIED_NODE_COUNT_FIELD_NUMBER = 7; + private int permisionDeniedNodeCount_; + /** + * + * + *
+       * The count of unexplored nodes caused by permission denied error.
+       * 
+ * + * int32 permision_denied_node_count = 7; + * + * @return The permisionDeniedNodeCount. + */ + @java.lang.Override + public int getPermisionDeniedNodeCount() { + return permisionDeniedNodeCount_; + } + + public static final int EXECUTION_TIMEOUT_NODE_COUNT_FIELD_NUMBER = 8; + private int executionTimeoutNodeCount_; + /** + * + * + *
+       * The count of unexplored nodes caused by execution timeout.
+       * 
+ * + * int32 execution_timeout_node_count = 8; + * + * @return The executionTimeoutNodeCount. + */ + @java.lang.Override + public int getExecutionTimeoutNodeCount() { + return executionTimeoutNodeCount_; + } + + 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 (nodeType_ + != com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType + .NODE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, nodeType_); + } + if (!getNodeSubtypeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nodeSubtype_); + } + if (discoveredNodeCount_ != 0) { + output.writeInt32(3, discoveredNodeCount_); + } + if (matchedNodeCount_ != 0) { + output.writeInt32(4, matchedNodeCount_); + } + if (exploredNodeCount_ != 0) { + output.writeInt32(5, exploredNodeCount_); + } + if (cappedNodeCount_ != 0) { + output.writeInt32(6, cappedNodeCount_); + } + if (permisionDeniedNodeCount_ != 0) { + output.writeInt32(7, permisionDeniedNodeCount_); + } + if (executionTimeoutNodeCount_ != 0) { + output.writeInt32(8, executionTimeoutNodeCount_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (nodeType_ + != com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType + .NODE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, nodeType_); + } + if (!getNodeSubtypeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nodeSubtype_); + } + if (discoveredNodeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, discoveredNodeCount_); + } + if (matchedNodeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, matchedNodeCount_); + } + if (exploredNodeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, exploredNodeCount_); + } + if (cappedNodeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, cappedNodeCount_); + } + if (permisionDeniedNodeCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(7, permisionDeniedNodeCount_); + } + if (executionTimeoutNodeCount_ != 0) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size(8, executionTimeoutNodeCount_); + } + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats other = + (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats) obj; + + if (nodeType_ != other.nodeType_) return false; + if (!getNodeSubtype().equals(other.getNodeSubtype())) return false; + if (getDiscoveredNodeCount() != other.getDiscoveredNodeCount()) return false; + if (getMatchedNodeCount() != other.getMatchedNodeCount()) return false; + if (getExploredNodeCount() != other.getExploredNodeCount()) return false; + if (getCappedNodeCount() != other.getCappedNodeCount()) return false; + if (getPermisionDeniedNodeCount() != other.getPermisionDeniedNodeCount()) return false; + if (getExecutionTimeoutNodeCount() != other.getExecutionTimeoutNodeCount()) 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) + NODE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + nodeType_; + hash = (37 * hash) + NODE_SUBTYPE_FIELD_NUMBER; + hash = (53 * hash) + getNodeSubtype().hashCode(); + hash = (37 * hash) + DISCOVERED_NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getDiscoveredNodeCount(); + hash = (37 * hash) + MATCHED_NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getMatchedNodeCount(); + hash = (37 * hash) + EXPLORED_NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getExploredNodeCount(); + hash = (37 * hash) + CAPPED_NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getCappedNodeCount(); + hash = (37 * hash) + PERMISION_DENIED_NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getPermisionDeniedNodeCount(); + hash = (37 * hash) + EXECUTION_TIMEOUT_NODE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getExecutionTimeoutNodeCount(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats 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; + } + /** + * + * + *
+       * A stats message that contains a set of analysis metrics.
+       * Here are some equations to show relationships of the explicitly specified
+       * metrics with other implicit metrics:
+       * * node_count = discovered_node_count + undiscovered_node_count(implicit)
+       * * discovered_node_count = explored_node_count +
+       * unexplored_node_count(implicit)
+       * * explored_node_count = capped_node_count + uncapped_node_count(implicit)
+       * * unexplored_node_count(implicit) = permission_denied_node_count +
+       * execution_timeout_node_count + other_unexplored_node_count(implicit)
+       * * discovered_node_count = matched_node_count +
+       * unmatched_node_count(implicit)
+       * 
+ * + * Protobuf type {@code + * google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats) + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.StatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_Stats_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_Stats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.class, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.Builder + .class); + } + + // Construct using + // com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.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(); + nodeType_ = 0; + + nodeSubtype_ = ""; + + discoveredNodeCount_ = 0; + + matchedNodeCount_ = 0; + + exploredNodeCount_ = 0; + + cappedNodeCount_ = 0; + + permisionDeniedNodeCount_ = 0; + + executionTimeoutNodeCount_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_Stats_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats build() { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + buildPartial() { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats result = + new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats(this); + result.nodeType_ = nodeType_; + result.nodeSubtype_ = nodeSubtype_; + result.discoveredNodeCount_ = discoveredNodeCount_; + result.matchedNodeCount_ = matchedNodeCount_; + result.exploredNodeCount_ = exploredNodeCount_; + result.cappedNodeCount_ = cappedNodeCount_; + result.permisionDeniedNodeCount_ = permisionDeniedNodeCount_; + result.executionTimeoutNodeCount_ = executionTimeoutNodeCount_; + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats) { + return mergeFrom( + (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats other) { + if (other + == com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + .getDefaultInstance()) return this; + if (other.nodeType_ != 0) { + setNodeTypeValue(other.getNodeTypeValue()); + } + if (!other.getNodeSubtype().isEmpty()) { + nodeSubtype_ = other.nodeSubtype_; + onChanged(); + } + if (other.getDiscoveredNodeCount() != 0) { + setDiscoveredNodeCount(other.getDiscoveredNodeCount()); + } + if (other.getMatchedNodeCount() != 0) { + setMatchedNodeCount(other.getMatchedNodeCount()); + } + if (other.getExploredNodeCount() != 0) { + setExploredNodeCount(other.getExploredNodeCount()); + } + if (other.getCappedNodeCount() != 0) { + setCappedNodeCount(other.getCappedNodeCount()); + } + if (other.getPermisionDeniedNodeCount() != 0) { + setPermisionDeniedNodeCount(other.getPermisionDeniedNodeCount()); + } + if (other.getExecutionTimeoutNodeCount() != 0) { + setExecutionTimeoutNodeCount(other.getExecutionTimeoutNodeCount()); + } + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int nodeType_ = 0; + /** + * + * + *
+         * Node type.
+         * 
+ * + * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType node_type = 1; + * + * + * @return The enum numeric value on the wire for nodeType. + */ + @java.lang.Override + public int getNodeTypeValue() { + return nodeType_; + } + /** + * + * + *
+         * Node type.
+         * 
+ * + * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType node_type = 1; + * + * + * @param value The enum numeric value on the wire for nodeType to set. + * @return This builder for chaining. + */ + public Builder setNodeTypeValue(int value) { + + nodeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * Node type.
+         * 
+ * + * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType node_type = 1; + * + * + * @return The nodeType. + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType + getNodeType() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType + result = + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + .NodeType.valueOf(nodeType_); + return result == null + ? com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Node type.
+         * 
+ * + * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType node_type = 1; + * + * + * @param value The nodeType to set. + * @return This builder for chaining. + */ + public Builder setNodeType( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType + value) { + if (value == null) { + throw new NullPointerException(); + } + + nodeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Node type.
+         * 
+ * + * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.NodeType node_type = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearNodeType() { + + nodeType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object nodeSubtype_ = ""; + /** + * + * + *
+         * The subtype of a node, such as:
+         * * For Identity: Group, User, ServiceAccount etc.
+         * * For Resource: resource type name, such as
+         * cloudresourcemanager.googleapis.com/Organization, etc.
+         * * For Access: Role or Permission
+         * 
+ * + * string node_subtype = 2; + * + * @return The nodeSubtype. + */ + public java.lang.String getNodeSubtype() { + java.lang.Object ref = nodeSubtype_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nodeSubtype_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The subtype of a node, such as:
+         * * For Identity: Group, User, ServiceAccount etc.
+         * * For Resource: resource type name, such as
+         * cloudresourcemanager.googleapis.com/Organization, etc.
+         * * For Access: Role or Permission
+         * 
+ * + * string node_subtype = 2; + * + * @return The bytes for nodeSubtype. + */ + public com.google.protobuf.ByteString getNodeSubtypeBytes() { + java.lang.Object ref = nodeSubtype_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nodeSubtype_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The subtype of a node, such as:
+         * * For Identity: Group, User, ServiceAccount etc.
+         * * For Resource: resource type name, such as
+         * cloudresourcemanager.googleapis.com/Organization, etc.
+         * * For Access: Role or Permission
+         * 
+ * + * string node_subtype = 2; + * + * @param value The nodeSubtype to set. + * @return This builder for chaining. + */ + public Builder setNodeSubtype(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nodeSubtype_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The subtype of a node, such as:
+         * * For Identity: Group, User, ServiceAccount etc.
+         * * For Resource: resource type name, such as
+         * cloudresourcemanager.googleapis.com/Organization, etc.
+         * * For Access: Role or Permission
+         * 
+ * + * string node_subtype = 2; + * + * @return This builder for chaining. + */ + public Builder clearNodeSubtype() { + + nodeSubtype_ = getDefaultInstance().getNodeSubtype(); + onChanged(); + return this; + } + /** + * + * + *
+         * The subtype of a node, such as:
+         * * For Identity: Group, User, ServiceAccount etc.
+         * * For Resource: resource type name, such as
+         * cloudresourcemanager.googleapis.com/Organization, etc.
+         * * For Access: Role or Permission
+         * 
+ * + * string node_subtype = 2; + * + * @param value The bytes for nodeSubtype to set. + * @return This builder for chaining. + */ + public Builder setNodeSubtypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nodeSubtype_ = value; + onChanged(); + return this; + } + + private int discoveredNodeCount_; + /** + * + * + *
+         * The count of discovered nodes.
+         * 
+ * + * int32 discovered_node_count = 3; + * + * @return The discoveredNodeCount. + */ + @java.lang.Override + public int getDiscoveredNodeCount() { + return discoveredNodeCount_; + } + /** + * + * + *
+         * The count of discovered nodes.
+         * 
+ * + * int32 discovered_node_count = 3; + * + * @param value The discoveredNodeCount to set. + * @return This builder for chaining. + */ + public Builder setDiscoveredNodeCount(int value) { + + discoveredNodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The count of discovered nodes.
+         * 
+ * + * int32 discovered_node_count = 3; + * + * @return This builder for chaining. + */ + public Builder clearDiscoveredNodeCount() { + + discoveredNodeCount_ = 0; + onChanged(); + return this; + } + + private int matchedNodeCount_; + /** + * + * + *
+         * The count of nodes that match the query. These nodes form a sub-graph
+         * of discovered nodes.
+         * 
+ * + * int32 matched_node_count = 4; + * + * @return The matchedNodeCount. + */ + @java.lang.Override + public int getMatchedNodeCount() { + return matchedNodeCount_; + } + /** + * + * + *
+         * The count of nodes that match the query. These nodes form a sub-graph
+         * of discovered nodes.
+         * 
+ * + * int32 matched_node_count = 4; + * + * @param value The matchedNodeCount to set. + * @return This builder for chaining. + */ + public Builder setMatchedNodeCount(int value) { + + matchedNodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The count of nodes that match the query. These nodes form a sub-graph
+         * of discovered nodes.
+         * 
+ * + * int32 matched_node_count = 4; + * + * @return This builder for chaining. + */ + public Builder clearMatchedNodeCount() { + + matchedNodeCount_ = 0; + onChanged(); + return this; + } + + private int exploredNodeCount_; + /** + * + * + *
+         * The count of explored nodes.
+         * 
+ * + * int32 explored_node_count = 5; + * + * @return The exploredNodeCount. + */ + @java.lang.Override + public int getExploredNodeCount() { + return exploredNodeCount_; + } + /** + * + * + *
+         * The count of explored nodes.
+         * 
+ * + * int32 explored_node_count = 5; + * + * @param value The exploredNodeCount to set. + * @return This builder for chaining. + */ + public Builder setExploredNodeCount(int value) { + + exploredNodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The count of explored nodes.
+         * 
+ * + * int32 explored_node_count = 5; + * + * @return This builder for chaining. + */ + public Builder clearExploredNodeCount() { + + exploredNodeCount_ = 0; + onChanged(); + return this; + } + + private int cappedNodeCount_; + /** + * + * + *
+         * The count of nodes that get explored, but are capped by max fanout
+         * setting.
+         * 
+ * + * int32 capped_node_count = 6; + * + * @return The cappedNodeCount. + */ + @java.lang.Override + public int getCappedNodeCount() { + return cappedNodeCount_; + } + /** + * + * + *
+         * The count of nodes that get explored, but are capped by max fanout
+         * setting.
+         * 
+ * + * int32 capped_node_count = 6; + * + * @param value The cappedNodeCount to set. + * @return This builder for chaining. + */ + public Builder setCappedNodeCount(int value) { + + cappedNodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The count of nodes that get explored, but are capped by max fanout
+         * setting.
+         * 
+ * + * int32 capped_node_count = 6; + * + * @return This builder for chaining. + */ + public Builder clearCappedNodeCount() { + + cappedNodeCount_ = 0; + onChanged(); + return this; + } + + private int permisionDeniedNodeCount_; + /** + * + * + *
+         * The count of unexplored nodes caused by permission denied error.
+         * 
+ * + * int32 permision_denied_node_count = 7; + * + * @return The permisionDeniedNodeCount. + */ + @java.lang.Override + public int getPermisionDeniedNodeCount() { + return permisionDeniedNodeCount_; + } + /** + * + * + *
+         * The count of unexplored nodes caused by permission denied error.
+         * 
+ * + * int32 permision_denied_node_count = 7; + * + * @param value The permisionDeniedNodeCount to set. + * @return This builder for chaining. + */ + public Builder setPermisionDeniedNodeCount(int value) { + + permisionDeniedNodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The count of unexplored nodes caused by permission denied error.
+         * 
+ * + * int32 permision_denied_node_count = 7; + * + * @return This builder for chaining. + */ + public Builder clearPermisionDeniedNodeCount() { + + permisionDeniedNodeCount_ = 0; + onChanged(); + return this; + } + + private int executionTimeoutNodeCount_; + /** + * + * + *
+         * The count of unexplored nodes caused by execution timeout.
+         * 
+ * + * int32 execution_timeout_node_count = 8; + * + * @return The executionTimeoutNodeCount. + */ + @java.lang.Override + public int getExecutionTimeoutNodeCount() { + return executionTimeoutNodeCount_; + } + /** + * + * + *
+         * The count of unexplored nodes caused by execution timeout.
+         * 
+ * + * int32 execution_timeout_node_count = 8; + * + * @param value The executionTimeoutNodeCount to set. + * @return This builder for chaining. + */ + public Builder setExecutionTimeoutNodeCount(int value) { + + executionTimeoutNodeCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The count of unexplored nodes caused by execution timeout.
+         * 
+ * + * int32 execution_timeout_node_count = 8; + * + * @return This builder for chaining. + */ + public Builder clearExecutionTimeoutNodeCount() { + + executionTimeoutNodeCount_ = 0; + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats) + private static final com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .Stats + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats(); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Stats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Stats(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.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + /** + * + * + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + * + * @return Whether the analysisQuery field is set. + */ + @java.lang.Override + public boolean hasAnalysisQuery() { + return analysisQuery_ != null; + } + /** + * + * + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + * + * @return The analysisQuery. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { + return analysisQuery_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } + /** + * + * + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { + return getAnalysisQuery(); + } + + public static final int ANALYSIS_RESULTS_FIELD_NUMBER = 2; + private java.util.List analysisResults_; + /** + * + * + *
+     * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + @java.lang.Override + public java.util.List + getAnalysisResultsList() { + return analysisResults_; + } + /** + * + * + *
+     * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + @java.lang.Override + public java.util.List + getAnalysisResultsOrBuilderList() { + return analysisResults_; + } + /** + * + * + *
+     * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + @java.lang.Override + public int getAnalysisResultsCount() { + return analysisResults_.size(); + } + /** + * + * + *
+     * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult getAnalysisResults(int index) { + return analysisResults_.get(index); + } + /** + * + * + *
+     * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+     * that matches the analysis query, or empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder getAnalysisResultsOrBuilder( + int index) { + return analysisResults_.get(index); + } + + public static final int FULLY_EXPLORED_FIELD_NUMBER = 3; + private boolean fullyExplored_; + /** + * + * + *
+     * Represents whether all entries in the
+     * [analysis_results][analysis_results] have been fully explored to answer
+     * the query.
+     * 
+ * + * bool fully_explored = 3; + * + * @return The fullyExplored. + */ + @java.lang.Override + public boolean getFullyExplored() { + return fullyExplored_; + } + + public static final int STATS_FIELD_NUMBER = 4; + private java.util.List< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats> + stats_; + /** + * + * + *
+     * The stats of how the analysis has been explored.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats> + getStatsList() { + return stats_; + } + /** + * + * + *
+     * The stats of how the analysis has been explored.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.StatsOrBuilder> + getStatsOrBuilderList() { + return stats_; + } + /** + * + * + *
+     * The stats of how the analysis has been explored.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + @java.lang.Override + public int getStatsCount() { + return stats_.size(); + } + /** + * + * + *
+     * The stats of how the analysis has been explored.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats getStats( + int index) { + return stats_.get(index); + } + /** + * + * + *
+     * The stats of how the analysis has been explored.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.StatsOrBuilder + getStatsOrBuilder(int index) { + return stats_.get(index); + } + + public static final int NON_CRITICAL_ERRORS_FIELD_NUMBER = 5; + private java.util.List nonCriticalErrors_; + /** + * + * + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + @java.lang.Override + public java.util.List + getNonCriticalErrorsList() { + return nonCriticalErrors_; + } + /** + * + * + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + @java.lang.Override + public java.util.List + getNonCriticalErrorsOrBuilderList() { + return nonCriticalErrors_; + } + /** + * + * + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + @java.lang.Override + public int getNonCriticalErrorsCount() { + return nonCriticalErrors_.size(); + } + /** + * + * + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState getNonCriticalErrors(int index) { + return nonCriticalErrors_.get(index); + } + /** + * + * + *
+     * A list of non-critical errors happened during the query handling.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getNonCriticalErrorsOrBuilder( + int index) { + return nonCriticalErrors_.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 (analysisQuery_ != null) { + output.writeMessage(1, getAnalysisQuery()); + } + for (int i = 0; i < analysisResults_.size(); i++) { + output.writeMessage(2, analysisResults_.get(i)); + } + if (fullyExplored_ != false) { + output.writeBool(3, fullyExplored_); + } + for (int i = 0; i < stats_.size(); i++) { + output.writeMessage(4, stats_.get(i)); + } + for (int i = 0; i < nonCriticalErrors_.size(); i++) { + output.writeMessage(5, nonCriticalErrors_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (analysisQuery_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAnalysisQuery()); + } + for (int i = 0; i < analysisResults_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, analysisResults_.get(i)); + } + if (fullyExplored_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, fullyExplored_); + } + for (int i = 0; i < stats_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, stats_.get(i)); + } + for (int i = 0; i < nonCriticalErrors_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, nonCriticalErrors_.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.AnalyzeIamPolicyResponse.IamPolicyAnalysis)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis other = + (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) obj; + + if (hasAnalysisQuery() != other.hasAnalysisQuery()) return false; + if (hasAnalysisQuery()) { + if (!getAnalysisQuery().equals(other.getAnalysisQuery())) return false; + } + if (!getAnalysisResultsList().equals(other.getAnalysisResultsList())) return false; + if (getFullyExplored() != other.getFullyExplored()) return false; + if (!getStatsList().equals(other.getStatsList())) return false; + if (!getNonCriticalErrorsList().equals(other.getNonCriticalErrorsList())) 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 (hasAnalysisQuery()) { + hash = (37 * hash) + ANALYSIS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisQuery().hashCode(); + } + if (getAnalysisResultsCount() > 0) { + hash = (37 * hash) + ANALYSIS_RESULTS_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisResultsList().hashCode(); + } + hash = (37 * hash) + FULLY_EXPLORED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFullyExplored()); + if (getStatsCount() > 0) { + hash = (37 * hash) + STATS_FIELD_NUMBER; + hash = (53 * hash) + getStatsList().hashCode(); + } + if (getNonCriticalErrorsCount() > 0) { + hash = (37 * hash) + NON_CRITICAL_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getNonCriticalErrorsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis 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 analysis message to group the query and results.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.class, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder.class); + } + + // Construct using + // com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAnalysisResultsFieldBuilder(); + getStatsFieldBuilder(); + getNonCriticalErrorsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + if (analysisResultsBuilder_ == null) { + analysisResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + analysisResultsBuilder_.clear(); + } + fullyExplored_ = false; + + if (statsBuilder_ == null) { + stats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + statsBuilder_.clear(); + } + if (nonCriticalErrorsBuilder_ == null) { + nonCriticalErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + nonCriticalErrorsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis build() { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis buildPartial() { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis result = + new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis(this); + int from_bitField0_ = bitField0_; + if (analysisQueryBuilder_ == null) { + result.analysisQuery_ = analysisQuery_; + } else { + result.analysisQuery_ = analysisQueryBuilder_.build(); + } + if (analysisResultsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + analysisResults_ = java.util.Collections.unmodifiableList(analysisResults_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.analysisResults_ = analysisResults_; + } else { + result.analysisResults_ = analysisResultsBuilder_.build(); + } + result.fullyExplored_ = fullyExplored_; + if (statsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + stats_ = java.util.Collections.unmodifiableList(stats_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.stats_ = stats_; + } else { + result.stats_ = statsBuilder_.build(); + } + if (nonCriticalErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + nonCriticalErrors_ = java.util.Collections.unmodifiableList(nonCriticalErrors_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.nonCriticalErrors_ = nonCriticalErrors_; + } else { + result.nonCriticalErrors_ = nonCriticalErrorsBuilder_.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.AnalyzeIamPolicyResponse.IamPolicyAnalysis) { + return mergeFrom( + (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis other) { + if (other + == com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .getDefaultInstance()) return this; + if (other.hasAnalysisQuery()) { + mergeAnalysisQuery(other.getAnalysisQuery()); + } + if (analysisResultsBuilder_ == null) { + if (!other.analysisResults_.isEmpty()) { + if (analysisResults_.isEmpty()) { + analysisResults_ = other.analysisResults_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAnalysisResultsIsMutable(); + analysisResults_.addAll(other.analysisResults_); + } + onChanged(); + } + } else { + if (!other.analysisResults_.isEmpty()) { + if (analysisResultsBuilder_.isEmpty()) { + analysisResultsBuilder_.dispose(); + analysisResultsBuilder_ = null; + analysisResults_ = other.analysisResults_; + bitField0_ = (bitField0_ & ~0x00000001); + analysisResultsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAnalysisResultsFieldBuilder() + : null; + } else { + analysisResultsBuilder_.addAllMessages(other.analysisResults_); + } + } + } + if (other.getFullyExplored() != false) { + setFullyExplored(other.getFullyExplored()); + } + if (statsBuilder_ == null) { + if (!other.stats_.isEmpty()) { + if (stats_.isEmpty()) { + stats_ = other.stats_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStatsIsMutable(); + stats_.addAll(other.stats_); + } + onChanged(); + } + } else { + if (!other.stats_.isEmpty()) { + if (statsBuilder_.isEmpty()) { + statsBuilder_.dispose(); + statsBuilder_ = null; + stats_ = other.stats_; + bitField0_ = (bitField0_ & ~0x00000002); + statsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStatsFieldBuilder() + : null; + } else { + statsBuilder_.addAllMessages(other.stats_); + } + } + } + if (nonCriticalErrorsBuilder_ == null) { + if (!other.nonCriticalErrors_.isEmpty()) { + if (nonCriticalErrors_.isEmpty()) { + nonCriticalErrors_ = other.nonCriticalErrors_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.addAll(other.nonCriticalErrors_); + } + onChanged(); + } + } else { + if (!other.nonCriticalErrors_.isEmpty()) { + if (nonCriticalErrorsBuilder_.isEmpty()) { + nonCriticalErrorsBuilder_.dispose(); + nonCriticalErrorsBuilder_ = null; + nonCriticalErrors_ = other.nonCriticalErrors_; + bitField0_ = (bitField0_ & ~0x00000004); + nonCriticalErrorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getNonCriticalErrorsFieldBuilder() + : null; + } else { + nonCriticalErrorsBuilder_.addAllMessages(other.nonCriticalErrors_); + } + } + } + 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.AnalyzeIamPolicyResponse.IamPolicyAnalysis parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> + analysisQueryBuilder_; + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + * + * @return Whether the analysisQuery field is set. + */ + public boolean hasAnalysisQuery() { + return analysisQueryBuilder_ != null || analysisQuery_ != null; + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + * + * @return The analysisQuery. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + return analysisQuery_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } else { + return analysisQueryBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public Builder setAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisQuery_ = value; + onChanged(); + } else { + analysisQueryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public Builder setAnalysisQuery( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder builderForValue) { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = builderForValue.build(); + onChanged(); + } else { + analysisQueryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public Builder mergeAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (analysisQuery_ != null) { + analysisQuery_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder(analysisQuery_) + .mergeFrom(value) + .buildPartial(); + } else { + analysisQuery_ = value; + } + onChanged(); + } else { + analysisQueryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public Builder clearAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + onChanged(); + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder getAnalysisQueryBuilder() { + + onChanged(); + return getAnalysisQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { + if (analysisQueryBuilder_ != null) { + return analysisQueryBuilder_.getMessageOrBuilder(); + } else { + return analysisQuery_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> + getAnalysisQueryFieldBuilder() { + if (analysisQueryBuilder_ == null) { + analysisQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder>( + getAnalysisQuery(), getParentForChildren(), isClean()); + analysisQuery_ = null; + } + return analysisQueryBuilder_; + } + + private java.util.List analysisResults_ = + java.util.Collections.emptyList(); + + private void ensureAnalysisResultsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + analysisResults_ = + new java.util.ArrayList( + analysisResults_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder> + analysisResultsBuilder_; + + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public java.util.List + getAnalysisResultsList() { + if (analysisResultsBuilder_ == null) { + return java.util.Collections.unmodifiableList(analysisResults_); + } else { + return analysisResultsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public int getAnalysisResultsCount() { + if (analysisResultsBuilder_ == null) { + return analysisResults_.size(); + } else { + return analysisResultsBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult getAnalysisResults(int index) { + if (analysisResultsBuilder_ == null) { + return analysisResults_.get(index); + } else { + return analysisResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder setAnalysisResults( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult value) { + if (analysisResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisResultsIsMutable(); + analysisResults_.set(index, value); + onChanged(); + } else { + analysisResultsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder setAnalysisResults( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder builderForValue) { + if (analysisResultsBuilder_ == null) { + ensureAnalysisResultsIsMutable(); + analysisResults_.set(index, builderForValue.build()); + onChanged(); + } else { + analysisResultsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder addAnalysisResults(com.google.cloud.asset.v1.IamPolicyAnalysisResult value) { + if (analysisResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisResultsIsMutable(); + analysisResults_.add(value); + onChanged(); + } else { + analysisResultsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder addAnalysisResults( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult value) { + if (analysisResultsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnalysisResultsIsMutable(); + analysisResults_.add(index, value); + onChanged(); + } else { + analysisResultsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder addAnalysisResults( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder builderForValue) { + if (analysisResultsBuilder_ == null) { + ensureAnalysisResultsIsMutable(); + analysisResults_.add(builderForValue.build()); + onChanged(); + } else { + analysisResultsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder addAnalysisResults( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder builderForValue) { + if (analysisResultsBuilder_ == null) { + ensureAnalysisResultsIsMutable(); + analysisResults_.add(index, builderForValue.build()); + onChanged(); + } else { + analysisResultsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder addAllAnalysisResults( + java.lang.Iterable values) { + if (analysisResultsBuilder_ == null) { + ensureAnalysisResultsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, analysisResults_); + onChanged(); + } else { + analysisResultsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder clearAnalysisResults() { + if (analysisResultsBuilder_ == null) { + analysisResults_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + analysisResultsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public Builder removeAnalysisResults(int index) { + if (analysisResultsBuilder_ == null) { + ensureAnalysisResultsIsMutable(); + analysisResults_.remove(index); + onChanged(); + } else { + analysisResultsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder getAnalysisResultsBuilder( + int index) { + return getAnalysisResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder getAnalysisResultsOrBuilder( + int index) { + if (analysisResultsBuilder_ == null) { + return analysisResults_.get(index); + } else { + return analysisResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public java.util.List + getAnalysisResultsOrBuilderList() { + if (analysisResultsBuilder_ != null) { + return analysisResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(analysisResults_); + } + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder addAnalysisResultsBuilder() { + return getAnalysisResultsFieldBuilder() + .addBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisResult.getDefaultInstance()); + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder addAnalysisResultsBuilder( + int index) { + return getAnalysisResultsFieldBuilder() + .addBuilder( + index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.getDefaultInstance()); + } + /** + * + * + *
+       * A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult]
+       * that matches the analysis query, or empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult analysis_results = 2; + */ + public java.util.List + getAnalysisResultsBuilderList() { + return getAnalysisResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder> + getAnalysisResultsFieldBuilder() { + if (analysisResultsBuilder_ == null) { + analysisResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder>( + analysisResults_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + analysisResults_ = null; + } + return analysisResultsBuilder_; + } + + private boolean fullyExplored_; + /** + * + * + *
+       * Represents whether all entries in the
+       * [analysis_results][analysis_results] have been fully explored to answer
+       * the query.
+       * 
+ * + * bool fully_explored = 3; + * + * @return The fullyExplored. + */ + @java.lang.Override + public boolean getFullyExplored() { + return fullyExplored_; + } + /** + * + * + *
+       * Represents whether all entries in the
+       * [analysis_results][analysis_results] have been fully explored to answer
+       * the query.
+       * 
+ * + * bool fully_explored = 3; + * + * @param value The fullyExplored to set. + * @return This builder for chaining. + */ + public Builder setFullyExplored(boolean value) { + + fullyExplored_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Represents whether all entries in the
+       * [analysis_results][analysis_results] have been fully explored to answer
+       * the query.
+       * 
+ * + * bool fully_explored = 3; + * + * @return This builder for chaining. + */ + public Builder clearFullyExplored() { + + fullyExplored_ = false; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats> + stats_ = java.util.Collections.emptyList(); + + private void ensureStatsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + stats_ = + new java.util.ArrayList< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats>( + stats_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.Builder, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.StatsOrBuilder> + statsBuilder_; + + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public java.util.List< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats> + getStatsList() { + if (statsBuilder_ == null) { + return java.util.Collections.unmodifiableList(stats_); + } else { + return statsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public int getStatsCount() { + if (statsBuilder_ == null) { + return stats_.size(); + } else { + return statsBuilder_.getCount(); + } + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats getStats( + int index) { + if (statsBuilder_ == null) { + return stats_.get(index); + } else { + return statsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public Builder setStats( + int index, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatsIsMutable(); + stats_.set(index, value); + onChanged(); + } else { + statsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public Builder setStats( + int index, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.Builder + builderForValue) { + if (statsBuilder_ == null) { + ensureStatsIsMutable(); + stats_.set(index, builderForValue.build()); + onChanged(); + } else { + statsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public Builder addStats( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatsIsMutable(); + stats_.add(value); + onChanged(); + } else { + statsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public Builder addStats( + int index, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStatsIsMutable(); + stats_.add(index, value); + onChanged(); + } else { + statsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public Builder addStats( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.Builder + builderForValue) { + if (statsBuilder_ == null) { + ensureStatsIsMutable(); + stats_.add(builderForValue.build()); + onChanged(); + } else { + statsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public Builder addStats( + int index, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.Builder + builderForValue) { + if (statsBuilder_ == null) { + ensureStatsIsMutable(); + stats_.add(index, builderForValue.build()); + onChanged(); + } else { + statsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public Builder addAllStats( + java.lang.Iterable< + ? extends + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats> + values) { + if (statsBuilder_ == null) { + ensureStatsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, stats_); + onChanged(); + } else { + statsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public Builder clearStats() { + if (statsBuilder_ == null) { + stats_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + statsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public Builder removeStats(int index) { + if (statsBuilder_ == null) { + ensureStatsIsMutable(); + stats_.remove(index); + onChanged(); + } else { + statsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.Builder + getStatsBuilder(int index) { + return getStatsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.StatsOrBuilder + getStatsOrBuilder(int index) { + if (statsBuilder_ == null) { + return stats_.get(index); + } else { + return statsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .StatsOrBuilder> + getStatsOrBuilderList() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(stats_); + } + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.Builder + addStatsBuilder() { + return getStatsFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + .getDefaultInstance()); + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.Builder + addStatsBuilder(int index) { + return getStatsFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + .getDefaultInstance()); + } + /** + * + * + *
+       * The stats of how the analysis has been explored.
+       * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats stats = 4; + * + */ + public java.util.List< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.Builder> + getStatsBuilderList() { + return getStatsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats.Builder, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.StatsOrBuilder> + getStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Stats + .Builder, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .StatsOrBuilder>( + stats_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + stats_ = null; + } + return statsBuilder_; + } + + private java.util.List nonCriticalErrors_ = + java.util.Collections.emptyList(); + + private void ensureNonCriticalErrorsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + nonCriticalErrors_ = + new java.util.ArrayList( + nonCriticalErrors_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> + nonCriticalErrorsBuilder_; + + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public java.util.List + getNonCriticalErrorsList() { + if (nonCriticalErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(nonCriticalErrors_); + } else { + return nonCriticalErrorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public int getNonCriticalErrorsCount() { + if (nonCriticalErrorsBuilder_ == null) { + return nonCriticalErrors_.size(); + } else { + return nonCriticalErrorsBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState getNonCriticalErrors(int index) { + if (nonCriticalErrorsBuilder_ == null) { + return nonCriticalErrors_.get(index); + } else { + return nonCriticalErrorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public Builder setNonCriticalErrors( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (nonCriticalErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.set(index, value); + onChanged(); + } else { + nonCriticalErrorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public Builder setNonCriticalErrors( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { + if (nonCriticalErrorsBuilder_ == null) { + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + nonCriticalErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public Builder addNonCriticalErrors(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (nonCriticalErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.add(value); + onChanged(); + } else { + nonCriticalErrorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public Builder addNonCriticalErrors( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (nonCriticalErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.add(index, value); + onChanged(); + } else { + nonCriticalErrorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public Builder addNonCriticalErrors( + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { + if (nonCriticalErrorsBuilder_ == null) { + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.add(builderForValue.build()); + onChanged(); + } else { + nonCriticalErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public Builder addNonCriticalErrors( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { + if (nonCriticalErrorsBuilder_ == null) { + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + nonCriticalErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public Builder addAllNonCriticalErrors( + java.lang.Iterable values) { + if (nonCriticalErrorsBuilder_ == null) { + ensureNonCriticalErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nonCriticalErrors_); + onChanged(); + } else { + nonCriticalErrorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public Builder clearNonCriticalErrors() { + if (nonCriticalErrorsBuilder_ == null) { + nonCriticalErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + nonCriticalErrorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public Builder removeNonCriticalErrors(int index) { + if (nonCriticalErrorsBuilder_ == null) { + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.remove(index); + onChanged(); + } else { + nonCriticalErrorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder getNonCriticalErrorsBuilder( + int index) { + return getNonCriticalErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder + getNonCriticalErrorsOrBuilder(int index) { + if (nonCriticalErrorsBuilder_ == null) { + return nonCriticalErrors_.get(index); + } else { + return nonCriticalErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public java.util.List + getNonCriticalErrorsOrBuilderList() { + if (nonCriticalErrorsBuilder_ != null) { + return nonCriticalErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nonCriticalErrors_); + } + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder + addNonCriticalErrorsBuilder() { + return getNonCriticalErrorsFieldBuilder() + .addBuilder(com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance()); + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder addNonCriticalErrorsBuilder( + int index) { + return getNonCriticalErrorsFieldBuilder() + .addBuilder( + index, com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance()); + } + /** + * + * + *
+       * A list of non-critical errors happened during the query handling.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisState non_critical_errors = 5; + * + */ + public java.util.List + getNonCriticalErrorsBuilderList() { + return getNonCriticalErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> + getNonCriticalErrorsFieldBuilder() { + if (nonCriticalErrorsBuilder_ == null) { + nonCriticalErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder>( + nonCriticalErrors_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + nonCriticalErrors_ = null; + } + return nonCriticalErrorsBuilder_; + } + + @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.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + private static final com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis(); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamPolicyAnalysis parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IamPolicyAnalysis(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.AnalyzeIamPolicyResponse.IamPolicyAnalysis + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int MAIN_ANALYSIS_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis mainAnalysis_; + /** + * + * + *
+   * The main analysis that matches the original request.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + * + * @return Whether the mainAnalysis field is set. + */ + @java.lang.Override + public boolean hasMainAnalysis() { + return mainAnalysis_ != null; + } + /** + * + * + *
+   * The main analysis that matches the original request.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + * + * @return The mainAnalysis. + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getMainAnalysis() { + return mainAnalysis_ == null + ? com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.getDefaultInstance() + : mainAnalysis_; + } + /** + * + * + *
+   * The main analysis that matches the original request.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder + getMainAnalysisOrBuilder() { + return getMainAnalysis(); + } + + public static final int SERVICE_ACCOUNT_IMPERSONATION_ANALYSIS_FIELD_NUMBER = 2; + private java.util.List + serviceAccountImpersonationAnalysis_; + /** + * + * + *
+   * The service account impersonation analysis if
+   * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+   * is enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + @java.lang.Override + public java.util.List + getServiceAccountImpersonationAnalysisList() { + return serviceAccountImpersonationAnalysis_; + } + /** + * + * + *
+   * The service account impersonation analysis if
+   * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+   * is enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + getServiceAccountImpersonationAnalysisOrBuilderList() { + return serviceAccountImpersonationAnalysis_; + } + /** + * + * + *
+   * The service account impersonation analysis if
+   * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+   * is enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + @java.lang.Override + public int getServiceAccountImpersonationAnalysisCount() { + return serviceAccountImpersonationAnalysis_.size(); + } + /** + * + * + *
+   * The service account impersonation analysis if
+   * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+   * is enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + getServiceAccountImpersonationAnalysis(int index) { + return serviceAccountImpersonationAnalysis_.get(index); + } + /** + * + * + *
+   * The service account impersonation analysis if
+   * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+   * is enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder + getServiceAccountImpersonationAnalysisOrBuilder(int index) { + return serviceAccountImpersonationAnalysis_.get(index); + } + + public static final int FULLY_EXPLORED_FIELD_NUMBER = 3; + private boolean fullyExplored_; + /** + * + * + *
+   * Represents whether all entries in the [main_analysis][main_analysis] and
+   * [service_account_impersonation_analysis][] have been fully explored to
+   * answer the query in the request.
+   * 
+ * + * bool fully_explored = 3; + * + * @return The fullyExplored. + */ + @java.lang.Override + public boolean getFullyExplored() { + return fullyExplored_; + } + + 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 (mainAnalysis_ != null) { + output.writeMessage(1, getMainAnalysis()); + } + for (int i = 0; i < serviceAccountImpersonationAnalysis_.size(); i++) { + output.writeMessage(2, serviceAccountImpersonationAnalysis_.get(i)); + } + if (fullyExplored_ != false) { + output.writeBool(3, fullyExplored_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (mainAnalysis_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMainAnalysis()); + } + for (int i = 0; i < serviceAccountImpersonationAnalysis_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, serviceAccountImpersonationAnalysis_.get(i)); + } + if (fullyExplored_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, fullyExplored_); + } + 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.AnalyzeIamPolicyResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse other = + (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse) obj; + + if (hasMainAnalysis() != other.hasMainAnalysis()) return false; + if (hasMainAnalysis()) { + if (!getMainAnalysis().equals(other.getMainAnalysis())) return false; + } + if (!getServiceAccountImpersonationAnalysisList() + .equals(other.getServiceAccountImpersonationAnalysisList())) return false; + if (getFullyExplored() != other.getFullyExplored()) 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 (hasMainAnalysis()) { + hash = (37 * hash) + MAIN_ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + getMainAnalysis().hashCode(); + } + if (getServiceAccountImpersonationAnalysisCount() > 0) { + hash = (37 * hash) + SERVICE_ACCOUNT_IMPERSONATION_ANALYSIS_FIELD_NUMBER; + hash = (53 * hash) + getServiceAccountImpersonationAnalysisList().hashCode(); + } + hash = (37 * hash) + FULLY_EXPLORED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFullyExplored()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse 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.AnalyzeIamPolicyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse 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.AnalyzeIamPolicyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse 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.AnalyzeIamPolicyResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse 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.AnalyzeIamPolicyResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse 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.AnalyzeIamPolicyResponse 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.AnalyzeIamPolicyResponse 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.AnalyzeIamPolicyResponse 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; + } + /** + * + * + *
+   * A response message for
+   * [google.cloud.asset.v1.AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyResponse) + com.google.cloud.asset.v1.AnalyzeIamPolicyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.class, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getServiceAccountImpersonationAnalysisFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (mainAnalysisBuilder_ == null) { + mainAnalysis_ = null; + } else { + mainAnalysis_ = null; + mainAnalysisBuilder_ = null; + } + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + serviceAccountImpersonationAnalysis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + serviceAccountImpersonationAnalysisBuilder_.clear(); + } + fullyExplored_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse build() { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse buildPartial() { + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse result = + new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse(this); + int from_bitField0_ = bitField0_; + if (mainAnalysisBuilder_ == null) { + result.mainAnalysis_ = mainAnalysis_; + } else { + result.mainAnalysis_ = mainAnalysisBuilder_.build(); + } + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + serviceAccountImpersonationAnalysis_ = + java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.serviceAccountImpersonationAnalysis_ = serviceAccountImpersonationAnalysis_; + } else { + result.serviceAccountImpersonationAnalysis_ = + serviceAccountImpersonationAnalysisBuilder_.build(); + } + result.fullyExplored_ = fullyExplored_; + 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.AnalyzeIamPolicyResponse) { + return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyResponse other) { + if (other == com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.getDefaultInstance()) + return this; + if (other.hasMainAnalysis()) { + mergeMainAnalysis(other.getMainAnalysis()); + } + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + if (!other.serviceAccountImpersonationAnalysis_.isEmpty()) { + if (serviceAccountImpersonationAnalysis_.isEmpty()) { + serviceAccountImpersonationAnalysis_ = other.serviceAccountImpersonationAnalysis_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.addAll(other.serviceAccountImpersonationAnalysis_); + } + onChanged(); + } + } else { + if (!other.serviceAccountImpersonationAnalysis_.isEmpty()) { + if (serviceAccountImpersonationAnalysisBuilder_.isEmpty()) { + serviceAccountImpersonationAnalysisBuilder_.dispose(); + serviceAccountImpersonationAnalysisBuilder_ = null; + serviceAccountImpersonationAnalysis_ = other.serviceAccountImpersonationAnalysis_; + bitField0_ = (bitField0_ & ~0x00000001); + serviceAccountImpersonationAnalysisBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getServiceAccountImpersonationAnalysisFieldBuilder() + : null; + } else { + serviceAccountImpersonationAnalysisBuilder_.addAllMessages( + other.serviceAccountImpersonationAnalysis_); + } + } + } + if (other.getFullyExplored() != false) { + setFullyExplored(other.getFullyExplored()); + } + 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.AnalyzeIamPolicyResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.AnalyzeIamPolicyResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis mainAnalysis_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + mainAnalysisBuilder_; + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + * + * @return Whether the mainAnalysis field is set. + */ + public boolean hasMainAnalysis() { + return mainAnalysisBuilder_ != null || mainAnalysis_ != null; + } + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + * + * @return The mainAnalysis. + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getMainAnalysis() { + if (mainAnalysisBuilder_ == null) { + return mainAnalysis_ == null + ? com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .getDefaultInstance() + : mainAnalysis_; + } else { + return mainAnalysisBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + public Builder setMainAnalysis( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { + if (mainAnalysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mainAnalysis_ = value; + onChanged(); + } else { + mainAnalysisBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + public Builder setMainAnalysis( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + builderForValue) { + if (mainAnalysisBuilder_ == null) { + mainAnalysis_ = builderForValue.build(); + onChanged(); + } else { + mainAnalysisBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + public Builder mergeMainAnalysis( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { + if (mainAnalysisBuilder_ == null) { + if (mainAnalysis_ != null) { + mainAnalysis_ = + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.newBuilder( + mainAnalysis_) + .mergeFrom(value) + .buildPartial(); + } else { + mainAnalysis_ = value; + } + onChanged(); + } else { + mainAnalysisBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + public Builder clearMainAnalysis() { + if (mainAnalysisBuilder_ == null) { + mainAnalysis_ = null; + onChanged(); + } else { + mainAnalysis_ = null; + mainAnalysisBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + getMainAnalysisBuilder() { + + onChanged(); + return getMainAnalysisFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder + getMainAnalysisOrBuilder() { + if (mainAnalysisBuilder_ != null) { + return mainAnalysisBuilder_.getMessageOrBuilder(); + } else { + return mainAnalysis_ == null + ? com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .getDefaultInstance() + : mainAnalysis_; + } + } + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + getMainAnalysisFieldBuilder() { + if (mainAnalysisBuilder_ == null) { + mainAnalysisBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder>( + getMainAnalysis(), getParentForChildren(), isClean()); + mainAnalysis_ = null; + } + return mainAnalysisBuilder_; + } + + private java.util.List + serviceAccountImpersonationAnalysis_ = java.util.Collections.emptyList(); + + private void ensureServiceAccountImpersonationAnalysisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + serviceAccountImpersonationAnalysis_ = + new java.util.ArrayList< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis>( + serviceAccountImpersonationAnalysis_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + serviceAccountImpersonationAnalysisBuilder_; + + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public java.util.List + getServiceAccountImpersonationAnalysisList() { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); + } else { + return serviceAccountImpersonationAnalysisBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public int getServiceAccountImpersonationAnalysisCount() { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + return serviceAccountImpersonationAnalysis_.size(); + } else { + return serviceAccountImpersonationAnalysisBuilder_.getCount(); + } + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + getServiceAccountImpersonationAnalysis(int index) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + return serviceAccountImpersonationAnalysis_.get(index); + } else { + return serviceAccountImpersonationAnalysisBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder setServiceAccountImpersonationAnalysis( + int index, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.set(index, value); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder setServiceAccountImpersonationAnalysis( + int index, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + builderForValue) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder addServiceAccountImpersonationAnalysis( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.add(value); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder addServiceAccountImpersonationAnalysis( + int index, com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.add(index, value); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder addServiceAccountImpersonationAnalysis( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + builderForValue) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.add(builderForValue.build()); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder addServiceAccountImpersonationAnalysis( + int index, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + builderForValue) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder addAllServiceAccountImpersonationAnalysis( + java.lang.Iterable< + ? extends com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis> + values) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + ensureServiceAccountImpersonationAnalysisIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, serviceAccountImpersonationAnalysis_); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder clearServiceAccountImpersonationAnalysis() { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + serviceAccountImpersonationAnalysis_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder removeServiceAccountImpersonationAnalysis(int index) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + ensureServiceAccountImpersonationAnalysisIsMutable(); + serviceAccountImpersonationAnalysis_.remove(index); + onChanged(); + } else { + serviceAccountImpersonationAnalysisBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + getServiceAccountImpersonationAnalysisBuilder(int index) { + return getServiceAccountImpersonationAnalysisFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder + getServiceAccountImpersonationAnalysisOrBuilder(int index) { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + return serviceAccountImpersonationAnalysis_.get(index); + } else { + return serviceAccountImpersonationAnalysisBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + getServiceAccountImpersonationAnalysisOrBuilderList() { + if (serviceAccountImpersonationAnalysisBuilder_ != null) { + return serviceAccountImpersonationAnalysisBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); + } + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + addServiceAccountImpersonationAnalysisBuilder() { + return getServiceAccountImpersonationAnalysisFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .getDefaultInstance()); + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + addServiceAccountImpersonationAnalysisBuilder(int index) { + return getServiceAccountImpersonationAnalysisFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .getDefaultInstance()); + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+     * is enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public java.util.List< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder> + getServiceAccountImpersonationAnalysisBuilderList() { + return getServiceAccountImpersonationAnalysisFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + getServiceAccountImpersonationAnalysisFieldBuilder() { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + serviceAccountImpersonationAnalysisBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder>( + serviceAccountImpersonationAnalysis_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + serviceAccountImpersonationAnalysis_ = null; + } + return serviceAccountImpersonationAnalysisBuilder_; + } + + private boolean fullyExplored_; + /** + * + * + *
+     * Represents whether all entries in the [main_analysis][main_analysis] and
+     * [service_account_impersonation_analysis][] have been fully explored to
+     * answer the query in the request.
+     * 
+ * + * bool fully_explored = 3; + * + * @return The fullyExplored. + */ + @java.lang.Override + public boolean getFullyExplored() { + return fullyExplored_; + } + /** + * + * + *
+     * Represents whether all entries in the [main_analysis][main_analysis] and
+     * [service_account_impersonation_analysis][] have been fully explored to
+     * answer the query in the request.
+     * 
+ * + * bool fully_explored = 3; + * + * @param value The fullyExplored to set. + * @return This builder for chaining. + */ + public Builder setFullyExplored(boolean value) { + + fullyExplored_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents whether all entries in the [main_analysis][main_analysis] and
+     * [service_account_impersonation_analysis][] have been fully explored to
+     * answer the query in the request.
+     * 
+ * + * bool fully_explored = 3; + * + * @return This builder for chaining. + */ + public Builder clearFullyExplored() { + + fullyExplored_ = false; + 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.AnalyzeIamPolicyResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyResponse) + private static final com.google.cloud.asset.v1.AnalyzeIamPolicyResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyResponse(); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeIamPolicyResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalyzeIamPolicyResponse(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.AnalyzeIamPolicyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponseOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponseOrBuilder.java new file mode 100644 index 000000000..fa70726f5 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * 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/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface AnalyzeIamPolicyResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The main analysis that matches the original request.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + * + * @return Whether the mainAnalysis field is set. + */ + boolean hasMainAnalysis(); + /** + * + * + *
+   * The main analysis that matches the original request.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + * + * @return The mainAnalysis. + */ + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getMainAnalysis(); + /** + * + * + *
+   * The main analysis that matches the original request.
+   * 
+ * + * .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder + getMainAnalysisOrBuilder(); + + /** + * + * + *
+   * The service account impersonation analysis if
+   * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+   * is enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + java.util.List + getServiceAccountImpersonationAnalysisList(); + /** + * + * + *
+   * The service account impersonation analysis if
+   * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+   * is enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + getServiceAccountImpersonationAnalysis(int index); + /** + * + * + *
+   * The service account impersonation analysis if
+   * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+   * is enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + int getServiceAccountImpersonationAnalysisCount(); + /** + * + * + *
+   * The service account impersonation analysis if
+   * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+   * is enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + java.util.List< + ? extends com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + getServiceAccountImpersonationAnalysisOrBuilderList(); + /** + * + * + *
+   * The service account impersonation analysis if
+   * [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation]
+   * is enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + com.google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder + getServiceAccountImpersonationAnalysisOrBuilder(int index); + + /** + * + * + *
+   * Represents whether all entries in the [main_analysis][main_analysis] and
+   * [service_account_impersonation_analysis][] have been fully explored to
+   * answer the query in the request.
+   * 
+ * + * bool fully_explored = 3; + * + * @return The fullyExplored. + */ + boolean getFullyExplored(); +} 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 f7d5abcce..567bca780 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 @@ -67,6 +67,38 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_asset_v1_IamPolicySearchResult_Explanation_MatchedPermissionsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -84,66 +116,94 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ccess_level.proto\032;google/identity/acces" + "scontextmanager/v1/access_policy.proto\032?" + "google/identity/accesscontextmanager/v1/" - + "service_perimeter.proto\032\031google/protobuf" - + "/any.proto\032\034google/protobuf/struct.proto" - + "\032\037google/protobuf/timestamp.proto\032\025googl" - + "e/rpc/code.proto\032\034google/api/annotations" - + ".proto\"\365\002\n\rTemporalAsset\0221\n\006window\030\001 \001(\013" - + "2!.google.cloud.asset.v1.TimeWindow\022\017\n\007d" - + "eleted\030\002 \001(\010\022+\n\005asset\030\003 \001(\0132\034.google.clo" - + "ud.asset.v1.Asset\022O\n\021prior_asset_state\030\004" - + " \001(\01624.google.cloud.asset.v1.TemporalAss" - + "et.PriorAssetState\0221\n\013prior_asset\030\005 \001(\0132" - + "\034.google.cloud.asset.v1.Asset\"o\n\017PriorAs" - + "setState\022!\n\035PRIOR_ASSET_STATE_UNSPECIFIE" - + "D\020\000\022\013\n\007PRESENT\020\001\022\013\n\007INVALID\020\002\022\022\n\016DOES_NO" - + "T_EXIST\020\003\022\013\n\007DELETED\020\004\"j\n\nTimeWindow\022.\n\n" - + "start_time\030\001 \001(\0132\032.google.protobuf.Times" - + "tamp\022,\n\010end_time\030\002 \001(\0132\032.google.protobuf" - + ".Timestamp\"\272\004\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\nia" - + "m_policy\030\004 \001(\0132\025.google.iam.v1.Policy\0225\n" - + "\norg_policy\030\006 \003(\0132!.google.cloud.orgpoli" - + "cy.v1.Policy\022N\n\raccess_policy\030\007 \001(\01325.go" - + "ogle.identity.accesscontextmanager.v1.Ac" - + "cessPolicyH\000\022L\n\014access_level\030\010 \001(\01324.goo" - + "gle.identity.accesscontextmanager.v1.Acc" - + "essLevelH\000\022V\n\021service_perimeter\030\t \001(\01329." - + "google.identity.accesscontextmanager.v1." - + "ServicePerimeterH\000\022\021\n\tancestors\030\n \003(\t:\'\352" - + "A$\n\037cloudasset.googleapis.com/Asset\022\001*B\027" - + "\n\025access_context_policy\"\262\001\n\010Resource\022\017\n\007" - + "version\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\014resourc" - + "e_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\010location\030\010" - + " \001(\t\"\314\002\n\024ResourceSearchResult\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\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.ResourceSearchResu" - + "lt.LabelsEntry\022\024\n\014network_tags\030\010 \003(\t\0226\n\025" - + "additional_attributes\030\t \001(\0132\027.google.pro" - + "tobuf.Struct\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t" - + "\022\r\n\005value\030\002 \001(\t:\0028\001\"\324\003\n\025IamPolicySearchR" - + "esult\022\020\n\010resource\030\001 \001(\t\022\017\n\007project\030\002 \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\001B\230\001\n\031com.google.cloud.asset.v1" - + "B\nAssetProtoP\001Z:google.golang.org/genpro" - + "to/googleapis/cloud/asset/v1;asset\370\001\001\252\002\025" - + "Google.Cloud.Asset.V1\312\002\025Google\\Cloud\\Ass" - + "et\\V1b\006proto3" + + "service_perimeter.proto\032\034google/protobuf" + + "/struct.proto\032\037google/protobuf/timestamp" + + ".proto\032\025google/rpc/code.proto\"\365\002\n\rTempor" + + "alAsset\0221\n\006window\030\001 \001(\0132!.google.cloud.a" + + "sset.v1.TimeWindow\022\017\n\007deleted\030\002 \001(\010\022+\n\005a" + + "sset\030\003 \001(\0132\034.google.cloud.asset.v1.Asset" + + "\022O\n\021prior_asset_state\030\004 \001(\01624.google.clo" + + "ud.asset.v1.TemporalAsset.PriorAssetStat" + + "e\0221\n\013prior_asset\030\005 \001(\0132\034.google.cloud.as" + + "set.v1.Asset\"o\n\017PriorAssetState\022!\n\035PRIOR" + + "_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\007DELE" + + "TED\020\004\"j\n\nTimeWindow\022.\n\nstart_time\030\001 \001(\0132" + + "\032.google.protobuf.Timestamp\022,\n\010end_time\030" + + "\002 \001(\0132\032.google.protobuf.Timestamp\"\272\004\n\005As" + + "set\022/\n\013update_time\030\013 \001(\0132\032.google.protob" + + "uf.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\niam_policy\030\004 \001(\0132\025." + + "google.iam.v1.Policy\0225\n\norg_policy\030\006 \003(\013" + + "2!.google.cloud.orgpolicy.v1.Policy\022N\n\ra" + + "ccess_policy\030\007 \001(\01325.google.identity.acc" + + "esscontextmanager.v1.AccessPolicyH\000\022L\n\014a" + + "ccess_level\030\010 \001(\01324.google.identity.acce" + + "sscontextmanager.v1.AccessLevelH\000\022V\n\021ser" + + "vice_perimeter\030\t \001(\01329.google.identity.a" + + "ccesscontextmanager.v1.ServicePerimeterH" + + "\000\022\021\n\tancestors\030\n \003(\t:\'\352A$\n\037cloudasset.go" + + "ogleapis.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\026" + + "discovery_document_uri\030\002 \001(\t\022\026\n\016discover" + + "y_name\030\003 \001(\t\022\024\n\014resource_url\030\004 \001(\t\022\016\n\006pa" + + "rent\030\005 \001(\t\022%\n\004data\030\006 \001(\0132\027.google.protob" + + "uf.Struct\022\020\n\010location\030\010 \001(\t\"\314\002\n\024Resource" + + "SearchResult\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\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.asse" + + "t.v1.ResourceSearchResult.LabelsEntry\022\024\n" + + "\014network_tags\030\010 \003(\t\0226\n\025additional_attrib" + + "utes\030\t \001(\0132\027.google.protobuf.Struct\032-\n\013L" + + "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001\"\324\003\n\025IamPolicySearchResult\022\020\n\010resource" + + "\030\001 \001(\t\022\017\n\007project\030\002 \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.IamPolicySea" + + "rchResult.Explanation\032\241\002\n\013Explanation\022m\n" + + "\023matched_permissions\030\001 \003(\0132P.google.clou" + + "d.asset.v1.IamPolicySearchResult.Explana" + + "tion.MatchedPermissionsEntry\032\"\n\013Permissi" + + "ons\022\023\n\013permissions\030\001 \003(\t\032\177\n\027MatchedPermi" + + "ssionsEntry\022\013\n\003key\030\001 \001(\t\022S\n\005value\030\002 \001(\0132" + + "D.google.cloud.asset.v1.IamPolicySearchR" + + "esult.Explanation.Permissions:\0028\001\"G\n\026Iam" + + "PolicyAnalysisState\022\036\n\004code\030\001 \001(\0162\020.goog" + + "le.rpc.Code\022\r\n\005cause\030\002 \001(\t\"\341\010\n\027IamPolicy" + + "AnalysisResult\022#\n\033attached_resource_full" + + "_name\030\001 \001(\t\022+\n\013iam_binding\030\002 \001(\0132\026.googl" + + "e.iam.v1.Binding\022^\n\024access_control_lists" + + "\030\003 \003(\0132@.google.cloud.asset.v1.IamPolicy" + + "AnalysisResult.AccessControlList\022R\n\riden" + + "tity_list\030\004 \001(\0132;.google.cloud.asset.v1." + + "IamPolicyAnalysisResult.IdentityList\022\026\n\016" + + "fully_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.asset.v1.IamPolicyAn" + + "alysisState\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.asset.v1.IamPolicyAn" + + "alysisStateB\016\n\014oneof_access\032_\n\010Identity\022" + + "\014\n\004name\030\001 \001(\t\022E\n\016analysis_state\030\002 \001(\0132-." + + "google.cloud.asset.v1.IamPolicyAnalysisS" + + "tate\0320\n\004Edge\022\023\n\013source_node\030\001 \001(\t\022\023\n\013tar" + + "get_node\030\002 \001(\t\032\365\001\n\021AccessControlList\022J\n\t" + + "resources\030\001 \003(\01327.google.cloud.asset.v1." + + "IamPolicyAnalysisResult.Resource\022G\n\010acce" + + "sses\030\002 \003(\01325.google.cloud.asset.v1.IamPo" + + "licyAnalysisResult.Access\022K\n\016resource_ed" + + "ges\030\003 \003(\01323.google.cloud.asset.v1.IamPol" + + "icyAnalysisResult.Edge\032\245\001\n\014IdentityList\022" + + "K\n\nidentities\030\001 \003(\01327.google.cloud.asset" + + ".v1.IamPolicyAnalysisResult.Identity\022H\n\013" + + "group_edges\030\002 \003(\01323.google.cloud.asset.v" + + "1.IamPolicyAnalysisResult.EdgeB\230\001\n\031com.g" + + "oogle.cloud.asset.v1B\nAssetProtoP\001Z:goog" + + "le.golang.org/genproto/googleapis/cloud/" + + "asset/v1;asset\370\001\001\252\002\025Google.Cloud.Asset.V" + + "1\312\002\025Google\\Cloud\\Asset\\V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -155,11 +215,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(), com.google.identity.accesscontextmanager.v1.PolicyProto.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); @@ -273,6 +331,86 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor, + new java.lang.String[] { + "Code", "Cause", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor, + new java.lang.String[] { + "AttachedResourceFullName", + "IamBinding", + "AccessControlLists", + "IdentityList", + "FullyExplored", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor, + new java.lang.String[] { + "FullResourceName", "AnalysisState", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor, + new java.lang.String[] { + "Role", "Permission", "AnalysisState", "OneofAccess", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor, + new java.lang.String[] { + "Name", "AnalysisState", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor, + new java.lang.String[] { + "SourceNode", "TargetNode", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor, + new java.lang.String[] { + "Resources", "Accesses", "ResourceEdges", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor, + new java.lang.String[] { + "Identities", "GroupEdges", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ResourceProto.resource); @@ -284,11 +422,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.identity.accesscontextmanager.v1.AccessLevelProto.getDescriptor(); com.google.identity.accesscontextmanager.v1.PolicyProto.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 1a8e4c8d3..8d2678fd1 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 @@ -115,6 +115,62 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_asset_v1_SearchAllIamPoliciesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_Stats_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_Stats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -203,52 +259,139 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\"v\n\034SearchAllIa" + "mPoliciesResponse\022=\n\007results\030\001 \003(\0132,.goo" + "gle.cloud.asset.v1.IamPolicySearchResult" - + "\022\027\n\017next_page_token\030\002 \001(\t*l\n\013ContentType" - + "\022\034\n\030CONTENT_TYPE_UNSPECIFIED\020\000\022\014\n\010RESOUR" - + "CE\020\001\022\016\n\nIAM_POLICY\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\r" - + "ACCESS_POLICY\020\0052\360\013\n\014AssetService\022\336\001\n\014Exp" - + "ortAssets\022*.google.cloud.asset.v1.Export" - + "AssetsRequest\032\035.google.longrunning.Opera" - + "tion\"\202\001\202\323\344\223\002\"\"\035/v1/{parent=*/*}:exportAs" - + "sets:\001*\312AW\n*google.cloud.asset.v1.Export" - + "AssetsResponse\022)google.cloud.asset.v1.Ex" - + "portAssetsRequest\022\262\001\n\025BatchGetAssetsHist" - + "ory\0223.google.cloud.asset.v1.BatchGetAsse" - + "tsHistoryRequest\0324.google.cloud.asset.v1" - + ".BatchGetAssetsHistoryResponse\".\202\323\344\223\002(\022&" - + "/v1/{parent=*/*}:batchGetAssetsHistory\022\177" - + "\n\nCreateFeed\022(.google.cloud.asset.v1.Cre" - + "ateFeedRequest\032\033.google.cloud.asset.v1.F" - + "eed\"*\202\323\344\223\002\033\"\026/v1/{parent=*/*}/feeds:\001*\332A" - + "\006parent\022t\n\007GetFeed\022%.google.cloud.asset." - + "v1.GetFeedRequest\032\033.google.cloud.asset.v" - + "1.Feed\"%\202\323\344\223\002\030\022\026/v1/{name=*/*/feeds/*}\332A" - + "\004name\022\207\001\n\tListFeeds\022\'.google.cloud.asset" - + ".v1.ListFeedsRequest\032(.google.cloud.asse" - + "t.v1.ListFeedsResponse\"\'\202\323\344\223\002\030\022\026/v1/{par" - + "ent=*/*}/feeds\332A\006parent\022\202\001\n\nUpdateFeed\022(" - + ".google.cloud.asset.v1.UpdateFeedRequest" - + "\032\033.google.cloud.asset.v1.Feed\"-\202\323\344\223\002 2\033/" - + "v1/{feed.name=*/*/feeds/*}:\001*\332A\004feed\022u\n\n" - + "DeleteFeed\022(.google.cloud.asset.v1.Delet" - + "eFeedRequest\032\026.google.protobuf.Empty\"%\202\323" - + "\344\223\002\030*\026/v1/{name=*/*/feeds/*}\332A\004name\022\277\001\n\022" - + "SearchAllResources\0220.google.cloud.asset." - + "v1.SearchAllResourcesRequest\0321.google.cl" - + "oud.asset.v1.SearchAllResourcesResponse\"" - + "D\202\323\344\223\002$\022\"/v1/{scope=*/*}:searchAllResour" - + "ces\332A\027scope,query,asset_types\022\273\001\n\024Search" - + "AllIamPolicies\0222.google.cloud.asset.v1.S" - + "earchAllIamPoliciesRequest\0323.google.clou" - + "d.asset.v1.SearchAllIamPoliciesResponse\"" - + ":\202\323\344\223\002&\022$/v1/{scope=*/*}:searchAllIamPol" - + "icies\332A\013scope,query\032M\312A\031cloudasset.googl" - + "eapis.com\322A.https://www.googleapis.com/a" - + "uth/cloud-platformB\234\001\n\031com.google.cloud." - + "asset.v1B\021AssetServiceProtoP\001Z:google.go" - + "lang.org/genproto/googleapis/cloud/asset" - + "/v1;asset\252\002\025Google.Cloud.Asset.V1\312\002\025Goog" - + "le\\Cloud\\Asset\\V1b\006proto3" + + "\022\027\n\017next_page_token\030\002 \001(\t\"\333\006\n\026IamPolicyA" + + "nalysisQuery\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022^\n\021reso" + + "urce_selector\030\002 \001(\0132>.google.cloud.asset" + + ".v1.IamPolicyAnalysisQuery.ResourceSelec" + + "torB\003\340A\001\022^\n\021identity_selector\030\003 \001(\0132>.go" + + "ogle.cloud.asset.v1.IamPolicyAnalysisQue" + + "ry.IdentitySelectorB\003\340A\001\022Z\n\017access_selec" + + "tor\030\004 \001(\0132<.google.cloud.asset.v1.IamPol" + + "icyAnalysisQuery.AccessSelectorB\003\340A\001\022K\n\007" + + "options\030\005 \001(\01325.google.cloud.asset.v1.Ia" + + "mPolicyAnalysisQuery.OptionsB\003\340A\001\0323\n\020Res" + + "ourceSelector\022\037\n\022full_resource_name\030\001 \001(" + + "\tB\003\340A\002\032)\n\020IdentitySelector\022\025\n\010identity\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\243\002\n\007Op" + + "tions\022\032\n\rexpand_groups\030\001 \001(\010B\003\340A\001\022\031\n\014exp" + + "and_roles\030\002 \001(\010B\003\340A\001\022\035\n\020expand_resources" + + "\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_impersonatio" + + "n\030\006 \001(\010B\003\340A\001\022\"\n\025max_fanouts_per_group\030\007 " + + "\001(\005B\003\340A\001\022%\n\030max_fanouts_per_resource\030\010 \001" + + "(\005B\003\340A\001\"\240\001\n\027AnalyzeIamPolicyRequest\022J\n\016a" + + "nalysis_query\030\001 \001(\0132-.google.cloud.asset" + + ".v1.IamPolicyAnalysisQueryB\003\340A\002\0229\n\021execu" + + "tion_timeout\030\002 \001(\0132\031.google.protobuf.Dur" + + "ationB\003\340A\001\"\201\010\n\030AnalyzeIamPolicyResponse\022" + + "X\n\rmain_analysis\030\001 \001(\0132A.google.cloud.as" + + "set.v1.AnalyzeIamPolicyResponse.IamPolic" + + "yAnalysis\022q\n&service_account_impersonati" + + "on_analysis\030\002 \003(\0132A.google.cloud.asset.v" + + "1.AnalyzeIamPolicyResponse.IamPolicyAnal" + + "ysis\022\026\n\016fully_explored\030\003 \001(\010\032\377\005\n\021IamPoli" + + "cyAnalysis\022E\n\016analysis_query\030\001 \001(\0132-.goo" + + "gle.cloud.asset.v1.IamPolicyAnalysisQuer" + + "y\022H\n\020analysis_results\030\002 \003(\0132..google.clo" + + "ud.asset.v1.IamPolicyAnalysisResult\022\026\n\016f" + + "ully_explored\030\003 \001(\010\022V\n\005stats\030\004 \003(\0132G.goo" + + "gle.cloud.asset.v1.AnalyzeIamPolicyRespo" + + "nse.IamPolicyAnalysis.Stats\022J\n\023non_criti" + + "cal_errors\030\005 \003(\0132-.google.cloud.asset.v1" + + ".IamPolicyAnalysisState\032\234\003\n\005Stats\022c\n\tnod" + + "e_type\030\001 \001(\0162P.google.cloud.asset.v1.Ana" + + "lyzeIamPolicyResponse.IamPolicyAnalysis." + + "Stats.NodeType\022\024\n\014node_subtype\030\002 \001(\t\022\035\n\025" + + "discovered_node_count\030\003 \001(\005\022\032\n\022matched_n" + + "ode_count\030\004 \001(\005\022\033\n\023explored_node_count\030\005" + + " \001(\005\022\031\n\021capped_node_count\030\006 \001(\005\022#\n\033permi" + + "sion_denied_node_count\030\007 \001(\005\022$\n\034executio" + + "n_timeout_node_count\030\010 \001(\005\"Z\n\010NodeType\022\031" + + "\n\025NODE_TYPE_UNSPECIFIED\020\000\022\013\n\007BINDING\020\001\022\014" + + "\n\010IDENTITY\020\002\022\014\n\010RESOURCE\020\003\022\n\n\006ACCESS\020\004\"\277" + + "\005\n\035IamPolicyAnalysisOutputConfig\022^\n\017gcs_" + + "destination\030\001 \001(\0132C.google.cloud.asset.v" + + "1.IamPolicyAnalysisOutputConfig.GcsDesti" + + "nationH\000\022h\n\024bigquery_destination\030\002 \001(\0132H" + + ".google.cloud.asset.v1.IamPolicyAnalysis" + + "OutputConfig.BigQueryDestinationH\000\032\"\n\016Gc" + + "sDestination\022\020\n\003uri\030\001 \001(\tB\003\340A\002\032\240\003\n\023BigQu" + + "eryDestination\022\024\n\007dataset\030\001 \001(\tB\003\340A\002\022\031\n\014" + + "table_prefix\030\002 \001(\tB\003\340A\002\022l\n\rpartition_key" + + "\030\003 \001(\0162U.google.cloud.asset.v1.IamPolicy" + + "AnalysisOutputConfig.BigQueryDestination" + + ".PartitionKey\022f\n\nwrite_mode\030\004 \001(\0162R.goog" + + "le.cloud.asset.v1.IamPolicyAnalysisOutpu" + + "tConfig.BigQueryDestination.WriteMode\"?\n" + + "\014PartitionKey\022\035\n\031PARTITION_KEY_UNSPECIFI" + + "ED\020\000\022\020\n\014REQUEST_TIME\020\001\"A\n\tWriteMode\022\032\n\026W" + + "RITE_MODE_UNSPECIFIED\020\000\022\t\n\005ABORT\020\001\022\r\n\tOV" + + "ERWRITE\020\002B\r\n\013destination\"\276\001\n\036ExportIamPo" + + "licyAnalysisRequest\022J\n\016analysis_query\030\001 " + + "\001(\0132-.google.cloud.asset.v1.IamPolicyAna" + + "lysisQueryB\003\340A\002\022P\n\routput_config\030\002 \001(\01324" + + ".google.cloud.asset.v1.IamPolicyAnalysis" + + "OutputConfigB\003\340A\002\"!\n\037ExportIamPolicyAnal" + + "ysisResponse*l\n\013ContentType\022\034\n\030CONTENT_T" + + "YPE_UNSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n\nIAM_P" + + "OLICY\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_POLICY" + + "\020\0052\305\017\n\014AssetService\022\336\001\n\014ExportAssets\022*.g" + + "oogle.cloud.asset.v1.ExportAssetsRequest" + + "\032\035.google.longrunning.Operation\"\202\001\202\323\344\223\002\"" + + "\"\035/v1/{parent=*/*}:exportAssets:\001*\312AW\n*g" + + "oogle.cloud.asset.v1.ExportAssetsRespons" + + "e\022)google.cloud.asset.v1.ExportAssetsReq" + + "uest\022\262\001\n\025BatchGetAssetsHistory\0223.google." + + "cloud.asset.v1.BatchGetAssetsHistoryRequ" + + "est\0324.google.cloud.asset.v1.BatchGetAsse" + + "tsHistoryResponse\".\202\323\344\223\002(\022&/v1/{parent=*" + + "/*}:batchGetAssetsHistory\022\177\n\nCreateFeed\022" + + "(.google.cloud.asset.v1.CreateFeedReques" + + "t\032\033.google.cloud.asset.v1.Feed\"*\202\323\344\223\002\033\"\026" + + "/v1/{parent=*/*}/feeds:\001*\332A\006parent\022t\n\007Ge" + + "tFeed\022%.google.cloud.asset.v1.GetFeedReq" + + "uest\032\033.google.cloud.asset.v1.Feed\"%\202\323\344\223\002" + + "\030\022\026/v1/{name=*/*/feeds/*}\332A\004name\022\207\001\n\tLis" + + "tFeeds\022\'.google.cloud.asset.v1.ListFeeds" + + "Request\032(.google.cloud.asset.v1.ListFeed" + + "sResponse\"\'\202\323\344\223\002\030\022\026/v1/{parent=*/*}/feed" + + "s\332A\006parent\022\202\001\n\nUpdateFeed\022(.google.cloud" + + ".asset.v1.UpdateFeedRequest\032\033.google.clo" + + "ud.asset.v1.Feed\"-\202\323\344\223\002 2\033/v1/{feed.name" + + "=*/*/feeds/*}:\001*\332A\004feed\022u\n\nDeleteFeed\022(." + + "google.cloud.asset.v1.DeleteFeedRequest\032" + + "\026.google.protobuf.Empty\"%\202\323\344\223\002\030*\026/v1/{na" + + "me=*/*/feeds/*}\332A\004name\022\277\001\n\022SearchAllReso" + + "urces\0220.google.cloud.asset.v1.SearchAllR" + + "esourcesRequest\0321.google.cloud.asset.v1." + + "SearchAllResourcesResponse\"D\202\323\344\223\002$\022\"/v1/" + + "{scope=*/*}:searchAllResources\332A\027scope,q" + + "uery,asset_types\022\273\001\n\024SearchAllIamPolicie" + + "s\0222.google.cloud.asset.v1.SearchAllIamPo" + + "liciesRequest\0323.google.cloud.asset.v1.Se" + + "archAllIamPoliciesResponse\":\202\323\344\223\002&\022$/v1/" + + "{scope=*/*}:searchAllIamPolicies\332A\013scope" + + ",query\022\254\001\n\020AnalyzeIamPolicy\022..google.clo" + + "ud.asset.v1.AnalyzeIamPolicyRequest\032/.go" + + "ogle.cloud.asset.v1.AnalyzeIamPolicyResp" + + "onse\"7\202\323\344\223\0021\022//v1/{analysis_query.scope=" + + "*/*}:analyzeIamPolicy\022\243\002\n\027ExportIamPolic" + + "yAnalysis\0225.google.cloud.asset.v1.Export" + + "IamPolicyAnalysisRequest\032\035.google.longru" + + "nning.Operation\"\261\001\202\323\344\223\002;\"6/v1/{analysis_" + + "query.scope=*/*}:exportIamPolicyAnalysis" + + ":\001*\312Am\n5google.cloud.asset.v1.ExportIamP" + + "olicyAnalysisResponse\0224google.cloud.asse" + + "t.v1.ExportIamPolicyAnalysisRequest\032M\312A\031" + + "cloudasset.googleapis.com\322A.https://www." + + "googleapis.com/auth/cloud-platformB\234\001\n\031c" + + "om.google.cloud.asset.v1B\021AssetServicePr" + + "otoP\001Z:google.golang.org/genproto/google" + + "apis/cloud/asset/v1;asset\252\002\025Google.Cloud" + + ".Asset.V1\312\002\025Google\\Cloud\\Asset\\V1b\006proto" + + "3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -442,6 +585,146 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Results", "NextPageToken", }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor, + new java.lang.String[] { + "Scope", "ResourceSelector", "IdentitySelector", "AccessSelector", "Options", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor, + new java.lang.String[] { + "FullResourceName", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor, + new java.lang.String[] { + "Identity", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor, + new java.lang.String[] { + "Roles", "Permissions", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor, + new java.lang.String[] { + "ExpandGroups", + "ExpandRoles", + "ExpandResources", + "OutputResourceEdges", + "OutputGroupEdges", + "AnalyzeServiceAccountImpersonation", + "MaxFanoutsPerGroup", + "MaxFanoutsPerResource", + }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor, + new java.lang.String[] { + "AnalysisQuery", "ExecutionTimeout", + }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor, + new java.lang.String[] { + "MainAnalysis", "ServiceAccountImpersonationAnalysis", "FullyExplored", + }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor = + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor, + new java.lang.String[] { + "AnalysisQuery", "AnalysisResults", "FullyExplored", "Stats", "NonCriticalErrors", + }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_Stats_descriptor = + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_Stats_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_Stats_descriptor, + new java.lang.String[] { + "NodeType", + "NodeSubtype", + "DiscoveredNodeCount", + "MatchedNodeCount", + "ExploredNodeCount", + "CappedNodeCount", + "PermisionDeniedNodeCount", + "ExecutionTimeoutNodeCount", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor, + new java.lang.String[] { + "GcsDestination", "BigqueryDestination", "Destination", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor, + new java.lang.String[] { + "Uri", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor = + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor, + new java.lang.String[] { + "Dataset", "TablePrefix", "PartitionKey", "WriteMode", + }); + internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisRequest_descriptor, + new java.lang.String[] { + "AnalysisQuery", "OutputConfig", + }); + internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisResponse_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisResponse_descriptor, + new java.lang.String[] {}); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisRequest.java new file mode 100644 index 000000000..0e5b04b70 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisRequest.java @@ -0,0 +1,1067 @@ +/* + * 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/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
+ * A request message for [AssetService.ExportIamPolicyAnalysis][].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ExportIamPolicyAnalysisRequest} + */ +public final class ExportIamPolicyAnalysisRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ExportIamPolicyAnalysisRequest) + ExportIamPolicyAnalysisRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportIamPolicyAnalysisRequest.newBuilder() to construct. + private ExportIamPolicyAnalysisRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportIamPolicyAnalysisRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportIamPolicyAnalysisRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportIamPolicyAnalysisRequest( + 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: + { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder subBuilder = null; + if (analysisQuery_ != null) { + subBuilder = analysisQuery_.toBuilder(); + } + analysisQuery_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisQuery_); + analysisQuery_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder subBuilder = null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(outputConfig_); + outputConfig_ = subBuilder.buildPartial(); + } + + 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.AssetServiceProto + .internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest.class, + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest.Builder.class); + } + + public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + /** + * + * + *
+   * The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the analysisQuery field is set. + */ + @java.lang.Override + public boolean hasAnalysisQuery() { + return analysisQuery_ != null; + } + /** + * + * + *
+   * The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysisQuery. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { + return analysisQuery_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } + /** + * + * + *
+   * The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { + return getAnalysisQuery(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig outputConfig_; + /** + * + * + *
+   * Output configuration indicating where the results will be output to.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + @java.lang.Override + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + * + * + *
+   * Output configuration indicating where the results will be output to.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getOutputConfig() { + return outputConfig_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance() + : outputConfig_; + } + /** + * + * + *
+   * Output configuration indicating where the results will be output to.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder + getOutputConfigOrBuilder() { + return getOutputConfig(); + } + + 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 (analysisQuery_ != null) { + output.writeMessage(1, getAnalysisQuery()); + } + if (outputConfig_ != null) { + output.writeMessage(2, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (analysisQuery_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAnalysisQuery()); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOutputConfig()); + } + 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.ExportIamPolicyAnalysisRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest other = + (com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest) obj; + + if (hasAnalysisQuery() != other.hasAnalysisQuery()) return false; + if (hasAnalysisQuery()) { + if (!getAnalysisQuery().equals(other.getAnalysisQuery())) return false; + } + if (hasOutputConfig() != other.hasOutputConfig()) return false; + if (hasOutputConfig()) { + if (!getOutputConfig().equals(other.getOutputConfig())) 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 (hasAnalysisQuery()) { + hash = (37 * hash) + ANALYSIS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisQuery().hashCode(); + } + if (hasOutputConfig()) { + hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOutputConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest 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.ExportIamPolicyAnalysisRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest 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.ExportIamPolicyAnalysisRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest 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.ExportIamPolicyAnalysisRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest 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.ExportIamPolicyAnalysisRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest 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.ExportIamPolicyAnalysisRequest 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.ExportIamPolicyAnalysisRequest 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.ExportIamPolicyAnalysisRequest 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; + } + /** + * + * + *
+   * A request message for [AssetService.ExportIamPolicyAnalysis][].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ExportIamPolicyAnalysisRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ExportIamPolicyAnalysisRequest) + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest.class, + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest.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(); + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest build() { + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest buildPartial() { + com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest result = + new com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest(this); + if (analysisQueryBuilder_ == null) { + result.analysisQuery_ = analysisQuery_; + } else { + result.analysisQuery_ = analysisQueryBuilder_.build(); + } + if (outputConfigBuilder_ == null) { + result.outputConfig_ = outputConfig_; + } else { + result.outputConfig_ = outputConfigBuilder_.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.ExportIamPolicyAnalysisRequest) { + return mergeFrom((com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest other) { + if (other == com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest.getDefaultInstance()) + return this; + if (other.hasAnalysisQuery()) { + mergeAnalysisQuery(other.getAnalysisQuery()); + } + if (other.hasOutputConfig()) { + mergeOutputConfig(other.getOutputConfig()); + } + 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.ExportIamPolicyAnalysisRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> + analysisQueryBuilder_; + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the analysisQuery field is set. + */ + public boolean hasAnalysisQuery() { + return analysisQueryBuilder_ != null || analysisQuery_ != null; + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysisQuery. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + return analysisQuery_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } else { + return analysisQueryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisQuery_ = value; + onChanged(); + } else { + analysisQueryBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnalysisQuery( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder builderForValue) { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = builderForValue.build(); + onChanged(); + } else { + analysisQueryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAnalysisQuery(com.google.cloud.asset.v1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (analysisQuery_ != null) { + analysisQuery_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.newBuilder(analysisQuery_) + .mergeFrom(value) + .buildPartial(); + } else { + analysisQuery_ = value; + } + onChanged(); + } else { + analysisQueryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + onChanged(); + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder getAnalysisQueryBuilder() { + + onChanged(); + return getAnalysisQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder() { + if (analysisQueryBuilder_ != null) { + return analysisQueryBuilder_.getMessageOrBuilder(); + } else { + return analysisQuery_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } + } + /** + * + * + *
+     * The request query.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder> + getAnalysisQueryFieldBuilder() { + if (analysisQueryBuilder_ == null) { + analysisQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder>( + getAnalysisQuery(), getParentForChildren(), isClean()); + analysisQuery_ = null; + } + return analysisQueryBuilder_; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder> + outputConfigBuilder_; + /** + * + * + *
+     * Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + * + * + *
+     * Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance() + : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOutputConfig(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOutputConfig( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOutputConfig( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.newBuilder(outputConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder + getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder + getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance() + : outputConfig_; + } + } + /** + * + * + *
+     * Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder>( + getOutputConfig(), getParentForChildren(), isClean()); + outputConfig_ = null; + } + return outputConfigBuilder_; + } + + @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.ExportIamPolicyAnalysisRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ExportIamPolicyAnalysisRequest) + private static final com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest(); + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportIamPolicyAnalysisRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportIamPolicyAnalysisRequest(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.ExportIamPolicyAnalysisRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisRequestOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisRequestOrBuilder.java new file mode 100644 index 000000000..97b3e4033 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * 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/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface ExportIamPolicyAnalysisRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ExportIamPolicyAnalysisRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the analysisQuery field is set. + */ + boolean hasAnalysisQuery(); + /** + * + * + *
+   * The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysisQuery. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery getAnalysisQuery(); + /** + * + * + *
+   * The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); + + /** + * + * + *
+   * Output configuration indicating where the results will be output to.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + * + * + *
+   * Output configuration indicating where the results will be output to.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getOutputConfig(); + /** + * + * + *
+   * Output configuration indicating where the results will be output to.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig output_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder getOutputConfigOrBuilder(); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisResponse.java new file mode 100644 index 000000000..97e27346c --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisResponse.java @@ -0,0 +1,458 @@ +/* + * 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/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
+ * The export IAM policy analysis response.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ExportIamPolicyAnalysisResponse} + */ +public final class ExportIamPolicyAnalysisResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.ExportIamPolicyAnalysisResponse) + ExportIamPolicyAnalysisResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportIamPolicyAnalysisResponse.newBuilder() to construct. + private ExportIamPolicyAnalysisResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportIamPolicyAnalysisResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportIamPolicyAnalysisResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportIamPolicyAnalysisResponse( + 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; + 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.AssetServiceProto + .internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse.class, + com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse.Builder.class); + } + + 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 { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + 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.ExportIamPolicyAnalysisResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse other = + (com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse) obj; + + 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse 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.ExportIamPolicyAnalysisResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse 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.ExportIamPolicyAnalysisResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse 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.ExportIamPolicyAnalysisResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse 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.ExportIamPolicyAnalysisResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse 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.ExportIamPolicyAnalysisResponse 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.ExportIamPolicyAnalysisResponse 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.ExportIamPolicyAnalysisResponse 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 export IAM policy analysis response.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.ExportIamPolicyAnalysisResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.ExportIamPolicyAnalysisResponse) + com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse.class, + com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse.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(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_ExportIamPolicyAnalysisResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse build() { + com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse buildPartial() { + com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse result = + new com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse(this); + 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.ExportIamPolicyAnalysisResponse) { + return mergeFrom((com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse other) { + if (other == com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse.getDefaultInstance()) + return this; + 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.ExportIamPolicyAnalysisResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + 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.ExportIamPolicyAnalysisResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.ExportIamPolicyAnalysisResponse) + private static final com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse(); + } + + public static com.google.cloud.asset.v1.ExportIamPolicyAnalysisResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportIamPolicyAnalysisResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportIamPolicyAnalysisResponse(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.ExportIamPolicyAnalysisResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisResponseOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisResponseOrBuilder.java new file mode 100644 index 000000000..477ff342b --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * 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/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface ExportIamPolicyAnalysisResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.ExportIamPolicyAnalysisResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java new file mode 100644 index 000000000..627da88c5 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java @@ -0,0 +1,3666 @@ +/* + * 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/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
+ * Output configuration for export IAM policy analysis destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig} + */ +public final class IamPolicyAnalysisOutputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) + IamPolicyAnalysisOutputConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use IamPolicyAnalysisOutputConfig.newBuilder() to construct. + private IamPolicyAnalysisOutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IamPolicyAnalysisOutputConfig() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IamPolicyAnalysisOutputConfig(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IamPolicyAnalysisOutputConfig( + 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: + { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder + subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = + ((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_) + .toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + break; + } + case 18: + { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder + subBuilder = null; + if (destinationCase_ == 2) { + subBuilder = + ((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + destination_) + .toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 2; + 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.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.class, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder.class); + } + + public interface GcsDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + } + /** + * + * + *
+   * A Cloud Storage location.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination} + */ + public static final class GcsDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + GcsDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use GcsDestination.newBuilder() to construct. + private GcsDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GcsDestination() { + uri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GcsDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GcsDestination( + 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(); + + uri_ = 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.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.class, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder.class); + } + + public static final int URI_FIELD_NUMBER = 1; + private volatile java.lang.Object uri_; + /** + * + * + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + @java.lang.Override + public java.lang.String getUri() { + java.lang.Object ref = uri_; + 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(); + uri_ = s; + return s; + } + } + /** + * + * + *
+     * The uri of the Cloud Storage object. It's the same uri that is used by
+     * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = 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 (!getUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_); + } + 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.IamPolicyAnalysisOutputConfig.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination other = + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) obj; + + if (!getUri().equals(other.getUri())) 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) + URI_FIELD_NUMBER; + hash = (53 * hash) + getUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination 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.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination 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.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination 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.IamPolicyAnalysisOutputConfig.GcsDestination parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination 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.IamPolicyAnalysisOutputConfig.GcsDestination + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + 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.IamPolicyAnalysisOutputConfig.GcsDestination 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.IamPolicyAnalysisOutputConfig.GcsDestination 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.IamPolicyAnalysisOutputConfig.GcsDestination 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; + } + /** + * + * + *
+     * A Cloud Storage location.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.class, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder + .class); + } + + // Construct using + // com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.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(); + uri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination build() { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination result = + new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination(this); + result.uri_ = uri_; + 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.IamPolicyAnalysisOutputConfig.GcsDestination) { + return mergeFrom( + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination other) { + if (other + == com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance()) return this; + if (!other.getUri().isEmpty()) { + uri_ = other.uri_; + 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.IamPolicyAnalysisOutputConfig.GcsDestination parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object uri_ = ""; + /** + * + * + *
+       * The uri of the Cloud Storage object. It's the same uri that is used by
+       * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The uri of the Cloud Storage object. It's the same uri that is used by
+       * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The uri of the Cloud Storage object. It's the same uri that is used by
+       * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The uri of the Cloud Storage object. It's the same uri that is used by
+       * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+       * The uri of the Cloud Storage object. It's the same uri that is used by
+       * gsutil. For example: "gs://bucket_name/object_name". See [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = 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.IamPolicyAnalysisOutputConfig.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GcsDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GcsDestination(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.IamPolicyAnalysisOutputConfig.GcsDestination + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface BigQueryDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The BigQuery dataset in format "projects/projectId/datasets/datasetId",
+     * to which the analysis results should be exported. If this dataset does
+     * not exist, the export call will return an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataset. + */ + java.lang.String getDataset(); + /** + * + * + *
+     * The BigQuery dataset in format "projects/projectId/datasets/datasetId",
+     * to which the analysis results should be exported. If this dataset does
+     * not exist, the export call will return an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataset. + */ + com.google.protobuf.ByteString getDatasetBytes(); + + /** + * + * + *
+     * The prefix of the BigQuery tables to which the analysis results will be
+     * written. Tables will be created based on this table_prefix if not exist:
+     * * <table_prefix>_analysis table will contain export operation's metadata.
+     * * <table_prefix>_analysis_result will contain all the
+     *   [IamPolicyAnalysisResult][].
+     * When [partition_key] is specified, both tables will be partitioned based
+     * on the [partition_key].
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tablePrefix. + */ + java.lang.String getTablePrefix(); + /** + * + * + *
+     * The prefix of the BigQuery tables to which the analysis results will be
+     * written. Tables will be created based on this table_prefix if not exist:
+     * * <table_prefix>_analysis table will contain export operation's metadata.
+     * * <table_prefix>_analysis_result will contain all the
+     *   [IamPolicyAnalysisResult][].
+     * When [partition_key] is specified, both tables will be partitioned based
+     * on the [partition_key].
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tablePrefix. + */ + com.google.protobuf.ByteString getTablePrefixBytes(); + + /** + * + * + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * + * + * @return The enum numeric value on the wire for partitionKey. + */ + int getPartitionKeyValue(); + /** + * + * + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * + * + * @return The partitionKey. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey + getPartitionKey(); + + /** + * + * + *
+     * The write mode when table exists. WriteMode is ignored when no existing
+     * tables, or no existing partitions are found.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode write_mode = 4; + * + * + * @return The enum numeric value on the wire for writeMode. + */ + int getWriteModeValue(); + /** + * + * + *
+     * The write mode when table exists. WriteMode is ignored when no existing
+     * tables, or no existing partitions are found.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode write_mode = 4; + * + * + * @return The writeMode. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode + getWriteMode(); + } + /** + * + * + *
+   * A BigQuery destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination} + */ + public static final class BigQueryDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + BigQueryDestinationOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryDestination.newBuilder() to construct. + private BigQueryDestination(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryDestination() { + dataset_ = ""; + tablePrefix_ = ""; + partitionKey_ = 0; + writeMode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryDestination(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private BigQueryDestination( + 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(); + + dataset_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + tablePrefix_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + partitionKey_ = rawValue; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + writeMode_ = rawValue; + 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.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.class, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder + .class); + } + + /** + * + * + *
+     * This enum determines the partition key column for the bigquery tables.
+     * Partitioning can improve query performance and reduce query cost by
+     * filtering partitions. Refer to
+     * https://cloud.google.com/bigquery/docs/partitioned-tables for details.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey} + */ + public enum PartitionKey implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified partition key. Tables won't be partitioned using this
+       * option.
+       * 
+ * + * PARTITION_KEY_UNSPECIFIED = 0; + */ + PARTITION_KEY_UNSPECIFIED(0), + /** + * + * + *
+       * The time when the request is received. If specified as partition key,
+       * the result table(s) is partitoned by the RequestTime column, an
+       * additional timestamp column representing when the request was received.
+       * 
+ * + * REQUEST_TIME = 1; + */ + REQUEST_TIME(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified partition key. Tables won't be partitioned using this
+       * option.
+       * 
+ * + * PARTITION_KEY_UNSPECIFIED = 0; + */ + public static final int PARTITION_KEY_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The time when the request is received. If specified as partition key,
+       * the result table(s) is partitoned by the RequestTime column, an
+       * additional timestamp column representing when the request was received.
+       * 
+ * + * REQUEST_TIME = 1; + */ + public static final int REQUEST_TIME_VALUE = 1; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PartitionKey valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static PartitionKey forNumber(int value) { + switch (value) { + case 0: + return PARTITION_KEY_UNSPECIFIED; + case 1: + return REQUEST_TIME; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PartitionKey findValueByNumber(int number) { + return PartitionKey.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final PartitionKey[] VALUES = values(); + + public static PartitionKey valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private PartitionKey(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey) + } + + /** + * + * + *
+     * Write mode types if table exists.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode} + */ + public enum WriteMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified write mode. We expect one of the following valid modes must
+       * be specified when table or partition exists.
+       * 
+ * + * WRITE_MODE_UNSPECIFIED = 0; + */ + WRITE_MODE_UNSPECIFIED(0), + /** + * + * + *
+       * Abort the export when table or partition exists.
+       * 
+ * + * ABORT = 1; + */ + ABORT(1), + /** + * + * + *
+       * Overwrite the table when table exists. When partitioned, overwrite
+       * the existing partition.
+       * 
+ * + * OVERWRITE = 2; + */ + OVERWRITE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified write mode. We expect one of the following valid modes must
+       * be specified when table or partition exists.
+       * 
+ * + * WRITE_MODE_UNSPECIFIED = 0; + */ + public static final int WRITE_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Abort the export when table or partition exists.
+       * 
+ * + * ABORT = 1; + */ + public static final int ABORT_VALUE = 1; + /** + * + * + *
+       * Overwrite the table when table exists. When partitioned, overwrite
+       * the existing partition.
+       * 
+ * + * OVERWRITE = 2; + */ + public static final int OVERWRITE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static WriteMode valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static WriteMode forNumber(int value) { + switch (value) { + case 0: + return WRITE_MODE_UNSPECIFIED; + case 1: + return ABORT; + case 2: + return OVERWRITE; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public WriteMode findValueByNumber(int number) { + return WriteMode.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final WriteMode[] VALUES = values(); + + public static WriteMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private WriteMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode) + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + * + * + *
+     * The BigQuery dataset in format "projects/projectId/datasets/datasetId",
+     * to which the analysis results should be exported. If this dataset does
+     * not exist, the export call will return an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataset. + */ + @java.lang.Override + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + 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(); + dataset_ = s; + return s; + } + } + /** + * + * + *
+     * The BigQuery dataset in format "projects/projectId/datasets/datasetId",
+     * to which the analysis results should be exported. If this dataset does
+     * not exist, the export call will return an INVALID_ARGUMENT error.
+     * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataset. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TABLE_PREFIX_FIELD_NUMBER = 2; + private volatile java.lang.Object tablePrefix_; + /** + * + * + *
+     * The prefix of the BigQuery tables to which the analysis results will be
+     * written. Tables will be created based on this table_prefix if not exist:
+     * * <table_prefix>_analysis table will contain export operation's metadata.
+     * * <table_prefix>_analysis_result will contain all the
+     *   [IamPolicyAnalysisResult][].
+     * When [partition_key] is specified, both tables will be partitioned based
+     * on the [partition_key].
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tablePrefix. + */ + @java.lang.Override + public java.lang.String getTablePrefix() { + java.lang.Object ref = tablePrefix_; + 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(); + tablePrefix_ = s; + return s; + } + } + /** + * + * + *
+     * The prefix of the BigQuery tables to which the analysis results will be
+     * written. Tables will be created based on this table_prefix if not exist:
+     * * <table_prefix>_analysis table will contain export operation's metadata.
+     * * <table_prefix>_analysis_result will contain all the
+     *   [IamPolicyAnalysisResult][].
+     * When [partition_key] is specified, both tables will be partitioned based
+     * on the [partition_key].
+     * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tablePrefix. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTablePrefixBytes() { + java.lang.Object ref = tablePrefix_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tablePrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARTITION_KEY_FIELD_NUMBER = 3; + private int partitionKey_; + /** + * + * + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * + * + * @return The enum numeric value on the wire for partitionKey. + */ + @java.lang.Override + public int getPartitionKeyValue() { + return partitionKey_; + } + /** + * + * + *
+     * The partition key for BigQuery partitioned table.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * + * + * @return The partitionKey. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey + getPartitionKey() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey + result = + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .PartitionKey.valueOf(partitionKey_); + return result == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey + .UNRECOGNIZED + : result; + } + + public static final int WRITE_MODE_FIELD_NUMBER = 4; + private int writeMode_; + /** + * + * + *
+     * The write mode when table exists. WriteMode is ignored when no existing
+     * tables, or no existing partitions are found.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode write_mode = 4; + * + * + * @return The enum numeric value on the wire for writeMode. + */ + @java.lang.Override + public int getWriteModeValue() { + return writeMode_; + } + /** + * + * + *
+     * The write mode when table exists. WriteMode is ignored when no existing
+     * tables, or no existing partitions are found.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode write_mode = 4; + * + * + * @return The writeMode. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode + getWriteMode() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode result = + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode + .valueOf(writeMode_); + return result == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode + .UNRECOGNIZED + : result; + } + + 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 (!getDatasetBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataset_); + } + if (!getTablePrefixBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tablePrefix_); + } + if (partitionKey_ + != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .PartitionKey.PARTITION_KEY_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, partitionKey_); + } + if (writeMode_ + != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode + .WRITE_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, writeMode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDatasetBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataset_); + } + if (!getTablePrefixBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tablePrefix_); + } + if (partitionKey_ + != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .PartitionKey.PARTITION_KEY_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, partitionKey_); + } + if (writeMode_ + != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode + .WRITE_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, writeMode_); + } + 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.IamPolicyAnalysisOutputConfig.BigQueryDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination other = + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) obj; + + if (!getDataset().equals(other.getDataset())) return false; + if (!getTablePrefix().equals(other.getTablePrefix())) return false; + if (partitionKey_ != other.partitionKey_) return false; + if (writeMode_ != other.writeMode_) 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) + DATASET_FIELD_NUMBER; + hash = (53 * hash) + getDataset().hashCode(); + hash = (37 * hash) + TABLE_PREFIX_FIELD_NUMBER; + hash = (53 * hash) + getTablePrefix().hashCode(); + hash = (37 * hash) + PARTITION_KEY_FIELD_NUMBER; + hash = (53 * hash) + partitionKey_; + hash = (37 * hash) + WRITE_MODE_FIELD_NUMBER; + hash = (53 * hash) + writeMode_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + 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.IamPolicyAnalysisOutputConfig.BigQueryDestination + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + 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.IamPolicyAnalysisOutputConfig.BigQueryDestination + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + 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.IamPolicyAnalysisOutputConfig.BigQueryDestination + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + 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.IamPolicyAnalysisOutputConfig.BigQueryDestination + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + 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.IamPolicyAnalysisOutputConfig.BigQueryDestination + 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.IamPolicyAnalysisOutputConfig.BigQueryDestination + 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.IamPolicyAnalysisOutputConfig.BigQueryDestination 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; + } + /** + * + * + *
+     * A BigQuery destination.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.class, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder + .class); + } + + // Construct using + // com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.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(); + dataset_ = ""; + + tablePrefix_ = ""; + + partitionKey_ = 0; + + writeMode_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_BigQueryDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination build() { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination result = + new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination(this); + result.dataset_ = dataset_; + result.tablePrefix_ = tablePrefix_; + result.partitionKey_ = partitionKey_; + result.writeMode_ = writeMode_; + 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.IamPolicyAnalysisOutputConfig.BigQueryDestination) { + return mergeFrom( + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination other) { + if (other + == com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .getDefaultInstance()) return this; + if (!other.getDataset().isEmpty()) { + dataset_ = other.dataset_; + onChanged(); + } + if (!other.getTablePrefix().isEmpty()) { + tablePrefix_ = other.tablePrefix_; + onChanged(); + } + if (other.partitionKey_ != 0) { + setPartitionKeyValue(other.getPartitionKeyValue()); + } + if (other.writeMode_ != 0) { + setWriteModeValue(other.getWriteModeValue()); + } + 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.IamPolicyAnalysisOutputConfig.BigQueryDestination parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object dataset_ = ""; + /** + * + * + *
+       * The BigQuery dataset in format "projects/projectId/datasets/datasetId",
+       * to which the analysis results should be exported. If this dataset does
+       * not exist, the export call will return an INVALID_ARGUMENT error.
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataset. + */ + public java.lang.String getDataset() { + java.lang.Object ref = dataset_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataset_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The BigQuery dataset in format "projects/projectId/datasets/datasetId",
+       * to which the analysis results should be exported. If this dataset does
+       * not exist, the export call will return an INVALID_ARGUMENT error.
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataset. + */ + public com.google.protobuf.ByteString getDatasetBytes() { + java.lang.Object ref = dataset_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataset_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The BigQuery dataset in format "projects/projectId/datasets/datasetId",
+       * to which the analysis results should be exported. If this dataset does
+       * not exist, the export call will return an INVALID_ARGUMENT error.
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The dataset to set. + * @return This builder for chaining. + */ + public Builder setDataset(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + dataset_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The BigQuery dataset in format "projects/projectId/datasets/datasetId",
+       * to which the analysis results should be exported. If this dataset does
+       * not exist, the export call will return an INVALID_ARGUMENT error.
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDataset() { + + dataset_ = getDefaultInstance().getDataset(); + onChanged(); + return this; + } + /** + * + * + *
+       * The BigQuery dataset in format "projects/projectId/datasets/datasetId",
+       * to which the analysis results should be exported. If this dataset does
+       * not exist, the export call will return an INVALID_ARGUMENT error.
+       * 
+ * + * string dataset = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for dataset to set. + * @return This builder for chaining. + */ + public Builder setDatasetBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + dataset_ = value; + onChanged(); + return this; + } + + private java.lang.Object tablePrefix_ = ""; + /** + * + * + *
+       * The prefix of the BigQuery tables to which the analysis results will be
+       * written. Tables will be created based on this table_prefix if not exist:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][].
+       * When [partition_key] is specified, both tables will be partitioned based
+       * on the [partition_key].
+       * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The tablePrefix. + */ + public java.lang.String getTablePrefix() { + java.lang.Object ref = tablePrefix_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tablePrefix_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The prefix of the BigQuery tables to which the analysis results will be
+       * written. Tables will be created based on this table_prefix if not exist:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][].
+       * When [partition_key] is specified, both tables will be partitioned based
+       * on the [partition_key].
+       * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for tablePrefix. + */ + public com.google.protobuf.ByteString getTablePrefixBytes() { + java.lang.Object ref = tablePrefix_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tablePrefix_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The prefix of the BigQuery tables to which the analysis results will be
+       * written. Tables will be created based on this table_prefix if not exist:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][].
+       * When [partition_key] is specified, both tables will be partitioned based
+       * on the [partition_key].
+       * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The tablePrefix to set. + * @return This builder for chaining. + */ + public Builder setTablePrefix(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tablePrefix_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The prefix of the BigQuery tables to which the analysis results will be
+       * written. Tables will be created based on this table_prefix if not exist:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][].
+       * When [partition_key] is specified, both tables will be partitioned based
+       * on the [partition_key].
+       * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearTablePrefix() { + + tablePrefix_ = getDefaultInstance().getTablePrefix(); + onChanged(); + return this; + } + /** + * + * + *
+       * The prefix of the BigQuery tables to which the analysis results will be
+       * written. Tables will be created based on this table_prefix if not exist:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][].
+       * When [partition_key] is specified, both tables will be partitioned based
+       * on the [partition_key].
+       * 
+ * + * string table_prefix = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for tablePrefix to set. + * @return This builder for chaining. + */ + public Builder setTablePrefixBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tablePrefix_ = value; + onChanged(); + return this; + } + + private int partitionKey_ = 0; + /** + * + * + *
+       * The partition key for BigQuery partitioned table.
+       * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * + * + * @return The enum numeric value on the wire for partitionKey. + */ + @java.lang.Override + public int getPartitionKeyValue() { + return partitionKey_; + } + /** + * + * + *
+       * The partition key for BigQuery partitioned table.
+       * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * + * + * @param value The enum numeric value on the wire for partitionKey to set. + * @return This builder for chaining. + */ + public Builder setPartitionKeyValue(int value) { + + partitionKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The partition key for BigQuery partitioned table.
+       * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * + * + * @return The partitionKey. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .PartitionKey + getPartitionKey() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey + result = + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .PartitionKey.valueOf(partitionKey_); + return result == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .PartitionKey.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The partition key for BigQuery partitioned table.
+       * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * + * + * @param value The partitionKey to set. + * @return This builder for chaining. + */ + public Builder setPartitionKey( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey + value) { + if (value == null) { + throw new NullPointerException(); + } + + partitionKey_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The partition key for BigQuery partitioned table.
+       * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.PartitionKey partition_key = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearPartitionKey() { + + partitionKey_ = 0; + onChanged(); + return this; + } + + private int writeMode_ = 0; + /** + * + * + *
+       * The write mode when table exists. WriteMode is ignored when no existing
+       * tables, or no existing partitions are found.
+       * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode write_mode = 4; + * + * + * @return The enum numeric value on the wire for writeMode. + */ + @java.lang.Override + public int getWriteModeValue() { + return writeMode_; + } + /** + * + * + *
+       * The write mode when table exists. WriteMode is ignored when no existing
+       * tables, or no existing partitions are found.
+       * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode write_mode = 4; + * + * + * @param value The enum numeric value on the wire for writeMode to set. + * @return This builder for chaining. + */ + public Builder setWriteModeValue(int value) { + + writeMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The write mode when table exists. WriteMode is ignored when no existing
+       * tables, or no existing partitions are found.
+       * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode write_mode = 4; + * + * + * @return The writeMode. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode + getWriteMode() { + @SuppressWarnings("deprecation") + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode + result = + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .WriteMode.valueOf(writeMode_); + return result == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The write mode when table exists. WriteMode is ignored when no existing
+       * tables, or no existing partitions are found.
+       * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode write_mode = 4; + * + * + * @param value The writeMode to set. + * @return This builder for chaining. + */ + public Builder setWriteMode( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode + value) { + if (value == null) { + throw new NullPointerException(); + } + + writeMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The write mode when table exists. WriteMode is ignored when no existing
+       * tables, or no existing partitions are found.
+       * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.WriteMode write_mode = 4; + * + * + * @return This builder for chaining. + */ + public Builder clearWriteMode() { + + writeMode_ = 0; + 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.IamPolicyAnalysisOutputConfig.BigQueryDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryDestination parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BigQueryDestination(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.IamPolicyAnalysisOutputConfig.BigQueryDestination + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public enum DestinationCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + GCS_DESTINATION(1), + BIGQUERY_DESTINATION(2), + DESTINATION_NOT_SET(0); + private final int value; + + private DestinationCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static DestinationCase valueOf(int value) { + return forNumber(value); + } + + public static DestinationCase forNumber(int value) { + switch (value) { + case 1: + return GCS_DESTINATION; + case 2: + return BIGQUERY_DESTINATION; + case 0: + return DESTINATION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public static final int GCS_DESTINATION_FIELD_NUMBER = 1; + /** + * + * + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + * + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + * + * + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + * + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + getGcsDestination() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } + /** + * + * + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder + getGcsDestinationOrBuilder() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } + + public static final int BIGQUERY_DESTINATION_FIELD_NUMBER = 2; + /** + * + * + *
+   * Destination on BigQuery.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + * + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return destinationCase_ == 2; + } + /** + * + * + *
+   * Destination on BigQuery.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + * + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + getBigqueryDestination() { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .getDefaultInstance(); + } + /** + * + * + *
+   * Destination on BigQuery.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder + getBigqueryDestinationOrBuilder() { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .getDefaultInstance(); + } + + 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 (destinationCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) destination_); + } + if (destinationCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + destination_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (destinationCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_); + } + if (destinationCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + destination_); + } + 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.IamPolicyAnalysisOutputConfig)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig other = + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsDestination().equals(other.getGcsDestination())) return false; + break; + case 2: + if (!getBigqueryDestination().equals(other.getBigqueryDestination())) return false; + break; + case 0: + default: + } + 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(); + switch (destinationCase_) { + case 1: + hash = (37 * hash) + GCS_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getGcsDestination().hashCode(); + break; + case 2: + hash = (37 * hash) + BIGQUERY_DESTINATION_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryDestination().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig 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.IamPolicyAnalysisOutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig 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.IamPolicyAnalysisOutputConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig 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.IamPolicyAnalysisOutputConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig 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.IamPolicyAnalysisOutputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig 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.IamPolicyAnalysisOutputConfig 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.IamPolicyAnalysisOutputConfig 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.IamPolicyAnalysisOutputConfig 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; + } + /** + * + * + *
+   * Output configuration for export IAM policy analysis destination.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisOutputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.class, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.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(); + destinationCase_ = 0; + destination_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig build() { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig result = + new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig(this); + if (destinationCase_ == 1) { + if (gcsDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsDestinationBuilder_.build(); + } + } + if (destinationCase_ == 2) { + if (bigqueryDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = bigqueryDestinationBuilder_.build(); + } + } + result.destinationCase_ = destinationCase_; + 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.IamPolicyAnalysisOutputConfig) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.getDefaultInstance()) + return this; + switch (other.getDestinationCase()) { + case GCS_DESTINATION: + { + mergeGcsDestination(other.getGcsDestination()); + break; + } + case BIGQUERY_DESTINATION: + { + mergeBigqueryDestination(other.getBigqueryDestination()); + break; + } + case DESTINATION_NOT_SET: + { + break; + } + } + 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.IamPolicyAnalysisOutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int destinationCase_ = 0; + private java.lang.Object destination_; + + public DestinationCase getDestinationCase() { + return DestinationCase.forNumber(destinationCase_); + } + + public Builder clearDestination() { + destinationCase_ = 0; + destination_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder> + gcsDestinationBuilder_; + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + * + * @return Whether the gcsDestination field is set. + */ + @java.lang.Override + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + * + * @return The gcsDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } else { + if (destinationCase_ == 1) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + public Builder setGcsDestination( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + public Builder setGcsDestination( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder + builderForValue) { + if (gcsDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + gcsDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 1; + return this; + } + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + public Builder mergeGcsDestination( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1 + && destination_ + != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance()) { + destination_ = + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.newBuilder( + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 1) { + gcsDestinationBuilder_.mergeFrom(value); + } + gcsDestinationBuilder_.setMessage(value); + } + destinationCase_ = 1; + return this; + } + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + public Builder clearGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 1) { + destinationCase_ = 0; + destination_ = null; + } + gcsDestinationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder + getGcsDestinationBuilder() { + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder + getGcsDestinationOrBuilder() { + if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 1)) { + destination_ = + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } + gcsDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder>( + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 1; + onChanged(); + ; + return gcsDestinationBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder> + bigqueryDestinationBuilder_; + /** + * + * + *
+     * Destination on BigQuery.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + * + * @return Whether the bigqueryDestination field is set. + */ + @java.lang.Override + public boolean hasBigqueryDestination() { + return destinationCase_ == 2; + } + /** + * + * + *
+     * Destination on BigQuery.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + * + * @return The bigqueryDestination. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + getBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .getDefaultInstance(); + } else { + if (destinationCase_ == 2) { + return bigqueryDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Destination on BigQuery.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + */ + public Builder setBigqueryDestination( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + destination_ = value; + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+     * Destination on BigQuery.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + */ + public Builder setBigqueryDestination( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder + builderForValue) { + if (bigqueryDestinationBuilder_ == null) { + destination_ = builderForValue.build(); + onChanged(); + } else { + bigqueryDestinationBuilder_.setMessage(builderForValue.build()); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+     * Destination on BigQuery.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + */ + public Builder mergeBigqueryDestination( + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination value) { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2 + && destination_ + != com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .getDefaultInstance()) { + destination_ = + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .newBuilder( + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + destination_) + .mergeFrom(value) + .buildPartial(); + } else { + destination_ = value; + } + onChanged(); + } else { + if (destinationCase_ == 2) { + bigqueryDestinationBuilder_.mergeFrom(value); + } + bigqueryDestinationBuilder_.setMessage(value); + } + destinationCase_ = 2; + return this; + } + /** + * + * + *
+     * Destination on BigQuery.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + */ + public Builder clearBigqueryDestination() { + if (bigqueryDestinationBuilder_ == null) { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + onChanged(); + } + } else { + if (destinationCase_ == 2) { + destinationCase_ = 0; + destination_ = null; + } + bigqueryDestinationBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Destination on BigQuery.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder + getBigqueryDestinationBuilder() { + return getBigqueryDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Destination on BigQuery.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder + getBigqueryDestinationOrBuilder() { + if ((destinationCase_ == 2) && (bigqueryDestinationBuilder_ != null)) { + return bigqueryDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 2) { + return (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + destination_; + } + return com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Destination on BigQuery.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder> + getBigqueryDestinationFieldBuilder() { + if (bigqueryDestinationBuilder_ == null) { + if (!(destinationCase_ == 2)) { + destination_ = + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + .getDefaultInstance(); + } + bigqueryDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig + .BigQueryDestinationOrBuilder>( + (com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination) + destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 2; + onChanged(); + ; + return bigqueryDestinationBuilder_; + } + + @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.IamPolicyAnalysisOutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamPolicyAnalysisOutputConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IamPolicyAnalysisOutputConfig(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.IamPolicyAnalysisOutputConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfigOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfigOrBuilder.java new file mode 100644 index 000000000..0e02268b9 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfigOrBuilder.java @@ -0,0 +1,110 @@ +/* + * 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/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface IamPolicyAnalysisOutputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisOutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + * + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + * + * + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + * + * @return The gcsDestination. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination getGcsDestination(); + /** + * + * + *
+   * Destination on Cloud Storage.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder + getGcsDestinationOrBuilder(); + + /** + * + * + *
+   * Destination on BigQuery.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + * + * @return Whether the bigqueryDestination field is set. + */ + boolean hasBigqueryDestination(); + /** + * + * + *
+   * Destination on BigQuery.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + * + * @return The bigqueryDestination. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination + getBigqueryDestination(); + /** + * + * + *
+   * Destination on BigQuery.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestination bigquery_destination = 2; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.BigQueryDestinationOrBuilder + getBigqueryDestinationOrBuilder(); + + public com.google.cloud.asset.v1.IamPolicyAnalysisOutputConfig.DestinationCase + getDestinationCase(); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java new file mode 100644 index 000000000..2ff279394 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java @@ -0,0 +1,6062 @@ +/* + * 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/asset_service.proto + +package com.google.cloud.asset.v1; + +/** + * + * + *
+ * IAM policy analysis query message.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery} + */ +public final class IamPolicyAnalysisQuery extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery) + IamPolicyAnalysisQueryOrBuilder { + private static final long serialVersionUID = 0L; + // Use IamPolicyAnalysisQuery.newBuilder() to construct. + private IamPolicyAnalysisQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IamPolicyAnalysisQuery() { + scope_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IamPolicyAnalysisQuery(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IamPolicyAnalysisQuery( + 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(); + + scope_ = s; + break; + } + case 18: + { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder subBuilder = + null; + if (resourceSelector_ != null) { + subBuilder = resourceSelector_.toBuilder(); + } + resourceSelector_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resourceSelector_); + resourceSelector_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder subBuilder = + null; + if (identitySelector_ != null) { + subBuilder = identitySelector_.toBuilder(); + } + identitySelector_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(identitySelector_); + identitySelector_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder subBuilder = + null; + if (accessSelector_ != null) { + subBuilder = accessSelector_.toBuilder(); + } + accessSelector_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(accessSelector_); + accessSelector_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder subBuilder = null; + if (options_ != null) { + subBuilder = options_.toBuilder(); + } + options_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(options_); + options_ = subBuilder.buildPartial(); + } + + 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.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.class, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder.class); + } + + public interface ResourceSelectorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The [full resource name]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of a resource of [supported resource
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+     * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fullResourceName. + */ + java.lang.String getFullResourceName(); + /** + * + * + *
+     * The [full resource name]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of a resource of [supported resource
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+     * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fullResourceName. + */ + com.google.protobuf.ByteString getFullResourceNameBytes(); + } + /** + * + * + *
+   * Specifies the resource to analyze for access policies, which may be set
+   * directly on the resource, or on ancestors such as organizations, folders or
+   * projects.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector} + */ + public static final class ResourceSelector extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) + ResourceSelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceSelector.newBuilder() to construct. + private ResourceSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceSelector() { + fullResourceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceSelector(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ResourceSelector( + 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(); + + fullResourceName_ = 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.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.class, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder.class); + } + + public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object fullResourceName_; + /** + * + * + *
+     * The [full resource name]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of a resource of [supported resource
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+     * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fullResourceName. + */ + @java.lang.Override + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + 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(); + fullResourceName_ = s; + return s; + } + } + /** + * + * + *
+     * The [full resource name]
+     * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of a resource of [supported resource
+     * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+     * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fullResourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullResourceName_ = 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 (!getFullResourceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullResourceName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFullResourceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullResourceName_); + } + 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.IamPolicyAnalysisQuery.ResourceSelector)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector other = + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) obj; + + if (!getFullResourceName().equals(other.getFullResourceName())) 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) + FULL_RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullResourceName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector + 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.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector 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.IamPolicyAnalysisQuery.ResourceSelector 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; + } + /** + * + * + *
+     * Specifies the resource to analyze for access policies, which may be set
+     * directly on the resource, or on ancestors such as organizations, folders or
+     * projects.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.class, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder.class); + } + + // Construct using + // com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.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(); + fullResourceName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector build() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector result = + new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector(this); + result.fullResourceName_ = fullResourceName_; + 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.IamPolicyAnalysisQuery.ResourceSelector) { + return mergeFrom( + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector other) { + if (other + == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector + .getDefaultInstance()) return this; + if (!other.getFullResourceName().isEmpty()) { + fullResourceName_ = other.fullResourceName_; + 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.IamPolicyAnalysisQuery.ResourceSelector parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object fullResourceName_ = ""; + /** + * + * + *
+       * The [full resource name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * of a resource of [supported resource
+       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+       * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The fullResourceName. + */ + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The [full resource name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * of a resource of [supported resource
+       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+       * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for fullResourceName. + */ + public com.google.protobuf.ByteString getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The [full resource name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * of a resource of [supported resource
+       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+       * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullResourceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The [full resource name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * of a resource of [supported resource
+       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+       * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFullResourceName() { + + fullResourceName_ = getDefaultInstance().getFullResourceName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The [full resource name]
+       * (https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * of a resource of [supported resource
+       * types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types).
+       * 
+ * + * string full_resource_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullResourceName_ = 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.IamPolicyAnalysisQuery.ResourceSelector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResourceSelector(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.IamPolicyAnalysisQuery.ResourceSelector + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface IdentitySelectorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The identity appear in the form of members in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+     * The examples of supported forms are:
+     * "user:mike@example.com",
+     * "group:admins@example.com",
+     * "domain:google.com",
+     * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+     * Notice that wildcard characters (such as * and ?) are not supported.
+     * You must give a specific identity.
+     * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The identity. + */ + java.lang.String getIdentity(); + /** + * + * + *
+     * The identity appear in the form of members in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+     * The examples of supported forms are:
+     * "user:mike@example.com",
+     * "group:admins@example.com",
+     * "domain:google.com",
+     * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+     * Notice that wildcard characters (such as * and ?) are not supported.
+     * You must give a specific identity.
+     * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for identity. + */ + com.google.protobuf.ByteString getIdentityBytes(); + } + /** + * + * + *
+   * Specifies an identity for which to determine resource access, based on
+   * roles assigned either directly to them or to the groups they belong to,
+   * directly or indirectly.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector} + */ + public static final class IdentitySelector extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) + IdentitySelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use IdentitySelector.newBuilder() to construct. + private IdentitySelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IdentitySelector() { + identity_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IdentitySelector(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IdentitySelector( + 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(); + + identity_ = 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.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.class, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder.class); + } + + public static final int IDENTITY_FIELD_NUMBER = 1; + private volatile java.lang.Object identity_; + /** + * + * + *
+     * The identity appear in the form of members in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+     * The examples of supported forms are:
+     * "user:mike@example.com",
+     * "group:admins@example.com",
+     * "domain:google.com",
+     * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+     * Notice that wildcard characters (such as * and ?) are not supported.
+     * You must give a specific identity.
+     * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The identity. + */ + @java.lang.Override + public java.lang.String getIdentity() { + java.lang.Object ref = identity_; + 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(); + identity_ = s; + return s; + } + } + /** + * + * + *
+     * The identity appear in the form of members in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+     * The examples of supported forms are:
+     * "user:mike@example.com",
+     * "group:admins@example.com",
+     * "domain:google.com",
+     * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+     * Notice that wildcard characters (such as * and ?) are not supported.
+     * You must give a specific identity.
+     * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for identity. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdentityBytes() { + java.lang.Object ref = identity_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identity_ = 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 (!getIdentityBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, identity_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getIdentityBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, identity_); + } + 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.IamPolicyAnalysisQuery.IdentitySelector)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector other = + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) obj; + + if (!getIdentity().equals(other.getIdentity())) 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) + IDENTITY_FIELD_NUMBER; + hash = (53 * hash) + getIdentity().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 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.IamPolicyAnalysisQuery.IdentitySelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 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.IamPolicyAnalysisQuery.IdentitySelector parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 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.IamPolicyAnalysisQuery.IdentitySelector parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector 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.IamPolicyAnalysisQuery.IdentitySelector + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector + 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.IamPolicyAnalysisQuery.IdentitySelector 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.IamPolicyAnalysisQuery.IdentitySelector 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.IamPolicyAnalysisQuery.IdentitySelector 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; + } + /** + * + * + *
+     * Specifies an identity for which to determine resource access, based on
+     * roles assigned either directly to them or to the groups they belong to,
+     * directly or indirectly.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.class, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder.class); + } + + // Construct using + // com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.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(); + identity_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector build() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector result = + new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector(this); + result.identity_ = identity_; + 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.IamPolicyAnalysisQuery.IdentitySelector) { + return mergeFrom( + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector other) { + if (other + == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector + .getDefaultInstance()) return this; + if (!other.getIdentity().isEmpty()) { + identity_ = other.identity_; + 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.IamPolicyAnalysisQuery.IdentitySelector parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object identity_ = ""; + /** + * + * + *
+       * The identity appear in the form of members in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+       * The examples of supported forms are:
+       * "user:mike@example.com",
+       * "group:admins@example.com",
+       * "domain:google.com",
+       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+       * Notice that wildcard characters (such as * and ?) are not supported.
+       * You must give a specific identity.
+       * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The identity. + */ + public java.lang.String getIdentity() { + java.lang.Object ref = identity_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + identity_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The identity appear in the form of members in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+       * The examples of supported forms are:
+       * "user:mike@example.com",
+       * "group:admins@example.com",
+       * "domain:google.com",
+       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+       * Notice that wildcard characters (such as * and ?) are not supported.
+       * You must give a specific identity.
+       * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for identity. + */ + public com.google.protobuf.ByteString getIdentityBytes() { + java.lang.Object ref = identity_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + identity_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The identity appear in the form of members in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+       * The examples of supported forms are:
+       * "user:mike@example.com",
+       * "group:admins@example.com",
+       * "domain:google.com",
+       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+       * Notice that wildcard characters (such as * and ?) are not supported.
+       * You must give a specific identity.
+       * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The identity to set. + * @return This builder for chaining. + */ + public Builder setIdentity(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + identity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The identity appear in the form of members in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+       * The examples of supported forms are:
+       * "user:mike@example.com",
+       * "group:admins@example.com",
+       * "domain:google.com",
+       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+       * Notice that wildcard characters (such as * and ?) are not supported.
+       * You must give a specific identity.
+       * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearIdentity() { + + identity_ = getDefaultInstance().getIdentity(); + onChanged(); + return this; + } + /** + * + * + *
+       * The identity appear in the form of members in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding).
+       * The examples of supported forms are:
+       * "user:mike@example.com",
+       * "group:admins@example.com",
+       * "domain:google.com",
+       * "serviceAccount:my-project-id@appspot.gserviceaccount.com".
+       * Notice that wildcard characters (such as * and ?) are not supported.
+       * You must give a specific identity.
+       * 
+ * + * string identity = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for identity to set. + * @return This builder for chaining. + */ + public Builder setIdentityBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + identity_ = 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.IamPolicyAnalysisQuery.IdentitySelector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdentitySelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IdentitySelector(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.IamPolicyAnalysisQuery.IdentitySelector + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AccessSelectorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the roles. + */ + java.util.List getRolesList(); + /** + * + * + *
+     * The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of roles. + */ + int getRolesCount(); + /** + * + * + *
+     * The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The roles at the given index. + */ + java.lang.String getRoles(int index); + /** + * + * + *
+     * The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the roles at the given index. + */ + com.google.protobuf.ByteString getRolesBytes(int index); + + /** + * + * + *
+     * The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the permissions. + */ + java.util.List getPermissionsList(); + /** + * + * + *
+     * The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of permissions. + */ + int getPermissionsCount(); + /** + * + * + *
+     * The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + java.lang.String getPermissions(int index); + /** + * + * + *
+     * The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + com.google.protobuf.ByteString getPermissionsBytes(int index); + } + /** + * + * + *
+   * Specifies roles and/or permissions to analyze, to determine both the
+   * identities possessing them and the resources they control. If multiple
+   * values are specified, results will include roles or permissions matching
+   * any of them.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector} + */ + public static final class AccessSelector extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) + AccessSelectorOrBuilder { + private static final long serialVersionUID = 0L; + // Use AccessSelector.newBuilder() to construct. + private AccessSelector(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AccessSelector() { + roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AccessSelector(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AccessSelector( + 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(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + roles_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + roles_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + permissions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + permissions_.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)) { + roles_ = roles_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + permissions_ = permissions_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.class, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder.class); + } + + public static final int ROLES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList roles_; + /** + * + * + *
+     * The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the roles. + */ + public com.google.protobuf.ProtocolStringList getRolesList() { + return roles_; + } + /** + * + * + *
+     * The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of roles. + */ + public int getRolesCount() { + return roles_.size(); + } + /** + * + * + *
+     * The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The roles at the given index. + */ + public java.lang.String getRoles(int index) { + return roles_.get(index); + } + /** + * + * + *
+     * The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the roles at the given index. + */ + public com.google.protobuf.ByteString getRolesBytes(int index) { + return roles_.getByteString(index); + } + + public static final int PERMISSIONS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList permissions_; + /** + * + * + *
+     * The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the permissions. + */ + public com.google.protobuf.ProtocolStringList getPermissionsList() { + return permissions_; + } + /** + * + * + *
+     * The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of permissions. + */ + public int getPermissionsCount() { + return permissions_.size(); + } + /** + * + * + *
+     * The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + public java.lang.String getPermissions(int index) { + return permissions_.get(index); + } + /** + * + * + *
+     * The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + public com.google.protobuf.ByteString getPermissionsBytes(int index) { + return permissions_.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 { + for (int i = 0; i < roles_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, roles_.getRaw(i)); + } + for (int i = 0; i < permissions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permissions_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < roles_.size(); i++) { + dataSize += computeStringSizeNoTag(roles_.getRaw(i)); + } + size += dataSize; + size += 1 * getRolesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < permissions_.size(); i++) { + dataSize += computeStringSizeNoTag(permissions_.getRaw(i)); + } + size += dataSize; + size += 1 * getPermissionsList().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.IamPolicyAnalysisQuery.AccessSelector)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector other = + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) obj; + + if (!getRolesList().equals(other.getRolesList())) return false; + if (!getPermissionsList().equals(other.getPermissionsList())) 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 (getRolesCount() > 0) { + hash = (37 * hash) + ROLES_FIELD_NUMBER; + hash = (53 * hash) + getRolesList().hashCode(); + } + if (getPermissionsCount() > 0) { + hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; + hash = (53 * hash) + getPermissionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector 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.IamPolicyAnalysisQuery.AccessSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector 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.IamPolicyAnalysisQuery.AccessSelector parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector 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.IamPolicyAnalysisQuery.AccessSelector parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector 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.IamPolicyAnalysisQuery.AccessSelector + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector + 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.IamPolicyAnalysisQuery.AccessSelector 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.IamPolicyAnalysisQuery.AccessSelector 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.IamPolicyAnalysisQuery.AccessSelector 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; + } + /** + * + * + *
+     * Specifies roles and/or permissions to analyze, to determine both the
+     * identities possessing them and the resources they control. If multiple
+     * values are specified, results will include roles or permissions matching
+     * any of them.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.class, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder.class); + } + + // Construct using + // com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.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(); + roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_AccessSelector_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector build() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector result = + new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + roles_ = roles_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.roles_ = roles_; + if (((bitField0_ & 0x00000002) != 0)) { + permissions_ = permissions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.permissions_ = permissions_; + 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.IamPolicyAnalysisQuery.AccessSelector) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector other) { + if (other + == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance()) + return this; + if (!other.roles_.isEmpty()) { + if (roles_.isEmpty()) { + roles_ = other.roles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRolesIsMutable(); + roles_.addAll(other.roles_); + } + onChanged(); + } + if (!other.permissions_.isEmpty()) { + if (permissions_.isEmpty()) { + permissions_ = other.permissions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensurePermissionsIsMutable(); + permissions_.addAll(other.permissions_); + } + 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.IamPolicyAnalysisQuery.AccessSelector parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList roles_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureRolesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + roles_ = new com.google.protobuf.LazyStringArrayList(roles_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the roles. + */ + public com.google.protobuf.ProtocolStringList getRolesList() { + return roles_.getUnmodifiableView(); + } + /** + * + * + *
+       * The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of roles. + */ + public int getRolesCount() { + return roles_.size(); + } + /** + * + * + *
+       * The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The roles at the given index. + */ + public java.lang.String getRoles(int index) { + return roles_.get(index); + } + /** + * + * + *
+       * The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the roles at the given index. + */ + public com.google.protobuf.ByteString getRolesBytes(int index) { + return roles_.getByteString(index); + } + /** + * + * + *
+       * The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The roles to set. + * @return This builder for chaining. + */ + public Builder setRoles(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolesIsMutable(); + roles_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The roles to add. + * @return This builder for chaining. + */ + public Builder addRoles(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolesIsMutable(); + roles_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The roles to add. + * @return This builder for chaining. + */ + public Builder addAllRoles(java.lang.Iterable values) { + ensureRolesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, roles_); + onChanged(); + return this; + } + /** + * + * + *
+       * The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRoles() { + roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * The roles to appear in result.
+       * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the roles to add. + * @return This builder for chaining. + */ + public Builder addRolesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRolesIsMutable(); + roles_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList permissions_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensurePermissionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + permissions_ = new com.google.protobuf.LazyStringArrayList(permissions_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the permissions. + */ + public com.google.protobuf.ProtocolStringList getPermissionsList() { + return permissions_.getUnmodifiableView(); + } + /** + * + * + *
+       * The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of permissions. + */ + public int getPermissionsCount() { + return permissions_.size(); + } + /** + * + * + *
+       * The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The permissions at the given index. + */ + public java.lang.String getPermissions(int index) { + return permissions_.get(index); + } + /** + * + * + *
+       * The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the permissions at the given index. + */ + public com.google.protobuf.ByteString getPermissionsBytes(int index) { + return permissions_.getByteString(index); + } + /** + * + * + *
+       * The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The permissions to set. + * @return This builder for chaining. + */ + public Builder setPermissions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The permissions to add. + * @return This builder for chaining. + */ + public Builder addPermissions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePermissionsIsMutable(); + permissions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The permissions to add. + * @return This builder for chaining. + */ + public Builder addAllPermissions(java.lang.Iterable values) { + ensurePermissionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, permissions_); + onChanged(); + return this; + } + /** + * + * + *
+       * The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPermissions() { + permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * The permissions to appear in result.
+       * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the permissions to add. + * @return This builder for chaining. + */ + public Builder addPermissionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePermissionsIsMutable(); + permissions_.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.IamPolicyAnalysisQuery.AccessSelector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccessSelector parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AccessSelector(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.IamPolicyAnalysisQuery.AccessSelector + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * If true, the identities section of the result will expand any
+     * Google groups appearing in an IAM policy binding.
+     * If
+     * [google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
+     * is specified, the identity in the result will be determined by the
+     * selector, and this flag is not allowed to set.
+     * Default is false.
+     * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandGroups. + */ + boolean getExpandGroups(); + + /** + * + * + *
+     * If true, the access section of result will expand any roles
+     * appearing in IAM policy bindings to include their permissions.
+     * If
+     * [google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
+     * is specified, the access section of the result will be determined by the
+     * selector, and this flag is not allowed to set.
+     * Default is false.
+     * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandRoles. + */ + boolean getExpandRoles(); + + /** + * + * + *
+     * If true and
+     * [google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+     * is not specified, the resource section of the result will expand any
+     * resource attached to an IAM policy to include resources lower in the
+     * resource hierarchy.
+     * For example, if the request analyzes for which resources user A has
+     * permission P, and the results include an IAM policy with P on a GCP
+     * folder, the results will also include resources in that folder with
+     * permission P.
+     * If true and
+     * [google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+     * is specified, the resource section of the result will expand the
+     * specified resource to include resources lower in the resource hierarchy.
+     * For example, if the request analyzes for which users have permission P on
+     * a GCP folder with this option enabled, the results will include all users
+     * who have permission P on that folder or any lower resource(ex. project).
+     * Default is false.
+     * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandResources. + */ + boolean getExpandResources(); + + /** + * + * + *
+     * If true, the result will output resource edges, starting
+     * from the policy attached resource, to any expanded resources.
+     * Default is false.
+     * 
+ * + * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The outputResourceEdges. + */ + boolean getOutputResourceEdges(); + + /** + * + * + *
+     * If true, the result will output group identity edges, starting
+     * from the binding's group members, to any expanded identities.
+     * Default is false.
+     * 
+ * + * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The outputGroupEdges. + */ + boolean getOutputGroupEdges(); + + /** + * + * + *
+     * If true, the response will include access analysis from identities to
+     * resources via service account impersonation. This is a very expensive
+     * operation, because many derived queries will be executed. We highly
+     * recommend you use
+     * [google.cloud.asset.v1.AssetService.ExportIamPolicyAnalysis][google.cloud.asset.v1.AssetService.ExportIamPolicyAnalysis]
+     * rpc instead.
+     * For example, if the request analyzes for which resources user A has
+     * permission P, and there's an IAM policy states user A has
+     * iam.serviceAccounts.getAccessToken permission to a service account SA,
+     * and there's another IAM policy states service account SA has permission P
+     * to a GCP folder F, then user A potentially has access to the GCP folder
+     * F. And those advanced analysis results will be included in
+     * [google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+     * Another example, if the request analyzes for who has
+     * permission P to a GCP folder F, and there's an IAM policy states user A
+     * has iam.serviceAccounts.actAs permission to a service account SA, and
+     * there's another IAM policy states service account SA has permission P to
+     * the GCP folder F, then user A potentially has access to the GCP folder
+     * F. And those advanced analysis results will be included in
+     * [google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+     * Default is false.
+     * 
+ * + * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The analyzeServiceAccountImpersonation. + */ + boolean getAnalyzeServiceAccountImpersonation(); + + /** + * + * + *
+     * The maximum number of fanouts per group when [expand_groups][expand_groups]
+     * is enabled. This internal field is to help load testing and determine a
+     * proper value, and won't be public in the future.
+     * 
+ * + * int32 max_fanouts_per_group = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxFanoutsPerGroup. + */ + int getMaxFanoutsPerGroup(); + + /** + * + * + *
+     * The maximum number of fanouts per parent resource, such as
+     * GCP Project etc., when [expand_resources][] is enabled. This internal
+     * field is to help load testing and determine a proper value, and won't be
+     * public in the future.
+     * 
+ * + * int32 max_fanouts_per_resource = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxFanoutsPerResource. + */ + int getMaxFanoutsPerResource(); + } + /** + * + * + *
+   * Contains query options.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.Options} + */ + public static final class Options extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) + OptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Options.newBuilder() to construct. + private Options(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Options() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Options(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Options( + 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 8: + { + expandGroups_ = input.readBool(); + break; + } + case 16: + { + expandRoles_ = input.readBool(); + break; + } + case 24: + { + expandResources_ = input.readBool(); + break; + } + case 32: + { + outputResourceEdges_ = input.readBool(); + break; + } + case 40: + { + outputGroupEdges_ = input.readBool(); + break; + } + case 48: + { + analyzeServiceAccountImpersonation_ = input.readBool(); + break; + } + case 56: + { + maxFanoutsPerGroup_ = input.readInt32(); + break; + } + case 64: + { + maxFanoutsPerResource_ = input.readInt32(); + 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.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.class, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder.class); + } + + public static final int EXPAND_GROUPS_FIELD_NUMBER = 1; + private boolean expandGroups_; + /** + * + * + *
+     * If true, the identities section of the result will expand any
+     * Google groups appearing in an IAM policy binding.
+     * If
+     * [google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
+     * is specified, the identity in the result will be determined by the
+     * selector, and this flag is not allowed to set.
+     * Default is false.
+     * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandGroups. + */ + @java.lang.Override + public boolean getExpandGroups() { + return expandGroups_; + } + + public static final int EXPAND_ROLES_FIELD_NUMBER = 2; + private boolean expandRoles_; + /** + * + * + *
+     * If true, the access section of result will expand any roles
+     * appearing in IAM policy bindings to include their permissions.
+     * If
+     * [google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
+     * is specified, the access section of the result will be determined by the
+     * selector, and this flag is not allowed to set.
+     * Default is false.
+     * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandRoles. + */ + @java.lang.Override + public boolean getExpandRoles() { + return expandRoles_; + } + + public static final int EXPAND_RESOURCES_FIELD_NUMBER = 3; + private boolean expandResources_; + /** + * + * + *
+     * If true and
+     * [google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+     * is not specified, the resource section of the result will expand any
+     * resource attached to an IAM policy to include resources lower in the
+     * resource hierarchy.
+     * For example, if the request analyzes for which resources user A has
+     * permission P, and the results include an IAM policy with P on a GCP
+     * folder, the results will also include resources in that folder with
+     * permission P.
+     * If true and
+     * [google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+     * is specified, the resource section of the result will expand the
+     * specified resource to include resources lower in the resource hierarchy.
+     * For example, if the request analyzes for which users have permission P on
+     * a GCP folder with this option enabled, the results will include all users
+     * who have permission P on that folder or any lower resource(ex. project).
+     * Default is false.
+     * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandResources. + */ + @java.lang.Override + public boolean getExpandResources() { + return expandResources_; + } + + public static final int OUTPUT_RESOURCE_EDGES_FIELD_NUMBER = 4; + private boolean outputResourceEdges_; + /** + * + * + *
+     * If true, the result will output resource edges, starting
+     * from the policy attached resource, to any expanded resources.
+     * Default is false.
+     * 
+ * + * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The outputResourceEdges. + */ + @java.lang.Override + public boolean getOutputResourceEdges() { + return outputResourceEdges_; + } + + public static final int OUTPUT_GROUP_EDGES_FIELD_NUMBER = 5; + private boolean outputGroupEdges_; + /** + * + * + *
+     * If true, the result will output group identity edges, starting
+     * from the binding's group members, to any expanded identities.
+     * Default is false.
+     * 
+ * + * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The outputGroupEdges. + */ + @java.lang.Override + public boolean getOutputGroupEdges() { + return outputGroupEdges_; + } + + public static final int ANALYZE_SERVICE_ACCOUNT_IMPERSONATION_FIELD_NUMBER = 6; + private boolean analyzeServiceAccountImpersonation_; + /** + * + * + *
+     * If true, the response will include access analysis from identities to
+     * resources via service account impersonation. This is a very expensive
+     * operation, because many derived queries will be executed. We highly
+     * recommend you use
+     * [google.cloud.asset.v1.AssetService.ExportIamPolicyAnalysis][google.cloud.asset.v1.AssetService.ExportIamPolicyAnalysis]
+     * rpc instead.
+     * For example, if the request analyzes for which resources user A has
+     * permission P, and there's an IAM policy states user A has
+     * iam.serviceAccounts.getAccessToken permission to a service account SA,
+     * and there's another IAM policy states service account SA has permission P
+     * to a GCP folder F, then user A potentially has access to the GCP folder
+     * F. And those advanced analysis results will be included in
+     * [google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+     * Another example, if the request analyzes for who has
+     * permission P to a GCP folder F, and there's an IAM policy states user A
+     * has iam.serviceAccounts.actAs permission to a service account SA, and
+     * there's another IAM policy states service account SA has permission P to
+     * the GCP folder F, then user A potentially has access to the GCP folder
+     * F. And those advanced analysis results will be included in
+     * [google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+     * Default is false.
+     * 
+ * + * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The analyzeServiceAccountImpersonation. + */ + @java.lang.Override + public boolean getAnalyzeServiceAccountImpersonation() { + return analyzeServiceAccountImpersonation_; + } + + public static final int MAX_FANOUTS_PER_GROUP_FIELD_NUMBER = 7; + private int maxFanoutsPerGroup_; + /** + * + * + *
+     * The maximum number of fanouts per group when [expand_groups][expand_groups]
+     * is enabled. This internal field is to help load testing and determine a
+     * proper value, and won't be public in the future.
+     * 
+ * + * int32 max_fanouts_per_group = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxFanoutsPerGroup. + */ + @java.lang.Override + public int getMaxFanoutsPerGroup() { + return maxFanoutsPerGroup_; + } + + public static final int MAX_FANOUTS_PER_RESOURCE_FIELD_NUMBER = 8; + private int maxFanoutsPerResource_; + /** + * + * + *
+     * The maximum number of fanouts per parent resource, such as
+     * GCP Project etc., when [expand_resources][] is enabled. This internal
+     * field is to help load testing and determine a proper value, and won't be
+     * public in the future.
+     * 
+ * + * int32 max_fanouts_per_resource = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxFanoutsPerResource. + */ + @java.lang.Override + public int getMaxFanoutsPerResource() { + return maxFanoutsPerResource_; + } + + 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 (expandGroups_ != false) { + output.writeBool(1, expandGroups_); + } + if (expandRoles_ != false) { + output.writeBool(2, expandRoles_); + } + if (expandResources_ != false) { + output.writeBool(3, expandResources_); + } + if (outputResourceEdges_ != false) { + output.writeBool(4, outputResourceEdges_); + } + if (outputGroupEdges_ != false) { + output.writeBool(5, outputGroupEdges_); + } + if (analyzeServiceAccountImpersonation_ != false) { + output.writeBool(6, analyzeServiceAccountImpersonation_); + } + if (maxFanoutsPerGroup_ != 0) { + output.writeInt32(7, maxFanoutsPerGroup_); + } + if (maxFanoutsPerResource_ != 0) { + output.writeInt32(8, maxFanoutsPerResource_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (expandGroups_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, expandGroups_); + } + if (expandRoles_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, expandRoles_); + } + if (expandResources_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, expandResources_); + } + if (outputResourceEdges_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, outputResourceEdges_); + } + if (outputGroupEdges_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, outputGroupEdges_); + } + if (analyzeServiceAccountImpersonation_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 6, analyzeServiceAccountImpersonation_); + } + if (maxFanoutsPerGroup_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(7, maxFanoutsPerGroup_); + } + if (maxFanoutsPerResource_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, maxFanoutsPerResource_); + } + 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.IamPolicyAnalysisQuery.Options)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options other = + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) obj; + + if (getExpandGroups() != other.getExpandGroups()) return false; + if (getExpandRoles() != other.getExpandRoles()) return false; + if (getExpandResources() != other.getExpandResources()) return false; + if (getOutputResourceEdges() != other.getOutputResourceEdges()) return false; + if (getOutputGroupEdges() != other.getOutputGroupEdges()) return false; + if (getAnalyzeServiceAccountImpersonation() != other.getAnalyzeServiceAccountImpersonation()) + return false; + if (getMaxFanoutsPerGroup() != other.getMaxFanoutsPerGroup()) return false; + if (getMaxFanoutsPerResource() != other.getMaxFanoutsPerResource()) 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) + EXPAND_GROUPS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandGroups()); + hash = (37 * hash) + EXPAND_ROLES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandRoles()); + hash = (37 * hash) + EXPAND_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandResources()); + hash = (37 * hash) + OUTPUT_RESOURCE_EDGES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOutputResourceEdges()); + hash = (37 * hash) + OUTPUT_GROUP_EDGES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOutputGroupEdges()); + hash = (37 * hash) + ANALYZE_SERVICE_ACCOUNT_IMPERSONATION_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashBoolean(getAnalyzeServiceAccountImpersonation()); + hash = (37 * hash) + MAX_FANOUTS_PER_GROUP_FIELD_NUMBER; + hash = (53 * hash) + getMaxFanoutsPerGroup(); + hash = (37 * hash) + MAX_FANOUTS_PER_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getMaxFanoutsPerResource(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options 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.IamPolicyAnalysisQuery.Options 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; + } + /** + * + * + *
+     * Contains query options.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery.Options} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.class, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.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(); + expandGroups_ = false; + + expandRoles_ = false; + + expandResources_ = false; + + outputResourceEdges_ = false; + + outputGroupEdges_ = false; + + analyzeServiceAccountImpersonation_ = false; + + maxFanoutsPerGroup_ = 0; + + maxFanoutsPerResource_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_Options_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options build() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options result = + new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options(this); + result.expandGroups_ = expandGroups_; + result.expandRoles_ = expandRoles_; + result.expandResources_ = expandResources_; + result.outputResourceEdges_ = outputResourceEdges_; + result.outputGroupEdges_ = outputGroupEdges_; + result.analyzeServiceAccountImpersonation_ = analyzeServiceAccountImpersonation_; + result.maxFanoutsPerGroup_ = maxFanoutsPerGroup_; + result.maxFanoutsPerResource_ = maxFanoutsPerResource_; + 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.IamPolicyAnalysisQuery.Options) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance()) + return this; + if (other.getExpandGroups() != false) { + setExpandGroups(other.getExpandGroups()); + } + if (other.getExpandRoles() != false) { + setExpandRoles(other.getExpandRoles()); + } + if (other.getExpandResources() != false) { + setExpandResources(other.getExpandResources()); + } + if (other.getOutputResourceEdges() != false) { + setOutputResourceEdges(other.getOutputResourceEdges()); + } + if (other.getOutputGroupEdges() != false) { + setOutputGroupEdges(other.getOutputGroupEdges()); + } + if (other.getAnalyzeServiceAccountImpersonation() != false) { + setAnalyzeServiceAccountImpersonation(other.getAnalyzeServiceAccountImpersonation()); + } + if (other.getMaxFanoutsPerGroup() != 0) { + setMaxFanoutsPerGroup(other.getMaxFanoutsPerGroup()); + } + if (other.getMaxFanoutsPerResource() != 0) { + setMaxFanoutsPerResource(other.getMaxFanoutsPerResource()); + } + 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.IamPolicyAnalysisQuery.Options parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean expandGroups_; + /** + * + * + *
+       * If true, the identities section of the result will expand any
+       * Google groups appearing in an IAM policy binding.
+       * If
+       * [google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
+       * is specified, the identity in the result will be determined by the
+       * selector, and this flag is not allowed to set.
+       * Default is false.
+       * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandGroups. + */ + @java.lang.Override + public boolean getExpandGroups() { + return expandGroups_; + } + /** + * + * + *
+       * If true, the identities section of the result will expand any
+       * Google groups appearing in an IAM policy binding.
+       * If
+       * [google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
+       * is specified, the identity in the result will be determined by the
+       * selector, and this flag is not allowed to set.
+       * Default is false.
+       * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The expandGroups to set. + * @return This builder for chaining. + */ + public Builder setExpandGroups(boolean value) { + + expandGroups_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, the identities section of the result will expand any
+       * Google groups appearing in an IAM policy binding.
+       * If
+       * [google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector]
+       * is specified, the identity in the result will be determined by the
+       * selector, and this flag is not allowed to set.
+       * Default is false.
+       * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearExpandGroups() { + + expandGroups_ = false; + onChanged(); + return this; + } + + private boolean expandRoles_; + /** + * + * + *
+       * If true, the access section of result will expand any roles
+       * appearing in IAM policy bindings to include their permissions.
+       * If
+       * [google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
+       * is specified, the access section of the result will be determined by the
+       * selector, and this flag is not allowed to set.
+       * Default is false.
+       * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandRoles. + */ + @java.lang.Override + public boolean getExpandRoles() { + return expandRoles_; + } + /** + * + * + *
+       * If true, the access section of result will expand any roles
+       * appearing in IAM policy bindings to include their permissions.
+       * If
+       * [google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
+       * is specified, the access section of the result will be determined by the
+       * selector, and this flag is not allowed to set.
+       * Default is false.
+       * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The expandRoles to set. + * @return This builder for chaining. + */ + public Builder setExpandRoles(boolean value) { + + expandRoles_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, the access section of result will expand any roles
+       * appearing in IAM policy bindings to include their permissions.
+       * If
+       * [google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector]
+       * is specified, the access section of the result will be determined by the
+       * selector, and this flag is not allowed to set.
+       * Default is false.
+       * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearExpandRoles() { + + expandRoles_ = false; + onChanged(); + return this; + } + + private boolean expandResources_; + /** + * + * + *
+       * If true and
+       * [google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+       * is not specified, the resource section of the result will expand any
+       * resource attached to an IAM policy to include resources lower in the
+       * resource hierarchy.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and the results include an IAM policy with P on a GCP
+       * folder, the results will also include resources in that folder with
+       * permission P.
+       * If true and
+       * [google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+       * is specified, the resource section of the result will expand the
+       * specified resource to include resources lower in the resource hierarchy.
+       * For example, if the request analyzes for which users have permission P on
+       * a GCP folder with this option enabled, the results will include all users
+       * who have permission P on that folder or any lower resource(ex. project).
+       * Default is false.
+       * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandResources. + */ + @java.lang.Override + public boolean getExpandResources() { + return expandResources_; + } + /** + * + * + *
+       * If true and
+       * [google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+       * is not specified, the resource section of the result will expand any
+       * resource attached to an IAM policy to include resources lower in the
+       * resource hierarchy.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and the results include an IAM policy with P on a GCP
+       * folder, the results will also include resources in that folder with
+       * permission P.
+       * If true and
+       * [google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+       * is specified, the resource section of the result will expand the
+       * specified resource to include resources lower in the resource hierarchy.
+       * For example, if the request analyzes for which users have permission P on
+       * a GCP folder with this option enabled, the results will include all users
+       * who have permission P on that folder or any lower resource(ex. project).
+       * Default is false.
+       * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The expandResources to set. + * @return This builder for chaining. + */ + public Builder setExpandResources(boolean value) { + + expandResources_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true and
+       * [google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+       * is not specified, the resource section of the result will expand any
+       * resource attached to an IAM policy to include resources lower in the
+       * resource hierarchy.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and the results include an IAM policy with P on a GCP
+       * folder, the results will also include resources in that folder with
+       * permission P.
+       * If true and
+       * [google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector]
+       * is specified, the resource section of the result will expand the
+       * specified resource to include resources lower in the resource hierarchy.
+       * For example, if the request analyzes for which users have permission P on
+       * a GCP folder with this option enabled, the results will include all users
+       * who have permission P on that folder or any lower resource(ex. project).
+       * Default is false.
+       * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearExpandResources() { + + expandResources_ = false; + onChanged(); + return this; + } + + private boolean outputResourceEdges_; + /** + * + * + *
+       * If true, the result will output resource edges, starting
+       * from the policy attached resource, to any expanded resources.
+       * Default is false.
+       * 
+ * + * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The outputResourceEdges. + */ + @java.lang.Override + public boolean getOutputResourceEdges() { + return outputResourceEdges_; + } + /** + * + * + *
+       * If true, the result will output resource edges, starting
+       * from the policy attached resource, to any expanded resources.
+       * Default is false.
+       * 
+ * + * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The outputResourceEdges to set. + * @return This builder for chaining. + */ + public Builder setOutputResourceEdges(boolean value) { + + outputResourceEdges_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, the result will output resource edges, starting
+       * from the policy attached resource, to any expanded resources.
+       * Default is false.
+       * 
+ * + * bool output_resource_edges = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOutputResourceEdges() { + + outputResourceEdges_ = false; + onChanged(); + return this; + } + + private boolean outputGroupEdges_; + /** + * + * + *
+       * If true, the result will output group identity edges, starting
+       * from the binding's group members, to any expanded identities.
+       * Default is false.
+       * 
+ * + * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The outputGroupEdges. + */ + @java.lang.Override + public boolean getOutputGroupEdges() { + return outputGroupEdges_; + } + /** + * + * + *
+       * If true, the result will output group identity edges, starting
+       * from the binding's group members, to any expanded identities.
+       * Default is false.
+       * 
+ * + * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The outputGroupEdges to set. + * @return This builder for chaining. + */ + public Builder setOutputGroupEdges(boolean value) { + + outputGroupEdges_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, the result will output group identity edges, starting
+       * from the binding's group members, to any expanded identities.
+       * Default is false.
+       * 
+ * + * bool output_group_edges = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOutputGroupEdges() { + + outputGroupEdges_ = false; + onChanged(); + return this; + } + + private boolean analyzeServiceAccountImpersonation_; + /** + * + * + *
+       * If true, the response will include access analysis from identities to
+       * resources via service account impersonation. This is a very expensive
+       * operation, because many derived queries will be executed. We highly
+       * recommend you use
+       * [google.cloud.asset.v1.AssetService.ExportIamPolicyAnalysis][google.cloud.asset.v1.AssetService.ExportIamPolicyAnalysis]
+       * rpc instead.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and there's an IAM policy states user A has
+       * iam.serviceAccounts.getAccessToken permission to a service account SA,
+       * and there's another IAM policy states service account SA has permission P
+       * to a GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Another example, if the request analyzes for who has
+       * permission P to a GCP folder F, and there's an IAM policy states user A
+       * has iam.serviceAccounts.actAs permission to a service account SA, and
+       * there's another IAM policy states service account SA has permission P to
+       * the GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Default is false.
+       * 
+ * + * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The analyzeServiceAccountImpersonation. + */ + @java.lang.Override + public boolean getAnalyzeServiceAccountImpersonation() { + return analyzeServiceAccountImpersonation_; + } + /** + * + * + *
+       * If true, the response will include access analysis from identities to
+       * resources via service account impersonation. This is a very expensive
+       * operation, because many derived queries will be executed. We highly
+       * recommend you use
+       * [google.cloud.asset.v1.AssetService.ExportIamPolicyAnalysis][google.cloud.asset.v1.AssetService.ExportIamPolicyAnalysis]
+       * rpc instead.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and there's an IAM policy states user A has
+       * iam.serviceAccounts.getAccessToken permission to a service account SA,
+       * and there's another IAM policy states service account SA has permission P
+       * to a GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Another example, if the request analyzes for who has
+       * permission P to a GCP folder F, and there's an IAM policy states user A
+       * has iam.serviceAccounts.actAs permission to a service account SA, and
+       * there's another IAM policy states service account SA has permission P to
+       * the GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Default is false.
+       * 
+ * + * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The analyzeServiceAccountImpersonation to set. + * @return This builder for chaining. + */ + public Builder setAnalyzeServiceAccountImpersonation(boolean value) { + + analyzeServiceAccountImpersonation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, the response will include access analysis from identities to
+       * resources via service account impersonation. This is a very expensive
+       * operation, because many derived queries will be executed. We highly
+       * recommend you use
+       * [google.cloud.asset.v1.AssetService.ExportIamPolicyAnalysis][google.cloud.asset.v1.AssetService.ExportIamPolicyAnalysis]
+       * rpc instead.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and there's an IAM policy states user A has
+       * iam.serviceAccounts.getAccessToken permission to a service account SA,
+       * and there's another IAM policy states service account SA has permission P
+       * to a GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Another example, if the request analyzes for who has
+       * permission P to a GCP folder F, and there's an IAM policy states user A
+       * has iam.serviceAccounts.actAs permission to a service account SA, and
+       * there's another IAM policy states service account SA has permission P to
+       * the GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Default is false.
+       * 
+ * + * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAnalyzeServiceAccountImpersonation() { + + analyzeServiceAccountImpersonation_ = false; + onChanged(); + return this; + } + + private int maxFanoutsPerGroup_; + /** + * + * + *
+       * The maximum number of fanouts per group when [expand_groups][expand_groups]
+       * is enabled. This internal field is to help load testing and determine a
+       * proper value, and won't be public in the future.
+       * 
+ * + * int32 max_fanouts_per_group = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxFanoutsPerGroup. + */ + @java.lang.Override + public int getMaxFanoutsPerGroup() { + return maxFanoutsPerGroup_; + } + /** + * + * + *
+       * The maximum number of fanouts per group when [expand_groups][expand_groups]
+       * is enabled. This internal field is to help load testing and determine a
+       * proper value, and won't be public in the future.
+       * 
+ * + * int32 max_fanouts_per_group = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maxFanoutsPerGroup to set. + * @return This builder for chaining. + */ + public Builder setMaxFanoutsPerGroup(int value) { + + maxFanoutsPerGroup_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum number of fanouts per group when [expand_groups][expand_groups]
+       * is enabled. This internal field is to help load testing and determine a
+       * proper value, and won't be public in the future.
+       * 
+ * + * int32 max_fanouts_per_group = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMaxFanoutsPerGroup() { + + maxFanoutsPerGroup_ = 0; + onChanged(); + return this; + } + + private int maxFanoutsPerResource_; + /** + * + * + *
+       * The maximum number of fanouts per parent resource, such as
+       * GCP Project etc., when [expand_resources][] is enabled. This internal
+       * field is to help load testing and determine a proper value, and won't be
+       * public in the future.
+       * 
+ * + * int32 max_fanouts_per_resource = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The maxFanoutsPerResource. + */ + @java.lang.Override + public int getMaxFanoutsPerResource() { + return maxFanoutsPerResource_; + } + /** + * + * + *
+       * The maximum number of fanouts per parent resource, such as
+       * GCP Project etc., when [expand_resources][] is enabled. This internal
+       * field is to help load testing and determine a proper value, and won't be
+       * public in the future.
+       * 
+ * + * int32 max_fanouts_per_resource = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The maxFanoutsPerResource to set. + * @return This builder for chaining. + */ + public Builder setMaxFanoutsPerResource(int value) { + + maxFanoutsPerResource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The maximum number of fanouts per parent resource, such as
+       * GCP Project etc., when [expand_resources][] is enabled. This internal
+       * field is to help load testing and determine a proper value, and won't be
+       * public in the future.
+       * 
+ * + * int32 max_fanouts_per_resource = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearMaxFanoutsPerResource() { + + maxFanoutsPerResource_ = 0; + 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.IamPolicyAnalysisQuery.Options) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery.Options) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Options parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Options(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.IamPolicyAnalysisQuery.Options getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private volatile java.lang.Object scope_; + /** + * + * + *
+   * The relative name of the root asset. Only resources and IAM policies within
+   * the scope will be analyzed.
+   * This can only be an organization number (such as "organizations/123"), a
+   * folder number (such as "folders/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345").
+   * To know how to get organization id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+   * To know how to get folder or project id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The scope. + */ + @java.lang.Override + public java.lang.String getScope() { + java.lang.Object ref = scope_; + 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(); + scope_ = s; + return s; + } + } + /** + * + * + *
+   * The relative name of the root asset. Only resources and IAM policies within
+   * the scope will be analyzed.
+   * This can only be an organization number (such as "organizations/123"), a
+   * folder number (such as "folders/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345").
+   * To know how to get organization id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+   * To know how to get folder or project id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for scope. + */ + @java.lang.Override + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_SELECTOR_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resourceSelector_; + /** + * + * + *
+   * Specifies a resource for analysis.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceSelector field is set. + */ + @java.lang.Override + public boolean hasResourceSelector() { + return resourceSelector_ != null; + } + /** + * + * + *
+   * Specifies a resource for analysis.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceSelector. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector() { + return resourceSelector_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() + : resourceSelector_; + } + /** + * + * + *
+   * Specifies a resource for analysis.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder + getResourceSelectorOrBuilder() { + return getResourceSelector(); + } + + public static final int IDENTITY_SELECTOR_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identitySelector_; + /** + * + * + *
+   * Specifies an identity for analysis.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the identitySelector field is set. + */ + @java.lang.Override + public boolean hasIdentitySelector() { + return identitySelector_ != null; + } + /** + * + * + *
+   * Specifies an identity for analysis.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The identitySelector. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector() { + return identitySelector_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() + : identitySelector_; + } + /** + * + * + *
+   * Specifies an identity for analysis.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder + getIdentitySelectorOrBuilder() { + return getIdentitySelector(); + } + + public static final int ACCESS_SELECTOR_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector accessSelector_; + /** + * + * + *
+   * Specifies roles or permissions for analysis. This is optional.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the accessSelector field is set. + */ + @java.lang.Override + public boolean hasAccessSelector() { + return accessSelector_ != null; + } + /** + * + * + *
+   * Specifies roles or permissions for analysis. This is optional.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessSelector. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector() { + return accessSelector_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() + : accessSelector_; + } + /** + * + * + *
+   * Specifies roles or permissions for analysis. This is optional.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder + getAccessSelectorOrBuilder() { + return getAccessSelector(); + } + + public static final int OPTIONS_FIELD_NUMBER = 5; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options_; + /** + * + * + *
+   * The query options.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + @java.lang.Override + public boolean hasOptions() { + return options_ != null; + } + /** + * + * + *
+   * The query options.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions() { + return options_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() + : options_; + } + /** + * + * + *
+   * The query options.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder() { + return getOptions(); + } + + 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 (!getScopeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_); + } + if (resourceSelector_ != null) { + output.writeMessage(2, getResourceSelector()); + } + if (identitySelector_ != null) { + output.writeMessage(3, getIdentitySelector()); + } + if (accessSelector_ != null) { + output.writeMessage(4, getAccessSelector()); + } + if (options_ != null) { + output.writeMessage(5, getOptions()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getScopeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_); + } + if (resourceSelector_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getResourceSelector()); + } + if (identitySelector_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIdentitySelector()); + } + if (accessSelector_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAccessSelector()); + } + if (options_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getOptions()); + } + 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.IamPolicyAnalysisQuery)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisQuery other = + (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) obj; + + if (!getScope().equals(other.getScope())) return false; + if (hasResourceSelector() != other.hasResourceSelector()) return false; + if (hasResourceSelector()) { + if (!getResourceSelector().equals(other.getResourceSelector())) return false; + } + if (hasIdentitySelector() != other.hasIdentitySelector()) return false; + if (hasIdentitySelector()) { + if (!getIdentitySelector().equals(other.getIdentitySelector())) return false; + } + if (hasAccessSelector() != other.hasAccessSelector()) return false; + if (hasAccessSelector()) { + if (!getAccessSelector().equals(other.getAccessSelector())) return false; + } + if (hasOptions() != other.hasOptions()) return false; + if (hasOptions()) { + if (!getOptions().equals(other.getOptions())) 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) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + getScope().hashCode(); + if (hasResourceSelector()) { + hash = (37 * hash) + RESOURCE_SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getResourceSelector().hashCode(); + } + if (hasIdentitySelector()) { + hash = (37 * hash) + IDENTITY_SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getIdentitySelector().hashCode(); + } + if (hasAccessSelector()) { + hash = (37 * hash) + ACCESS_SELECTOR_FIELD_NUMBER; + hash = (53 * hash) + getAccessSelector().hashCode(); + } + if (hasOptions()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptions().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery 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.IamPolicyAnalysisQuery 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; + } + /** + * + * + *
+   * IAM policy analysis query message.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisQuery) + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.class, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisQuery.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(); + scope_ = ""; + + if (resourceSelectorBuilder_ == null) { + resourceSelector_ = null; + } else { + resourceSelector_ = null; + resourceSelectorBuilder_ = null; + } + if (identitySelectorBuilder_ == null) { + identitySelector_ = null; + } else { + identitySelector_ = null; + identitySelectorBuilder_ = null; + } + if (accessSelectorBuilder_ == null) { + accessSelector_ = null; + } else { + accessSelector_ = null; + accessSelectorBuilder_ = null; + } + if (optionsBuilder_ == null) { + options_ = null; + } else { + options_ = null; + optionsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery build() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisQuery result = + new com.google.cloud.asset.v1.IamPolicyAnalysisQuery(this); + result.scope_ = scope_; + if (resourceSelectorBuilder_ == null) { + result.resourceSelector_ = resourceSelector_; + } else { + result.resourceSelector_ = resourceSelectorBuilder_.build(); + } + if (identitySelectorBuilder_ == null) { + result.identitySelector_ = identitySelector_; + } else { + result.identitySelector_ = identitySelectorBuilder_.build(); + } + if (accessSelectorBuilder_ == null) { + result.accessSelector_ = accessSelector_; + } else { + result.accessSelector_ = accessSelectorBuilder_.build(); + } + if (optionsBuilder_ == null) { + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.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.IamPolicyAnalysisQuery) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisQuery other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisQuery.getDefaultInstance()) + return this; + if (!other.getScope().isEmpty()) { + scope_ = other.scope_; + onChanged(); + } + if (other.hasResourceSelector()) { + mergeResourceSelector(other.getResourceSelector()); + } + if (other.hasIdentitySelector()) { + mergeIdentitySelector(other.getIdentitySelector()); + } + if (other.hasAccessSelector()) { + mergeAccessSelector(other.getAccessSelector()); + } + if (other.hasOptions()) { + mergeOptions(other.getOptions()); + } + 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.IamPolicyAnalysisQuery parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisQuery) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object scope_ = ""; + /** + * + * + *
+     * The relative name of the root asset. Only resources and IAM policies within
+     * the scope will be analyzed.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The scope. + */ + public java.lang.String getScope() { + java.lang.Object ref = scope_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scope_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The relative name of the root asset. Only resources and IAM policies within
+     * the scope will be analyzed.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for scope. + */ + public com.google.protobuf.ByteString getScopeBytes() { + java.lang.Object ref = scope_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + scope_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The relative name of the root asset. Only resources and IAM policies within
+     * the scope will be analyzed.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The scope to set. + * @return This builder for chaining. + */ + public Builder setScope(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + scope_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The relative name of the root asset. Only resources and IAM policies within
+     * the scope will be analyzed.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearScope() { + + scope_ = getDefaultInstance().getScope(); + onChanged(); + return this; + } + /** + * + * + *
+     * The relative name of the root asset. Only resources and IAM policies within
+     * the scope will be analyzed.
+     * This can only be an organization number (such as "organizations/123"), a
+     * folder number (such as "folders/123"), a project ID (such as
+     * "projects/my-project-id"), or a project number (such as "projects/12345").
+     * To know how to get organization id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+     * To know how to get folder or project id, visit [here
+     * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+     * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for scope to set. + * @return This builder for chaining. + */ + public Builder setScopeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + scope_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resourceSelector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder> + resourceSelectorBuilder_; + /** + * + * + *
+     * Specifies a resource for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceSelector field is set. + */ + public boolean hasResourceSelector() { + return resourceSelectorBuilder_ != null || resourceSelector_ != null; + } + /** + * + * + *
+     * Specifies a resource for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceSelector. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector() { + if (resourceSelectorBuilder_ == null) { + return resourceSelector_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() + : resourceSelector_; + } else { + return resourceSelectorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Specifies a resource for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setResourceSelector( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector value) { + if (resourceSelectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceSelector_ = value; + onChanged(); + } else { + resourceSelectorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Specifies a resource for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setResourceSelector( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder builderForValue) { + if (resourceSelectorBuilder_ == null) { + resourceSelector_ = builderForValue.build(); + onChanged(); + } else { + resourceSelectorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Specifies a resource for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeResourceSelector( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector value) { + if (resourceSelectorBuilder_ == null) { + if (resourceSelector_ != null) { + resourceSelector_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.newBuilder( + resourceSelector_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceSelector_ = value; + } + onChanged(); + } else { + resourceSelectorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Specifies a resource for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearResourceSelector() { + if (resourceSelectorBuilder_ == null) { + resourceSelector_ = null; + onChanged(); + } else { + resourceSelector_ = null; + resourceSelectorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Specifies a resource for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder + getResourceSelectorBuilder() { + + onChanged(); + return getResourceSelectorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specifies a resource for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder + getResourceSelectorOrBuilder() { + if (resourceSelectorBuilder_ != null) { + return resourceSelectorBuilder_.getMessageOrBuilder(); + } else { + return resourceSelector_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.getDefaultInstance() + : resourceSelector_; + } + } + /** + * + * + *
+     * Specifies a resource for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder> + getResourceSelectorFieldBuilder() { + if (resourceSelectorBuilder_ == null) { + resourceSelectorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder>( + getResourceSelector(), getParentForChildren(), isClean()); + resourceSelector_ = null; + } + return resourceSelectorBuilder_; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identitySelector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder> + identitySelectorBuilder_; + /** + * + * + *
+     * Specifies an identity for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the identitySelector field is set. + */ + public boolean hasIdentitySelector() { + return identitySelectorBuilder_ != null || identitySelector_ != null; + } + /** + * + * + *
+     * Specifies an identity for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The identitySelector. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector() { + if (identitySelectorBuilder_ == null) { + return identitySelector_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() + : identitySelector_; + } else { + return identitySelectorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Specifies an identity for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIdentitySelector( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector value) { + if (identitySelectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + identitySelector_ = value; + onChanged(); + } else { + identitySelectorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Specifies an identity for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIdentitySelector( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder builderForValue) { + if (identitySelectorBuilder_ == null) { + identitySelector_ = builderForValue.build(); + onChanged(); + } else { + identitySelectorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Specifies an identity for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeIdentitySelector( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector value) { + if (identitySelectorBuilder_ == null) { + if (identitySelector_ != null) { + identitySelector_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.newBuilder( + identitySelector_) + .mergeFrom(value) + .buildPartial(); + } else { + identitySelector_ = value; + } + onChanged(); + } else { + identitySelectorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Specifies an identity for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearIdentitySelector() { + if (identitySelectorBuilder_ == null) { + identitySelector_ = null; + onChanged(); + } else { + identitySelector_ = null; + identitySelectorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Specifies an identity for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder + getIdentitySelectorBuilder() { + + onChanged(); + return getIdentitySelectorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specifies an identity for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder + getIdentitySelectorOrBuilder() { + if (identitySelectorBuilder_ != null) { + return identitySelectorBuilder_.getMessageOrBuilder(); + } else { + return identitySelector_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.getDefaultInstance() + : identitySelector_; + } + } + /** + * + * + *
+     * Specifies an identity for analysis.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder> + getIdentitySelectorFieldBuilder() { + if (identitySelectorBuilder_ == null) { + identitySelectorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder>( + getIdentitySelector(), getParentForChildren(), isClean()); + identitySelector_ = null; + } + return identitySelectorBuilder_; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector accessSelector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder> + accessSelectorBuilder_; + /** + * + * + *
+     * Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the accessSelector field is set. + */ + public boolean hasAccessSelector() { + return accessSelectorBuilder_ != null || accessSelector_ != null; + } + /** + * + * + *
+     * Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessSelector. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector() { + if (accessSelectorBuilder_ == null) { + return accessSelector_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() + : accessSelector_; + } else { + return accessSelectorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAccessSelector( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector value) { + if (accessSelectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accessSelector_ = value; + onChanged(); + } else { + accessSelectorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAccessSelector( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder builderForValue) { + if (accessSelectorBuilder_ == null) { + accessSelector_ = builderForValue.build(); + onChanged(); + } else { + accessSelectorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAccessSelector( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector value) { + if (accessSelectorBuilder_ == null) { + if (accessSelector_ != null) { + accessSelector_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.newBuilder( + accessSelector_) + .mergeFrom(value) + .buildPartial(); + } else { + accessSelector_ = value; + } + onChanged(); + } else { + accessSelectorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAccessSelector() { + if (accessSelectorBuilder_ == null) { + accessSelector_ = null; + onChanged(); + } else { + accessSelector_ = null; + accessSelectorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder + getAccessSelectorBuilder() { + + onChanged(); + return getAccessSelectorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder + getAccessSelectorOrBuilder() { + if (accessSelectorBuilder_ != null) { + return accessSelectorBuilder_.getMessageOrBuilder(); + } else { + return accessSelector_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.getDefaultInstance() + : accessSelector_; + } + } + /** + * + * + *
+     * Specifies roles or permissions for analysis. This is optional.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder> + getAccessSelectorFieldBuilder() { + if (accessSelectorBuilder_ == null) { + accessSelectorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder>( + getAccessSelector(), getParentForChildren(), isClean()); + accessSelector_ = null; + } + return accessSelectorBuilder_; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder> + optionsBuilder_; + /** + * + * + *
+     * The query options.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + public boolean hasOptions() { + return optionsBuilder_ != null || options_ != null; + } + /** + * + * + *
+     * The query options.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions() { + if (optionsBuilder_ == null) { + return options_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() + : options_; + } else { + return optionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The query options.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOptions(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + onChanged(); + } else { + optionsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The query options.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOptions( + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder builderForValue) { + if (optionsBuilder_ == null) { + options_ = builderForValue.build(); + onChanged(); + } else { + optionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The query options.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOptions(com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options value) { + if (optionsBuilder_ == null) { + if (options_ != null) { + options_ = + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.newBuilder(options_) + .mergeFrom(value) + .buildPartial(); + } else { + options_ = value; + } + onChanged(); + } else { + optionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The query options.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = null; + onChanged(); + } else { + options_ = null; + optionsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The query options.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder getOptionsBuilder() { + + onChanged(); + return getOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The query options.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilder(); + } else { + return options_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.getDefaultInstance() + : options_; + } + } + /** + * + * + *
+     * The query options.
+     * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder>( + getOptions(), getParentForChildren(), isClean()); + options_ = null; + } + return optionsBuilder_; + } + + @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.IamPolicyAnalysisQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisQuery) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisQuery(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisQuery getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamPolicyAnalysisQuery parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IamPolicyAnalysisQuery(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.IamPolicyAnalysisQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java new file mode 100644 index 000000000..90a4fbc8f --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java @@ -0,0 +1,233 @@ +/* + * 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/asset_service.proto + +package com.google.cloud.asset.v1; + +public interface IamPolicyAnalysisQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The relative name of the root asset. Only resources and IAM policies within
+   * the scope will be analyzed.
+   * This can only be an organization number (such as "organizations/123"), a
+   * folder number (such as "folders/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345").
+   * To know how to get organization id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+   * To know how to get folder or project id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The scope. + */ + java.lang.String getScope(); + /** + * + * + *
+   * The relative name of the root asset. Only resources and IAM policies within
+   * the scope will be analyzed.
+   * This can only be an organization number (such as "organizations/123"), a
+   * folder number (such as "folders/123"), a project ID (such as
+   * "projects/my-project-id"), or a project number (such as "projects/12345").
+   * To know how to get organization id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id).
+   * To know how to get folder or project id, visit [here
+   * ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects).
+   * 
+ * + * string scope = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for scope. + */ + com.google.protobuf.ByteString getScopeBytes(); + + /** + * + * + *
+   * Specifies a resource for analysis.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceSelector field is set. + */ + boolean hasResourceSelector(); + /** + * + * + *
+   * Specifies a resource for analysis.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceSelector. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector(); + /** + * + * + *
+   * Specifies a resource for analysis.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder + getResourceSelectorOrBuilder(); + + /** + * + * + *
+   * Specifies an identity for analysis.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the identitySelector field is set. + */ + boolean hasIdentitySelector(); + /** + * + * + *
+   * Specifies an identity for analysis.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The identitySelector. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector(); + /** + * + * + *
+   * Specifies an identity for analysis.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder + getIdentitySelectorOrBuilder(); + + /** + * + * + *
+   * Specifies roles or permissions for analysis. This is optional.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the accessSelector field is set. + */ + boolean hasAccessSelector(); + /** + * + * + *
+   * Specifies roles or permissions for analysis. This is optional.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessSelector. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector(); + /** + * + * + *
+   * Specifies roles or permissions for analysis. This is optional.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder + getAccessSelectorOrBuilder(); + + /** + * + * + *
+   * The query options.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + boolean hasOptions(); + /** + * + * + *
+   * The query options.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.Options getOptions(); + /** + * + * + *
+   * The query options.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery.Options options = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQuery.OptionsOrBuilder getOptionsOrBuilder(); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java new file mode 100644 index 000000000..0f8885400 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java @@ -0,0 +1,10499 @@ +/* + * 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; + +/** + * + * + *
+ * IAM Policy analysis result, consisting of one IAM policy binding and derived
+ * access control lists.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult} + */ +public final class IamPolicyAnalysisResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult) + IamPolicyAnalysisResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use IamPolicyAnalysisResult.newBuilder() to construct. + private IamPolicyAnalysisResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IamPolicyAnalysisResult() { + attachedResourceFullName_ = ""; + accessControlLists_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IamPolicyAnalysisResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IamPolicyAnalysisResult( + 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(); + + attachedResourceFullName_ = s; + break; + } + case 18: + { + com.google.iam.v1.Binding.Builder subBuilder = null; + if (iamBinding_ != null) { + subBuilder = iamBinding_.toBuilder(); + } + iamBinding_ = + input.readMessage(com.google.iam.v1.Binding.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(iamBinding_); + iamBinding_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + accessControlLists_ = + new java.util.ArrayList< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList>(); + mutable_bitField0_ |= 0x00000001; + } + accessControlLists_.add( + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.parser(), + extensionRegistry)); + break; + } + case 34: + { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder subBuilder = + null; + if (identityList_ != null) { + subBuilder = identityList_.toBuilder(); + } + identityList_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(identityList_); + identityList_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + fullyExplored_ = input.readBool(); + 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)) { + accessControlLists_ = java.util.Collections.unmodifiableList(accessControlLists_); + } + 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_IamPolicyAnalysisResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder.class); + } + + public interface ResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+     *     --)
+     * 
+ * + * string full_resource_name = 1; + * + * @return The fullResourceName. + */ + java.lang.String getFullResourceName(); + /** + * + * + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+     *     --)
+     * 
+ * + * string full_resource_name = 1; + * + * @return The bytes for fullResourceName. + */ + com.google.protobuf.ByteString getFullResourceNameBytes(); + + /** + * + * + *
+     * The analysis state of this resource.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * + * @return Whether the analysisState field is set. + */ + boolean hasAnalysisState(); + /** + * + * + *
+     * The analysis state of this resource.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * + * @return The analysisState. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState(); + /** + * + * + *
+     * The analysis state of this resource.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder(); + } + /** + * + * + *
+   * A Google Cloud resource under analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Resource} + */ + public static final class Resource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) + ResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Resource.newBuilder() to construct. + private Resource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Resource() { + fullResourceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Resource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Resource( + 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(); + + fullResourceName_ = s; + break; + } + case 18: + { + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder subBuilder = null; + if (analysisState_ != null) { + subBuilder = analysisState_.toBuilder(); + } + analysisState_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisState_); + analysisState_ = subBuilder.buildPartial(); + } + + 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_IamPolicyAnalysisResult_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder.class); + } + + public static final int FULL_RESOURCE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object fullResourceName_; + /** + * + * + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+     *     --)
+     * 
+ * + * string full_resource_name = 1; + * + * @return The fullResourceName. + */ + @java.lang.Override + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + 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(); + fullResourceName_ = s; + return s; + } + } + /** + * + * + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+     *     --)
+     * 
+ * + * string full_resource_name = 1; + * + * @return The bytes for fullResourceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANALYSIS_STATE_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; + /** + * + * + *
+     * The analysis state of this resource.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * + * @return Whether the analysisState field is set. + */ + @java.lang.Override + public boolean hasAnalysisState() { + return analysisState_ != null; + } + /** + * + * + *
+     * The analysis state of this resource.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * + * @return The analysisState. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { + return analysisState_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() + : analysisState_; + } + /** + * + * + *
+     * The analysis state of this resource.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { + return getAnalysisState(); + } + + 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 (!getFullResourceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fullResourceName_); + } + if (analysisState_ != null) { + output.writeMessage(2, getAnalysisState()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFullResourceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fullResourceName_); + } + if (analysisState_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAnalysisState()); + } + 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.IamPolicyAnalysisResult.Resource)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource other = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) obj; + + if (!getFullResourceName().equals(other.getFullResourceName())) return false; + if (hasAnalysisState() != other.hasAnalysisState()) return false; + if (hasAnalysisState()) { + if (!getAnalysisState().equals(other.getAnalysisState())) 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) + FULL_RESOURCE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFullResourceName().hashCode(); + if (hasAnalysisState()) { + hash = (37 * hash) + ANALYSIS_STATE_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisState().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource 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.IamPolicyAnalysisResult.Resource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource 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.IamPolicyAnalysisResult.Resource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource 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.IamPolicyAnalysisResult.Resource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource 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.IamPolicyAnalysisResult.Resource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource 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.IamPolicyAnalysisResult.Resource 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.IamPolicyAnalysisResult.Resource 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.IamPolicyAnalysisResult.Resource 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; + } + /** + * + * + *
+     * A Google Cloud resource under analysis.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Resource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) + com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.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(); + fullResourceName_ = ""; + + if (analysisStateBuilder_ == null) { + analysisState_ = null; + } else { + analysisState_ = null; + analysisStateBuilder_ = null; + } + 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_IamPolicyAnalysisResult_Resource_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource result = + new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource(this); + result.fullResourceName_ = fullResourceName_; + if (analysisStateBuilder_ == null) { + result.analysisState_ = analysisState_; + } else { + result.analysisState_ = analysisStateBuilder_.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.IamPolicyAnalysisResult.Resource) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource other) { + if (other + == com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.getDefaultInstance()) + return this; + if (!other.getFullResourceName().isEmpty()) { + fullResourceName_ = other.fullResourceName_; + onChanged(); + } + if (other.hasAnalysisState()) { + mergeAnalysisState(other.getAnalysisState()); + } + 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.IamPolicyAnalysisResult.Resource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object fullResourceName_ = ""; + /** + * + * + *
+       * The [full resource
+       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+       *     --)
+       * 
+ * + * string full_resource_name = 1; + * + * @return The fullResourceName. + */ + public java.lang.String getFullResourceName() { + java.lang.Object ref = fullResourceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + fullResourceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The [full resource
+       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+       *     --)
+       * 
+ * + * string full_resource_name = 1; + * + * @return The bytes for fullResourceName. + */ + public com.google.protobuf.ByteString getFullResourceNameBytes() { + java.lang.Object ref = fullResourceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + fullResourceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The [full resource
+       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+       *     --)
+       * 
+ * + * string full_resource_name = 1; + * + * @param value The fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + fullResourceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The [full resource
+       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+       *     --)
+       * 
+ * + * string full_resource_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearFullResourceName() { + + fullResourceName_ = getDefaultInstance().getFullResourceName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The [full resource
+       * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+       * (-- api-linter: core::0122::name-suffix=disabled
+       *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+       *     --)
+       * 
+ * + * string full_resource_name = 1; + * + * @param value The bytes for fullResourceName to set. + * @return This builder for chaining. + */ + public Builder setFullResourceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + fullResourceName_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> + analysisStateBuilder_; + /** + * + * + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * + * @return Whether the analysisState field is set. + */ + public boolean hasAnalysisState() { + return analysisStateBuilder_ != null || analysisState_ != null; + } + /** + * + * + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * + * @return The analysisState. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { + if (analysisStateBuilder_ == null) { + return analysisState_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() + : analysisState_; + } else { + return analysisStateBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder setAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (analysisStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisState_ = value; + onChanged(); + } else { + analysisStateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder setAnalysisState( + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { + if (analysisStateBuilder_ == null) { + analysisState_ = builderForValue.build(); + onChanged(); + } else { + analysisStateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder mergeAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (analysisStateBuilder_ == null) { + if (analysisState_ != null) { + analysisState_ = + com.google.cloud.asset.v1.IamPolicyAnalysisState.newBuilder(analysisState_) + .mergeFrom(value) + .buildPartial(); + } else { + analysisState_ = value; + } + onChanged(); + } else { + analysisStateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder clearAnalysisState() { + if (analysisStateBuilder_ == null) { + analysisState_ = null; + onChanged(); + } else { + analysisState_ = null; + analysisStateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder getAnalysisStateBuilder() { + + onChanged(); + return getAnalysisStateFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { + if (analysisStateBuilder_ != null) { + return analysisStateBuilder_.getMessageOrBuilder(); + } else { + return analysisState_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() + : analysisState_; + } + } + /** + * + * + *
+       * The analysis state of this resource.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> + getAnalysisStateFieldBuilder() { + if (analysisStateBuilder_ == null) { + analysisStateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder>( + getAnalysisState(), getParentForChildren(), isClean()); + analysisState_ = null; + } + return analysisStateBuilder_; + } + + @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.IamPolicyAnalysisResult.Resource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Resource) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Resource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Resource(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.IamPolicyAnalysisResult.Resource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AccessOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The role.
+     * 
+ * + * string role = 1; + * + * @return The role. + */ + java.lang.String getRole(); + /** + * + * + *
+     * The role.
+     * 
+ * + * string role = 1; + * + * @return The bytes for role. + */ + com.google.protobuf.ByteString getRoleBytes(); + + /** + * + * + *
+     * The permission.
+     * 
+ * + * string permission = 2; + * + * @return The permission. + */ + java.lang.String getPermission(); + /** + * + * + *
+     * The permission.
+     * 
+ * + * string permission = 2; + * + * @return The bytes for permission. + */ + com.google.protobuf.ByteString getPermissionBytes(); + + /** + * + * + *
+     * The analysis state of this access.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + * + * @return Whether the analysisState field is set. + */ + boolean hasAnalysisState(); + /** + * + * + *
+     * The analysis state of this access.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + * + * @return The analysisState. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState(); + /** + * + * + *
+     * The analysis state of this access.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder(); + + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.OneofAccessCase + getOneofAccessCase(); + } + /** + * + * + *
+   * An IAM role or permission under analysis.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Access} + */ + public static final class Access extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) + AccessOrBuilder { + private static final long serialVersionUID = 0L; + // Use Access.newBuilder() to construct. + private Access(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Access() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Access(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Access( + 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(); + oneofAccessCase_ = 1; + oneofAccess_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + oneofAccessCase_ = 2; + oneofAccess_ = s; + break; + } + case 26: + { + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder subBuilder = null; + if (analysisState_ != null) { + subBuilder = analysisState_.toBuilder(); + } + analysisState_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisState_); + analysisState_ = subBuilder.buildPartial(); + } + + 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_IamPolicyAnalysisResult_Access_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder.class); + } + + private int oneofAccessCase_ = 0; + private java.lang.Object oneofAccess_; + + public enum OneofAccessCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ROLE(1), + PERMISSION(2), + ONEOFACCESS_NOT_SET(0); + private final int value; + + private OneofAccessCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static OneofAccessCase valueOf(int value) { + return forNumber(value); + } + + public static OneofAccessCase forNumber(int value) { + switch (value) { + case 1: + return ROLE; + case 2: + return PERMISSION; + case 0: + return ONEOFACCESS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public OneofAccessCase getOneofAccessCase() { + return OneofAccessCase.forNumber(oneofAccessCase_); + } + + public static final int ROLE_FIELD_NUMBER = 1; + /** + * + * + *
+     * The role.
+     * 
+ * + * string role = 1; + * + * @return The role. + */ + public java.lang.String getRole() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 1) { + ref = oneofAccess_; + } + 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(); + if (oneofAccessCase_ == 1) { + oneofAccess_ = s; + } + return s; + } + } + /** + * + * + *
+     * The role.
+     * 
+ * + * string role = 1; + * + * @return The bytes for role. + */ + public com.google.protobuf.ByteString getRoleBytes() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 1) { + ref = oneofAccess_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (oneofAccessCase_ == 1) { + oneofAccess_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERMISSION_FIELD_NUMBER = 2; + /** + * + * + *
+     * The permission.
+     * 
+ * + * string permission = 2; + * + * @return The permission. + */ + public java.lang.String getPermission() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 2) { + ref = oneofAccess_; + } + 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(); + if (oneofAccessCase_ == 2) { + oneofAccess_ = s; + } + return s; + } + } + /** + * + * + *
+     * The permission.
+     * 
+ * + * string permission = 2; + * + * @return The bytes for permission. + */ + public com.google.protobuf.ByteString getPermissionBytes() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 2) { + ref = oneofAccess_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (oneofAccessCase_ == 2) { + oneofAccess_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANALYSIS_STATE_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; + /** + * + * + *
+     * The analysis state of this access.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + * + * @return Whether the analysisState field is set. + */ + @java.lang.Override + public boolean hasAnalysisState() { + return analysisState_ != null; + } + /** + * + * + *
+     * The analysis state of this access.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + * + * @return The analysisState. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { + return analysisState_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() + : analysisState_; + } + /** + * + * + *
+     * The analysis state of this access.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { + return getAnalysisState(); + } + + 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 (oneofAccessCase_ == 1) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, oneofAccess_); + } + if (oneofAccessCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, oneofAccess_); + } + if (analysisState_ != null) { + output.writeMessage(3, getAnalysisState()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (oneofAccessCase_ == 1) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, oneofAccess_); + } + if (oneofAccessCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, oneofAccess_); + } + if (analysisState_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAnalysisState()); + } + 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.IamPolicyAnalysisResult.Access)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access other = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access) obj; + + if (hasAnalysisState() != other.hasAnalysisState()) return false; + if (hasAnalysisState()) { + if (!getAnalysisState().equals(other.getAnalysisState())) return false; + } + if (!getOneofAccessCase().equals(other.getOneofAccessCase())) return false; + switch (oneofAccessCase_) { + case 1: + if (!getRole().equals(other.getRole())) return false; + break; + case 2: + if (!getPermission().equals(other.getPermission())) return false; + break; + case 0: + default: + } + 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 (hasAnalysisState()) { + hash = (37 * hash) + ANALYSIS_STATE_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisState().hashCode(); + } + switch (oneofAccessCase_) { + case 1: + hash = (37 * hash) + ROLE_FIELD_NUMBER; + hash = (53 * hash) + getRole().hashCode(); + break; + case 2: + hash = (37 * hash) + PERMISSION_FIELD_NUMBER; + hash = (53 * hash) + getPermission().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access 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.IamPolicyAnalysisResult.Access parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access 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.IamPolicyAnalysisResult.Access parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access 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.IamPolicyAnalysisResult.Access parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access 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.IamPolicyAnalysisResult.Access parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access 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.IamPolicyAnalysisResult.Access 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.IamPolicyAnalysisResult.Access 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.IamPolicyAnalysisResult.Access 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 IAM role or permission under analysis.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Access} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Access_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.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(); + if (analysisStateBuilder_ == null) { + analysisState_ = null; + } else { + analysisState_ = null; + analysisStateBuilder_ = null; + } + oneofAccessCase_ = 0; + oneofAccess_ = null; + 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_IamPolicyAnalysisResult_Access_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access result = + new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access(this); + if (oneofAccessCase_ == 1) { + result.oneofAccess_ = oneofAccess_; + } + if (oneofAccessCase_ == 2) { + result.oneofAccess_ = oneofAccess_; + } + if (analysisStateBuilder_ == null) { + result.analysisState_ = analysisState_; + } else { + result.analysisState_ = analysisStateBuilder_.build(); + } + result.oneofAccessCase_ = oneofAccessCase_; + 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.IamPolicyAnalysisResult.Access) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.getDefaultInstance()) + return this; + if (other.hasAnalysisState()) { + mergeAnalysisState(other.getAnalysisState()); + } + switch (other.getOneofAccessCase()) { + case ROLE: + { + oneofAccessCase_ = 1; + oneofAccess_ = other.oneofAccess_; + onChanged(); + break; + } + case PERMISSION: + { + oneofAccessCase_ = 2; + oneofAccess_ = other.oneofAccess_; + onChanged(); + break; + } + case ONEOFACCESS_NOT_SET: + { + break; + } + } + 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.IamPolicyAnalysisResult.Access parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int oneofAccessCase_ = 0; + private java.lang.Object oneofAccess_; + + public OneofAccessCase getOneofAccessCase() { + return OneofAccessCase.forNumber(oneofAccessCase_); + } + + public Builder clearOneofAccess() { + oneofAccessCase_ = 0; + oneofAccess_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+       * The role.
+       * 
+ * + * string role = 1; + * + * @return The role. + */ + @java.lang.Override + public java.lang.String getRole() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 1) { + ref = oneofAccess_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (oneofAccessCase_ == 1) { + oneofAccess_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The role.
+       * 
+ * + * string role = 1; + * + * @return The bytes for role. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRoleBytes() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 1) { + ref = oneofAccess_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (oneofAccessCase_ == 1) { + oneofAccess_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The role.
+       * 
+ * + * string role = 1; + * + * @param value The role to set. + * @return This builder for chaining. + */ + public Builder setRole(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + oneofAccessCase_ = 1; + oneofAccess_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The role.
+       * 
+ * + * string role = 1; + * + * @return This builder for chaining. + */ + public Builder clearRole() { + if (oneofAccessCase_ == 1) { + oneofAccessCase_ = 0; + oneofAccess_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The role.
+       * 
+ * + * string role = 1; + * + * @param value The bytes for role to set. + * @return This builder for chaining. + */ + public Builder setRoleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + oneofAccessCase_ = 1; + oneofAccess_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * The permission.
+       * 
+ * + * string permission = 2; + * + * @return The permission. + */ + @java.lang.Override + public java.lang.String getPermission() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 2) { + ref = oneofAccess_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (oneofAccessCase_ == 2) { + oneofAccess_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The permission.
+       * 
+ * + * string permission = 2; + * + * @return The bytes for permission. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPermissionBytes() { + java.lang.Object ref = ""; + if (oneofAccessCase_ == 2) { + ref = oneofAccess_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (oneofAccessCase_ == 2) { + oneofAccess_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The permission.
+       * 
+ * + * string permission = 2; + * + * @param value The permission to set. + * @return This builder for chaining. + */ + public Builder setPermission(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + oneofAccessCase_ = 2; + oneofAccess_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The permission.
+       * 
+ * + * string permission = 2; + * + * @return This builder for chaining. + */ + public Builder clearPermission() { + if (oneofAccessCase_ == 2) { + oneofAccessCase_ = 0; + oneofAccess_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * The permission.
+       * 
+ * + * string permission = 2; + * + * @param value The bytes for permission to set. + * @return This builder for chaining. + */ + public Builder setPermissionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + oneofAccessCase_ = 2; + oneofAccess_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> + analysisStateBuilder_; + /** + * + * + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + * + * @return Whether the analysisState field is set. + */ + public boolean hasAnalysisState() { + return analysisStateBuilder_ != null || analysisState_ != null; + } + /** + * + * + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + * + * @return The analysisState. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { + if (analysisStateBuilder_ == null) { + return analysisState_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() + : analysisState_; + } else { + return analysisStateBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + public Builder setAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (analysisStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisState_ = value; + onChanged(); + } else { + analysisStateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + public Builder setAnalysisState( + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { + if (analysisStateBuilder_ == null) { + analysisState_ = builderForValue.build(); + onChanged(); + } else { + analysisStateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + public Builder mergeAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (analysisStateBuilder_ == null) { + if (analysisState_ != null) { + analysisState_ = + com.google.cloud.asset.v1.IamPolicyAnalysisState.newBuilder(analysisState_) + .mergeFrom(value) + .buildPartial(); + } else { + analysisState_ = value; + } + onChanged(); + } else { + analysisStateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + public Builder clearAnalysisState() { + if (analysisStateBuilder_ == null) { + analysisState_ = null; + onChanged(); + } else { + analysisState_ = null; + analysisStateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder getAnalysisStateBuilder() { + + onChanged(); + return getAnalysisStateFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { + if (analysisStateBuilder_ != null) { + return analysisStateBuilder_.getMessageOrBuilder(); + } else { + return analysisState_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() + : analysisState_; + } + } + /** + * + * + *
+       * The analysis state of this access.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> + getAnalysisStateFieldBuilder() { + if (analysisStateBuilder_ == null) { + analysisStateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder>( + getAnalysisState(), getParentForChildren(), isClean()); + analysisState_ = null; + } + return analysisStateBuilder_; + } + + @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.IamPolicyAnalysisResult.Access) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Access) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Access parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Access(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.IamPolicyAnalysisResult.Access getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface IdentityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The identity name in any form of members appear in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+     * as:
+     * - user:foo@google.com
+     * - group:group1@google.com
+     * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+     * - projectOwner:some_project_id
+     * - domain:google.com
+     * - allUsers
+     * - etc.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * The identity name in any form of members appear in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+     * as:
+     * - user:foo@google.com
+     * - group:group1@google.com
+     * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+     * - projectOwner:some_project_id
+     * - domain:google.com
+     * - allUsers
+     * - etc.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * The analysis state of this identity.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * + * @return Whether the analysisState field is set. + */ + boolean hasAnalysisState(); + /** + * + * + *
+     * The analysis state of this identity.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * + * @return The analysisState. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState(); + /** + * + * + *
+     * The analysis state of this identity.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder(); + } + /** + * + * + *
+   * An identity under analysis.
+   * (-- api-linter: core::0123::resource-annotation=disabled
+   *     aip.dev/not-precedent: Identity name is not a resource. --)
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Identity} + */ + public static final class Identity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) + IdentityOrBuilder { + private static final long serialVersionUID = 0L; + // Use Identity.newBuilder() to construct. + private Identity(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Identity() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Identity(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Identity( + 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(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder subBuilder = null; + if (analysisState_ != null) { + subBuilder = analysisState_.toBuilder(); + } + analysisState_ = + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisState.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisState_); + analysisState_ = subBuilder.buildPartial(); + } + + 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_IamPolicyAnalysisResult_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * The identity name in any form of members appear in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+     * as:
+     * - user:foo@google.com
+     * - group:group1@google.com
+     * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+     * - projectOwner:some_project_id
+     * - domain:google.com
+     * - allUsers
+     * - etc.
+     * 
+ * + * string name = 1; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * The identity name in any form of members appear in
+     * [IAM policy
+     * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+     * as:
+     * - user:foo@google.com
+     * - group:group1@google.com
+     * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+     * - projectOwner:some_project_id
+     * - domain:google.com
+     * - allUsers
+     * - etc.
+     * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ANALYSIS_STATE_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; + /** + * + * + *
+     * The analysis state of this identity.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * + * @return Whether the analysisState field is set. + */ + @java.lang.Override + public boolean hasAnalysisState() { + return analysisState_ != null; + } + /** + * + * + *
+     * The analysis state of this identity.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * + * @return The analysisState. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { + return analysisState_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() + : analysisState_; + } + /** + * + * + *
+     * The analysis state of this identity.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { + return getAnalysisState(); + } + + 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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (analysisState_ != null) { + output.writeMessage(2, getAnalysisState()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (analysisState_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAnalysisState()); + } + 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.IamPolicyAnalysisResult.Identity)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity other = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) obj; + + if (!getName().equals(other.getName())) return false; + if (hasAnalysisState() != other.hasAnalysisState()) return false; + if (hasAnalysisState()) { + if (!getAnalysisState().equals(other.getAnalysisState())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasAnalysisState()) { + hash = (37 * hash) + ANALYSIS_STATE_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisState().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity 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.IamPolicyAnalysisResult.Identity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity 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.IamPolicyAnalysisResult.Identity parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity 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.IamPolicyAnalysisResult.Identity parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity 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.IamPolicyAnalysisResult.Identity parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity 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.IamPolicyAnalysisResult.Identity 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.IamPolicyAnalysisResult.Identity 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.IamPolicyAnalysisResult.Identity 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 identity under analysis.
+     * (-- api-linter: core::0123::resource-annotation=disabled
+     *     aip.dev/not-precedent: Identity name is not a resource. --)
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Identity} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.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(); + name_ = ""; + + if (analysisStateBuilder_ == null) { + analysisState_ = null; + } else { + analysisState_ = null; + analysisStateBuilder_ = null; + } + 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_IamPolicyAnalysisResult_Identity_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity result = + new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity(this); + result.name_ = name_; + if (analysisStateBuilder_ == null) { + result.analysisState_ = analysisState_; + } else { + result.analysisState_ = analysisStateBuilder_.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.IamPolicyAnalysisResult.Identity) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity other) { + if (other + == com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasAnalysisState()) { + mergeAnalysisState(other.getAnalysisState()); + } + 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.IamPolicyAnalysisResult.Identity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * The identity name in any form of members appear in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+       * as:
+       * - user:foo@google.com
+       * - group:group1@google.com
+       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+       * - projectOwner:some_project_id
+       * - domain:google.com
+       * - allUsers
+       * - etc.
+       * 
+ * + * string name = 1; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The identity name in any form of members appear in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+       * as:
+       * - user:foo@google.com
+       * - group:group1@google.com
+       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+       * - projectOwner:some_project_id
+       * - domain:google.com
+       * - allUsers
+       * - etc.
+       * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The identity name in any form of members appear in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+       * as:
+       * - user:foo@google.com
+       * - group:group1@google.com
+       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+       * - projectOwner:some_project_id
+       * - domain:google.com
+       * - allUsers
+       * - etc.
+       * 
+ * + * string name = 1; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The identity name in any form of members appear in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+       * as:
+       * - user:foo@google.com
+       * - group:group1@google.com
+       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+       * - projectOwner:some_project_id
+       * - domain:google.com
+       * - allUsers
+       * - etc.
+       * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The identity name in any form of members appear in
+       * [IAM policy
+       * binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such
+       * as:
+       * - user:foo@google.com
+       * - group:group1@google.com
+       * - serviceAccount:s1@prj1.iam.gserviceaccount.com
+       * - projectOwner:some_project_id
+       * - domain:google.com
+       * - allUsers
+       * - etc.
+       * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisState analysisState_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> + analysisStateBuilder_; + /** + * + * + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * + * @return Whether the analysisState field is set. + */ + public boolean hasAnalysisState() { + return analysisStateBuilder_ != null || analysisState_ != null; + } + /** + * + * + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + * + * @return The analysisState. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState getAnalysisState() { + if (analysisStateBuilder_ == null) { + return analysisState_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() + : analysisState_; + } else { + return analysisStateBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder setAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (analysisStateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + analysisState_ = value; + onChanged(); + } else { + analysisStateBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder setAnalysisState( + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder builderForValue) { + if (analysisStateBuilder_ == null) { + analysisState_ = builderForValue.build(); + onChanged(); + } else { + analysisStateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder mergeAnalysisState(com.google.cloud.asset.v1.IamPolicyAnalysisState value) { + if (analysisStateBuilder_ == null) { + if (analysisState_ != null) { + analysisState_ = + com.google.cloud.asset.v1.IamPolicyAnalysisState.newBuilder(analysisState_) + .mergeFrom(value) + .buildPartial(); + } else { + analysisState_ = value; + } + onChanged(); + } else { + analysisStateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public Builder clearAnalysisState() { + if (analysisStateBuilder_ == null) { + analysisState_ = null; + onChanged(); + } else { + analysisState_ = null; + analysisStateBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder getAnalysisStateBuilder() { + + onChanged(); + return getAnalysisStateFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder getAnalysisStateOrBuilder() { + if (analysisStateBuilder_ != null) { + return analysisStateBuilder_.getMessageOrBuilder(); + } else { + return analysisState_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance() + : analysisState_; + } + } + /** + * + * + *
+       * The analysis state of this identity.
+       * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisState analysis_state = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder> + getAnalysisStateFieldBuilder() { + if (analysisStateBuilder_ == null) { + analysisStateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisState, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder>( + getAnalysisState(), getParentForChildren(), isClean()); + analysisState_ = null; + } + return analysisStateBuilder_; + } + + @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.IamPolicyAnalysisResult.Identity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Identity) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Identity parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Identity(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.IamPolicyAnalysisResult.Identity getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EdgeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The source node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string source_node = 1; + * + * @return The sourceNode. + */ + java.lang.String getSourceNode(); + /** + * + * + *
+     * The source node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string source_node = 1; + * + * @return The bytes for sourceNode. + */ + com.google.protobuf.ByteString getSourceNodeBytes(); + + /** + * + * + *
+     * The target node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string target_node = 2; + * + * @return The targetNode. + */ + java.lang.String getTargetNode(); + /** + * + * + *
+     * The target node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string target_node = 2; + * + * @return The bytes for targetNode. + */ + com.google.protobuf.ByteString getTargetNodeBytes(); + } + /** + * + * + *
+   * A directional edge.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Edge} + */ + public static final class Edge extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) + EdgeOrBuilder { + private static final long serialVersionUID = 0L; + // Use Edge.newBuilder() to construct. + private Edge(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Edge() { + sourceNode_ = ""; + targetNode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Edge(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Edge( + 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(); + + sourceNode_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + targetNode_ = 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_IamPolicyAnalysisResult_Edge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder.class); + } + + public static final int SOURCE_NODE_FIELD_NUMBER = 1; + private volatile java.lang.Object sourceNode_; + /** + * + * + *
+     * The source node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string source_node = 1; + * + * @return The sourceNode. + */ + @java.lang.Override + public java.lang.String getSourceNode() { + java.lang.Object ref = sourceNode_; + 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(); + sourceNode_ = s; + return s; + } + } + /** + * + * + *
+     * The source node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string source_node = 1; + * + * @return The bytes for sourceNode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSourceNodeBytes() { + java.lang.Object ref = sourceNode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TARGET_NODE_FIELD_NUMBER = 2; + private volatile java.lang.Object targetNode_; + /** + * + * + *
+     * The target node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string target_node = 2; + * + * @return The targetNode. + */ + @java.lang.Override + public java.lang.String getTargetNode() { + java.lang.Object ref = targetNode_; + 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(); + targetNode_ = s; + return s; + } + } + /** + * + * + *
+     * The target node of the edge. For example, it could be a full resource
+     * name for a resource node or an email of an identity.
+     * 
+ * + * string target_node = 2; + * + * @return The bytes for targetNode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTargetNodeBytes() { + java.lang.Object ref = targetNode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetNode_ = 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 (!getSourceNodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceNode_); + } + if (!getTargetNodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, targetNode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSourceNodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceNode_); + } + if (!getTargetNodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, targetNode_); + } + 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.IamPolicyAnalysisResult.Edge)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge other = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) obj; + + if (!getSourceNode().equals(other.getSourceNode())) return false; + if (!getTargetNode().equals(other.getTargetNode())) 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) + SOURCE_NODE_FIELD_NUMBER; + hash = (53 * hash) + getSourceNode().hashCode(); + hash = (37 * hash) + TARGET_NODE_FIELD_NUMBER; + hash = (53 * hash) + getTargetNode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge 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.IamPolicyAnalysisResult.Edge parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge 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.IamPolicyAnalysisResult.Edge parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge 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.IamPolicyAnalysisResult.Edge parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge 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.IamPolicyAnalysisResult.Edge parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge 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.IamPolicyAnalysisResult.Edge 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.IamPolicyAnalysisResult.Edge 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.IamPolicyAnalysisResult.Edge 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; + } + /** + * + * + *
+     * A directional edge.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.Edge} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) + com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_Edge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.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(); + sourceNode_ = ""; + + targetNode_ = ""; + + 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_IamPolicyAnalysisResult_Edge_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge result = + new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge(this); + result.sourceNode_ = sourceNode_; + result.targetNode_ = targetNode_; + 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.IamPolicyAnalysisResult.Edge) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()) + return this; + if (!other.getSourceNode().isEmpty()) { + sourceNode_ = other.sourceNode_; + onChanged(); + } + if (!other.getTargetNode().isEmpty()) { + targetNode_ = other.targetNode_; + 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.IamPolicyAnalysisResult.Edge parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object sourceNode_ = ""; + /** + * + * + *
+       * The source node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string source_node = 1; + * + * @return The sourceNode. + */ + public java.lang.String getSourceNode() { + java.lang.Object ref = sourceNode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sourceNode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The source node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string source_node = 1; + * + * @return The bytes for sourceNode. + */ + public com.google.protobuf.ByteString getSourceNodeBytes() { + java.lang.Object ref = sourceNode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sourceNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The source node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string source_node = 1; + * + * @param value The sourceNode to set. + * @return This builder for chaining. + */ + public Builder setSourceNode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sourceNode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The source node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string source_node = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceNode() { + + sourceNode_ = getDefaultInstance().getSourceNode(); + onChanged(); + return this; + } + /** + * + * + *
+       * The source node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string source_node = 1; + * + * @param value The bytes for sourceNode to set. + * @return This builder for chaining. + */ + public Builder setSourceNodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sourceNode_ = value; + onChanged(); + return this; + } + + private java.lang.Object targetNode_ = ""; + /** + * + * + *
+       * The target node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string target_node = 2; + * + * @return The targetNode. + */ + public java.lang.String getTargetNode() { + java.lang.Object ref = targetNode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + targetNode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The target node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string target_node = 2; + * + * @return The bytes for targetNode. + */ + public com.google.protobuf.ByteString getTargetNodeBytes() { + java.lang.Object ref = targetNode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + targetNode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The target node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string target_node = 2; + * + * @param value The targetNode to set. + * @return This builder for chaining. + */ + public Builder setTargetNode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + targetNode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The target node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string target_node = 2; + * + * @return This builder for chaining. + */ + public Builder clearTargetNode() { + + targetNode_ = getDefaultInstance().getTargetNode(); + onChanged(); + return this; + } + /** + * + * + *
+       * The target node of the edge. For example, it could be a full resource
+       * name for a resource node or an email of an identity.
+       * 
+ * + * string target_node = 2; + * + * @param value The bytes for targetNode to set. + * @return This builder for chaining. + */ + public Builder setTargetNodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + targetNode_ = 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.IamPolicyAnalysisResult.Edge) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.Edge) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Edge parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Edge(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.IamPolicyAnalysisResult.Edge getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AccessControlListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + java.util.List getResourcesList(); + /** + * + * + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getResources(int index); + /** + * + * + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + int getResourcesCount(); + /** + * + * + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + java.util.List + getResourcesOrBuilderList(); + /** + * + * + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder getResourcesOrBuilder( + int index); + + /** + * + * + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + java.util.List getAccessesList(); + /** + * + * + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getAccesses(int index); + /** + * + * + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + int getAccessesCount(); + /** + * + * + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + java.util.List + getAccessesOrBuilderList(); + /** + * + * + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder getAccessesOrBuilder( + int index); + + /** + * + * + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The [Edge.source_node][] contains
+     * the full resource name of a parent resource and [Edge.target_node][]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + java.util.List getResourceEdgesList(); + /** + * + * + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The [Edge.source_node][] contains
+     * the full resource name of a parent resource and [Edge.target_node][]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getResourceEdges(int index); + /** + * + * + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The [Edge.source_node][] contains
+     * the full resource name of a parent resource and [Edge.target_node][]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + int getResourceEdgesCount(); + /** + * + * + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The [Edge.source_node][] contains
+     * the full resource name of a parent resource and [Edge.target_node][]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + java.util.List + getResourceEdgesOrBuilderList(); + /** + * + * + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The [Edge.source_node][] contains
+     * the full resource name of a parent resource and [Edge.target_node][]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getResourceEdgesOrBuilder( + int index); + } + /** + * + * + *
+   * An access control list, derived from the above IAM policy binding, which
+   * contains a set of resources and accesses. May include one
+   * item from each set to compose an access control entry.
+   * NOTICE that there could be multiple access control lists for one IAM policy
+   * binding. The access control lists are created based on resource and access
+   * combinations.
+   * For example, assume we have the following cases in one IAM policy binding:
+   * - Permission P1 and P2 apply to resource R1 and R2;
+   * - Permission P3 applies to resource R2 and R3;
+   * This will result in the following access control lists:
+   * - AccessControlList 1: [R1, R2], [P1, P2]
+   * - AccessControlList 2: [R2, R3], [P3]
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList} + */ + public static final class AccessControlList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) + AccessControlListOrBuilder { + private static final long serialVersionUID = 0L; + // Use AccessControlList.newBuilder() to construct. + private AccessControlList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AccessControlList() { + resources_ = java.util.Collections.emptyList(); + accesses_ = java.util.Collections.emptyList(); + resourceEdges_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AccessControlList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AccessControlList( + 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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resources_ = + new java.util.ArrayList< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource>(); + mutable_bitField0_ |= 0x00000001; + } + resources_.add( + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.parser(), + extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + accesses_ = + new java.util.ArrayList< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access>(); + mutable_bitField0_ |= 0x00000002; + } + accesses_.add( + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.parser(), + extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + resourceEdges_ = + new java.util.ArrayList< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge>(); + mutable_bitField0_ |= 0x00000004; + } + resourceEdges_.add( + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.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)) { + resources_ = java.util.Collections.unmodifiableList(resources_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + accesses_ = java.util.Collections.unmodifiableList(accesses_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + resourceEdges_ = java.util.Collections.unmodifiableList(resourceEdges_); + } + 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_IamPolicyAnalysisResult_AccessControlList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder.class); + } + + public static final int RESOURCES_FIELD_NUMBER = 1; + private java.util.List resources_; + /** + * + * + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + @java.lang.Override + public java.util.List + getResourcesList() { + return resources_; + } + /** + * + * + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder> + getResourcesOrBuilderList() { + return resources_; + } + /** + * + * + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + @java.lang.Override + public int getResourcesCount() { + return resources_.size(); + } + /** + * + * + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getResources(int index) { + return resources_.get(index); + } + /** + * + * + *
+     * The resources that match one of the following conditions:
+     * - The resource_selector, if it is specified in request;
+     * - Otherwise, resources reachable from the policy attached resource.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder + getResourcesOrBuilder(int index) { + return resources_.get(index); + } + + public static final int ACCESSES_FIELD_NUMBER = 2; + private java.util.List accesses_; + /** + * + * + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + @java.lang.Override + public java.util.List + getAccessesList() { + return accesses_; + } + /** + * + * + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder> + getAccessesOrBuilderList() { + return accesses_; + } + /** + * + * + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + @java.lang.Override + public int getAccessesCount() { + return accesses_.size(); + } + /** + * + * + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getAccesses(int index) { + return accesses_.get(index); + } + /** + * + * + *
+     * The accesses that match one of the following conditions:
+     * - The access_selector, if it is specified in request;
+     * - Otherwise, access specifiers reachable from the policy binding's role.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder getAccessesOrBuilder( + int index) { + return accesses_.get(index); + } + + public static final int RESOURCE_EDGES_FIELD_NUMBER = 3; + private java.util.List resourceEdges_; + /** + * + * + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The [Edge.source_node][] contains
+     * the full resource name of a parent resource and [Edge.target_node][]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + @java.lang.Override + public java.util.List + getResourceEdgesList() { + return resourceEdges_; + } + /** + * + * + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The [Edge.source_node][] contains
+     * the full resource name of a parent resource and [Edge.target_node][]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + @java.lang.Override + public java.util.List + getResourceEdgesOrBuilderList() { + return resourceEdges_; + } + /** + * + * + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The [Edge.source_node][] contains
+     * the full resource name of a parent resource and [Edge.target_node][]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + @java.lang.Override + public int getResourceEdgesCount() { + return resourceEdges_.size(); + } + /** + * + * + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The [Edge.source_node][] contains
+     * the full resource name of a parent resource and [Edge.target_node][]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getResourceEdges(int index) { + return resourceEdges_.get(index); + } + /** + * + * + *
+     * Resource edges of the graph starting from the policy attached
+     * resource to any descendant resources. The [Edge.source_node][] contains
+     * the full resource name of a parent resource and [Edge.target_node][]
+     * contains the full resource name of a child resource. This field is
+     * present only if the output_resource_edges option is enabled in request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder + getResourceEdgesOrBuilder(int index) { + return resourceEdges_.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 { + for (int i = 0; i < resources_.size(); i++) { + output.writeMessage(1, resources_.get(i)); + } + for (int i = 0; i < accesses_.size(); i++) { + output.writeMessage(2, accesses_.get(i)); + } + for (int i = 0; i < resourceEdges_.size(); i++) { + output.writeMessage(3, resourceEdges_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < resources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, resources_.get(i)); + } + for (int i = 0; i < accesses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, accesses_.get(i)); + } + for (int i = 0; i < resourceEdges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, resourceEdges_.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.IamPolicyAnalysisResult.AccessControlList)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList other = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) obj; + + if (!getResourcesList().equals(other.getResourcesList())) return false; + if (!getAccessesList().equals(other.getAccessesList())) return false; + if (!getResourceEdgesList().equals(other.getResourceEdgesList())) 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 (getResourcesCount() > 0) { + hash = (37 * hash) + RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getResourcesList().hashCode(); + } + if (getAccessesCount() > 0) { + hash = (37 * hash) + ACCESSES_FIELD_NUMBER; + hash = (53 * hash) + getAccessesList().hashCode(); + } + if (getResourceEdgesCount() > 0) { + hash = (37 * hash) + RESOURCE_EDGES_FIELD_NUMBER; + hash = (53 * hash) + getResourceEdgesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList 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.IamPolicyAnalysisResult.AccessControlList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList 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.IamPolicyAnalysisResult.AccessControlList parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList 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.IamPolicyAnalysisResult.AccessControlList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList 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.IamPolicyAnalysisResult.AccessControlList + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList + 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.IamPolicyAnalysisResult.AccessControlList 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.IamPolicyAnalysisResult.AccessControlList 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.IamPolicyAnalysisResult.AccessControlList 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 access control list, derived from the above IAM policy binding, which
+     * contains a set of resources and accesses. May include one
+     * item from each set to compose an access control entry.
+     * NOTICE that there could be multiple access control lists for one IAM policy
+     * binding. The access control lists are created based on resource and access
+     * combinations.
+     * For example, assume we have the following cases in one IAM policy binding:
+     * - Permission P1 and P2 apply to resource R1 and R2;
+     * - Permission P3 applies to resource R2 and R3;
+     * This will result in the following access control lists:
+     * - AccessControlList 1: [R1, R2], [P1, P2]
+     * - AccessControlList 2: [R2, R3], [P3]
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder.class); + } + + // Construct using + // com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResourcesFieldBuilder(); + getAccessesFieldBuilder(); + getResourceEdgesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + resourcesBuilder_.clear(); + } + if (accessesBuilder_ == null) { + accesses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + accessesBuilder_.clear(); + } + if (resourceEdgesBuilder_ == null) { + resourceEdges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + resourceEdgesBuilder_.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_IamPolicyAnalysisResult_AccessControlList_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList result = + new com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList(this); + int from_bitField0_ = bitField0_; + if (resourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + resources_ = java.util.Collections.unmodifiableList(resources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resources_ = resources_; + } else { + result.resources_ = resourcesBuilder_.build(); + } + if (accessesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + accesses_ = java.util.Collections.unmodifiableList(accesses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.accesses_ = accesses_; + } else { + result.accesses_ = accessesBuilder_.build(); + } + if (resourceEdgesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + resourceEdges_ = java.util.Collections.unmodifiableList(resourceEdges_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.resourceEdges_ = resourceEdges_; + } else { + result.resourceEdges_ = resourceEdgesBuilder_.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.IamPolicyAnalysisResult.AccessControlList) { + return mergeFrom( + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList other) { + if (other + == com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList + .getDefaultInstance()) return this; + if (resourcesBuilder_ == null) { + if (!other.resources_.isEmpty()) { + if (resources_.isEmpty()) { + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourcesIsMutable(); + resources_.addAll(other.resources_); + } + onChanged(); + } + } else { + if (!other.resources_.isEmpty()) { + if (resourcesBuilder_.isEmpty()) { + resourcesBuilder_.dispose(); + resourcesBuilder_ = null; + resources_ = other.resources_; + bitField0_ = (bitField0_ & ~0x00000001); + resourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourcesFieldBuilder() + : null; + } else { + resourcesBuilder_.addAllMessages(other.resources_); + } + } + } + if (accessesBuilder_ == null) { + if (!other.accesses_.isEmpty()) { + if (accesses_.isEmpty()) { + accesses_ = other.accesses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAccessesIsMutable(); + accesses_.addAll(other.accesses_); + } + onChanged(); + } + } else { + if (!other.accesses_.isEmpty()) { + if (accessesBuilder_.isEmpty()) { + accessesBuilder_.dispose(); + accessesBuilder_ = null; + accesses_ = other.accesses_; + bitField0_ = (bitField0_ & ~0x00000002); + accessesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAccessesFieldBuilder() + : null; + } else { + accessesBuilder_.addAllMessages(other.accesses_); + } + } + } + if (resourceEdgesBuilder_ == null) { + if (!other.resourceEdges_.isEmpty()) { + if (resourceEdges_.isEmpty()) { + resourceEdges_ = other.resourceEdges_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureResourceEdgesIsMutable(); + resourceEdges_.addAll(other.resourceEdges_); + } + onChanged(); + } + } else { + if (!other.resourceEdges_.isEmpty()) { + if (resourceEdgesBuilder_.isEmpty()) { + resourceEdgesBuilder_.dispose(); + resourceEdgesBuilder_ = null; + resourceEdges_ = other.resourceEdges_; + bitField0_ = (bitField0_ & ~0x00000004); + resourceEdgesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResourceEdgesFieldBuilder() + : null; + } else { + resourceEdgesBuilder_.addAllMessages(other.resourceEdges_); + } + } + } + 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.IamPolicyAnalysisResult.AccessControlList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + resources_ = java.util.Collections.emptyList(); + + private void ensureResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resources_ = + new java.util.ArrayList( + resources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder> + resourcesBuilder_; + + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public java.util.List + getResourcesList() { + if (resourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resources_); + } else { + return resourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public int getResourcesCount() { + if (resourcesBuilder_ == null) { + return resources_.size(); + } else { + return resourcesBuilder_.getCount(); + } + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource getResources(int index) { + if (resourcesBuilder_ == null) { + return resources_.get(index); + } else { + return resourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder setResources( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.set(index, value); + onChanged(); + } else { + resourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder setResources( + int index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.set(index, builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder addResources( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(value); + onChanged(); + } else { + resourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder addResources( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource value) { + if (resourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourcesIsMutable(); + resources_.add(index, value); + onChanged(); + } else { + resourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder addResources( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder addResources( + int index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder builderForValue) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(index, builderForValue.build()); + onChanged(); + } else { + resourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder addAllResources( + java.lang.Iterable + values) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resources_); + onChanged(); + } else { + resourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder clearResources() { + if (resourcesBuilder_ == null) { + resources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + resourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder removeResources(int index) { + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.remove(index); + onChanged(); + } else { + resourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder getResourcesBuilder( + int index) { + return getResourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder + getResourcesOrBuilder(int index) { + if (resourcesBuilder_ == null) { + return resources_.get(index); + } else { + return resourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder> + getResourcesOrBuilderList() { + if (resourcesBuilder_ != null) { + return resourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resources_); + } + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder + addResourcesBuilder() { + return getResourcesFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.getDefaultInstance()); + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder addResourcesBuilder( + int index) { + return getResourcesFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.getDefaultInstance()); + } + /** + * + * + *
+       * The resources that match one of the following conditions:
+       * - The resource_selector, if it is specified in request;
+       * - Otherwise, resources reachable from the policy attached resource.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public java.util.List + getResourcesBuilderList() { + return getResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Resource.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.ResourceOrBuilder>( + resources_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + resources_ = null; + } + return resourcesBuilder_; + } + + private java.util.List accesses_ = + java.util.Collections.emptyList(); + + private void ensureAccessesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + accesses_ = + new java.util.ArrayList( + accesses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder> + accessesBuilder_; + + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public java.util.List + getAccessesList() { + if (accessesBuilder_ == null) { + return java.util.Collections.unmodifiableList(accesses_); + } else { + return accessesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public int getAccessesCount() { + if (accessesBuilder_ == null) { + return accesses_.size(); + } else { + return accessesBuilder_.getCount(); + } + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access getAccesses(int index) { + if (accessesBuilder_ == null) { + return accesses_.get(index); + } else { + return accessesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder setAccesses( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access value) { + if (accessesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessesIsMutable(); + accesses_.set(index, value); + onChanged(); + } else { + accessesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder setAccesses( + int index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder builderForValue) { + if (accessesBuilder_ == null) { + ensureAccessesIsMutable(); + accesses_.set(index, builderForValue.build()); + onChanged(); + } else { + accessesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder addAccesses(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access value) { + if (accessesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessesIsMutable(); + accesses_.add(value); + onChanged(); + } else { + accessesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder addAccesses( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access value) { + if (accessesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessesIsMutable(); + accesses_.add(index, value); + onChanged(); + } else { + accessesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder addAccesses( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder builderForValue) { + if (accessesBuilder_ == null) { + ensureAccessesIsMutable(); + accesses_.add(builderForValue.build()); + onChanged(); + } else { + accessesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder addAccesses( + int index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder builderForValue) { + if (accessesBuilder_ == null) { + ensureAccessesIsMutable(); + accesses_.add(index, builderForValue.build()); + onChanged(); + } else { + accessesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder addAllAccesses( + java.lang.Iterable + values) { + if (accessesBuilder_ == null) { + ensureAccessesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accesses_); + onChanged(); + } else { + accessesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder clearAccesses() { + if (accessesBuilder_ == null) { + accesses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + accessesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public Builder removeAccesses(int index) { + if (accessesBuilder_ == null) { + ensureAccessesIsMutable(); + accesses_.remove(index); + onChanged(); + } else { + accessesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder getAccessesBuilder( + int index) { + return getAccessesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder getAccessesOrBuilder( + int index) { + if (accessesBuilder_ == null) { + return accesses_.get(index); + } else { + return accessesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public java.util.List< + ? extends com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder> + getAccessesOrBuilderList() { + if (accessesBuilder_ != null) { + return accessesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accesses_); + } + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder addAccessesBuilder() { + return getAccessesFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.getDefaultInstance()); + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder addAccessesBuilder( + int index) { + return getAccessesFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.getDefaultInstance()); + } + /** + * + * + *
+       * The accesses that match one of the following conditions:
+       * - The access_selector, if it is specified in request;
+       * - Otherwise, access specifiers reachable from the policy binding's role.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Access accesses = 2; + */ + public java.util.List + getAccessesBuilderList() { + return getAccessesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder> + getAccessesFieldBuilder() { + if (accessesBuilder_ == null) { + accessesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Access.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessOrBuilder>( + accesses_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + accesses_ = null; + } + return accessesBuilder_; + } + + private java.util.List + resourceEdges_ = java.util.Collections.emptyList(); + + private void ensureResourceEdgesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + resourceEdges_ = + new java.util.ArrayList( + resourceEdges_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> + resourceEdgesBuilder_; + + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public java.util.List + getResourceEdgesList() { + if (resourceEdgesBuilder_ == null) { + return java.util.Collections.unmodifiableList(resourceEdges_); + } else { + return resourceEdgesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public int getResourceEdgesCount() { + if (resourceEdgesBuilder_ == null) { + return resourceEdges_.size(); + } else { + return resourceEdgesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getResourceEdges(int index) { + if (resourceEdgesBuilder_ == null) { + return resourceEdges_.get(index); + } else { + return resourceEdgesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder setResourceEdges( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { + if (resourceEdgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceEdgesIsMutable(); + resourceEdges_.set(index, value); + onChanged(); + } else { + resourceEdgesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder setResourceEdges( + int index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { + if (resourceEdgesBuilder_ == null) { + ensureResourceEdgesIsMutable(); + resourceEdges_.set(index, builderForValue.build()); + onChanged(); + } else { + resourceEdgesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder addResourceEdges( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { + if (resourceEdgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceEdgesIsMutable(); + resourceEdges_.add(value); + onChanged(); + } else { + resourceEdgesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder addResourceEdges( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { + if (resourceEdgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceEdgesIsMutable(); + resourceEdges_.add(index, value); + onChanged(); + } else { + resourceEdgesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder addResourceEdges( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { + if (resourceEdgesBuilder_ == null) { + ensureResourceEdgesIsMutable(); + resourceEdges_.add(builderForValue.build()); + onChanged(); + } else { + resourceEdgesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder addResourceEdges( + int index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { + if (resourceEdgesBuilder_ == null) { + ensureResourceEdgesIsMutable(); + resourceEdges_.add(index, builderForValue.build()); + onChanged(); + } else { + resourceEdgesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder addAllResourceEdges( + java.lang.Iterable + values) { + if (resourceEdgesBuilder_ == null) { + ensureResourceEdgesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceEdges_); + onChanged(); + } else { + resourceEdgesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder clearResourceEdges() { + if (resourceEdgesBuilder_ == null) { + resourceEdges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + resourceEdgesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder removeResourceEdges(int index) { + if (resourceEdgesBuilder_ == null) { + ensureResourceEdgesIsMutable(); + resourceEdges_.remove(index); + onChanged(); + } else { + resourceEdgesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder getResourceEdgesBuilder( + int index) { + return getResourceEdgesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder + getResourceEdgesOrBuilder(int index) { + if (resourceEdgesBuilder_ == null) { + return resourceEdges_.get(index); + } else { + return resourceEdgesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> + getResourceEdgesOrBuilderList() { + if (resourceEdgesBuilder_ != null) { + return resourceEdgesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(resourceEdges_); + } + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder + addResourceEdgesBuilder() { + return getResourceEdgesFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()); + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder addResourceEdgesBuilder( + int index) { + return getResourceEdgesFieldBuilder() + .addBuilder( + index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()); + } + /** + * + * + *
+       * Resource edges of the graph starting from the policy attached
+       * resource to any descendant resources. The [Edge.source_node][] contains
+       * the full resource name of a parent resource and [Edge.target_node][]
+       * contains the full resource name of a child resource. This field is
+       * present only if the output_resource_edges option is enabled in request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public java.util.List + getResourceEdgesBuilderList() { + return getResourceEdgesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> + getResourceEdgesFieldBuilder() { + if (resourceEdgesBuilder_ == null) { + resourceEdgesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder>( + resourceEdges_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + resourceEdges_ = null; + } + return resourceEdgesBuilder_; + } + + @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.IamPolicyAnalysisResult.AccessControlList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AccessControlList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AccessControlList(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.IamPolicyAnalysisResult.AccessControlList + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface IdentityListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + java.util.List getIdentitiesList(); + /** + * + * + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getIdentities(int index); + /** + * + * + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + int getIdentitiesCount(); + /** + * + * + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + java.util.List + getIdentitiesOrBuilderList(); + /** + * + * + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder getIdentitiesOrBuilder( + int index); + + /** + * + * + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the [identities][]. The [Edge.source_node][]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][] contains a member of the group,
+     * such as `group:child@google.com` or `user:foo@google.com`.
+     * This field is present only if the output_group_edges option is enabled in
+     * request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + java.util.List getGroupEdgesList(); + /** + * + * + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the [identities][]. The [Edge.source_node][]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][] contains a member of the group,
+     * such as `group:child@google.com` or `user:foo@google.com`.
+     * This field is present only if the output_group_edges option is enabled in
+     * request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getGroupEdges(int index); + /** + * + * + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the [identities][]. The [Edge.source_node][]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][] contains a member of the group,
+     * such as `group:child@google.com` or `user:foo@google.com`.
+     * This field is present only if the output_group_edges option is enabled in
+     * request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + int getGroupEdgesCount(); + /** + * + * + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the [identities][]. The [Edge.source_node][]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][] contains a member of the group,
+     * such as `group:child@google.com` or `user:foo@google.com`.
+     * This field is present only if the output_group_edges option is enabled in
+     * request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + java.util.List + getGroupEdgesOrBuilderList(); + /** + * + * + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the [identities][]. The [Edge.source_node][]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][] contains a member of the group,
+     * such as `group:child@google.com` or `user:foo@google.com`.
+     * This field is present only if the output_group_edges option is enabled in
+     * request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getGroupEdgesOrBuilder( + int index); + } + /** + * + * + *
+   * The identities and group edges.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList} + */ + public static final class IdentityList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) + IdentityListOrBuilder { + private static final long serialVersionUID = 0L; + // Use IdentityList.newBuilder() to construct. + private IdentityList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IdentityList() { + identities_ = java.util.Collections.emptyList(); + groupEdges_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IdentityList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IdentityList( + 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: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + identities_ = + new java.util.ArrayList< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity>(); + mutable_bitField0_ |= 0x00000001; + } + identities_.add( + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.parser(), + extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + groupEdges_ = + new java.util.ArrayList< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge>(); + mutable_bitField0_ |= 0x00000002; + } + groupEdges_.add( + input.readMessage( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.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)) { + identities_ = java.util.Collections.unmodifiableList(identities_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + groupEdges_ = java.util.Collections.unmodifiableList(groupEdges_); + } + 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_IamPolicyAnalysisResult_IdentityList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder.class); + } + + public static final int IDENTITIES_FIELD_NUMBER = 1; + private java.util.List identities_; + /** + * + * + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + @java.lang.Override + public java.util.List + getIdentitiesList() { + return identities_; + } + /** + * + * + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder> + getIdentitiesOrBuilderList() { + return identities_; + } + /** + * + * + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + @java.lang.Override + public int getIdentitiesCount() { + return identities_.size(); + } + /** + * + * + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getIdentities(int index) { + return identities_.get(index); + } + /** + * + * + *
+     * Only the identities that match one of the following conditions will be
+     * presented:
+     * - The identity_selector, if it is specified in request;
+     * - Otherwise, identities reachable from the policy binding's members.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder + getIdentitiesOrBuilder(int index) { + return identities_.get(index); + } + + public static final int GROUP_EDGES_FIELD_NUMBER = 2; + private java.util.List groupEdges_; + /** + * + * + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the [identities][]. The [Edge.source_node][]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][] contains a member of the group,
+     * such as `group:child@google.com` or `user:foo@google.com`.
+     * This field is present only if the output_group_edges option is enabled in
+     * request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + @java.lang.Override + public java.util.List + getGroupEdgesList() { + return groupEdges_; + } + /** + * + * + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the [identities][]. The [Edge.source_node][]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][] contains a member of the group,
+     * such as `group:child@google.com` or `user:foo@google.com`.
+     * This field is present only if the output_group_edges option is enabled in
+     * request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + @java.lang.Override + public java.util.List + getGroupEdgesOrBuilderList() { + return groupEdges_; + } + /** + * + * + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the [identities][]. The [Edge.source_node][]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][] contains a member of the group,
+     * such as `group:child@google.com` or `user:foo@google.com`.
+     * This field is present only if the output_group_edges option is enabled in
+     * request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + @java.lang.Override + public int getGroupEdgesCount() { + return groupEdges_.size(); + } + /** + * + * + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the [identities][]. The [Edge.source_node][]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][] contains a member of the group,
+     * such as `group:child@google.com` or `user:foo@google.com`.
+     * This field is present only if the output_group_edges option is enabled in
+     * request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getGroupEdges(int index) { + return groupEdges_.get(index); + } + /** + * + * + *
+     * Group identity edges of the graph starting from the binding's
+     * group members to any node of the [identities][]. The [Edge.source_node][]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][] contains a member of the group,
+     * such as `group:child@google.com` or `user:foo@google.com`.
+     * This field is present only if the output_group_edges option is enabled in
+     * request.
+     * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getGroupEdgesOrBuilder( + int index) { + return groupEdges_.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 { + for (int i = 0; i < identities_.size(); i++) { + output.writeMessage(1, identities_.get(i)); + } + for (int i = 0; i < groupEdges_.size(); i++) { + output.writeMessage(2, groupEdges_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < identities_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, identities_.get(i)); + } + for (int i = 0; i < groupEdges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, groupEdges_.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.IamPolicyAnalysisResult.IdentityList)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList other = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) obj; + + if (!getIdentitiesList().equals(other.getIdentitiesList())) return false; + if (!getGroupEdgesList().equals(other.getGroupEdgesList())) 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 (getIdentitiesCount() > 0) { + hash = (37 * hash) + IDENTITIES_FIELD_NUMBER; + hash = (53 * hash) + getIdentitiesList().hashCode(); + } + if (getGroupEdgesCount() > 0) { + hash = (37 * hash) + GROUP_EDGES_FIELD_NUMBER; + hash = (53 * hash) + getGroupEdgesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList 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.IamPolicyAnalysisResult.IdentityList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList 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.IamPolicyAnalysisResult.IdentityList parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList 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.IamPolicyAnalysisResult.IdentityList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList 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.IamPolicyAnalysisResult.IdentityList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList 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.IamPolicyAnalysisResult.IdentityList 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.IamPolicyAnalysisResult.IdentityList 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.IamPolicyAnalysisResult.IdentityList 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 identities and group edges.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getIdentitiesFieldBuilder(); + getGroupEdgesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (identitiesBuilder_ == null) { + identities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + identitiesBuilder_.clear(); + } + if (groupEdgesBuilder_ == null) { + groupEdges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + groupEdgesBuilder_.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_IamPolicyAnalysisResult_IdentityList_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList result = + new com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList(this); + int from_bitField0_ = bitField0_; + if (identitiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + identities_ = java.util.Collections.unmodifiableList(identities_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.identities_ = identities_; + } else { + result.identities_ = identitiesBuilder_.build(); + } + if (groupEdgesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + groupEdges_ = java.util.Collections.unmodifiableList(groupEdges_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.groupEdges_ = groupEdges_; + } else { + result.groupEdges_ = groupEdgesBuilder_.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.IamPolicyAnalysisResult.IdentityList) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList other) { + if (other + == com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance()) + return this; + if (identitiesBuilder_ == null) { + if (!other.identities_.isEmpty()) { + if (identities_.isEmpty()) { + identities_ = other.identities_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureIdentitiesIsMutable(); + identities_.addAll(other.identities_); + } + onChanged(); + } + } else { + if (!other.identities_.isEmpty()) { + if (identitiesBuilder_.isEmpty()) { + identitiesBuilder_.dispose(); + identitiesBuilder_ = null; + identities_ = other.identities_; + bitField0_ = (bitField0_ & ~0x00000001); + identitiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getIdentitiesFieldBuilder() + : null; + } else { + identitiesBuilder_.addAllMessages(other.identities_); + } + } + } + if (groupEdgesBuilder_ == null) { + if (!other.groupEdges_.isEmpty()) { + if (groupEdges_.isEmpty()) { + groupEdges_ = other.groupEdges_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureGroupEdgesIsMutable(); + groupEdges_.addAll(other.groupEdges_); + } + onChanged(); + } + } else { + if (!other.groupEdges_.isEmpty()) { + if (groupEdgesBuilder_.isEmpty()) { + groupEdgesBuilder_.dispose(); + groupEdgesBuilder_ = null; + groupEdges_ = other.groupEdges_; + bitField0_ = (bitField0_ & ~0x00000002); + groupEdgesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getGroupEdgesFieldBuilder() + : null; + } else { + groupEdgesBuilder_.addAllMessages(other.groupEdges_); + } + } + } + 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.IamPolicyAnalysisResult.IdentityList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + identities_ = java.util.Collections.emptyList(); + + private void ensureIdentitiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + identities_ = + new java.util.ArrayList( + identities_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder> + identitiesBuilder_; + + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public java.util.List + getIdentitiesList() { + if (identitiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(identities_); + } else { + return identitiesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public int getIdentitiesCount() { + if (identitiesBuilder_ == null) { + return identities_.size(); + } else { + return identitiesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity getIdentities(int index) { + if (identitiesBuilder_ == null) { + return identities_.get(index); + } else { + return identitiesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder setIdentities( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity value) { + if (identitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentitiesIsMutable(); + identities_.set(index, value); + onChanged(); + } else { + identitiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder setIdentities( + int index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder builderForValue) { + if (identitiesBuilder_ == null) { + ensureIdentitiesIsMutable(); + identities_.set(index, builderForValue.build()); + onChanged(); + } else { + identitiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder addIdentities( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity value) { + if (identitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentitiesIsMutable(); + identities_.add(value); + onChanged(); + } else { + identitiesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder addIdentities( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity value) { + if (identitiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureIdentitiesIsMutable(); + identities_.add(index, value); + onChanged(); + } else { + identitiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder addIdentities( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder builderForValue) { + if (identitiesBuilder_ == null) { + ensureIdentitiesIsMutable(); + identities_.add(builderForValue.build()); + onChanged(); + } else { + identitiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder addIdentities( + int index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder builderForValue) { + if (identitiesBuilder_ == null) { + ensureIdentitiesIsMutable(); + identities_.add(index, builderForValue.build()); + onChanged(); + } else { + identitiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder addAllIdentities( + java.lang.Iterable + values) { + if (identitiesBuilder_ == null) { + ensureIdentitiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, identities_); + onChanged(); + } else { + identitiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder clearIdentities() { + if (identitiesBuilder_ == null) { + identities_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + identitiesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder removeIdentities(int index) { + if (identitiesBuilder_ == null) { + ensureIdentitiesIsMutable(); + identities_.remove(index); + onChanged(); + } else { + identitiesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder + getIdentitiesBuilder(int index) { + return getIdentitiesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder + getIdentitiesOrBuilder(int index) { + if (identitiesBuilder_ == null) { + return identities_.get(index); + } else { + return identitiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder> + getIdentitiesOrBuilderList() { + if (identitiesBuilder_ != null) { + return identitiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(identities_); + } + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder + addIdentitiesBuilder() { + return getIdentitiesFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.getDefaultInstance()); + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder + addIdentitiesBuilder(int index) { + return getIdentitiesFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.getDefaultInstance()); + } + /** + * + * + *
+       * Only the identities that match one of the following conditions will be
+       * presented:
+       * - The identity_selector, if it is specified in request;
+       * - Otherwise, identities reachable from the policy binding's members.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public java.util.List + getIdentitiesBuilderList() { + return getIdentitiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder> + getIdentitiesFieldBuilder() { + if (identitiesBuilder_ == null) { + identitiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Identity.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityOrBuilder>( + identities_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + identities_ = null; + } + return identitiesBuilder_; + } + + private java.util.List groupEdges_ = + java.util.Collections.emptyList(); + + private void ensureGroupEdgesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + groupEdges_ = + new java.util.ArrayList( + groupEdges_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> + groupEdgesBuilder_; + + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public java.util.List + getGroupEdgesList() { + if (groupEdgesBuilder_ == null) { + return java.util.Collections.unmodifiableList(groupEdges_); + } else { + return groupEdgesBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public int getGroupEdgesCount() { + if (groupEdgesBuilder_ == null) { + return groupEdges_.size(); + } else { + return groupEdgesBuilder_.getCount(); + } + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge getGroupEdges(int index) { + if (groupEdgesBuilder_ == null) { + return groupEdges_.get(index); + } else { + return groupEdgesBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder setGroupEdges( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { + if (groupEdgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupEdgesIsMutable(); + groupEdges_.set(index, value); + onChanged(); + } else { + groupEdgesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder setGroupEdges( + int index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { + if (groupEdgesBuilder_ == null) { + ensureGroupEdgesIsMutable(); + groupEdges_.set(index, builderForValue.build()); + onChanged(); + } else { + groupEdgesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder addGroupEdges(com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { + if (groupEdgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupEdgesIsMutable(); + groupEdges_.add(value); + onChanged(); + } else { + groupEdgesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder addGroupEdges( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge value) { + if (groupEdgesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGroupEdgesIsMutable(); + groupEdges_.add(index, value); + onChanged(); + } else { + groupEdgesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder addGroupEdges( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { + if (groupEdgesBuilder_ == null) { + ensureGroupEdgesIsMutable(); + groupEdges_.add(builderForValue.build()); + onChanged(); + } else { + groupEdgesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder addGroupEdges( + int index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder builderForValue) { + if (groupEdgesBuilder_ == null) { + ensureGroupEdgesIsMutable(); + groupEdges_.add(index, builderForValue.build()); + onChanged(); + } else { + groupEdgesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder addAllGroupEdges( + java.lang.Iterable + values) { + if (groupEdgesBuilder_ == null) { + ensureGroupEdgesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, groupEdges_); + onChanged(); + } else { + groupEdgesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder clearGroupEdges() { + if (groupEdgesBuilder_ == null) { + groupEdges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + groupEdgesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public Builder removeGroupEdges(int index) { + if (groupEdgesBuilder_ == null) { + ensureGroupEdgesIsMutable(); + groupEdges_.remove(index); + onChanged(); + } else { + groupEdgesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder getGroupEdgesBuilder( + int index) { + return getGroupEdgesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder getGroupEdgesOrBuilder( + int index) { + if (groupEdgesBuilder_ == null) { + return groupEdges_.get(index); + } else { + return groupEdgesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public java.util.List< + ? extends com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> + getGroupEdgesOrBuilderList() { + if (groupEdgesBuilder_ != null) { + return groupEdgesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(groupEdges_); + } + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder addGroupEdgesBuilder() { + return getGroupEdgesFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()); + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder addGroupEdgesBuilder( + int index) { + return getGroupEdgesFieldBuilder() + .addBuilder( + index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.getDefaultInstance()); + } + /** + * + * + *
+       * Group identity edges of the graph starting from the binding's
+       * group members to any node of the [identities][]. The [Edge.source_node][]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][] contains a member of the group,
+       * such as `group:child@google.com` or `user:foo@google.com`.
+       * This field is present only if the output_group_edges option is enabled in
+       * request.
+       * 
+ * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.Edge group_edges = 2; + */ + public java.util.List + getGroupEdgesBuilderList() { + return getGroupEdgesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder> + getGroupEdgesFieldBuilder() { + if (groupEdgesBuilder_ == null) { + groupEdgesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.EdgeOrBuilder>( + groupEdges_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + groupEdges_ = null; + } + return groupEdgesBuilder_; + } + + @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.IamPolicyAnalysisResult.IdentityList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IdentityList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IdentityList(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.IamPolicyAnalysisResult.IdentityList + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ATTACHED_RESOURCE_FULL_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object attachedResourceFullName_; + /** + * + * + *
+   * The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the resource to which the [iam_binding][iam_binding] policy attaches.
+   * (-- api-linter: core::0122::name-suffix=disabled
+   *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+   *     --)
+   * 
+ * + * string attached_resource_full_name = 1; + * + * @return The attachedResourceFullName. + */ + @java.lang.Override + public java.lang.String getAttachedResourceFullName() { + java.lang.Object ref = attachedResourceFullName_; + 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(); + attachedResourceFullName_ = s; + return s; + } + } + /** + * + * + *
+   * The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the resource to which the [iam_binding][iam_binding] policy attaches.
+   * (-- api-linter: core::0122::name-suffix=disabled
+   *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+   *     --)
+   * 
+ * + * string attached_resource_full_name = 1; + * + * @return The bytes for attachedResourceFullName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttachedResourceFullNameBytes() { + java.lang.Object ref = attachedResourceFullName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attachedResourceFullName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IAM_BINDING_FIELD_NUMBER = 2; + private com.google.iam.v1.Binding iamBinding_; + /** + * + * + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + * + * @return Whether the iamBinding field is set. + */ + @java.lang.Override + public boolean hasIamBinding() { + return iamBinding_ != null; + } + /** + * + * + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + * + * @return The iamBinding. + */ + @java.lang.Override + public com.google.iam.v1.Binding getIamBinding() { + return iamBinding_ == null ? com.google.iam.v1.Binding.getDefaultInstance() : iamBinding_; + } + /** + * + * + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + @java.lang.Override + public com.google.iam.v1.BindingOrBuilder getIamBindingOrBuilder() { + return getIamBinding(); + } + + public static final int ACCESS_CONTROL_LISTS_FIELD_NUMBER = 3; + private java.util.List + accessControlLists_; + /** + * + * + *
+   * The access control lists derived from the [iam_binding][iam_binding] that
+   * match or potentially match resource and access selectors specified in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + @java.lang.Override + public java.util.List + getAccessControlListsList() { + return accessControlLists_; + } + /** + * + * + *
+   * The access control lists derived from the [iam_binding][iam_binding] that
+   * match or potentially match resource and access selectors specified in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder> + getAccessControlListsOrBuilderList() { + return accessControlLists_; + } + /** + * + * + *
+   * The access control lists derived from the [iam_binding][iam_binding] that
+   * match or potentially match resource and access selectors specified in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + @java.lang.Override + public int getAccessControlListsCount() { + return accessControlLists_.size(); + } + /** + * + * + *
+   * The access control lists derived from the [iam_binding][iam_binding] that
+   * match or potentially match resource and access selectors specified in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getAccessControlLists( + int index) { + return accessControlLists_.get(index); + } + /** + * + * + *
+   * The access control lists derived from the [iam_binding][iam_binding] that
+   * match or potentially match resource and access selectors specified in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder + getAccessControlListsOrBuilder(int index) { + return accessControlLists_.get(index); + } + + public static final int IDENTITY_LIST_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identityList_; + /** + * + * + *
+   * The identity list derived from members of the [iam_binding][iam_binding]
+   * that match or potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + * @return Whether the identityList field is set. + */ + @java.lang.Override + public boolean hasIdentityList() { + return identityList_ != null; + } + /** + * + * + *
+   * The identity list derived from members of the [iam_binding][iam_binding]
+   * that match or potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + * @return The identityList. + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getIdentityList() { + return identityList_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance() + : identityList_; + } + /** + * + * + *
+   * The identity list derived from members of the [iam_binding][iam_binding]
+   * that match or potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder + getIdentityListOrBuilder() { + return getIdentityList(); + } + + public static final int FULLY_EXPLORED_FIELD_NUMBER = 5; + private boolean fullyExplored_; + /** + * + * + *
+   * Represents whether all analyses on the [iam_binding][iam_binding] have
+   * successfully finished.
+   * 
+ * + * bool fully_explored = 5; + * + * @return The fullyExplored. + */ + @java.lang.Override + public boolean getFullyExplored() { + return fullyExplored_; + } + + 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 (!getAttachedResourceFullNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attachedResourceFullName_); + } + if (iamBinding_ != null) { + output.writeMessage(2, getIamBinding()); + } + for (int i = 0; i < accessControlLists_.size(); i++) { + output.writeMessage(3, accessControlLists_.get(i)); + } + if (identityList_ != null) { + output.writeMessage(4, getIdentityList()); + } + if (fullyExplored_ != false) { + output.writeBool(5, fullyExplored_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAttachedResourceFullNameBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attachedResourceFullName_); + } + if (iamBinding_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getIamBinding()); + } + for (int i = 0; i < accessControlLists_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, accessControlLists_.get(i)); + } + if (identityList_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getIdentityList()); + } + if (fullyExplored_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, fullyExplored_); + } + 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.IamPolicyAnalysisResult)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisResult other = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult) obj; + + if (!getAttachedResourceFullName().equals(other.getAttachedResourceFullName())) return false; + if (hasIamBinding() != other.hasIamBinding()) return false; + if (hasIamBinding()) { + if (!getIamBinding().equals(other.getIamBinding())) return false; + } + if (!getAccessControlListsList().equals(other.getAccessControlListsList())) return false; + if (hasIdentityList() != other.hasIdentityList()) return false; + if (hasIdentityList()) { + if (!getIdentityList().equals(other.getIdentityList())) return false; + } + if (getFullyExplored() != other.getFullyExplored()) 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) + ATTACHED_RESOURCE_FULL_NAME_FIELD_NUMBER; + hash = (53 * hash) + getAttachedResourceFullName().hashCode(); + if (hasIamBinding()) { + hash = (37 * hash) + IAM_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getIamBinding().hashCode(); + } + if (getAccessControlListsCount() > 0) { + hash = (37 * hash) + ACCESS_CONTROL_LISTS_FIELD_NUMBER; + hash = (53 * hash) + getAccessControlListsList().hashCode(); + } + if (hasIdentityList()) { + hash = (37 * hash) + IDENTITY_LIST_FIELD_NUMBER; + hash = (53 * hash) + getIdentityList().hashCode(); + } + hash = (37 * hash) + FULLY_EXPLORED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFullyExplored()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult 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.IamPolicyAnalysisResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult 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.IamPolicyAnalysisResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult 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.IamPolicyAnalysisResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult 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.IamPolicyAnalysisResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult 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.IamPolicyAnalysisResult 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.IamPolicyAnalysisResult 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.IamPolicyAnalysisResult 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; + } + /** + * + * + *
+   * IAM Policy analysis result, consisting of one IAM policy binding and derived
+   * access control lists.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisResult) + com.google.cloud.asset.v1.IamPolicyAnalysisResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.class, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAccessControlListsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + attachedResourceFullName_ = ""; + + if (iamBindingBuilder_ == null) { + iamBinding_ = null; + } else { + iamBinding_ = null; + iamBindingBuilder_ = null; + } + if (accessControlListsBuilder_ == null) { + accessControlLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + accessControlListsBuilder_.clear(); + } + if (identityListBuilder_ == null) { + identityList_ = null; + } else { + identityList_ = null; + identityListBuilder_ = null; + } + fullyExplored_ = false; + + 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_IamPolicyAnalysisResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult build() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisResult buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisResult result = + new com.google.cloud.asset.v1.IamPolicyAnalysisResult(this); + int from_bitField0_ = bitField0_; + result.attachedResourceFullName_ = attachedResourceFullName_; + if (iamBindingBuilder_ == null) { + result.iamBinding_ = iamBinding_; + } else { + result.iamBinding_ = iamBindingBuilder_.build(); + } + if (accessControlListsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + accessControlLists_ = java.util.Collections.unmodifiableList(accessControlLists_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.accessControlLists_ = accessControlLists_; + } else { + result.accessControlLists_ = accessControlListsBuilder_.build(); + } + if (identityListBuilder_ == null) { + result.identityList_ = identityList_; + } else { + result.identityList_ = identityListBuilder_.build(); + } + result.fullyExplored_ = fullyExplored_; + 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.IamPolicyAnalysisResult) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisResult other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisResult.getDefaultInstance()) + return this; + if (!other.getAttachedResourceFullName().isEmpty()) { + attachedResourceFullName_ = other.attachedResourceFullName_; + onChanged(); + } + if (other.hasIamBinding()) { + mergeIamBinding(other.getIamBinding()); + } + if (accessControlListsBuilder_ == null) { + if (!other.accessControlLists_.isEmpty()) { + if (accessControlLists_.isEmpty()) { + accessControlLists_ = other.accessControlLists_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAccessControlListsIsMutable(); + accessControlLists_.addAll(other.accessControlLists_); + } + onChanged(); + } + } else { + if (!other.accessControlLists_.isEmpty()) { + if (accessControlListsBuilder_.isEmpty()) { + accessControlListsBuilder_.dispose(); + accessControlListsBuilder_ = null; + accessControlLists_ = other.accessControlLists_; + bitField0_ = (bitField0_ & ~0x00000001); + accessControlListsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAccessControlListsFieldBuilder() + : null; + } else { + accessControlListsBuilder_.addAllMessages(other.accessControlLists_); + } + } + } + if (other.hasIdentityList()) { + mergeIdentityList(other.getIdentityList()); + } + if (other.getFullyExplored() != false) { + setFullyExplored(other.getFullyExplored()); + } + 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.IamPolicyAnalysisResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.IamPolicyAnalysisResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object attachedResourceFullName_ = ""; + /** + * + * + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource to which the [iam_binding][iam_binding] policy attaches.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+     *     --)
+     * 
+ * + * string attached_resource_full_name = 1; + * + * @return The attachedResourceFullName. + */ + public java.lang.String getAttachedResourceFullName() { + java.lang.Object ref = attachedResourceFullName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attachedResourceFullName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource to which the [iam_binding][iam_binding] policy attaches.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+     *     --)
+     * 
+ * + * string attached_resource_full_name = 1; + * + * @return The bytes for attachedResourceFullName. + */ + public com.google.protobuf.ByteString getAttachedResourceFullNameBytes() { + java.lang.Object ref = attachedResourceFullName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attachedResourceFullName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource to which the [iam_binding][iam_binding] policy attaches.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+     *     --)
+     * 
+ * + * string attached_resource_full_name = 1; + * + * @param value The attachedResourceFullName to set. + * @return This builder for chaining. + */ + public Builder setAttachedResourceFullName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + attachedResourceFullName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource to which the [iam_binding][iam_binding] policy attaches.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+     *     --)
+     * 
+ * + * string attached_resource_full_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearAttachedResourceFullName() { + + attachedResourceFullName_ = getDefaultInstance().getAttachedResourceFullName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The [full resource
+     * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+     * of the resource to which the [iam_binding][iam_binding] policy attaches.
+     * (-- api-linter: core::0122::name-suffix=disabled
+     *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+     *     --)
+     * 
+ * + * string attached_resource_full_name = 1; + * + * @param value The bytes for attachedResourceFullName to set. + * @return This builder for chaining. + */ + public Builder setAttachedResourceFullNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + attachedResourceFullName_ = value; + onChanged(); + return this; + } + + private com.google.iam.v1.Binding iamBinding_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Binding, + com.google.iam.v1.Binding.Builder, + com.google.iam.v1.BindingOrBuilder> + iamBindingBuilder_; + /** + * + * + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + * + * @return Whether the iamBinding field is set. + */ + public boolean hasIamBinding() { + return iamBindingBuilder_ != null || iamBinding_ != null; + } + /** + * + * + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + * + * @return The iamBinding. + */ + public com.google.iam.v1.Binding getIamBinding() { + if (iamBindingBuilder_ == null) { + return iamBinding_ == null ? com.google.iam.v1.Binding.getDefaultInstance() : iamBinding_; + } else { + return iamBindingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + public Builder setIamBinding(com.google.iam.v1.Binding value) { + if (iamBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + iamBinding_ = value; + onChanged(); + } else { + iamBindingBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + public Builder setIamBinding(com.google.iam.v1.Binding.Builder builderForValue) { + if (iamBindingBuilder_ == null) { + iamBinding_ = builderForValue.build(); + onChanged(); + } else { + iamBindingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + public Builder mergeIamBinding(com.google.iam.v1.Binding value) { + if (iamBindingBuilder_ == null) { + if (iamBinding_ != null) { + iamBinding_ = + com.google.iam.v1.Binding.newBuilder(iamBinding_).mergeFrom(value).buildPartial(); + } else { + iamBinding_ = value; + } + onChanged(); + } else { + iamBindingBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + public Builder clearIamBinding() { + if (iamBindingBuilder_ == null) { + iamBinding_ = null; + onChanged(); + } else { + iamBinding_ = null; + iamBindingBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + public com.google.iam.v1.Binding.Builder getIamBindingBuilder() { + + onChanged(); + return getIamBindingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + public com.google.iam.v1.BindingOrBuilder getIamBindingOrBuilder() { + if (iamBindingBuilder_ != null) { + return iamBindingBuilder_.getMessageOrBuilder(); + } else { + return iamBinding_ == null ? com.google.iam.v1.Binding.getDefaultInstance() : iamBinding_; + } + } + /** + * + * + *
+     * The Cloud IAM policy binding under analysis.
+     * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Binding, + com.google.iam.v1.Binding.Builder, + com.google.iam.v1.BindingOrBuilder> + getIamBindingFieldBuilder() { + if (iamBindingBuilder_ == null) { + iamBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.iam.v1.Binding, + com.google.iam.v1.Binding.Builder, + com.google.iam.v1.BindingOrBuilder>( + getIamBinding(), getParentForChildren(), isClean()); + iamBinding_ = null; + } + return iamBindingBuilder_; + } + + private java.util.List + accessControlLists_ = java.util.Collections.emptyList(); + + private void ensureAccessControlListsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + accessControlLists_ = + new java.util.ArrayList< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList>( + accessControlLists_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder> + accessControlListsBuilder_; + + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public java.util.List + getAccessControlListsList() { + if (accessControlListsBuilder_ == null) { + return java.util.Collections.unmodifiableList(accessControlLists_); + } else { + return accessControlListsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public int getAccessControlListsCount() { + if (accessControlListsBuilder_ == null) { + return accessControlLists_.size(); + } else { + return accessControlListsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList + getAccessControlLists(int index) { + if (accessControlListsBuilder_ == null) { + return accessControlLists_.get(index); + } else { + return accessControlListsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder setAccessControlLists( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList value) { + if (accessControlListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessControlListsIsMutable(); + accessControlLists_.set(index, value); + onChanged(); + } else { + accessControlListsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder setAccessControlLists( + int index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder + builderForValue) { + if (accessControlListsBuilder_ == null) { + ensureAccessControlListsIsMutable(); + accessControlLists_.set(index, builderForValue.build()); + onChanged(); + } else { + accessControlListsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder addAccessControlLists( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList value) { + if (accessControlListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessControlListsIsMutable(); + accessControlLists_.add(value); + onChanged(); + } else { + accessControlListsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder addAccessControlLists( + int index, com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList value) { + if (accessControlListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAccessControlListsIsMutable(); + accessControlLists_.add(index, value); + onChanged(); + } else { + accessControlListsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder addAccessControlLists( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder + builderForValue) { + if (accessControlListsBuilder_ == null) { + ensureAccessControlListsIsMutable(); + accessControlLists_.add(builderForValue.build()); + onChanged(); + } else { + accessControlListsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder addAccessControlLists( + int index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder + builderForValue) { + if (accessControlListsBuilder_ == null) { + ensureAccessControlListsIsMutable(); + accessControlLists_.add(index, builderForValue.build()); + onChanged(); + } else { + accessControlListsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder addAllAccessControlLists( + java.lang.Iterable< + ? extends com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList> + values) { + if (accessControlListsBuilder_ == null) { + ensureAccessControlListsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accessControlLists_); + onChanged(); + } else { + accessControlListsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder clearAccessControlLists() { + if (accessControlListsBuilder_ == null) { + accessControlLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + accessControlListsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder removeAccessControlLists(int index) { + if (accessControlListsBuilder_ == null) { + ensureAccessControlListsIsMutable(); + accessControlLists_.remove(index); + onChanged(); + } else { + accessControlListsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder + getAccessControlListsBuilder(int index) { + return getAccessControlListsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder + getAccessControlListsOrBuilder(int index) { + if (accessControlListsBuilder_ == null) { + return accessControlLists_.get(index); + } else { + return accessControlListsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder> + getAccessControlListsOrBuilderList() { + if (accessControlListsBuilder_ != null) { + return accessControlListsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(accessControlLists_); + } + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder + addAccessControlListsBuilder() { + return getAccessControlListsFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList + .getDefaultInstance()); + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder + addAccessControlListsBuilder(int index) { + return getAccessControlListsFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList + .getDefaultInstance()); + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][iam_binding] that
+     * match or potentially match resource and access selectors specified in the
+     * request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public java.util.List< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder> + getAccessControlListsBuilderList() { + return getAccessControlListsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder> + getAccessControlListsFieldBuilder() { + if (accessControlListsBuilder_ == null) { + accessControlListsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder>( + accessControlLists_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + accessControlLists_ = null; + } + return accessControlListsBuilder_; + } + + private com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identityList_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder> + identityListBuilder_; + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + * @return Whether the identityList field is set. + */ + public boolean hasIdentityList() { + return identityListBuilder_ != null || identityList_ != null; + } + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + * @return The identityList. + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getIdentityList() { + if (identityListBuilder_ == null) { + return identityList_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance() + : identityList_; + } else { + return identityListBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + public Builder setIdentityList( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList value) { + if (identityListBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + identityList_ = value; + onChanged(); + } else { + identityListBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + public Builder setIdentityList( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder builderForValue) { + if (identityListBuilder_ == null) { + identityList_ = builderForValue.build(); + onChanged(); + } else { + identityListBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + public Builder mergeIdentityList( + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList value) { + if (identityListBuilder_ == null) { + if (identityList_ != null) { + identityList_ = + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.newBuilder( + identityList_) + .mergeFrom(value) + .buildPartial(); + } else { + identityList_ = value; + } + onChanged(); + } else { + identityListBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + public Builder clearIdentityList() { + if (identityListBuilder_ == null) { + identityList_ = null; + onChanged(); + } else { + identityList_ = null; + identityListBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder + getIdentityListBuilder() { + + onChanged(); + return getIdentityListFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + public com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder + getIdentityListOrBuilder() { + if (identityListBuilder_ != null) { + return identityListBuilder_.getMessageOrBuilder(); + } else { + return identityList_ == null + ? com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance() + : identityList_; + } + } + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][iam_binding]
+     * that match or potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder> + getIdentityListFieldBuilder() { + if (identityListBuilder_ == null) { + identityListBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.Builder, + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder>( + getIdentityList(), getParentForChildren(), isClean()); + identityList_ = null; + } + return identityListBuilder_; + } + + private boolean fullyExplored_; + /** + * + * + *
+     * Represents whether all analyses on the [iam_binding][iam_binding] have
+     * successfully finished.
+     * 
+ * + * bool fully_explored = 5; + * + * @return The fullyExplored. + */ + @java.lang.Override + public boolean getFullyExplored() { + return fullyExplored_; + } + /** + * + * + *
+     * Represents whether all analyses on the [iam_binding][iam_binding] have
+     * successfully finished.
+     * 
+ * + * bool fully_explored = 5; + * + * @param value The fullyExplored to set. + * @return This builder for chaining. + */ + public Builder setFullyExplored(boolean value) { + + fullyExplored_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents whether all analyses on the [iam_binding][iam_binding] have
+     * successfully finished.
+     * 
+ * + * bool fully_explored = 5; + * + * @return This builder for chaining. + */ + public Builder clearFullyExplored() { + + fullyExplored_ = false; + 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.IamPolicyAnalysisResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisResult) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisResult(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamPolicyAnalysisResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IamPolicyAnalysisResult(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.IamPolicyAnalysisResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java new file mode 100644 index 000000000..68d2044cc --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java @@ -0,0 +1,224 @@ +/* + * 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 IamPolicyAnalysisResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the resource to which the [iam_binding][iam_binding] policy attaches.
+   * (-- api-linter: core::0122::name-suffix=disabled
+   *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+   *     --)
+   * 
+ * + * string attached_resource_full_name = 1; + * + * @return The attachedResourceFullName. + */ + java.lang.String getAttachedResourceFullName(); + /** + * + * + *
+   * The [full resource
+   * name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
+   * of the resource to which the [iam_binding][iam_binding] policy attaches.
+   * (-- api-linter: core::0122::name-suffix=disabled
+   *     aip.dev/not-precedent: full_resource_name is a public notion in GCP.
+   *     --)
+   * 
+ * + * string attached_resource_full_name = 1; + * + * @return The bytes for attachedResourceFullName. + */ + com.google.protobuf.ByteString getAttachedResourceFullNameBytes(); + + /** + * + * + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + * + * @return Whether the iamBinding field is set. + */ + boolean hasIamBinding(); + /** + * + * + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + * + * @return The iamBinding. + */ + com.google.iam.v1.Binding getIamBinding(); + /** + * + * + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + com.google.iam.v1.BindingOrBuilder getIamBindingOrBuilder(); + + /** + * + * + *
+   * The access control lists derived from the [iam_binding][iam_binding] that
+   * match or potentially match resource and access selectors specified in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + java.util.List + getAccessControlListsList(); + /** + * + * + *
+   * The access control lists derived from the [iam_binding][iam_binding] that
+   * match or potentially match resource and access selectors specified in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList getAccessControlLists( + int index); + /** + * + * + *
+   * The access control lists derived from the [iam_binding][iam_binding] that
+   * match or potentially match resource and access selectors specified in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + int getAccessControlListsCount(); + /** + * + * + *
+   * The access control lists derived from the [iam_binding][iam_binding] that
+   * match or potentially match resource and access selectors specified in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + java.util.List< + ? extends com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder> + getAccessControlListsOrBuilderList(); + /** + * + * + *
+   * The access control lists derived from the [iam_binding][iam_binding] that
+   * match or potentially match resource and access selectors specified in the
+   * request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.AccessControlListOrBuilder + getAccessControlListsOrBuilder(int index); + + /** + * + * + *
+   * The identity list derived from members of the [iam_binding][iam_binding]
+   * that match or potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + * @return Whether the identityList field is set. + */ + boolean hasIdentityList(); + /** + * + * + *
+   * The identity list derived from members of the [iam_binding][iam_binding]
+   * that match or potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + * @return The identityList. + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList getIdentityList(); + /** + * + * + *
+   * The identity list derived from members of the [iam_binding][iam_binding]
+   * that match or potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + */ + com.google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityListOrBuilder + getIdentityListOrBuilder(); + + /** + * + * + *
+   * Represents whether all analyses on the [iam_binding][iam_binding] have
+   * successfully finished.
+   * 
+ * + * bool fully_explored = 5; + * + * @return The fullyExplored. + */ + boolean getFullyExplored(); +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java new file mode 100644 index 000000000..41beef02e --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java @@ -0,0 +1,820 @@ +/* + * 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; + +/** + * + * + *
+ * Represents the detailed state of an entity under analysis, such as a
+ * resource, an identity or an access.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisState} + */ +public final class IamPolicyAnalysisState extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.IamPolicyAnalysisState) + IamPolicyAnalysisStateOrBuilder { + private static final long serialVersionUID = 0L; + // Use IamPolicyAnalysisState.newBuilder() to construct. + private IamPolicyAnalysisState(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private IamPolicyAnalysisState() { + code_ = 0; + cause_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IamPolicyAnalysisState(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IamPolicyAnalysisState( + 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 8: + { + int rawValue = input.readEnum(); + + code_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + cause_ = 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_IamPolicyAnalysisState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisState.class, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder.class); + } + + public static final int CODE_FIELD_NUMBER = 1; + private int code_; + /** + * + * + *
+   * The Google standard error code that best describes the state.
+   * For example:
+   * - OK means the analysis on this entity has been successfully finished;
+   * - PERMISSION_DENIED means an access denied error is encountered;
+   * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+   * in time;
+   * 
+ * + * .google.rpc.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override + public int getCodeValue() { + return code_; + } + /** + * + * + *
+   * The Google standard error code that best describes the state.
+   * For example:
+   * - OK means the analysis on this entity has been successfully finished;
+   * - PERMISSION_DENIED means an access denied error is encountered;
+   * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+   * in time;
+   * 
+ * + * .google.rpc.Code code = 1; + * + * @return The code. + */ + @java.lang.Override + public com.google.rpc.Code getCode() { + @SuppressWarnings("deprecation") + com.google.rpc.Code result = com.google.rpc.Code.valueOf(code_); + return result == null ? com.google.rpc.Code.UNRECOGNIZED : result; + } + + public static final int CAUSE_FIELD_NUMBER = 2; + private volatile java.lang.Object cause_; + /** + * + * + *
+   * The human-readable description of the cause of failure.
+   * 
+ * + * string cause = 2; + * + * @return The cause. + */ + @java.lang.Override + public java.lang.String getCause() { + java.lang.Object ref = cause_; + 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(); + cause_ = s; + return s; + } + } + /** + * + * + *
+   * The human-readable description of the cause of failure.
+   * 
+ * + * string cause = 2; + * + * @return The bytes for cause. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCauseBytes() { + java.lang.Object ref = cause_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cause_ = 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 (code_ != com.google.rpc.Code.OK.getNumber()) { + output.writeEnum(1, code_); + } + if (!getCauseBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, cause_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (code_ != com.google.rpc.Code.OK.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, code_); + } + if (!getCauseBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, cause_); + } + 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.IamPolicyAnalysisState)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.IamPolicyAnalysisState other = + (com.google.cloud.asset.v1.IamPolicyAnalysisState) obj; + + if (code_ != other.code_) return false; + if (!getCause().equals(other.getCause())) 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) + CODE_FIELD_NUMBER; + hash = (53 * hash) + code_; + hash = (37 * hash) + CAUSE_FIELD_NUMBER; + hash = (53 * hash) + getCause().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisState parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisState 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.IamPolicyAnalysisState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisState 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.IamPolicyAnalysisState parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisState 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.IamPolicyAnalysisState parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisState 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.IamPolicyAnalysisState parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisState 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.IamPolicyAnalysisState 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.IamPolicyAnalysisState 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.IamPolicyAnalysisState 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; + } + /** + * + * + *
+   * Represents the detailed state of an entity under analysis, such as a
+   * resource, an identity or an access.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.IamPolicyAnalysisState} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.IamPolicyAnalysisState) + com.google.cloud.asset.v1.IamPolicyAnalysisStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetProto + .internal_static_google_cloud_asset_v1_IamPolicyAnalysisState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.IamPolicyAnalysisState.class, + com.google.cloud.asset.v1.IamPolicyAnalysisState.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.IamPolicyAnalysisState.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(); + code_ = 0; + + cause_ = ""; + + 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_IamPolicyAnalysisState_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState getDefaultInstanceForType() { + return com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState build() { + com.google.cloud.asset.v1.IamPolicyAnalysisState result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.IamPolicyAnalysisState buildPartial() { + com.google.cloud.asset.v1.IamPolicyAnalysisState result = + new com.google.cloud.asset.v1.IamPolicyAnalysisState(this); + result.code_ = code_; + result.cause_ = cause_; + 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.IamPolicyAnalysisState) { + return mergeFrom((com.google.cloud.asset.v1.IamPolicyAnalysisState) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.IamPolicyAnalysisState other) { + if (other == com.google.cloud.asset.v1.IamPolicyAnalysisState.getDefaultInstance()) + return this; + if (other.code_ != 0) { + setCodeValue(other.getCodeValue()); + } + if (!other.getCause().isEmpty()) { + cause_ = other.cause_; + 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.IamPolicyAnalysisState parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.asset.v1.IamPolicyAnalysisState) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int code_ = 0; + /** + * + * + *
+     * The Google standard error code that best describes the state.
+     * For example:
+     * - OK means the analysis on this entity has been successfully finished;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+     * in time;
+     * 
+ * + * .google.rpc.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + @java.lang.Override + public int getCodeValue() { + return code_; + } + /** + * + * + *
+     * The Google standard error code that best describes the state.
+     * For example:
+     * - OK means the analysis on this entity has been successfully finished;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+     * in time;
+     * 
+ * + * .google.rpc.Code code = 1; + * + * @param value The enum numeric value on the wire for code to set. + * @return This builder for chaining. + */ + public Builder setCodeValue(int value) { + + code_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The Google standard error code that best describes the state.
+     * For example:
+     * - OK means the analysis on this entity has been successfully finished;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+     * in time;
+     * 
+ * + * .google.rpc.Code code = 1; + * + * @return The code. + */ + @java.lang.Override + public com.google.rpc.Code getCode() { + @SuppressWarnings("deprecation") + com.google.rpc.Code result = com.google.rpc.Code.valueOf(code_); + return result == null ? com.google.rpc.Code.UNRECOGNIZED : result; + } + /** + * + * + *
+     * The Google standard error code that best describes the state.
+     * For example:
+     * - OK means the analysis on this entity has been successfully finished;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+     * in time;
+     * 
+ * + * .google.rpc.Code code = 1; + * + * @param value The code to set. + * @return This builder for chaining. + */ + public Builder setCode(com.google.rpc.Code value) { + if (value == null) { + throw new NullPointerException(); + } + + code_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The Google standard error code that best describes the state.
+     * For example:
+     * - OK means the analysis on this entity has been successfully finished;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+     * in time;
+     * 
+ * + * .google.rpc.Code code = 1; + * + * @return This builder for chaining. + */ + public Builder clearCode() { + + code_ = 0; + onChanged(); + return this; + } + + private java.lang.Object cause_ = ""; + /** + * + * + *
+     * The human-readable description of the cause of failure.
+     * 
+ * + * string cause = 2; + * + * @return The cause. + */ + public java.lang.String getCause() { + java.lang.Object ref = cause_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cause_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The human-readable description of the cause of failure.
+     * 
+ * + * string cause = 2; + * + * @return The bytes for cause. + */ + public com.google.protobuf.ByteString getCauseBytes() { + java.lang.Object ref = cause_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cause_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The human-readable description of the cause of failure.
+     * 
+ * + * string cause = 2; + * + * @param value The cause to set. + * @return This builder for chaining. + */ + public Builder setCause(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cause_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The human-readable description of the cause of failure.
+     * 
+ * + * string cause = 2; + * + * @return This builder for chaining. + */ + public Builder clearCause() { + + cause_ = getDefaultInstance().getCause(); + onChanged(); + return this; + } + /** + * + * + *
+     * The human-readable description of the cause of failure.
+     * 
+ * + * string cause = 2; + * + * @param value The bytes for cause to set. + * @return This builder for chaining. + */ + public Builder setCauseBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cause_ = 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.IamPolicyAnalysisState) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.IamPolicyAnalysisState) + private static final com.google.cloud.asset.v1.IamPolicyAnalysisState DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.IamPolicyAnalysisState(); + } + + public static com.google.cloud.asset.v1.IamPolicyAnalysisState getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IamPolicyAnalysisState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new IamPolicyAnalysisState(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.IamPolicyAnalysisState getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java new file mode 100644 index 000000000..be06b9be5 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java @@ -0,0 +1,85 @@ +/* + * 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 IamPolicyAnalysisStateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.IamPolicyAnalysisState) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Google standard error code that best describes the state.
+   * For example:
+   * - OK means the analysis on this entity has been successfully finished;
+   * - PERMISSION_DENIED means an access denied error is encountered;
+   * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+   * in time;
+   * 
+ * + * .google.rpc.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + int getCodeValue(); + /** + * + * + *
+   * The Google standard error code that best describes the state.
+   * For example:
+   * - OK means the analysis on this entity has been successfully finished;
+   * - PERMISSION_DENIED means an access denied error is encountered;
+   * - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started
+   * in time;
+   * 
+ * + * .google.rpc.Code code = 1; + * + * @return The code. + */ + com.google.rpc.Code getCode(); + + /** + * + * + *
+   * The human-readable description of the cause of failure.
+   * 
+ * + * string cause = 2; + * + * @return The cause. + */ + java.lang.String getCause(); + /** + * + * + *
+   * The human-readable description of the cause of failure.
+   * 
+ * + * string cause = 2; + * + * @return The bytes for cause. + */ + com.google.protobuf.ByteString getCauseBytes(); +} 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 4aa3ee74e..fce88c71c 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 @@ -138,6 +138,36 @@ service AssetService { }; option (google.api.method_signature) = "scope,query"; } + + // Analyzes IAM policies to answer which identities have what accesses on + // which resources. + rpc AnalyzeIamPolicy(AnalyzeIamPolicyRequest) + returns (AnalyzeIamPolicyResponse) { + option (google.api.http) = { + get: "/v1/{analysis_query.scope=*/*}:analyzeIamPolicy" + }; + } + + // Exports the answers of which identities have what accesses on which + // resources to a Google Cloud Storage or a BigQuery destination. For Cloud + // Storage destination, the output format is the JSON format that represents a + // [google.cloud.asset.v1.AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. + // This method implements the + // [google.longrunning.Operation][google.longrunning.Operation], which allows + // you to track the export status. We recommend intervals of at least 2 + // seconds with exponential retry to poll the export operation result. The + // metadata contains the request to help callers to map responses to requests. + rpc ExportIamPolicyAnalysis(ExportIamPolicyAnalysisRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{analysis_query.scope=*/*}:exportIamPolicyAnalysis" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.asset.v1.ExportIamPolicyAnalysisResponse" + metadata_type: "google.cloud.asset.v1.ExportIamPolicyAnalysisRequest" + }; + } } // Export asset request. @@ -638,6 +668,401 @@ message SearchAllIamPoliciesResponse { string next_page_token = 2; } +// IAM policy analysis query message. +message IamPolicyAnalysisQuery { + // The relative name of the root asset. Only resources and IAM policies within + // the scope will be analyzed. + // + // This can only be an organization number (such as "organizations/123"), a + // folder number (such as "folders/123"), a project ID (such as + // "projects/my-project-id"), or a project number (such as "projects/12345"). + // + // To know how to get organization id, visit [here + // ](https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id). + // + // To know how to get folder or project id, visit [here + // ](https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects). + string scope = 1 [ + (google.api.field_behavior) = REQUIRED + ]; + + // Specifies the resource to analyze for access policies, which may be set + // directly on the resource, or on ancestors such as organizations, folders or + // projects. + message ResourceSelector { + // The [full resource name] + // (https://cloud.google.com/asset-inventory/docs/resource-name-format) + // of a resource of [supported resource + // types](https://cloud.google.com/asset-inventory/docs/supported-asset-types#analyzable_asset_types). + string full_resource_name = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Specifies a resource for analysis. + ResourceSelector resource_selector = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Specifies an identity for which to determine resource access, based on + // roles assigned either directly to them or to the groups they belong to, + // directly or indirectly. + message IdentitySelector { + // The identity appear in the form of members in + // [IAM policy + // binding](https://cloud.google.com/iam/reference/rest/v1/Binding). + // + // The examples of supported forms are: + // "user:mike@example.com", + // "group:admins@example.com", + // "domain:google.com", + // "serviceAccount:my-project-id@appspot.gserviceaccount.com". + // + // Notice that wildcard characters (such as * and ?) are not supported. + // You must give a specific identity. + string identity = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Specifies an identity for analysis. + IdentitySelector identity_selector = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Specifies roles and/or permissions to analyze, to determine both the + // identities possessing them and the resources they control. If multiple + // values are specified, results will include roles or permissions matching + // any of them. + message AccessSelector { + // The roles to appear in result. + repeated string roles = 1 [(google.api.field_behavior) = OPTIONAL]; + + // The permissions to appear in result. + repeated string permissions = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Specifies roles or permissions for analysis. This is optional. + AccessSelector access_selector = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Contains query options. + message Options { + // If true, the identities section of the result will expand any + // Google groups appearing in an IAM policy binding. + // + // If + // [google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.identity_selector] + // is specified, the identity in the result will be determined by the + // selector, and this flag is not allowed to set. + // + // Default is false. + bool expand_groups = 1 [(google.api.field_behavior) = OPTIONAL]; + + // If true, the access section of result will expand any roles + // appearing in IAM policy bindings to include their permissions. + // + // If + // [google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.access_selector] + // is specified, the access section of the result will be determined by the + // selector, and this flag is not allowed to set. + // + // Default is false. + bool expand_roles = 2 [(google.api.field_behavior) = OPTIONAL]; + + // If true and + // [google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] + // is not specified, the resource section of the result will expand any + // resource attached to an IAM policy to include resources lower in the + // resource hierarchy. + // + // For example, if the request analyzes for which resources user A has + // permission P, and the results include an IAM policy with P on a GCP + // folder, the results will also include resources in that folder with + // permission P. + // + // If true and + // [google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector][google.cloud.asset.v1.IamPolicyAnalysisQuery.resource_selector] + // is specified, the resource section of the result will expand the + // specified resource to include resources lower in the resource hierarchy. + // + // For example, if the request analyzes for which users have permission P on + // a GCP folder with this option enabled, the results will include all users + // who have permission P on that folder or any lower resource(ex. project). + // + // Default is false. + bool expand_resources = 3 [(google.api.field_behavior) = OPTIONAL]; + + // If true, the result will output resource edges, starting + // from the policy attached resource, to any expanded resources. + // Default is false. + bool output_resource_edges = 4 [(google.api.field_behavior) = OPTIONAL]; + + // If true, the result will output group identity edges, starting + // from the binding's group members, to any expanded identities. + // Default is false. + bool output_group_edges = 5 [(google.api.field_behavior) = OPTIONAL]; + + // If true, the response will include access analysis from identities to + // resources via service account impersonation. This is a very expensive + // operation, because many derived queries will be executed. We highly + // recommend you use + // [google.cloud.asset.v1.AssetService.ExportIamPolicyAnalysis][google.cloud.asset.v1.AssetService.ExportIamPolicyAnalysis] + // rpc instead. + // + // For example, if the request analyzes for which resources user A has + // permission P, and there's an IAM policy states user A has + // iam.serviceAccounts.getAccessToken permission to a service account SA, + // and there's another IAM policy states service account SA has permission P + // to a GCP folder F, then user A potentially has access to the GCP folder + // F. And those advanced analysis results will be included in + // [google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. + // + // Another example, if the request analyzes for who has + // permission P to a GCP folder F, and there's an IAM policy states user A + // has iam.serviceAccounts.actAs permission to a service account SA, and + // there's another IAM policy states service account SA has permission P to + // the GCP folder F, then user A potentially has access to the GCP folder + // F. And those advanced analysis results will be included in + // [google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. + // + // Default is false. + bool analyze_service_account_impersonation = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // The maximum number of fanouts per group when [expand_groups][expand_groups] + // is enabled. This internal field is to help load testing and determine a + // proper value, and won't be public in the future. + int32 max_fanouts_per_group = 7 [ + (google.api.field_behavior) = OPTIONAL + ]; + + // The maximum number of fanouts per parent resource, such as + // GCP Project etc., when [expand_resources][] is enabled. This internal + // field is to help load testing and determine a proper value, and won't be + // public in the future. + int32 max_fanouts_per_resource = 8 [ + (google.api.field_behavior) = OPTIONAL + ]; + } + + // The query options. + Options options = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request message for +// [google.cloud.asset.v1.AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]. +message AnalyzeIamPolicyRequest { + // The request query. + IamPolicyAnalysisQuery analysis_query = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Amount of time executable has to complete. See JSON representation of + // [Duration](https://developers.google.com/protocol-buffers/docs/proto3#json). + // + // If this field is set with a value less than the RPC deadline, and the + // execution of your query hasn't finished in the specified + // execution timeout, you will get a response with partial result. + // Otherwise, your query's execution will continue until the RPC deadline. + // If it's not finished until then, you will get a DEADLINE_EXCEEDED error. + // + // Default is empty. + // + // (-- We had discussion of whether we should have this field in the --) + // (-- request or use the RPC deadline instead. We finally choose this --) + // (-- approach for the following reasons (detailed in --) + // (-- go/analyze-iam-policy-deadlines): --) + // (-- * HTTP clients have very limited support of the RPC deadline. --) + // (-- There is an X-Server-Timeout header introduced in 2019/09, but --) + // (-- only implemented in the C++ HTTP server library. --) + // (-- * The purpose of the RPC deadline is for RPC clients to --) + // (-- communicate its max waiting time to the server. This deadline --) + // (-- could be further propagated to the downstream servers. It is --) + // (-- mainly used for servers to cancel the request processing --) + // (-- to avoid resource wasting. Overloading the RPC deadline for --) + // (-- other purposes could make our backend system harder to reason --) + // (-- about. --) + google.protobuf.Duration execution_timeout = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A response message for +// [google.cloud.asset.v1.AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]. +message AnalyzeIamPolicyResponse { + // An analysis message to group the query and results. + message IamPolicyAnalysis { + // The analysis query. + IamPolicyAnalysisQuery analysis_query = 1; + + // A list of [google.cloud.asset.v1.IamPolicyAnalysisResult][google.cloud.asset.v1.IamPolicyAnalysisResult] + // that matches the analysis query, or empty if no result is found. + repeated IamPolicyAnalysisResult analysis_results = 2; + + // Represents whether all entries in the + // [analysis_results][analysis_results] have been fully explored to answer + // the query. + bool fully_explored = 3; + + // A stats message that contains a set of analysis metrics. + // + // Here are some equations to show relationships of the explicitly specified + // metrics with other implicit metrics: + // * node_count = discovered_node_count + undiscovered_node_count(implicit) + // * discovered_node_count = explored_node_count + + // unexplored_node_count(implicit) + // * explored_node_count = capped_node_count + uncapped_node_count(implicit) + // * unexplored_node_count(implicit) = permission_denied_node_count + + // execution_timeout_node_count + other_unexplored_node_count(implicit) + // * discovered_node_count = matched_node_count + + // unmatched_node_count(implicit) + message Stats { + // Type of the node. + enum NodeType { + // Unspecified node type. + NODE_TYPE_UNSPECIFIED = 0; + // IAM Policy Binding node type. + BINDING = 1; + // Identity node type. + IDENTITY = 2; + // Resource node type. + RESOURCE = 3; + // Access node type. + ACCESS = 4; + } + + // Node type. + NodeType node_type = 1; + + // The subtype of a node, such as: + // * For Identity: Group, User, ServiceAccount etc. + // * For Resource: resource type name, such as + // cloudresourcemanager.googleapis.com/Organization, etc. + // * For Access: Role or Permission + string node_subtype = 2; + + // The count of discovered nodes. + int32 discovered_node_count = 3; + + // The count of nodes that match the query. These nodes form a sub-graph + // of discovered nodes. + int32 matched_node_count = 4; + + // The count of explored nodes. + int32 explored_node_count = 5; + + // The count of nodes that get explored, but are capped by max fanout + // setting. + int32 capped_node_count = 6; + + // The count of unexplored nodes caused by permission denied error. + int32 permision_denied_node_count = 7; + + // The count of unexplored nodes caused by execution timeout. + int32 execution_timeout_node_count = 8; + } + + // The stats of how the analysis has been explored. + repeated Stats stats = 4; + + // A list of non-critical errors happened during the query handling. + repeated IamPolicyAnalysisState non_critical_errors = 5; + } + + // The main analysis that matches the original request. + IamPolicyAnalysis main_analysis = 1; + + // The service account impersonation analysis if + // [google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation][google.cloud.asset.v1.AnalyzeIamPolicyRequest.analyze_service_account_impersonation] + // is enabled. + repeated IamPolicyAnalysis service_account_impersonation_analysis = 2; + + // Represents whether all entries in the [main_analysis][main_analysis] and + // [service_account_impersonation_analysis][] have been fully explored to + // answer the query in the request. + bool fully_explored = 3; +} + +// Output configuration for export IAM policy analysis destination. +message IamPolicyAnalysisOutputConfig { + // A Cloud Storage location. + message GcsDestination { + // The uri of the Cloud Storage object. It's the same uri that is used by + // gsutil. For example: "gs://bucket_name/object_name". See [Viewing and + // Editing Object + // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + // for more information. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // A BigQuery destination. + message BigQueryDestination { + // The BigQuery dataset in format "projects/projectId/datasets/datasetId", + // to which the analysis results should be exported. If this dataset does + // not exist, the export call will return an INVALID_ARGUMENT error. + string dataset = 1 [ + (google.api.field_behavior) = REQUIRED + ]; + + // The prefix of the BigQuery tables to which the analysis results will be + // written. Tables will be created based on this table_prefix if not exist: + // * _analysis table will contain export operation's metadata. + // * _analysis_result will contain all the + // [IamPolicyAnalysisResult][]. + // When [partition_key] is specified, both tables will be partitioned based + // on the [partition_key]. + string table_prefix = 2 [ + (google.api.field_behavior) = REQUIRED + ]; + + // This enum determines the partition key column for the bigquery tables. + // Partitioning can improve query performance and reduce query cost by + // filtering partitions. Refer to + // https://cloud.google.com/bigquery/docs/partitioned-tables for details. + enum PartitionKey { + // Unspecified partition key. Tables won't be partitioned using this + // option. + PARTITION_KEY_UNSPECIFIED = 0; + // The time when the request is received. If specified as partition key, + // the result table(s) is partitoned by the RequestTime column, an + // additional timestamp column representing when the request was received. + REQUEST_TIME = 1; + } + // The partition key for BigQuery partitioned table. + PartitionKey partition_key = 3; + + // Write mode types if table exists. + enum WriteMode { + // Unspecified write mode. We expect one of the following valid modes must + // be specified when table or partition exists. + WRITE_MODE_UNSPECIFIED = 0; + // Abort the export when table or partition exists. + ABORT = 1; + // Overwrite the table when table exists. When partitioned, overwrite + // the existing partition. + OVERWRITE = 2; + } + // The write mode when table exists. WriteMode is ignored when no existing + // tables, or no existing partitions are found. + WriteMode write_mode = 4; + } + + // IAM policy analysis export destination. + oneof destination { + // Destination on Cloud Storage. + GcsDestination gcs_destination = 1; + + // Destination on BigQuery. + BigQueryDestination bigquery_destination = 2; + } +} + +// A request message for [AssetService.ExportIamPolicyAnalysis][]. +message ExportIamPolicyAnalysisRequest { + // The request query. + IamPolicyAnalysisQuery analysis_query = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Output configuration indicating where the results will be output to. + IamPolicyAnalysisOutputConfig output_config = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// The export IAM policy analysis response. +message ExportIamPolicyAnalysisResponse {} + // Asset content type. enum ContentType { // Unspecified content type. 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 b9d56744e..01c768532 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 @@ -22,11 +22,9 @@ import "google/iam/v1/policy.proto"; import "google/identity/accesscontextmanager/v1/access_level.proto"; import "google/identity/accesscontextmanager/v1/access_policy.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"; @@ -150,7 +148,8 @@ message Asset { // Please also refer to the [service perimeter user // guide](https://cloud.google.com/vpc-service-controls/docs/overview). - google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = 9; + google.identity.accesscontextmanager.v1.ServicePerimeter service_perimeter = + 9; } // The ancestry path of an asset in Google Cloud [resource @@ -378,3 +377,158 @@ message IamPolicySearchResult { // information to explain why the search result matches the query. Explanation explanation = 4; } + +// Represents the detailed state of an entity under analysis, such as a +// resource, an identity or an access. +message IamPolicyAnalysisState { + // The Google standard error code that best describes the state. + // For example: + // - OK means the analysis on this entity has been successfully finished; + // - PERMISSION_DENIED means an access denied error is encountered; + // - DEADLINE_EXCEEDED means the analysis on this entity hasn't been started + // in time; + google.rpc.Code code = 1; + + // The human-readable description of the cause of failure. + string cause = 2; +} + +// IAM Policy analysis result, consisting of one IAM policy binding and derived +// access control lists. +message IamPolicyAnalysisResult { + // The [full resource + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // of the resource to which the [iam_binding][iam_binding] policy attaches. + // (-- api-linter: core::0122::name-suffix=disabled + // aip.dev/not-precedent: full_resource_name is a public notion in GCP. + // --) + string attached_resource_full_name = 1; + + // The Cloud IAM policy binding under analysis. + google.iam.v1.Binding iam_binding = 2; + + // A Google Cloud resource under analysis. + message Resource { + // The [full resource + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // (-- api-linter: core::0122::name-suffix=disabled + // aip.dev/not-precedent: full_resource_name is a public notion in GCP. + // --) + string full_resource_name = 1; + + // The analysis state of this resource. + IamPolicyAnalysisState analysis_state = 2; + } + + // An IAM role or permission under analysis. + message Access { + oneof oneof_access { + // The role. + string role = 1; + + // The permission. + string permission = 2; + } + + // The analysis state of this access. + IamPolicyAnalysisState analysis_state = 3; + } + + // An identity under analysis. + // (-- api-linter: core::0123::resource-annotation=disabled + // aip.dev/not-precedent: Identity name is not a resource. --) + message Identity { + // The identity name in any form of members appear in + // [IAM policy + // binding](https://cloud.google.com/iam/reference/rest/v1/Binding), such + // as: + // - user:foo@google.com + // - group:group1@google.com + // - serviceAccount:s1@prj1.iam.gserviceaccount.com + // - projectOwner:some_project_id + // - domain:google.com + // - allUsers + // - etc. + // + string name = 1; + + // The analysis state of this identity. + IamPolicyAnalysisState analysis_state = 2; + } + + // A directional edge. + message Edge { + // The source node of the edge. For example, it could be a full resource + // name for a resource node or an email of an identity. + string source_node = 1; + + // The target node of the edge. For example, it could be a full resource + // name for a resource node or an email of an identity. + string target_node = 2; + } + + // An access control list, derived from the above IAM policy binding, which + // contains a set of resources and accesses. May include one + // item from each set to compose an access control entry. + // + // NOTICE that there could be multiple access control lists for one IAM policy + // binding. The access control lists are created based on resource and access + // combinations. + // + // For example, assume we have the following cases in one IAM policy binding: + // - Permission P1 and P2 apply to resource R1 and R2; + // - Permission P3 applies to resource R2 and R3; + // + // This will result in the following access control lists: + // - AccessControlList 1: [R1, R2], [P1, P2] + // - AccessControlList 2: [R2, R3], [P3] + message AccessControlList { + // The resources that match one of the following conditions: + // - The resource_selector, if it is specified in request; + // - Otherwise, resources reachable from the policy attached resource. + repeated Resource resources = 1; + + // The accesses that match one of the following conditions: + // - The access_selector, if it is specified in request; + // - Otherwise, access specifiers reachable from the policy binding's role. + repeated Access accesses = 2; + + // Resource edges of the graph starting from the policy attached + // resource to any descendant resources. The [Edge.source_node][] contains + // the full resource name of a parent resource and [Edge.target_node][] + // contains the full resource name of a child resource. This field is + // present only if the output_resource_edges option is enabled in request. + repeated Edge resource_edges = 3; + } + + // The access control lists derived from the [iam_binding][iam_binding] that + // match or potentially match resource and access selectors specified in the + // request. + repeated AccessControlList access_control_lists = 3; + + // The identities and group edges. + message IdentityList { + // Only the identities that match one of the following conditions will be + // presented: + // - The identity_selector, if it is specified in request; + // - Otherwise, identities reachable from the policy binding's members. + repeated Identity identities = 1; + + // Group identity edges of the graph starting from the binding's + // group members to any node of the [identities][]. The [Edge.source_node][] + // contains a group, such as `group:parent@google.com`. The + // [Edge.target_node][] contains a member of the group, + // such as `group:child@google.com` or `user:foo@google.com`. + // This field is present only if the output_group_edges option is enabled in + // request. + repeated Edge group_edges = 2; + } + + // The identity list derived from members of the [iam_binding][iam_binding] + // that match or potentially match identity selector specified in the request. + IdentityList identity_list = 4; + + // Represents whether all analyses on the [iam_binding][iam_binding] have + // successfully finished. + bool fully_explored = 5; +} diff --git a/synth.metadata b/synth.metadata index 13d8195e0..edeb8d308 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,55 +4,55 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-asset.git", - "sha": "df4f4d66c5b90c90be37550004fe4374d4ca3d1a" + "sha": "e22b1ed5d91c8f6ce1a4d82a307368a993ecec00" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3a54e988edcbdef1e47c6ac19d3074a87214f667", - "internalRef": "326582222" + "sha": "72eb54c45231d84266ca059473bc1793c394fcb2", + "internalRef": "328059685" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3a54e988edcbdef1e47c6ac19d3074a87214f667", - "internalRef": "326582222" + "sha": "72eb54c45231d84266ca059473bc1793c394fcb2", + "internalRef": "328059685" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3a54e988edcbdef1e47c6ac19d3074a87214f667", - "internalRef": "326582222" + "sha": "72eb54c45231d84266ca059473bc1793c394fcb2", + "internalRef": "328059685" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3a54e988edcbdef1e47c6ac19d3074a87214f667", - "internalRef": "326582222" + "sha": "72eb54c45231d84266ca059473bc1793c394fcb2", + "internalRef": "328059685" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3a54e988edcbdef1e47c6ac19d3074a87214f667", - "internalRef": "326582222" + "sha": "72eb54c45231d84266ca059473bc1793c394fcb2", + "internalRef": "328059685" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3a54e988edcbdef1e47c6ac19d3074a87214f667", - "internalRef": "326582222" + "sha": "72eb54c45231d84266ca059473bc1793c394fcb2", + "internalRef": "328059685" } }, { @@ -246,6 +246,10 @@ "grpc-google-cloud-asset-v1p5beta1/src/main/java/com/google/cloud/asset/v1p5beta1/AssetServiceGrpc.java", "java.header", "license-checks.xml", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponseOrBuilder.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetOrBuilder.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetProto.java", @@ -265,6 +269,10 @@ "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsRequestOrBuilder.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponseOrBuilder.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisRequest.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisRequestOrBuilder.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisResponse.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportIamPolicyAnalysisResponseOrBuilder.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Feed.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedName.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/FeedOrBuilder.java", @@ -276,6 +284,14 @@ "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsOutputResultOrBuilder.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequestOrBuilder.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfigOrBuilder.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQueryOrBuilder.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisState.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisStateOrBuilder.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResult.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicySearchResultOrBuilder.java", "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsRequest.java",