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..bd8dc6e78 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,156 @@ 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 + /** + * Analyzes IAM policies asynchronously to answer which identities have what accesses on which + * resources, and writes the analysis results to a Google Cloud Storage or a BigQuery destination. + * For Cloud Storage destination, the output format is the JSON format that represents a + * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method + * implements the [google.longrunning.Operation][google.longrunning.Operation], which allows you + * to track the operation status. We recommend intervals of at least 2 seconds with exponential + * backoff retry to poll the 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();
+   *   AnalyzeIamPolicyLongrunningRequest request = AnalyzeIamPolicyLongrunningRequest.newBuilder()
+   *     .setAnalysisQuery(analysisQuery)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   AnalyzeIamPolicyLongrunningResponse response = assetServiceClient.analyzeIamPolicyLongrunningAsync(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< + AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> + analyzeIamPolicyLongrunningAsync(AnalyzeIamPolicyLongrunningRequest request) { + return analyzeIamPolicyLongrunningOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Analyzes IAM policies asynchronously to answer which identities have what accesses on which + * resources, and writes the analysis results to a Google Cloud Storage or a BigQuery destination. + * For Cloud Storage destination, the output format is the JSON format that represents a + * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method + * implements the [google.longrunning.Operation][google.longrunning.Operation], which allows you + * to track the operation status. We recommend intervals of at least 2 seconds with exponential + * backoff retry to poll the 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();
+   *   AnalyzeIamPolicyLongrunningRequest request = AnalyzeIamPolicyLongrunningRequest.newBuilder()
+   *     .setAnalysisQuery(analysisQuery)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   OperationFuture<AnalyzeIamPolicyLongrunningResponse, AnalyzeIamPolicyLongrunningRequest> future = assetServiceClient.analyzeIamPolicyLongrunningOperationCallable().futureCall(request);
+   *   // Do something
+   *   AnalyzeIamPolicyLongrunningResponse response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningRequest> + analyzeIamPolicyLongrunningOperationCallable() { + return stub.analyzeIamPolicyLongrunningOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Analyzes IAM policies asynchronously to answer which identities have what accesses on which + * resources, and writes the analysis results to a Google Cloud Storage or a BigQuery destination. + * For Cloud Storage destination, the output format is the JSON format that represents a + * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method + * implements the [google.longrunning.Operation][google.longrunning.Operation], which allows you + * to track the operation status. We recommend intervals of at least 2 seconds with exponential + * backoff retry to poll the 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();
+   *   AnalyzeIamPolicyLongrunningRequest request = AnalyzeIamPolicyLongrunningRequest.newBuilder()
+   *     .setAnalysisQuery(analysisQuery)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   ApiFuture<Operation> future = assetServiceClient.analyzeIamPolicyLongrunningCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + analyzeIamPolicyLongrunningCallable() { + return stub.analyzeIamPolicyLongrunningCallable(); + } + @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..a60a03ae6 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 analyzeIamPolicyLongrunning. */ + public UnaryCallSettings + analyzeIamPolicyLongrunningSettings() { + return ((AssetServiceStubSettings) getStubSettings()).analyzeIamPolicyLongrunningSettings(); + } + + /** Returns the object with the settings used for calls to analyzeIamPolicyLongrunning. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningRequest> + analyzeIamPolicyLongrunningOperationSettings() { + return ((AssetServiceStubSettings) getStubSettings()) + .analyzeIamPolicyLongrunningOperationSettings(); + } + 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 analyzeIamPolicyLongrunning. */ + public UnaryCallSettings.Builder + analyzeIamPolicyLongrunningSettings() { + return getStubSettingsBuilder().analyzeIamPolicyLongrunningSettings(); + } + + /** Returns the builder for the settings used for calls to analyzeIamPolicyLongrunning. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningRequest> + analyzeIamPolicyLongrunningOperationSettings() { + return getStubSettingsBuilder().analyzeIamPolicyLongrunningOperationSettings(); + } + @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..9c0d75e1b 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,6 +22,10 @@ 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.AnalyzeIamPolicyLongrunningRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; +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; @@ -112,6 +116,27 @@ 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< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningRequest> + analyzeIamPolicyLongrunningOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: analyzeIamPolicyLongrunningOperationCallable()"); + } + + public UnaryCallable + analyzeIamPolicyLongrunningCallable() { + throw new UnsupportedOperationException( + "Not implemented: analyzeIamPolicyLongrunningCallable()"); + } + @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 623b21502..0f4a285e9 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,6 +44,10 @@ 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.AnalyzeIamPolicyLongrunningRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; +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; @@ -129,6 +133,15 @@ public class AssetServiceStubSettings extends StubSettings searchAllIamPoliciesSettings; + private final UnaryCallSettings + analyzeIamPolicySettings; + private final UnaryCallSettings + analyzeIamPolicyLongrunningSettings; + private final OperationCallSettings< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningRequest> + analyzeIamPolicyLongrunningOperationSettings; /** 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 analyzeIamPolicyLongrunning. */ + public UnaryCallSettings + analyzeIamPolicyLongrunningSettings() { + return analyzeIamPolicyLongrunningSettings; + } + + /** Returns the object with the settings used for calls to analyzeIamPolicyLongrunning. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningRequest> + analyzeIamPolicyLongrunningOperationSettings() { + return analyzeIamPolicyLongrunningOperationSettings; + } + @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,11 @@ protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { deleteFeedSettings = settingsBuilder.deleteFeedSettings().build(); searchAllResourcesSettings = settingsBuilder.searchAllResourcesSettings().build(); searchAllIamPoliciesSettings = settingsBuilder.searchAllIamPoliciesSettings().build(); + analyzeIamPolicySettings = settingsBuilder.analyzeIamPolicySettings().build(); + analyzeIamPolicyLongrunningSettings = + settingsBuilder.analyzeIamPolicyLongrunningSettings().build(); + analyzeIamPolicyLongrunningOperationSettings = + settingsBuilder.analyzeIamPolicyLongrunningOperationSettings().build(); } private static final PagedListDescriptor< @@ -424,6 +464,15 @@ public static class Builder extends StubSettings.Builder searchAllIamPoliciesSettings; + private final UnaryCallSettings.Builder + analyzeIamPolicySettings; + private final UnaryCallSettings.Builder + analyzeIamPolicyLongrunningSettings; + private final OperationCallSettings.Builder< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningRequest> + analyzeIamPolicyLongrunningOperationSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -529,6 +578,12 @@ protected Builder(ClientContext clientContext) { searchAllIamPoliciesSettings = PagedCallSettings.newBuilder(SEARCH_ALL_IAM_POLICIES_PAGE_STR_FACT); + analyzeIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + analyzeIamPolicyLongrunningSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + analyzeIamPolicyLongrunningOperationSettings = OperationCallSettings.newBuilder(); + unaryMethodSettingsBuilders = ImmutableList.>of( exportAssetsSettings, @@ -539,7 +594,9 @@ protected Builder(ClientContext clientContext) { updateFeedSettings, deleteFeedSettings, searchAllResourcesSettings, - searchAllIamPoliciesSettings); + searchAllIamPoliciesSettings, + analyzeIamPolicySettings, + analyzeIamPolicyLongrunningSettings); initDefaults(this); } @@ -599,6 +656,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 + .analyzeIamPolicyLongrunningSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); builder .exportAssetsOperationSettings() .setInitialCallSettings( @@ -622,6 +689,32 @@ private static Builder initDefaults(Builder builder) { .setMaxRpcTimeout(Duration.ZERO) // ignored .setTotalTimeout(Duration.ofMillis(300000L)) .build())); + builder + .analyzeIamPolicyLongrunningOperationSettings() + .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( + AnalyzeIamPolicyLongrunningResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + AnalyzeIamPolicyLongrunningRequest.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; } @@ -639,6 +732,11 @@ protected Builder(AssetServiceStubSettings settings) { deleteFeedSettings = settings.deleteFeedSettings.toBuilder(); searchAllResourcesSettings = settings.searchAllResourcesSettings.toBuilder(); searchAllIamPoliciesSettings = settings.searchAllIamPoliciesSettings.toBuilder(); + analyzeIamPolicySettings = settings.analyzeIamPolicySettings.toBuilder(); + analyzeIamPolicyLongrunningSettings = + settings.analyzeIamPolicyLongrunningSettings.toBuilder(); + analyzeIamPolicyLongrunningOperationSettings = + settings.analyzeIamPolicyLongrunningOperationSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -650,7 +748,9 @@ protected Builder(AssetServiceStubSettings settings) { updateFeedSettings, deleteFeedSettings, searchAllResourcesSettings, - searchAllIamPoliciesSettings); + searchAllIamPoliciesSettings, + analyzeIamPolicySettings, + analyzeIamPolicyLongrunningSettings); } // NEXT_MAJOR_VER: remove 'throws Exception' @@ -730,6 +830,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 analyzeIamPolicyLongrunning. */ + public UnaryCallSettings.Builder + analyzeIamPolicyLongrunningSettings() { + return analyzeIamPolicyLongrunningSettings; + } + + /** Returns the builder for the settings used for calls to analyzeIamPolicyLongrunning. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningRequest> + analyzeIamPolicyLongrunningOperationSettings() { + return analyzeIamPolicyLongrunningOperationSettings; + } + @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..cd2f83637 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,6 +27,10 @@ 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.AnalyzeIamPolicyLongrunningRequest; +import com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse; +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; @@ -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 + analyzeIamPolicyLongrunningMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1.AssetService/AnalyzeIamPolicyLongrunning") + .setRequestMarshaller( + ProtoUtils.marshaller(AnalyzeIamPolicyLongrunningRequest.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 + analyzeIamPolicyLongrunningCallable; + private final OperationCallable< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningRequest> + analyzeIamPolicyLongrunningOperationCallable; private final GrpcStubCallableFactory callableFactory; @@ -321,6 +353,39 @@ 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 + analyzeIamPolicyLongrunningTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(analyzeIamPolicyLongrunningMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + AnalyzeIamPolicyLongrunningRequest 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 +436,20 @@ public Map extract(SearchAllIamPoliciesRequest request) { searchAllIamPoliciesTransportSettings, settings.searchAllIamPoliciesSettings(), clientContext); + this.analyzeIamPolicyCallable = + callableFactory.createUnaryCallable( + analyzeIamPolicyTransportSettings, settings.analyzeIamPolicySettings(), clientContext); + this.analyzeIamPolicyLongrunningCallable = + callableFactory.createUnaryCallable( + analyzeIamPolicyLongrunningTransportSettings, + settings.analyzeIamPolicyLongrunningSettings(), + clientContext); + this.analyzeIamPolicyLongrunningOperationCallable = + callableFactory.createOperationCallable( + analyzeIamPolicyLongrunningTransportSettings, + settings.analyzeIamPolicyLongrunningOperationSettings(), + clientContext, + this.operationsStub); backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); } @@ -435,6 +514,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< + AnalyzeIamPolicyLongrunningRequest, + AnalyzeIamPolicyLongrunningResponse, + AnalyzeIamPolicyLongrunningRequest> + analyzeIamPolicyLongrunningOperationCallable() { + return analyzeIamPolicyLongrunningOperationCallable; + } + + public UnaryCallable + analyzeIamPolicyLongrunningCallable() { + return analyzeIamPolicyLongrunningCallable; + } + @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..8c7f7882f 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 analyzeIamPolicyLongrunningTest() throws Exception { + AnalyzeIamPolicyLongrunningResponse expectedResponse = + AnalyzeIamPolicyLongrunningResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("analyzeIamPolicyLongrunningTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAssetService.addResponse(resultOperation); + + IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build(); + IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build(); + AnalyzeIamPolicyLongrunningRequest request = + AnalyzeIamPolicyLongrunningRequest.newBuilder() + .setAnalysisQuery(analysisQuery) + .setOutputConfig(outputConfig) + .build(); + + AnalyzeIamPolicyLongrunningResponse actualResponse = + client.analyzeIamPolicyLongrunningAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AnalyzeIamPolicyLongrunningRequest actualRequest = + (AnalyzeIamPolicyLongrunningRequest) 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 analyzeIamPolicyLongrunningExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build(); + IamPolicyAnalysisOutputConfig outputConfig = + IamPolicyAnalysisOutputConfig.newBuilder().build(); + AnalyzeIamPolicyLongrunningRequest request = + AnalyzeIamPolicyLongrunningRequest.newBuilder() + .setAnalysisQuery(analysisQuery) + .setOutputConfig(outputConfig) + .build(); + + client.analyzeIamPolicyLongrunningAsync(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..5b3b4dd64 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 analyzeIamPolicyLongrunning( + AnalyzeIamPolicyLongrunningRequest 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..e6c1cb742 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,104 @@ 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.AnalyzeIamPolicyLongrunningRequest, + com.google.longrunning.Operation> + getAnalyzeIamPolicyLongrunningMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AnalyzeIamPolicyLongrunning", + requestType = com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest, + com.google.longrunning.Operation> + getAnalyzeIamPolicyLongrunningMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest, + com.google.longrunning.Operation> + getAnalyzeIamPolicyLongrunningMethod; + if ((getAnalyzeIamPolicyLongrunningMethod = + AssetServiceGrpc.getAnalyzeIamPolicyLongrunningMethod) + == null) { + synchronized (AssetServiceGrpc.class) { + if ((getAnalyzeIamPolicyLongrunningMethod = + AssetServiceGrpc.getAnalyzeIamPolicyLongrunningMethod) + == null) { + AssetServiceGrpc.getAnalyzeIamPolicyLongrunningMethod = + getAnalyzeIamPolicyLongrunningMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "AnalyzeIamPolicyLongrunning")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AssetServiceMethodDescriptorSupplier("AnalyzeIamPolicyLongrunning")) + .build(); + } + } + } + return getAnalyzeIamPolicyLongrunningMethod; + } + /** 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 +716,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); + } + + /** + * + * + *
+     * Analyzes IAM policies asynchronously to answer which identities have what
+     * accesses on which resources, and writes the analysis results to a Google
+     * Cloud Storage or a BigQuery destination. For Cloud Storage destination, the
+     * output format is the JSON format that represents a
+     * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method implements the
+     * [google.longrunning.Operation][google.longrunning.Operation], which allows you to track the operation
+     * status. We recommend intervals of at least 2 seconds with exponential
+     * backoff retry to poll the operation result. The metadata contains the
+     * request to help callers to map responses to requests.
+     * 
+ */ + public void analyzeIamPolicyLongrunning( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getAnalyzeIamPolicyLongrunningMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -678,6 +812,20 @@ 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( + getAnalyzeIamPolicyLongrunningMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest, + com.google.longrunning.Operation>( + this, METHODID_ANALYZE_IAM_POLICY_LONGRUNNING))) .build(); } } @@ -858,6 +1006,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); + } + + /** + * + * + *
+     * Analyzes IAM policies asynchronously to answer which identities have what
+     * accesses on which resources, and writes the analysis results to a Google
+     * Cloud Storage or a BigQuery destination. For Cloud Storage destination, the
+     * output format is the JSON format that represents a
+     * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method implements the
+     * [google.longrunning.Operation][google.longrunning.Operation], which allows you to track the operation
+     * status. We recommend intervals of at least 2 seconds with exponential
+     * backoff retry to poll the operation result. The metadata contains the
+     * request to help callers to map responses to requests.
+     * 
+ */ + public void analyzeIamPolicyLongrunning( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getAnalyzeIamPolicyLongrunningMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -1011,6 +1201,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); + } + + /** + * + * + *
+     * Analyzes IAM policies asynchronously to answer which identities have what
+     * accesses on which resources, and writes the analysis results to a Google
+     * Cloud Storage or a BigQuery destination. For Cloud Storage destination, the
+     * output format is the JSON format that represents a
+     * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method implements the
+     * [google.longrunning.Operation][google.longrunning.Operation], which allows you to track the operation
+     * status. We recommend intervals of at least 2 seconds with exponential
+     * backoff retry to poll the operation result. The metadata contains the
+     * request to help callers to map responses to requests.
+     * 
+ */ + public com.google.longrunning.Operation analyzeIamPolicyLongrunning( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest request) { + return blockingUnaryCall( + getChannel(), getAnalyzeIamPolicyLongrunningMethod(), getCallOptions(), request); + } } /** @@ -1172,6 +1397,43 @@ 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); + } + + /** + * + * + *
+     * Analyzes IAM policies asynchronously to answer which identities have what
+     * accesses on which resources, and writes the analysis results to a Google
+     * Cloud Storage or a BigQuery destination. For Cloud Storage destination, the
+     * output format is the JSON format that represents a
+     * [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method implements the
+     * [google.longrunning.Operation][google.longrunning.Operation], which allows you to track the operation
+     * status. We recommend intervals of at least 2 seconds with exponential
+     * backoff retry to poll the operation result. The metadata contains the
+     * request to help callers to map responses to requests.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + analyzeIamPolicyLongrunning( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest request) { + return futureUnaryCall( + getChannel().newCall(getAnalyzeIamPolicyLongrunningMethod(), getCallOptions()), request); + } } private static final int METHODID_EXPORT_ASSETS = 0; @@ -1183,6 +1445,8 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1250,6 +1514,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_ANALYZE_IAM_POLICY_LONGRUNNING: + serviceImpl.analyzeIamPolicyLongrunning( + (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -1323,6 +1598,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getDeleteFeedMethod()) .addMethod(getSearchAllResourcesMethod()) .addMethod(getSearchAllIamPoliciesMethod()) + .addMethod(getAnalyzeIamPolicyMethod()) + .addMethod(getAnalyzeIamPolicyLongrunningMethod()) .build(); } } diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java new file mode 100644 index 000000000..08c1253f5 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequest.java @@ -0,0 +1,1070 @@ +/* + * 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.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest} + */ +public final class AnalyzeIamPolicyLongrunningRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) + AnalyzeIamPolicyLongrunningRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalyzeIamPolicyLongrunningRequest.newBuilder() to construct. + private AnalyzeIamPolicyLongrunningRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalyzeIamPolicyLongrunningRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalyzeIamPolicyLongrunningRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnalyzeIamPolicyLongrunningRequest( + 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_AnalyzeIamPolicyLongrunningRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.class, + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.Builder.class); + } + + public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1.IamPolicyAnalysisQuery analysisQuery_; + /** + * + * + *
+   * Required. 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; + } + /** + * + * + *
+   * Required. 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_; + } + /** + * + * + *
+   * Required. 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_; + /** + * + * + *
+   * Required. 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; + } + /** + * + * + *
+   * Required. 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_; + } + /** + * + * + *
+   * Required. 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.AnalyzeIamPolicyLongrunningRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest other = + (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) 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.AnalyzeIamPolicyLongrunningRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest 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.AnalyzeIamPolicyLongrunningRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest 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.AnalyzeIamPolicyLongrunningRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest 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.AnalyzeIamPolicyLongrunningRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest 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.AnalyzeIamPolicyLongrunningRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest 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.AnalyzeIamPolicyLongrunningRequest 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.AnalyzeIamPolicyLongrunningRequest 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.AnalyzeIamPolicyLongrunningRequest 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.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.class, + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.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_AnalyzeIamPolicyLongrunningRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest build() { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest buildPartial() { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest result = + new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest(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.AnalyzeIamPolicyLongrunningRequest) { + return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest other) { + if (other + == com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest.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.AnalyzeIamPolicyLongrunningRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) 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_; + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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(); + } + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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(); + } + /** + * + * + *
+     * Required. 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_; + } + } + /** + * + * + *
+     * Required. 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_; + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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(); + } + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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(); + } + /** + * + * + *
+     * Required. 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_; + } + } + /** + * + * + *
+     * Required. 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.AnalyzeIamPolicyLongrunningRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) + private static final com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest(); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeIamPolicyLongrunningRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalyzeIamPolicyLongrunningRequest(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.AnalyzeIamPolicyLongrunningRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequestOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequestOrBuilder.java new file mode 100644 index 000000000..de124f6c9 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequestOrBuilder.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 AnalyzeIamPolicyLongrunningRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. 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(); + /** + * + * + *
+   * Required. 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(); + /** + * + * + *
+   * Required. The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); + + /** + * + * + *
+   * Required. 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(); + /** + * + * + *
+   * Required. 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(); + /** + * + * + *
+   * Required. 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/AnalyzeIamPolicyLongrunningResponse.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java new file mode 100644 index 000000000..c08e3beef --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java @@ -0,0 +1,463 @@ +/* + * 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 [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse} + */ +public final class AnalyzeIamPolicyLongrunningResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) + AnalyzeIamPolicyLongrunningResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalyzeIamPolicyLongrunningResponse.newBuilder() to construct. + private AnalyzeIamPolicyLongrunningResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalyzeIamPolicyLongrunningResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalyzeIamPolicyLongrunningResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnalyzeIamPolicyLongrunningResponse( + 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_AnalyzeIamPolicyLongrunningResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.class, + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.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.AnalyzeIamPolicyLongrunningResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse other = + (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) 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.AnalyzeIamPolicyLongrunningResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse 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.AnalyzeIamPolicyLongrunningResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse 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.AnalyzeIamPolicyLongrunningResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse 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.AnalyzeIamPolicyLongrunningResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse 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.AnalyzeIamPolicyLongrunningResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse 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.AnalyzeIamPolicyLongrunningResponse 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.AnalyzeIamPolicyLongrunningResponse 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.AnalyzeIamPolicyLongrunningResponse 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 [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1.AssetServiceProto + .internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.class, + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.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_AnalyzeIamPolicyLongrunningResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse + getDefaultInstanceForType() { + return com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse build() { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse buildPartial() { + com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse result = + new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse(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.AnalyzeIamPolicyLongrunningResponse) { + return mergeFrom((com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse other) { + if (other + == com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse.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.AnalyzeIamPolicyLongrunningResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) + 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.AnalyzeIamPolicyLongrunningResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) + private static final com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse(); + } + + public static com.google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalyzeIamPolicyLongrunningResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalyzeIamPolicyLongrunningResponse(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.AnalyzeIamPolicyLongrunningResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponseOrBuilder.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponseOrBuilder.java new file mode 100644 index 000000000..6d3510e82 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponseOrBuilder.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 AnalyzeIamPolicyLongrunningResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse) + com.google.protobuf.MessageOrBuilder {} 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..fc60c38ec --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequest.java @@ -0,0 +1,1142 @@ +/* + * 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.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_; + /** + * + * + *
+   * Required. 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; + } + /** + * + * + *
+   * Required. 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_; + } + /** + * + * + *
+   * Required. 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_; + /** + * + * + *
+   * Optional. 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.
+   * 
+ * + * + * .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; + } + /** + * + * + *
+   * Optional. 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.
+   * 
+ * + * + * .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_; + } + /** + * + * + *
+   * Optional. 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.
+   * 
+ * + * + * .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 [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_; + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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(); + } + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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(); + } + /** + * + * + *
+     * Required. 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_; + } + } + /** + * + * + *
+     * Required. 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_; + /** + * + * + *
+     * Optional. 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.
+     * 
+ * + * + * .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; + } + /** + * + * + *
+     * Optional. 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.
+     * 
+ * + * + * .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(); + } + } + /** + * + * + *
+     * Optional. 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.
+     * 
+ * + * + * .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; + } + /** + * + * + *
+     * Optional. 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.
+     * 
+ * + * + * .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; + } + /** + * + * + *
+     * Optional. 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.
+     * 
+ * + * + * .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; + } + /** + * + * + *
+     * Optional. 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.
+     * 
+ * + * + * .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; + } + /** + * + * + *
+     * Optional. 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.
+     * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.Duration.Builder getExecutionTimeoutBuilder() { + + onChanged(); + return getExecutionTimeoutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. 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.
+     * 
+ * + * + * .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_; + } + } + /** + * + * + *
+     * Optional. 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.
+     * 
+ * + * + * .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..6d479d433 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyRequestOrBuilder.java @@ -0,0 +1,128 @@ +/* + * 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 { + + /** + * + * + *
+   * Required. 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(); + /** + * + * + *
+   * Required. 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(); + /** + * + * + *
+   * Required. The request query.
+   * 
+ * + * + * .google.cloud.asset.v1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.asset.v1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); + + /** + * + * + *
+   * Optional. 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.
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the executionTimeout field is set. + */ + boolean hasExecutionTimeout(); + /** + * + * + *
+   * Optional. 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.
+   * 
+ * + * + * .google.protobuf.Duration execution_timeout = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The executionTimeout. + */ + com.google.protobuf.Duration getExecutionTimeout(); + /** + * + * + *
+   * Optional. 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.
+   * 
+ * + * + * .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..9c4974eaf --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyResponse.java @@ -0,0 +1,3537 @@ +/* + * 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 [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 [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 [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 [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 [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 [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][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results] have been
+     * fully explored to answer the query.
+     * 
+ * + * bool fully_explored = 3; + * + * @return The fullyExplored. + */ + boolean getFullyExplored(); + + /** + * + * + *
+     * 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(); + 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 42: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + nonCriticalErrors_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + 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)) { + 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 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 [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 [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 [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 [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 [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][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.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 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 < 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 < 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 (!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 (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(); + 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 (nonCriticalErrorsBuilder_ == null) { + nonCriticalErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } 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 (nonCriticalErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + nonCriticalErrors_ = java.util.Collections.unmodifiableList(nonCriticalErrors_); + bitField0_ = (bitField0_ & ~0x00000002); + } + 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 (nonCriticalErrorsBuilder_ == null) { + if (!other.nonCriticalErrors_.isEmpty()) { + if (nonCriticalErrors_.isEmpty()) { + nonCriticalErrors_ = other.nonCriticalErrors_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureNonCriticalErrorsIsMutable(); + nonCriticalErrors_.addAll(other.nonCriticalErrors_); + } + onChanged(); + } + } else { + if (!other.nonCriticalErrors_.isEmpty()) { + if (nonCriticalErrorsBuilder_.isEmpty()) { + nonCriticalErrorsBuilder_.dispose(); + nonCriticalErrorsBuilder_ = null; + nonCriticalErrors_ = other.nonCriticalErrors_; + bitField0_ = (bitField0_ & ~0x00000002); + 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 [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 [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 [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 [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 [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 [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 [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 [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 [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 [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 [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 [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 [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 [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 [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 [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 [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 [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][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.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][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.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][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.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 nonCriticalErrors_ = + java.util.Collections.emptyList(); + + private void ensureNonCriticalErrorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + nonCriticalErrors_ = + new java.util.ArrayList( + nonCriticalErrors_); + bitField0_ |= 0x00000002; + } + } + + 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_ & ~0x00000002); + 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_ & 0x00000002) != 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
+   * [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
+   * [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
+   * [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
+   * [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
+   * [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][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis] and
+   * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.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 [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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
+     * [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][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis] and
+     * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.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][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis] and
+     * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.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][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis] and
+     * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.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..d55dcdf9c --- /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
+   * [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
+   * [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
+   * [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
+   * [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
+   * [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][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis] and
+   * [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.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..e45cca832 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; @@ -139,11 +171,41 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\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" + + "ssions:\0028\001\"G\n\026IamPolicyAnalysisState\022\036\n\004" + + "code\030\001 \001(\0162\020.google.rpc.Code\022\r\n\005cause\030\002 " + + "\001(\t\"\341\010\n\027IamPolicyAnalysisResult\022#\n\033attac" + + "hed_resource_full_name\030\001 \001(\t\022+\n\013iam_bind" + + "ing\030\002 \001(\0132\026.google.iam.v1.Binding\022^\n\024acc" + + "ess_control_lists\030\003 \003(\0132@.google.cloud.a" + + "sset.v1.IamPolicyAnalysisResult.AccessCo" + + "ntrolList\022R\n\ridentity_list\030\004 \001(\0132;.googl" + + "e.cloud.asset.v1.IamPolicyAnalysisResult" + + ".IdentityList\022\026\n\016fully_explored\030\005 \001(\010\032m\n" + + "\010Resource\022\032\n\022full_resource_name\030\001 \001(\t\022E\n" + + "\016analysis_state\030\002 \001(\0132-.google.cloud.ass" + + "et.v1.IamPolicyAnalysisState\032\205\001\n\006Access\022" + + "\016\n\004role\030\001 \001(\tH\000\022\024\n\npermission\030\002 \001(\tH\000\022E\n" + + "\016analysis_state\030\003 \001(\0132-.google.cloud.ass" + + "et.v1.IamPolicyAnalysisStateB\016\n\014oneof_ac" + + "cess\032_\n\010Identity\022\014\n\004name\030\001 \001(\t\022E\n\016analys" + + "is_state\030\002 \001(\0132-.google.cloud.asset.v1.I" + + "amPolicyAnalysisState\0320\n\004Edge\022\023\n\013source_" + + "node\030\001 \001(\t\022\023\n\013target_node\030\002 \001(\t\032\365\001\n\021Acce" + + "ssControlList\022J\n\tresources\030\001 \003(\01327.googl" + + "e.cloud.asset.v1.IamPolicyAnalysisResult" + + ".Resource\022G\n\010accesses\030\002 \003(\01325.google.clo" + + "ud.asset.v1.IamPolicyAnalysisResult.Acce" + + "ss\022K\n\016resource_edges\030\003 \003(\01323.google.clou" + + "d.asset.v1.IamPolicyAnalysisResult.Edge\032" + + "\245\001\n\014IdentityList\022K\n\nidentities\030\001 \003(\01327.g" + + "oogle.cloud.asset.v1.IamPolicyAnalysisRe" + + "sult.Identity\022H\n\013group_edges\030\002 \003(\01323.goo" + + "gle.cloud.asset.v1.IamPolicyAnalysisResu" + + "lt.EdgeB\230\001\n\031com.google.cloud.asset.v1B\nA" + + "ssetProtoP\001Z:google.golang.org/genproto/" + + "googleapis/cloud/asset/v1;asset\370\001\001\252\002\025Goo" + + "gle.Cloud.Asset.V1\312\002\025Google\\Cloud\\Asset\\" + + "V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -273,6 +335,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); 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 6a7ea340d..2d845fa0b 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 @@ -119,6 +119,58 @@ 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_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_AnalyzeIamPolicyLongrunningRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -214,52 +266,121 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "age_token\030\004 \001(\tB\003\340A\001\"v\n\034SearchAllIamPoli" + "ciesResponse\022=\n\007results\030\001 \003(\0132,.google.c" + "loud.asset.v1.IamPolicySearchResult\022\027\n\017n" - + "ext_page_token\030\002 \001(\t*l\n\013ContentType\022\034\n\030C" - + "ONTENT_TYPE_UNSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022" - + "\016\n\nIAM_POLICY\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACCES" - + "S_POLICY\020\0052\360\013\n\014AssetService\022\336\001\n\014ExportAs" - + "sets\022*.google.cloud.asset.v1.ExportAsset" - + "sRequest\032\035.google.longrunning.Operation\"" - + "\202\001\202\323\344\223\002\"\"\035/v1/{parent=*/*}:exportAssets:" - + "\001*\312AW\n*google.cloud.asset.v1.ExportAsset" - + "sResponse\022)google.cloud.asset.v1.ExportA" - + "ssetsRequest\022\262\001\n\025BatchGetAssetsHistory\0223" - + ".google.cloud.asset.v1.BatchGetAssetsHis" - + "toryRequest\0324.google.cloud.asset.v1.Batc" - + "hGetAssetsHistoryResponse\".\202\323\344\223\002(\022&/v1/{" - + "parent=*/*}:batchGetAssetsHistory\022\177\n\nCre" - + "ateFeed\022(.google.cloud.asset.v1.CreateFe" - + "edRequest\032\033.google.cloud.asset.v1.Feed\"*" - + "\202\323\344\223\002\033\"\026/v1/{parent=*/*}/feeds:\001*\332A\006pare" - + "nt\022t\n\007GetFeed\022%.google.cloud.asset.v1.Ge" - + "tFeedRequest\032\033.google.cloud.asset.v1.Fee" - + "d\"%\202\323\344\223\002\030\022\026/v1/{name=*/*/feeds/*}\332A\004name" - + "\022\207\001\n\tListFeeds\022\'.google.cloud.asset.v1.L" - + "istFeedsRequest\032(.google.cloud.asset.v1." - + "ListFeedsResponse\"\'\202\323\344\223\002\030\022\026/v1/{parent=*" - + "/*}/feeds\332A\006parent\022\202\001\n\nUpdateFeed\022(.goog" - + "le.cloud.asset.v1.UpdateFeedRequest\032\033.go" - + "ogle.cloud.asset.v1.Feed\"-\202\323\344\223\002 2\033/v1/{f" - + "eed.name=*/*/feeds/*}:\001*\332A\004feed\022u\n\nDelet" - + "eFeed\022(.google.cloud.asset.v1.DeleteFeed" - + "Request\032\026.google.protobuf.Empty\"%\202\323\344\223\002\030*" - + "\026/v1/{name=*/*/feeds/*}\332A\004name\022\277\001\n\022Searc" - + "hAllResources\0220.google.cloud.asset.v1.Se" - + "archAllResourcesRequest\0321.google.cloud.a" - + "sset.v1.SearchAllResourcesResponse\"D\202\323\344\223" - + "\002$\022\"/v1/{scope=*/*}:searchAllResources\332A" - + "\027scope,query,asset_types\022\273\001\n\024SearchAllIa" - + "mPolicies\0222.google.cloud.asset.v1.Search" - + "AllIamPoliciesRequest\0323.google.cloud.ass" - + "et.v1.SearchAllIamPoliciesResponse\":\202\323\344\223" - + "\002&\022$/v1/{scope=*/*}:searchAllIamPolicies" - + "\332A\013scope,query\032M\312A\031cloudasset.googleapis" - + ".com\322A.https://www.googleapis.com/auth/c" - + "loud-platformB\234\001\n\031com.google.cloud.asset" - + ".v1B\021AssetServiceProtoP\001Z:google.golang." - + "org/genproto/googleapis/cloud/asset/v1;a" - + "sset\252\002\025Google.Cloud.Asset.V1\312\002\025Google\\Cl" - + "oud\\Asset\\V1b\006proto3" + + "ext_page_token\030\002 \001(\t\"\220\006\n\026IamPolicyAnalys" + + "isQuery\022\022\n\005scope\030\001 \001(\tB\003\340A\002\022^\n\021resource_" + + "selector\030\002 \001(\0132>.google.cloud.asset.v1.I" + + "amPolicyAnalysisQuery.ResourceSelectorB\003" + + "\340A\001\022^\n\021identity_selector\030\003 \001(\0132>.google." + + "cloud.asset.v1.IamPolicyAnalysisQuery.Id" + + "entitySelectorB\003\340A\001\022Z\n\017access_selector\030\004" + + " \001(\0132<.google.cloud.asset.v1.IamPolicyAn" + + "alysisQuery.AccessSelectorB\003\340A\001\022K\n\007optio" + + "ns\030\005 \001(\01325.google.cloud.asset.v1.IamPoli" + + "cyAnalysisQuery.OptionsB\003\340A\001\0323\n\020Resource" + + "Selector\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\340" + + "A\001\022\030\n\013permissions\030\002 \003(\tB\003\340A\001\032\330\001\n\007Options" + + "\022\032\n\rexpand_groups\030\001 \001(\010B\003\340A\001\022\031\n\014expand_r" + + "oles\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\340" + + "A\001\022\037\n\022output_group_edges\030\005 \001(\010B\003\340A\001\0222\n%a" + + "nalyze_service_account_impersonation\030\006 \001" + + "(\010B\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\"\212\004\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\210\002\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\022J\n\023non_critical_erro" + + "rs\030\005 \003(\0132-.google.cloud.asset.v1.IamPoli" + + "cyAnalysisState\"\264\004\n\035IamPolicyAnalysisOut" + + "putConfig\022^\n\017gcs_destination\030\001 \001(\0132C.goo" + + "gle.cloud.asset.v1.IamPolicyAnalysisOutp" + + "utConfig.GcsDestinationH\000\022h\n\024bigquery_de" + + "stination\030\002 \001(\0132H.google.cloud.asset.v1." + + "IamPolicyAnalysisOutputConfig.BigQueryDe" + + "stinationH\000\032\"\n\016GcsDestination\022\020\n\003uri\030\001 \001" + + "(\tB\003\340A\002\032\225\002\n\023BigQueryDestination\022\024\n\007datas" + + "et\030\001 \001(\tB\003\340A\002\022\031\n\014table_prefix\030\002 \001(\tB\003\340A\002" + + "\022l\n\rpartition_key\030\003 \001(\0162U.google.cloud.a" + + "sset.v1.IamPolicyAnalysisOutputConfig.Bi" + + "gQueryDestination.PartitionKey\022\036\n\021write_" + + "disposition\030\004 \001(\tB\003\340A\001\"?\n\014PartitionKey\022\035" + + "\n\031PARTITION_KEY_UNSPECIFIED\020\000\022\020\n\014REQUEST" + + "_TIME\020\001B\r\n\013destination\"\302\001\n\"AnalyzeIamPol" + + "icyLongrunningRequest\022J\n\016analysis_query\030" + + "\001 \001(\0132-.google.cloud.asset.v1.IamPolicyA" + + "nalysisQueryB\003\340A\002\022P\n\routput_config\030\002 \001(\013" + + "24.google.cloud.asset.v1.IamPolicyAnalys" + + "isOutputConfigB\003\340A\002\"%\n#AnalyzeIamPolicyL" + + "ongrunningResponse*l\n\013ContentType\022\034\n\030CON" + + "TENT_TYPE_UNSPECIFIED\020\000\022\014\n\010RESOURCE\020\001\022\016\n" + + "\nIAM_POLICY\020\002\022\016\n\nORG_POLICY\020\004\022\021\n\rACCESS_" + + "POLICY\020\0052\331\017\n\014AssetService\022\336\001\n\014ExportAsse" + + "ts\022*.google.cloud.asset.v1.ExportAssetsR" + + "equest\032\035.google.longrunning.Operation\"\202\001" + + "\202\323\344\223\002\"\"\035/v1/{parent=*/*}:exportAssets:\001*" + + "\312AW\n*google.cloud.asset.v1.ExportAssetsR" + + "esponse\022)google.cloud.asset.v1.ExportAss" + + "etsRequest\022\262\001\n\025BatchGetAssetsHistory\0223.g" + + "oogle.cloud.asset.v1.BatchGetAssetsHisto" + + "ryRequest\0324.google.cloud.asset.v1.BatchG" + + "etAssetsHistoryResponse\".\202\323\344\223\002(\022&/v1/{pa" + + "rent=*/*}:batchGetAssetsHistory\022\177\n\nCreat" + + "eFeed\022(.google.cloud.asset.v1.CreateFeed" + + "Request\032\033.google.cloud.asset.v1.Feed\"*\202\323" + + "\344\223\002\033\"\026/v1/{parent=*/*}/feeds:\001*\332A\006parent" + + "\022t\n\007GetFeed\022%.google.cloud.asset.v1.GetF" + + "eedRequest\032\033.google.cloud.asset.v1.Feed\"" + + "%\202\323\344\223\002\030\022\026/v1/{name=*/*/feeds/*}\332A\004name\022\207" + + "\001\n\tListFeeds\022\'.google.cloud.asset.v1.Lis" + + "tFeedsRequest\032(.google.cloud.asset.v1.Li" + + "stFeedsResponse\"\'\202\323\344\223\002\030\022\026/v1/{parent=*/*" + + "}/feeds\332A\006parent\022\202\001\n\nUpdateFeed\022(.google" + + ".cloud.asset.v1.UpdateFeedRequest\032\033.goog" + + "le.cloud.asset.v1.Feed\"-\202\323\344\223\002 2\033/v1/{fee" + + "d.name=*/*/feeds/*}:\001*\332A\004feed\022u\n\nDeleteF" + + "eed\022(.google.cloud.asset.v1.DeleteFeedRe" + + "quest\032\026.google.protobuf.Empty\"%\202\323\344\223\002\030*\026/" + + "v1/{name=*/*/feeds/*}\332A\004name\022\277\001\n\022SearchA" + + "llResources\0220.google.cloud.asset.v1.Sear" + + "chAllResourcesRequest\0321.google.cloud.ass" + + "et.v1.SearchAllResourcesResponse\"D\202\323\344\223\002$" + + "\022\"/v1/{scope=*/*}:searchAllResources\332A\027s" + + "cope,query,asset_types\022\273\001\n\024SearchAllIamP" + + "olicies\0222.google.cloud.asset.v1.SearchAl" + + "lIamPoliciesRequest\0323.google.cloud.asset" + + ".v1.SearchAllIamPoliciesResponse\":\202\323\344\223\002&" + + "\022$/v1/{scope=*/*}:searchAllIamPolicies\332A" + + "\013scope,query\022\254\001\n\020AnalyzeIamPolicy\022..goog" + + "le.cloud.asset.v1.AnalyzeIamPolicyReques" + + "t\032/.google.cloud.asset.v1.AnalyzeIamPoli" + + "cyResponse\"7\202\323\344\223\0021\022//v1/{analysis_query." + + "scope=*/*}:analyzeIamPolicy\022\267\002\n\033AnalyzeI" + + "amPolicyLongrunning\0229.google.cloud.asset" + + ".v1.AnalyzeIamPolicyLongrunningRequest\032\035" + + ".google.longrunning.Operation\"\275\001\202\323\344\223\002?\":" + + "/v1/{analysis_query.scope=*/*}:analyzeIa" + + "mPolicyLongrunning:\001*\312Au\n9google.cloud.a" + + "sset.v1.AnalyzeIamPolicyLongrunningRespo" + + "nse\0228google.cloud.asset.v1.AnalyzeIamPol" + + "icyLongrunningRequest\032M\312A\031cloudasset.goo" + + "gleapis.com\322A.https://www.googleapis.com" + + "/auth/cloud-platformB\234\001\n\031com.google.clou" + + "d.asset.v1B\021AssetServiceProtoP\001Z:google." + + "golang.org/genproto/googleapis/cloud/ass" + + "et/v1;asset\252\002\025Google.Cloud.Asset.V1\312\002\025Go" + + "ogle\\Cloud\\Asset\\V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -461,6 +582,127 @@ 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(23); + 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", + }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + 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(25); + 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", "NonCriticalErrors", + }); + internal_static_google_cloud_asset_v1_IamPolicyAnalysisOutputConfig_descriptor = + getDescriptor().getMessageTypes().get(26); + 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", "WriteDisposition", + }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningRequest_descriptor, + new java.lang.String[] { + "AnalysisQuery", "OutputConfig", + }); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1_AnalyzeIamPolicyLongrunningResponse_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/IamPolicyAnalysisOutputConfig.java b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java new file mode 100644 index 000000000..e2933c625 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisOutputConfig.java @@ -0,0 +1,3564 @@ +/* + * 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 { + + /** + * + * + *
+     * Required. 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
+     * [Quickstart: Using the gsutil tool]
+     * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * Required. 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
+     * [Quickstart: Using the gsutil tool]
+     * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
+     * 
+ * + * 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_; + /** + * + * + *
+     * Required. 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
+     * [Quickstart: Using the gsutil tool]
+     * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Required. 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
+     * [Quickstart: Using the gsutil tool]
+     * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
+     * 
+ * + * 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_ = ""; + /** + * + * + *
+       * Required. 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
+       * [Quickstart: Using the gsutil tool]
+       * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * Required. 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
+       * [Quickstart: Using the gsutil tool]
+       * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * Required. 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
+       * [Quickstart: Using the gsutil tool]
+       * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
+       * 
+ * + * 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; + } + /** + * + * + *
+       * Required. 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
+       * [Quickstart: Using the gsutil tool]
+       * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. 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
+       * [Quickstart: Using the gsutil tool]
+       * (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples.
+       * 
+ * + * 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 { + + /** + * + * + *
+     * Required. 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(); + /** + * + * + *
+     * Required. 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(); + + /** + * + * + *
+     * 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:
+     * * <table_prefix>_analysis table will contain export operation's metadata.
+     * * <table_prefix>_analysis_result will contain all the
+     *   [IamPolicyAnalysisResult][google.cloud.asset.v1.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(); + /** + * + * + *
+     * 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:
+     * * <table_prefix>_analysis table will contain export operation's metadata.
+     * * <table_prefix>_analysis_result will contain all the
+     *   [IamPolicyAnalysisResult][google.cloud.asset.v1.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(); + + /** + * + * + *
+     * Optional. Specifies the action that occurs if the destination table or partition
+     * already exists. The following values are supported:
+     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+     * overwrites the entire table or all the partitions data.
+     * * WRITE_APPEND: If the table or partition already exists, BigQuery
+     * appends the data to the table or the latest partition.
+     * * WRITE_EMPTY: If the table already exists and contains data, an error is
+     * returned.
+     * The default value is WRITE_APPEND. Each action is atomic and only occurs
+     * if BigQuery is able to complete the job successfully. Details are at
+     * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+     * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The writeDisposition. + */ + java.lang.String getWriteDisposition(); + /** + * + * + *
+     * Optional. Specifies the action that occurs if the destination table or partition
+     * already exists. The following values are supported:
+     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+     * overwrites the entire table or all the partitions data.
+     * * WRITE_APPEND: If the table or partition already exists, BigQuery
+     * appends the data to the table or the latest partition.
+     * * WRITE_EMPTY: If the table already exists and contains data, an error is
+     * returned.
+     * The default value is WRITE_APPEND. Each action is atomic and only occurs
+     * if BigQuery is able to complete the job successfully. Details are at
+     * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+     * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for writeDisposition. + */ + com.google.protobuf.ByteString getWriteDispositionBytes(); + } + /** + * + * + *
+   * 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; + writeDisposition_ = ""; + } + + @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 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + writeDisposition_ = 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_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) + } + + public static final int DATASET_FIELD_NUMBER = 1; + private volatile java.lang.Object dataset_; + /** + * + * + *
+     * Required. 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; + } + } + /** + * + * + *
+     * Required. 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_; + /** + * + * + *
+     * 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:
+     * * <table_prefix>_analysis table will contain export operation's metadata.
+     * * <table_prefix>_analysis_result will contain all the
+     *   [IamPolicyAnalysisResult][google.cloud.asset.v1.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; + } + } + /** + * + * + *
+     * 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:
+     * * <table_prefix>_analysis table will contain export operation's metadata.
+     * * <table_prefix>_analysis_result will contain all the
+     *   [IamPolicyAnalysisResult][google.cloud.asset.v1.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_DISPOSITION_FIELD_NUMBER = 4; + private volatile java.lang.Object writeDisposition_; + /** + * + * + *
+     * Optional. Specifies the action that occurs if the destination table or partition
+     * already exists. The following values are supported:
+     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+     * overwrites the entire table or all the partitions data.
+     * * WRITE_APPEND: If the table or partition already exists, BigQuery
+     * appends the data to the table or the latest partition.
+     * * WRITE_EMPTY: If the table already exists and contains data, an error is
+     * returned.
+     * The default value is WRITE_APPEND. Each action is atomic and only occurs
+     * if BigQuery is able to complete the job successfully. Details are at
+     * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+     * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The writeDisposition. + */ + @java.lang.Override + public java.lang.String getWriteDisposition() { + java.lang.Object ref = writeDisposition_; + 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(); + writeDisposition_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. Specifies the action that occurs if the destination table or partition
+     * already exists. The following values are supported:
+     * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+     * overwrites the entire table or all the partitions data.
+     * * WRITE_APPEND: If the table or partition already exists, BigQuery
+     * appends the data to the table or the latest partition.
+     * * WRITE_EMPTY: If the table already exists and contains data, an error is
+     * returned.
+     * The default value is WRITE_APPEND. Each action is atomic and only occurs
+     * if BigQuery is able to complete the job successfully. Details are at
+     * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+     * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for writeDisposition. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWriteDispositionBytes() { + java.lang.Object ref = writeDisposition_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + writeDisposition_ = 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 (!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 (!getWriteDispositionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, writeDisposition_); + } + 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 (!getWriteDispositionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, writeDisposition_); + } + 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 (!getWriteDisposition().equals(other.getWriteDisposition())) 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_DISPOSITION_FIELD_NUMBER; + hash = (53 * hash) + getWriteDisposition().hashCode(); + 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; + + writeDisposition_ = ""; + + 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.writeDisposition_ = writeDisposition_; + 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.getWriteDisposition().isEmpty()) { + writeDisposition_ = other.writeDisposition_; + 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.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_ = ""; + /** + * + * + *
+       * Required. 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; + } + } + /** + * + * + *
+       * Required. 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; + } + } + /** + * + * + *
+       * Required. 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; + } + /** + * + * + *
+       * Required. 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; + } + /** + * + * + *
+       * Required. 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_ = ""; + /** + * + * + *
+       * 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:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.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; + } + } + /** + * + * + *
+       * 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:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.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; + } + } + /** + * + * + *
+       * 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:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.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; + } + /** + * + * + *
+       * 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:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.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; + } + /** + * + * + *
+       * 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:
+       * * <table_prefix>_analysis table will contain export operation's metadata.
+       * * <table_prefix>_analysis_result will contain all the
+       *   [IamPolicyAnalysisResult][google.cloud.asset.v1.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 java.lang.Object writeDisposition_ = ""; + /** + * + * + *
+       * Optional. Specifies the action that occurs if the destination table or partition
+       * already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * The default value is WRITE_APPEND. Each action is atomic and only occurs
+       * if BigQuery is able to complete the job successfully. Details are at
+       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+       * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The writeDisposition. + */ + public java.lang.String getWriteDisposition() { + java.lang.Object ref = writeDisposition_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + writeDisposition_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. Specifies the action that occurs if the destination table or partition
+       * already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * The default value is WRITE_APPEND. Each action is atomic and only occurs
+       * if BigQuery is able to complete the job successfully. Details are at
+       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+       * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for writeDisposition. + */ + public com.google.protobuf.ByteString getWriteDispositionBytes() { + java.lang.Object ref = writeDisposition_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + writeDisposition_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. Specifies the action that occurs if the destination table or partition
+       * already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * The default value is WRITE_APPEND. Each action is atomic and only occurs
+       * if BigQuery is able to complete the job successfully. Details are at
+       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+       * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The writeDisposition to set. + * @return This builder for chaining. + */ + public Builder setWriteDisposition(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + writeDisposition_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Specifies the action that occurs if the destination table or partition
+       * already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * The default value is WRITE_APPEND. Each action is atomic and only occurs
+       * if BigQuery is able to complete the job successfully. Details are at
+       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+       * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearWriteDisposition() { + + writeDisposition_ = getDefaultInstance().getWriteDisposition(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Specifies the action that occurs if the destination table or partition
+       * already exists. The following values are supported:
+       * * WRITE_TRUNCATE: If the table or partition already exists, BigQuery
+       * overwrites the entire table or all the partitions data.
+       * * WRITE_APPEND: If the table or partition already exists, BigQuery
+       * appends the data to the table or the latest partition.
+       * * WRITE_EMPTY: If the table already exists and contains data, an error is
+       * returned.
+       * The default value is WRITE_APPEND. Each action is atomic and only occurs
+       * if BigQuery is able to complete the job successfully. Details are at
+       * https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file.
+       * 
+ * + * string write_disposition = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for writeDisposition to set. + * @return This builder for chaining. + */ + public Builder setWriteDispositionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + writeDisposition_ = 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.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..4f0c4843b --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisQuery.java @@ -0,0 +1,5818 @@ +/* + * 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 { + + /** + * + * + *
+     * Required. 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(); + /** + * + * + *
+     * Required. 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_; + /** + * + * + *
+     * Required. 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; + } + } + /** + * + * + *
+     * Required. 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_ = ""; + /** + * + * + *
+       * Required. 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; + } + } + /** + * + * + *
+       * Required. 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; + } + } + /** + * + * + *
+       * Required. 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; + } + /** + * + * + *
+       * Required. 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; + } + /** + * + * + *
+       * Required. 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 { + + /** + * + * + *
+     * Required. 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(); + /** + * + * + *
+     * Required. 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_; + /** + * + * + *
+     * Required. 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; + } + } + /** + * + * + *
+     * Required. 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_ = ""; + /** + * + * + *
+       * Required. 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; + } + } + /** + * + * + *
+       * Required. 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; + } + } + /** + * + * + *
+       * Required. 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; + } + /** + * + * + *
+       * Required. 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; + } + /** + * + * + *
+       * Required. 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 { + + /** + * + * + *
+     * Optional. 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(); + /** + * + * + *
+     * Optional. The roles to appear in result.
+     * 
+ * + * repeated string roles = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of roles. + */ + int getRolesCount(); + /** + * + * + *
+     * Optional. 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); + /** + * + * + *
+     * Optional. 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); + + /** + * + * + *
+     * Optional. 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(); + /** + * + * + *
+     * Optional. The permissions to appear in result.
+     * 
+ * + * repeated string permissions = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of permissions. + */ + int getPermissionsCount(); + /** + * + * + *
+     * Optional. 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); + /** + * + * + *
+     * Optional. 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. The total number of roles and permissions should be equal or
+   * less than 10.
+   * 
+ * + * 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_; + /** + * + * + *
+     * Optional. 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_; + } + /** + * + * + *
+     * Optional. 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(); + } + /** + * + * + *
+     * Optional. 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); + } + /** + * + * + *
+     * Optional. 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_; + /** + * + * + *
+     * Optional. 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_; + } + /** + * + * + *
+     * Optional. 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(); + } + /** + * + * + *
+     * Optional. 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); + } + /** + * + * + *
+     * Optional. 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. The total number of roles and permissions should be equal or
+     * less than 10.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+       * Optional. 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(); + } + /** + * + * + *
+       * Optional. 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(); + } + /** + * + * + *
+       * Optional. 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); + } + /** + * + * + *
+       * Optional. 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); + } + /** + * + * + *
+       * Optional. 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; + } + /** + * + * + *
+       * Optional. 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; + } + /** + * + * + *
+       * Optional. 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; + } + /** + * + * + *
+       * Optional. 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; + } + /** + * + * + *
+       * Optional. 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; + } + } + /** + * + * + *
+       * Optional. 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(); + } + /** + * + * + *
+       * Optional. 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(); + } + /** + * + * + *
+       * Optional. 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); + } + /** + * + * + *
+       * Optional. 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); + } + /** + * + * + *
+       * Optional. 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; + } + /** + * + * + *
+       * Optional. 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; + } + /** + * + * + *
+       * Optional. 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; + } + /** + * + * + *
+       * Optional. 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; + } + /** + * + * + *
+       * Optional. 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 { + + /** + * + * + *
+     * Optional. If true, the identities section of the result will expand any
+     * Google groups appearing in an IAM policy binding.
+     * If [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(); + + /** + * + * + *
+     * Optional. If true, the access section of result will expand any roles
+     * appearing in IAM policy bindings to include their permissions.
+     * If [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(); + + /** + * + * + *
+     * Optional. If true and [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 [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. Only project or
+     * lower resources are supported. Folder and organization resource cannot be
+     * used together with this option.
+     * For example, if the request analyzes for which users have permission P on
+     * a GCP project with this option enabled, the results will include all
+     * users who have permission P on that project or any lower resource.
+     * Default is false.
+     * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandResources. + */ + boolean getExpandResources(); + + /** + * + * + *
+     * 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]; + * + * @return The outputResourceEdges. + */ + boolean getOutputResourceEdges(); + + /** + * + * + *
+     * 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]; + * + * @return The outputGroupEdges. + */ + boolean getOutputGroupEdges(); + + /** + * + * + *
+     * 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 [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] 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
+     * [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
+     * [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(); + } + /** + * + * + *
+   * 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; + } + 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_; + /** + * + * + *
+     * Optional. If true, the identities section of the result will expand any
+     * Google groups appearing in an IAM policy binding.
+     * If [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_; + /** + * + * + *
+     * Optional. If true, the access section of result will expand any roles
+     * appearing in IAM policy bindings to include their permissions.
+     * If [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_; + /** + * + * + *
+     * Optional. If true and [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 [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. Only project or
+     * lower resources are supported. Folder and organization resource cannot be
+     * used together with this option.
+     * For example, if the request analyzes for which users have permission P on
+     * a GCP project with this option enabled, the results will include all
+     * users who have permission P on that project or any lower resource.
+     * 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_; + /** + * + * + *
+     * 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]; + * + * @return The outputResourceEdges. + */ + @java.lang.Override + public boolean getOutputResourceEdges() { + return outputResourceEdges_; + } + + public static final int OUTPUT_GROUP_EDGES_FIELD_NUMBER = 5; + private boolean outputGroupEdges_; + /** + * + * + *
+     * 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]; + * + * @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_; + /** + * + * + *
+     * 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 [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] 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
+     * [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
+     * [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_; + } + + 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_); + } + 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_); + } + 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 (!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 = (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; + + 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_; + 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()); + } + 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_; + /** + * + * + *
+       * Optional. If true, the identities section of the result will expand any
+       * Google groups appearing in an IAM policy binding.
+       * If [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_; + } + /** + * + * + *
+       * Optional. If true, the identities section of the result will expand any
+       * Google groups appearing in an IAM policy binding.
+       * If [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; + } + /** + * + * + *
+       * Optional. If true, the identities section of the result will expand any
+       * Google groups appearing in an IAM policy binding.
+       * If [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_; + /** + * + * + *
+       * Optional. If true, the access section of result will expand any roles
+       * appearing in IAM policy bindings to include their permissions.
+       * If [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_; + } + /** + * + * + *
+       * Optional. If true, the access section of result will expand any roles
+       * appearing in IAM policy bindings to include their permissions.
+       * If [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; + } + /** + * + * + *
+       * Optional. If true, the access section of result will expand any roles
+       * appearing in IAM policy bindings to include their permissions.
+       * If [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_; + /** + * + * + *
+       * Optional. If true and [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 [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. Only project or
+       * lower resources are supported. Folder and organization resource cannot be
+       * used together with this option.
+       * For example, if the request analyzes for which users have permission P on
+       * a GCP project with this option enabled, the results will include all
+       * users who have permission P on that project or any lower resource.
+       * Default is false.
+       * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandResources. + */ + @java.lang.Override + public boolean getExpandResources() { + return expandResources_; + } + /** + * + * + *
+       * Optional. If true and [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 [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. Only project or
+       * lower resources are supported. Folder and organization resource cannot be
+       * used together with this option.
+       * For example, if the request analyzes for which users have permission P on
+       * a GCP project with this option enabled, the results will include all
+       * users who have permission P on that project or any lower resource.
+       * 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; + } + /** + * + * + *
+       * Optional. If true and [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 [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. Only project or
+       * lower resources are supported. Folder and organization resource cannot be
+       * used together with this option.
+       * For example, if the request analyzes for which users have permission P on
+       * a GCP project with this option enabled, the results will include all
+       * users who have permission P on that project or any lower resource.
+       * 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_; + /** + * + * + *
+       * 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]; + * + * @return The outputResourceEdges. + */ + @java.lang.Override + public boolean getOutputResourceEdges() { + return outputResourceEdges_; + } + /** + * + * + *
+       * 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]; + * + * @param value The outputResourceEdges to set. + * @return This builder for chaining. + */ + public Builder setOutputResourceEdges(boolean value) { + + outputResourceEdges_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * 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]; + * + * @return This builder for chaining. + */ + public Builder clearOutputResourceEdges() { + + outputResourceEdges_ = false; + onChanged(); + return this; + } + + private boolean outputGroupEdges_; + /** + * + * + *
+       * 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]; + * + * @return The outputGroupEdges. + */ + @java.lang.Override + public boolean getOutputGroupEdges() { + return outputGroupEdges_; + } + /** + * + * + *
+       * 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]; + * + * @param value The outputGroupEdges to set. + * @return This builder for chaining. + */ + public Builder setOutputGroupEdges(boolean value) { + + outputGroupEdges_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * 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]; + * + * @return This builder for chaining. + */ + public Builder clearOutputGroupEdges() { + + outputGroupEdges_ = false; + onChanged(); + return this; + } + + private boolean analyzeServiceAccountImpersonation_; + /** + * + * + *
+       * 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 [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] 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
+       * [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
+       * [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_; + } + /** + * + * + *
+       * 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 [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] 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
+       * [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
+       * [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; + } + /** + * + * + *
+       * 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 [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] 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
+       * [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
+       * [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; + } + + @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_; + /** + * + * + *
+   * Required. 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; + } + } + /** + * + * + *
+   * Required. 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_; + /** + * + * + *
+   * Optional. 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; + } + /** + * + * + *
+   * Optional. 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_; + } + /** + * + * + *
+   * Optional. 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_; + /** + * + * + *
+   * Optional. 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; + } + /** + * + * + *
+   * Optional. 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_; + } + /** + * + * + *
+   * Optional. 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_; + /** + * + * + *
+   * Optional. 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; + } + /** + * + * + *
+   * Optional. 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_; + } + /** + * + * + *
+   * Optional. 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_; + /** + * + * + *
+   * Optional. 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; + } + /** + * + * + *
+   * Optional. 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_; + } + /** + * + * + *
+   * Optional. 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_ = ""; + /** + * + * + *
+     * Required. 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; + } + } + /** + * + * + *
+     * Required. 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; + } + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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; + } + /** + * + * + *
+     * Required. 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_; + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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(); + } + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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(); + } + /** + * + * + *
+     * Optional. 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_; + } + } + /** + * + * + *
+     * Optional. 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_; + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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(); + } + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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(); + } + /** + * + * + *
+     * Optional. 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_; + } + } + /** + * + * + *
+     * Optional. 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_; + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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(); + } + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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(); + } + /** + * + * + *
+     * Optional. 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_; + } + } + /** + * + * + *
+     * Optional. 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_; + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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(); + } + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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; + } + /** + * + * + *
+     * Optional. 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(); + } + /** + * + * + *
+     * Optional. 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_; + } + } + /** + * + * + *
+     * Optional. 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..0ef52c4e2 --- /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 { + + /** + * + * + *
+   * Required. 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(); + /** + * + * + *
+   * Required. 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(); + + /** + * + * + *
+   * Optional. 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(); + /** + * + * + *
+   * Optional. 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(); + /** + * + * + *
+   * Optional. 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(); + + /** + * + * + *
+   * Optional. 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(); + /** + * + * + *
+   * Optional. 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(); + /** + * + * + *
+   * Optional. 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(); + + /** + * + * + *
+   * Optional. 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(); + /** + * + * + *
+   * Optional. 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(); + /** + * + * + *
+   * Optional. 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(); + + /** + * + * + *
+   * Optional. 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(); + /** + * + * + *
+   * Optional. 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(); + /** + * + * + *
+   * Optional. 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..3f9ef5adb --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResult.java @@ -0,0 +1,10424 @@ +/* + * 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)
+     * 
+ * + * 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)
+     * 
+ * + * 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)
+     * 
+ * + * 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)
+     * 
+ * + * 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)
+       * 
+ * + * 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)
+       * 
+ * + * 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)
+       * 
+ * + * 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)
+       * 
+ * + * 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)
+       * 
+ * + * 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.
+   * 
+ * + * 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.
+     * 
+ * + * 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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as `group:parent@google.com`. The
+     * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as `group:parent@google.com`. The
+       * [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches.
+   * 
+ * + * 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][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches.
+   * 
+ * + * 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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches.
+     * 
+ * + * 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][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches.
+     * 
+ * + * 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][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches.
+     * 
+ * + * 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][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches.
+     * 
+ * + * 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][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches.
+     * 
+ * + * 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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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..4b95e3bb1 --- /dev/null +++ b/proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/IamPolicyAnalysisResultOrBuilder.java @@ -0,0 +1,213 @@ +/* + * 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][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches.
+   * 
+ * + * 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][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches.
+   * 
+ * + * 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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.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 6b66d4444..c5873958a 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,34 @@ 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" + }; + } + + // Analyzes IAM policies asynchronously to answer which identities have what + // accesses on which resources, and writes the analysis results to a Google + // Cloud Storage or a BigQuery destination. For Cloud Storage destination, the + // output format is the JSON format that represents a + // [AnalyzeIamPolicyResponse][google.cloud.asset.v1.AnalyzeIamPolicyResponse]. This method implements the + // [google.longrunning.Operation][google.longrunning.Operation], which allows you to track the operation + // status. We recommend intervals of at least 2 seconds with exponential + // backoff retry to poll the operation result. The metadata contains the + // request to help callers to map responses to requests. + rpc AnalyzeIamPolicyLongrunning(AnalyzeIamPolicyLongrunningRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{analysis_query.scope=*/*}:analyzeIamPolicyLongrunning" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.asset.v1.AnalyzeIamPolicyLongrunningResponse" + metadata_type: "google.cloud.asset.v1.AnalyzeIamPolicyLongrunningRequest" + }; + } } // Export asset request. @@ -715,6 +743,293 @@ message SearchAllIamPoliciesResponse { string next_page_token = 2; } +// IAM policy analysis query message. +message IamPolicyAnalysisQuery { + // 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 { + // Required. 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 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 { + // Required. 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 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. The total number of roles and permissions should be equal or + // less than 10. + message AccessSelector { + // Optional. The roles to appear in result. + repeated string roles = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The permissions to appear in result. + repeated string permissions = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Contains query options. + message Options { + // Optional. If true, the identities section of the result will expand any + // Google groups appearing in an IAM policy binding. + // + // If [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]; + + // Optional. If true, the access section of result will expand any roles + // appearing in IAM policy bindings to include their permissions. + // + // If [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]; + + // Optional. If true and [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 [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. Only project or + // lower resources are supported. Folder and organization resource cannot be + // used together with this option. + // + // For example, if the request analyzes for which users have permission P on + // a GCP project with this option enabled, the results will include all + // users who have permission P on that project or any lower resource. + // + // Default is false. + bool expand_resources = 3 [(google.api.field_behavior) = OPTIONAL]; + + // 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]; + + // 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]; + + // 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 [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning] 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 + // [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 + // [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]; + } + + // Required. 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]; + + // Optional. Specifies a resource for analysis. + ResourceSelector resource_selector = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies an identity for analysis. + IdentitySelector identity_selector = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies roles or permissions for analysis. This is optional. + AccessSelector access_selector = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The query options. + Options options = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request message for [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1.AssetService.AnalyzeIamPolicy]. +message AnalyzeIamPolicyRequest { + // Required. The request query. + IamPolicyAnalysisQuery analysis_query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. 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. + google.protobuf.Duration execution_timeout = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response message for [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 [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][google.cloud.asset.v1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results] have been + // fully explored to answer the query. + bool fully_explored = 3; + + // 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 + // [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is + // enabled. + repeated IamPolicyAnalysis service_account_impersonation_analysis = 2; + + // Represents whether all entries in the [main_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.main_analysis] and + // [service_account_impersonation_analysis][google.cloud.asset.v1.AnalyzeIamPolicyResponse.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 { + // Required. 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 + // [Quickstart: Using the gsutil tool] + // (https://cloud.google.com/storage/docs/quickstart-gsutil) for examples. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // A BigQuery destination. + message BigQueryDestination { + // 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; + } + + // Required. 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]; + + // 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][google.cloud.asset.v1.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]; + + // The partition key for BigQuery partitioned table. + PartitionKey partition_key = 3; + + // Optional. Specifies the action that occurs if the destination table or partition + // already exists. The following values are supported: + // + // * WRITE_TRUNCATE: If the table or partition already exists, BigQuery + // overwrites the entire table or all the partitions data. + // * WRITE_APPEND: If the table or partition already exists, BigQuery + // appends the data to the table or the latest partition. + // * WRITE_EMPTY: If the table already exists and contains data, an error is + // returned. + // + // The default value is WRITE_APPEND. Each action is atomic and only occurs + // if BigQuery is able to complete the job successfully. Details are at + // https://cloud.google.com/bigquery/docs/loading-data-local#appending_to_or_overwriting_a_table_using_a_local_file. + string write_disposition = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // 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.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]. +message AnalyzeIamPolicyLongrunningRequest { + // Required. The request query. + IamPolicyAnalysisQuery analysis_query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Output configuration indicating where the results will be output to. + IamPolicyAnalysisOutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A response message for [AssetService.AnalyzeIamPolicyLongrunning][google.cloud.asset.v1.AssetService.AnalyzeIamPolicyLongrunning]. +message AnalyzeIamPolicyLongrunningResponse {} + // 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..c06caf71a 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 @@ -378,3 +378,148 @@ 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 { + // A Google Cloud resource under analysis. + message Resource { + // The [full resource + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + 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. + 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][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] contains + // the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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 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][google.cloud.asset.v1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1.IamPolicyAnalysisResult.Edge.source_node] + // contains a group, such as `group:parent@google.com`. The + // [Edge.target_node][google.cloud.asset.v1.IamPolicyAnalysisResult.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 [full resource + // name](https://cloud.google.com/asset-inventory/docs/resource-name-format) + // of the resource to which the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] policy attaches. + string attached_resource_full_name = 1; + + // The Cloud IAM policy binding under analysis. + google.iam.v1.Binding iam_binding = 2; + + // The access control lists derived from the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] that match or + // potentially match resource and access selectors specified in the request. + repeated AccessControlList access_control_lists = 3; + + // The identity list derived from members of the [iam_binding][google.cloud.asset.v1.IamPolicyAnalysisResult.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][google.cloud.asset.v1.IamPolicyAnalysisResult.iam_binding] have successfully + // finished. + bool fully_explored = 5; +} diff --git a/synth.metadata b/synth.metadata index 9edba51b7..70dd86265 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,55 +4,55 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-asset.git", - "sha": "a02680f3c88cb6aa6fd2bd84a54f1f57b7b69058" + "sha": "7631fa1faa48fbcbfaeb1e07f743955e096da64c" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5e53d6b6dde0e72fa9510ec1d796176d128afa40", - "internalRef": "331912851" + "sha": "00bbad4dfd6633cf4b5f9596c1f93b756bb5c776", + "internalRef": "339708980" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5e53d6b6dde0e72fa9510ec1d796176d128afa40", - "internalRef": "331912851" + "sha": "00bbad4dfd6633cf4b5f9596c1f93b756bb5c776", + "internalRef": "339708980" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5e53d6b6dde0e72fa9510ec1d796176d128afa40", - "internalRef": "331912851" + "sha": "00bbad4dfd6633cf4b5f9596c1f93b756bb5c776", + "internalRef": "339708980" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5e53d6b6dde0e72fa9510ec1d796176d128afa40", - "internalRef": "331912851" + "sha": "00bbad4dfd6633cf4b5f9596c1f93b756bb5c776", + "internalRef": "339708980" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5e53d6b6dde0e72fa9510ec1d796176d128afa40", - "internalRef": "331912851" + "sha": "00bbad4dfd6633cf4b5f9596c1f93b756bb5c776", + "internalRef": "339708980" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5e53d6b6dde0e72fa9510ec1d796176d128afa40", - "internalRef": "331912851" + "sha": "00bbad4dfd6633cf4b5f9596c1f93b756bb5c776", + "internalRef": "339708980" } }, { @@ -252,6 +252,14 @@ "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/AnalyzeIamPolicyLongrunningRequest.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningRequestOrBuilder.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponse.java", + "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AnalyzeIamPolicyLongrunningResponseOrBuilder.java", + "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", @@ -282,6 +290,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",