From add366a53ac2857de1e7a7093e41195c74558d84 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Thu, 12 Mar 2020 12:12:13 -0700 Subject: [PATCH] feat(v1p4beta1): add v1p4beta1 client (#101) * feat(v1p4beta1): add v1p4beta1 client * chore: fix declared dependencies --- google-cloud-asset-bom/pom.xml | 10 + .../clirr-ignored-differences.xml | 53 - google-cloud-asset/pom.xml | 9 + .../asset/v1p4beta1/AssetServiceClient.java | 333 + .../asset/v1p4beta1/AssetServiceSettings.java | 218 + .../cloud/asset/v1p4beta1/package-info.java | 43 + .../v1p4beta1/stub/AssetServiceStub.java | 67 + .../stub/AssetServiceStubSettings.java | 370 + .../stub/GrpcAssetServiceCallableFactory.java | 115 + .../v1p4beta1/stub/GrpcAssetServiceStub.java | 229 + .../v1p4beta1/AssetServiceClientTest.java | 187 + .../asset/v1p4beta1/MockAssetService.java | 57 + .../asset/v1p4beta1/MockAssetServiceImpl.java | 89 + grpc-google-cloud-asset-v1p4beta1/pom.xml | 60 + .../asset/v1p4beta1/AssetServiceGrpc.java | 488 + pom.xml | 12 + proto-google-cloud-asset-v1p4beta1/pom.xml | 29 + .../v1p4beta1/AnalyzeIamPolicyRequest.java | 2785 ++++ .../AnalyzeIamPolicyRequestOrBuilder.java | 107 + .../v1p4beta1/AnalyzeIamPolicyResponse.java | 3622 +++++ .../AnalyzeIamPolicyResponseOrBuilder.java | 230 + .../cloud/asset/v1p4beta1/AssetProto.java | 210 + .../asset/v1p4beta1/AssetServiceProto.java | 343 + .../ExportIamPolicyAnalysisRequest.java | 2666 ++++ ...portIamPolicyAnalysisRequestOrBuilder.java | 150 + .../ExportIamPolicyAnalysisResponse.java | 752 + ...ortIamPolicyAnalysisResponseOrBuilder.java | 61 + .../IamPolicyAnalysisOutputConfig.java | 1616 +++ ...amPolicyAnalysisOutputConfigOrBuilder.java | 70 + .../v1p4beta1/IamPolicyAnalysisQuery.java | 4132 ++++++ .../IamPolicyAnalysisQueryOrBuilder.java | 183 + .../v1p4beta1/IamPolicyAnalysisResult.java | 11564 ++++++++++++++++ .../IamPolicyAnalysisResultOrBuilder.java | 213 + .../cloud/asset/v1p4beta1/asset_service.proto | 343 + .../google/cloud/asset/v1p4beta1/assets.proto | 167 + synth.metadata | 25 +- synth.py | 5 + versions.txt | 2 + 38 files changed, 31550 insertions(+), 65 deletions(-) delete mode 100644 google-cloud-asset/clirr-ignored-differences.xml create mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceClient.java create mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceSettings.java create mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/package-info.java create mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/AssetServiceStub.java create mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/AssetServiceStubSettings.java create mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/GrpcAssetServiceCallableFactory.java create mode 100644 google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/GrpcAssetServiceStub.java create mode 100644 google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/AssetServiceClientTest.java create mode 100644 google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/MockAssetService.java create mode 100644 google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/MockAssetServiceImpl.java create mode 100644 grpc-google-cloud-asset-v1p4beta1/pom.xml create mode 100644 grpc-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceGrpc.java create mode 100644 proto-google-cloud-asset-v1p4beta1/pom.xml create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyRequest.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyRequestOrBuilder.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyResponse.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyResponseOrBuilder.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetProto.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceProto.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisRequest.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisRequestOrBuilder.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisResponse.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisResponseOrBuilder.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisOutputConfig.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisOutputConfigOrBuilder.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisQuery.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisQueryOrBuilder.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisResult.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisResultOrBuilder.java create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/proto/google/cloud/asset/v1p4beta1/asset_service.proto create mode 100644 proto-google-cloud-asset-v1p4beta1/src/main/proto/google/cloud/asset/v1p4beta1/assets.proto diff --git a/google-cloud-asset-bom/pom.xml b/google-cloud-asset-bom/pom.xml index a027987f3..bfb7946a5 100644 --- a/google-cloud-asset-bom/pom.xml +++ b/google-cloud-asset-bom/pom.xml @@ -86,6 +86,11 @@ grpc-google-cloud-asset-v1p2beta1 0.85.0 + + com.google.api.grpc + grpc-google-cloud-asset-v1p4beta1 + 0.85.0 + com.google.api.grpc proto-google-cloud-asset-v1p1beta1 @@ -101,6 +106,11 @@ proto-google-cloud-asset-v1beta1 0.85.0 + + com.google.api.grpc + proto-google-cloud-asset-v1p4beta1 + 0.85.0 + com.google.cloud google-cloud-asset diff --git a/google-cloud-asset/clirr-ignored-differences.xml b/google-cloud-asset/clirr-ignored-differences.xml deleted file mode 100644 index 35c3274fa..000000000 --- a/google-cloud-asset/clirr-ignored-differences.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - 7002 - com/google/cloud/asset/v1p1beta1/AssetServiceClient - * - - - 7002 - com/google/cloud/asset/v1p1beta1/AssetServiceSettings* - * - - - 7002 - com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub* - * - - - 7002 - com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub* - * - - - 7002 - com/google/cloud/asset/v1p2beta1/AssetServiceClient - * - - - 7002 - com/google/cloud/asset/v1p2beta1/AssetServiceSettings* - * - - - 7002 - com/google/cloud/asset/v1p2beta1/stub/AssetServiceStub* - * - - - 7002 - com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub* - * - - - 8001 - com/google/cloud/asset/v1p1beta1/AssetServiceClient$SearchIam* - - - 8001 - com/google/cloud/asset/v1p1beta1/AssetServiceClient$SearchResources* - - diff --git a/google-cloud-asset/pom.xml b/google-cloud-asset/pom.xml index e2ffbe077..f19af3175 100644 --- a/google-cloud-asset/pom.xml +++ b/google-cloud-asset/pom.xml @@ -58,6 +58,10 @@ com.google.api.grpc proto-google-cloud-asset-v1beta1 + + com.google.api.grpc + proto-google-cloud-asset-v1p4beta1 + com.google.guava guava @@ -121,6 +125,11 @@ grpc-google-cloud-asset-v1p2beta1 test + + com.google.api.grpc + grpc-google-cloud-asset-v1p4beta1 + test + com.google.api diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceClient.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceClient.java new file mode 100644 index 000000000..757bbdeaa --- /dev/null +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceClient.java @@ -0,0 +1,333 @@ +/* + * 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. + */ +package com.google.cloud.asset.v1p4beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.asset.v1p4beta1.stub.AssetServiceStub; +import com.google.cloud.asset.v1p4beta1.stub.AssetServiceStubSettings; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: Asset service definition. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

+ * 
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ *   IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
+ *   AnalyzeIamPolicyRequest request = AnalyzeIamPolicyRequest.newBuilder()
+ *     .setAnalysisQuery(analysisQuery)
+ *     .build();
+ *   AnalyzeIamPolicyResponse response = assetServiceClient.analyzeIamPolicy(request);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the assetServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *

The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *

    + *
  1. A "flattened" method. With this type of method, the fields of the request type have been + * converted into function parameters. It may be the case that not all fields are available as + * parameters, and not every API method will have a flattened method entry point. + *
  2. A "request object" method. This type of method only takes one parameter, a request object, + * which must be constructed before the call. Not every API method will have a request object + * method. + *
  3. A "callable" method. This type of method takes no parameters and returns an immutable API + * callable object, which can be used to initiate calls to the service. + *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of AssetServiceSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * AssetServiceClient assetServiceClient =
+ *     AssetServiceClient.create(assetServiceSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * AssetServiceSettings assetServiceSettings =
+ *     AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AssetServiceClient assetServiceClient =
+ *     AssetServiceClient.create(assetServiceSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class AssetServiceClient implements BackgroundResource { + private final AssetServiceSettings settings; + private final AssetServiceStub stub; + private final OperationsClient operationsClient; + + /** Constructs an instance of AssetServiceClient with default settings. */ + public static final AssetServiceClient create() throws IOException { + return create(AssetServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AssetServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final AssetServiceClient create(AssetServiceSettings settings) throws IOException { + return new AssetServiceClient(settings); + } + + /** + * Constructs an instance of AssetServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer to use AssetServiceSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final AssetServiceClient create(AssetServiceStub stub) { + return new AssetServiceClient(stub); + } + + /** + * Constructs an instance of AssetServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected AssetServiceClient(AssetServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AssetServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected AssetServiceClient(AssetServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); + } + + public final AssetServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public AssetServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationsClient getOperationsClient() { + return operationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Analyzes IAM policies based on the specified request. Returns a list of + * [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] matching the + * request. + * + *

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 based on the specified request. Returns a list of + * [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] matching the + * request. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
+   *   AnalyzeIamPolicyRequest request = AnalyzeIamPolicyRequest.newBuilder()
+   *     .setAnalysisQuery(analysisQuery)
+   *     .build();
+   *   ApiFuture<AnalyzeIamPolicyResponse> future = assetServiceClient.analyzeIamPolicyCallable().futureCall(request);
+   *   // Do something
+   *   AnalyzeIamPolicyResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + analyzeIamPolicyCallable() { + return stub.analyzeIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports IAM policy analysis based on the specified request. This API implements the + * [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep track of + * the export. The metadata contains the request to help callers to map responses to requests. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
+   *   IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
+   *   ExportIamPolicyAnalysisRequest request = ExportIamPolicyAnalysisRequest.newBuilder()
+   *     .setAnalysisQuery(analysisQuery)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   ExportIamPolicyAnalysisResponse response = assetServiceClient.exportIamPolicyAnalysisAsync(request).get();
+   * }
+   * 
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture + exportIamPolicyAnalysisAsync(ExportIamPolicyAnalysisRequest request) { + return exportIamPolicyAnalysisOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports IAM policy analysis based on the specified request. This API implements the + * [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep track of + * the export. The metadata contains the request to help callers to map responses to requests. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
+   *   IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
+   *   ExportIamPolicyAnalysisRequest request = ExportIamPolicyAnalysisRequest.newBuilder()
+   *     .setAnalysisQuery(analysisQuery)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   OperationFuture<ExportIamPolicyAnalysisResponse, ExportIamPolicyAnalysisRequest> future = assetServiceClient.exportIamPolicyAnalysisOperationCallable().futureCall(request);
+   *   // Do something
+   *   ExportIamPolicyAnalysisResponse response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationCallable() { + return stub.exportIamPolicyAnalysisOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports IAM policy analysis based on the specified request. This API implements the + * [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep track of + * the export. The metadata contains the request to help callers to map responses to requests. + * + *

Sample code: + * + *


+   * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+   *   IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
+   *   IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build();
+   *   ExportIamPolicyAnalysisRequest request = ExportIamPolicyAnalysisRequest.newBuilder()
+   *     .setAnalysisQuery(analysisQuery)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   ApiFuture<Operation> future = assetServiceClient.exportIamPolicyAnalysisCallable().futureCall(request);
+   *   // Do something
+   *   Operation response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + exportIamPolicyAnalysisCallable() { + return stub.exportIamPolicyAnalysisCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceSettings.java new file mode 100644 index 000000000..d8d73ed66 --- /dev/null +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceSettings.java @@ -0,0 +1,218 @@ +/* + * 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. + */ +package com.google.cloud.asset.v1p4beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.asset.v1p4beta1.stub.AssetServiceStubSettings; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link AssetServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of analyzeIamPolicy to 30 seconds: + * + *

+ * 
+ * AssetServiceSettings.Builder assetServiceSettingsBuilder =
+ *     AssetServiceSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ *     .analyzeIamPolicySettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.analyzeIamPolicySettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class AssetServiceSettings extends ClientSettings { + /** Returns the object with the settings used for calls to analyzeIamPolicy. */ + public UnaryCallSettings + analyzeIamPolicySettings() { + return ((AssetServiceStubSettings) getStubSettings()).analyzeIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to exportIamPolicyAnalysis. */ + public UnaryCallSettings + exportIamPolicyAnalysisSettings() { + return ((AssetServiceStubSettings) getStubSettings()).exportIamPolicyAnalysisSettings(); + } + + /** Returns the object with the settings used for calls to exportIamPolicyAnalysis. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationSettings() { + return ((AssetServiceStubSettings) getStubSettings()) + .exportIamPolicyAnalysisOperationSettings(); + } + + public static final AssetServiceSettings create(AssetServiceStubSettings stub) + throws IOException { + return new AssetServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return AssetServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return AssetServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return AssetServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return AssetServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return AssetServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return AssetServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return AssetServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssetServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for AssetServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(AssetServiceStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(AssetServiceStubSettings.newBuilder()); + } + + protected Builder(AssetServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(AssetServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public AssetServiceStubSettings.Builder getStubSettingsBuilder() { + return ((AssetServiceStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to analyzeIamPolicy. */ + public UnaryCallSettings.Builder + analyzeIamPolicySettings() { + return getStubSettingsBuilder().analyzeIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to exportIamPolicyAnalysis. */ + public UnaryCallSettings.Builder + exportIamPolicyAnalysisSettings() { + return getStubSettingsBuilder().exportIamPolicyAnalysisSettings(); + } + + /** Returns the builder for the settings used for calls to exportIamPolicyAnalysis. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationSettings() { + return getStubSettingsBuilder().exportIamPolicyAnalysisOperationSettings(); + } + + @Override + public AssetServiceSettings build() throws IOException { + return new AssetServiceSettings(this); + } + } +} diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/package-info.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/package-info.java new file mode 100644 index 000000000..1cf911905 --- /dev/null +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/package-info.java @@ -0,0 +1,43 @@ +/* + * 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. + */ + +/** + * A client to Cloud Asset API. + * + *

The interfaces provided are listed below, along with usage samples. + * + *

================== AssetServiceClient ================== + * + *

Service Description: Asset service definition. + * + *

Sample for AssetServiceClient: + * + *

+ * 
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ *   IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build();
+ *   AnalyzeIamPolicyRequest request = AnalyzeIamPolicyRequest.newBuilder()
+ *     .setAnalysisQuery(analysisQuery)
+ *     .build();
+ *   AnalyzeIamPolicyResponse response = assetServiceClient.analyzeIamPolicy(request);
+ * }
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +package com.google.cloud.asset.v1p4beta1; + +import javax.annotation.Generated; diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/AssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/AssetServiceStub.java new file mode 100644 index 000000000..e446003d8 --- /dev/null +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/AssetServiceStub.java @@ -0,0 +1,67 @@ +/* + * 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. + */ +package com.google.cloud.asset.v1p4beta1.stub; + +import com.google.api.core.BetaApi; +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.v1p4beta1.AnalyzeIamPolicyRequest; +import com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse; +import com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest; +import com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Cloud Asset API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class AssetServiceStub implements BackgroundResource { + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + analyzeIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: analyzeIamPolicyCallable()"); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: exportIamPolicyAnalysisOperationCallable()"); + } + + public UnaryCallable + exportIamPolicyAnalysisCallable() { + throw new UnsupportedOperationException("Not implemented: exportIamPolicyAnalysisCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/AssetServiceStubSettings.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/AssetServiceStubSettings.java new file mode 100644 index 000000000..aee9b623b --- /dev/null +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/AssetServiceStubSettings.java @@ -0,0 +1,370 @@ +/* + * 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. + */ +package com.google.cloud.asset.v1p4beta1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest; +import com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse; +import com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest; +import com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Settings class to configure an instance of {@link AssetServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (cloudasset.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the total timeout of analyzeIamPolicy to 30 seconds: + * + *

+ * 
+ * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
+ *     AssetServiceStubSettings.newBuilder();
+ * assetServiceSettingsBuilder
+ *     .analyzeIamPolicySettings()
+ *     .setRetrySettings(
+ *         assetServiceSettingsBuilder.analyzeIamPolicySettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class AssetServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + + private final UnaryCallSettings + analyzeIamPolicySettings; + private final UnaryCallSettings + exportIamPolicyAnalysisSettings; + private final OperationCallSettings< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationSettings; + + /** Returns the object with the settings used for calls to analyzeIamPolicy. */ + public UnaryCallSettings + analyzeIamPolicySettings() { + return analyzeIamPolicySettings; + } + + /** Returns the object with the settings used for calls to exportIamPolicyAnalysis. */ + public UnaryCallSettings + exportIamPolicyAnalysisSettings() { + return exportIamPolicyAnalysisSettings; + } + + /** Returns the object with the settings used for calls to exportIamPolicyAnalysis. */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationSettings() { + return exportIamPolicyAnalysisOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public AssetServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcAssetServiceStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + getTransportChannelProvider().getTransportName()); + } + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "cloudasset.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(AssetServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected AssetServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + analyzeIamPolicySettings = settingsBuilder.analyzeIamPolicySettings().build(); + exportIamPolicyAnalysisSettings = settingsBuilder.exportIamPolicyAnalysisSettings().build(); + exportIamPolicyAnalysisOperationSettings = + settingsBuilder.exportIamPolicyAnalysisOperationSettings().build(); + } + + /** Builder for AssetServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final UnaryCallSettings.Builder + analyzeIamPolicySettings; + private final UnaryCallSettings.Builder + exportIamPolicyAnalysisSettings; + private final OperationCallSettings.Builder< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + analyzeIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + exportIamPolicyAnalysisSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + exportIamPolicyAnalysisOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + analyzeIamPolicySettings, exportIamPolicyAnalysisSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .analyzeIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .exportIamPolicyAnalysisSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + builder + .exportIamPolicyAnalysisOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + ExportIamPolicyAnalysisResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create( + ExportIamPolicyAnalysisRequest.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(500L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(5000L)) + .setInitialRpcTimeout(Duration.ZERO) // ignored + .setRpcTimeoutMultiplier(1.0) // ignored + .setMaxRpcTimeout(Duration.ZERO) // ignored + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + protected Builder(AssetServiceStubSettings settings) { + super(settings); + + analyzeIamPolicySettings = settings.analyzeIamPolicySettings.toBuilder(); + exportIamPolicyAnalysisSettings = settings.exportIamPolicyAnalysisSettings.toBuilder(); + exportIamPolicyAnalysisOperationSettings = + settings.exportIamPolicyAnalysisOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + analyzeIamPolicySettings, exportIamPolicyAnalysisSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to analyzeIamPolicy. */ + public UnaryCallSettings.Builder + analyzeIamPolicySettings() { + return analyzeIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to exportIamPolicyAnalysis. */ + public UnaryCallSettings.Builder + exportIamPolicyAnalysisSettings() { + return exportIamPolicyAnalysisSettings; + } + + /** Returns the builder for the settings used for calls to exportIamPolicyAnalysis. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationSettings() { + return exportIamPolicyAnalysisOperationSettings; + } + + @Override + public AssetServiceStubSettings build() throws IOException { + return new AssetServiceStubSettings(this); + } + } +} diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/GrpcAssetServiceCallableFactory.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/GrpcAssetServiceCallableFactory.java new file mode 100644 index 000000000..06a952945 --- /dev/null +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/GrpcAssetServiceCallableFactory.java @@ -0,0 +1,115 @@ +/* + * 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. + */ +package com.google.cloud.asset.v1p4beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC callable factory implementation for Cloud Asset API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcAssetServiceCallableFactory implements GrpcStubCallableFactory { + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/GrpcAssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/GrpcAssetServiceStub.java new file mode 100644 index 000000000..0a0314fe9 --- /dev/null +++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p4beta1/stub/GrpcAssetServiceStub.java @@ -0,0 +1,229 @@ +/* + * 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. + */ +package com.google.cloud.asset.v1p4beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +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.v1p4beta1.AnalyzeIamPolicyRequest; +import com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse; +import com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest; +import com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * gRPC stub implementation for Cloud Asset API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcAssetServiceStub extends AssetServiceStub { + + private static final MethodDescriptor + analyzeIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.asset.v1p4beta1.AssetService/AnalyzeIamPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(AnalyzeIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(AnalyzeIamPolicyResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + exportIamPolicyAnalysisMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.asset.v1p4beta1.AssetService/ExportIamPolicyAnalysis") + .setRequestMarshaller( + ProtoUtils.marshaller(ExportIamPolicyAnalysisRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + + private final UnaryCallable + analyzeIamPolicyCallable; + private final UnaryCallable + exportIamPolicyAnalysisCallable; + private final OperationCallable< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcAssetServiceStub create(AssetServiceStubSettings settings) + throws IOException { + return new GrpcAssetServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcAssetServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcAssetServiceStub(AssetServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcAssetServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcAssetServiceStub( + AssetServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcAssetServiceStub(AssetServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcAssetServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcAssetServiceStub, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected GrpcAssetServiceStub( + AssetServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + analyzeIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(analyzeIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(AnalyzeIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "analysis_query.parent", + String.valueOf(request.getAnalysisQuery().getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + exportIamPolicyAnalysisTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(exportIamPolicyAnalysisMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ExportIamPolicyAnalysisRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "analysis_query.parent", + String.valueOf(request.getAnalysisQuery().getParent())); + return params.build(); + } + }) + .build(); + + this.analyzeIamPolicyCallable = + callableFactory.createUnaryCallable( + analyzeIamPolicyTransportSettings, settings.analyzeIamPolicySettings(), clientContext); + this.exportIamPolicyAnalysisCallable = + callableFactory.createUnaryCallable( + exportIamPolicyAnalysisTransportSettings, + settings.exportIamPolicyAnalysisSettings(), + clientContext); + this.exportIamPolicyAnalysisOperationCallable = + callableFactory.createOperationCallable( + exportIamPolicyAnalysisTransportSettings, + settings.exportIamPolicyAnalysisOperationSettings(), + clientContext, + this.operationsStub); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable + analyzeIamPolicyCallable() { + return analyzeIamPolicyCallable; + } + + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallable< + ExportIamPolicyAnalysisRequest, + ExportIamPolicyAnalysisResponse, + ExportIamPolicyAnalysisRequest> + exportIamPolicyAnalysisOperationCallable() { + return exportIamPolicyAnalysisOperationCallable; + } + + public UnaryCallable + exportIamPolicyAnalysisCallable() { + return exportIamPolicyAnalysisCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/AssetServiceClientTest.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/AssetServiceClientTest.java new file mode 100644 index 000000000..4cd070f39 --- /dev/null +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/AssetServiceClientTest.java @@ -0,0 +1,187 @@ +/* + * 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. + */ +package com.google.cloud.asset.v1p4beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import java.util.concurrent.ExecutionException; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class AssetServiceClientTest { + private static MockAssetService mockAssetService; + private static MockServiceHelper serviceHelper; + private AssetServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockAssetService = new MockAssetService(); + serviceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockAssetService)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + AssetServiceSettings settings = + AssetServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = AssetServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void analyzeIamPolicyTest() { + boolean fullyExplored = true; + AnalyzeIamPolicyResponse expectedResponse = + AnalyzeIamPolicyResponse.newBuilder().setFullyExplored(fullyExplored).build(); + mockAssetService.addResponse(expectedResponse); + + IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build(); + AnalyzeIamPolicyRequest request = + AnalyzeIamPolicyRequest.newBuilder().setAnalysisQuery(analysisQuery).build(); + + AnalyzeIamPolicyResponse actualResponse = client.analyzeIamPolicy(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AnalyzeIamPolicyRequest actualRequest = (AnalyzeIamPolicyRequest) actualRequests.get(0); + + Assert.assertEquals(analysisQuery, actualRequest.getAnalysisQuery()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void analyzeIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build(); + AnalyzeIamPolicyRequest request = + AnalyzeIamPolicyRequest.newBuilder().setAnalysisQuery(analysisQuery).build(); + + client.analyzeIamPolicy(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void exportIamPolicyAnalysisTest() throws Exception { + ExportIamPolicyAnalysisResponse expectedResponse = + ExportIamPolicyAnalysisResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("exportIamPolicyAnalysisTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockAssetService.addResponse(resultOperation); + + IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build(); + IamPolicyAnalysisOutputConfig outputConfig = IamPolicyAnalysisOutputConfig.newBuilder().build(); + ExportIamPolicyAnalysisRequest request = + ExportIamPolicyAnalysisRequest.newBuilder() + .setAnalysisQuery(analysisQuery) + .setOutputConfig(outputConfig) + .build(); + + ExportIamPolicyAnalysisResponse actualResponse = + client.exportIamPolicyAnalysisAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockAssetService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ExportIamPolicyAnalysisRequest actualRequest = + (ExportIamPolicyAnalysisRequest) actualRequests.get(0); + + Assert.assertEquals(analysisQuery, actualRequest.getAnalysisQuery()); + Assert.assertEquals(outputConfig, actualRequest.getOutputConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void exportIamPolicyAnalysisExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockAssetService.addException(exception); + + try { + IamPolicyAnalysisQuery analysisQuery = IamPolicyAnalysisQuery.newBuilder().build(); + IamPolicyAnalysisOutputConfig outputConfig = + IamPolicyAnalysisOutputConfig.newBuilder().build(); + ExportIamPolicyAnalysisRequest request = + ExportIamPolicyAnalysisRequest.newBuilder() + .setAnalysisQuery(analysisQuery) + .setOutputConfig(outputConfig) + .build(); + + client.exportIamPolicyAnalysisAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = (InvalidArgumentException) e.getCause(); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } +} diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/MockAssetService.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/MockAssetService.java new file mode 100644 index 000000000..ef0547bcb --- /dev/null +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/MockAssetService.java @@ -0,0 +1,57 @@ +/* + * 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. + */ +package com.google.cloud.asset.v1p4beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockAssetService implements MockGrpcService { + private final MockAssetServiceImpl serviceImpl; + + public MockAssetService() { + serviceImpl = new MockAssetServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/MockAssetServiceImpl.java b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/MockAssetServiceImpl.java new file mode 100644 index 000000000..dc4ceef49 --- /dev/null +++ b/google-cloud-asset/src/test/java/com/google/cloud/asset/v1p4beta1/MockAssetServiceImpl.java @@ -0,0 +1,89 @@ +/* + * 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. + */ +package com.google.cloud.asset.v1p4beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.asset.v1p4beta1.AssetServiceGrpc.AssetServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockAssetServiceImpl extends AssetServiceImplBase { + private List requests; + private Queue responses; + + public MockAssetServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void analyzeIamPolicy( + AnalyzeIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof AnalyzeIamPolicyResponse) { + requests.add(request); + responseObserver.onNext((AnalyzeIamPolicyResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void exportIamPolicyAnalysis( + ExportIamPolicyAnalysisRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext((Operation) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/grpc-google-cloud-asset-v1p4beta1/pom.xml b/grpc-google-cloud-asset-v1p4beta1/pom.xml new file mode 100644 index 000000000..495200a8a --- /dev/null +++ b/grpc-google-cloud-asset-v1p4beta1/pom.xml @@ -0,0 +1,60 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-asset-v1p4beta1 + 0.85.0 + grpc-google-cloud-asset-v1p4beta1 + GRPC library for grpc-google-cloud-asset-v1p4beta1 + + com.google.cloud + google-cloud-asset-parent + 1.0.0 + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-cloud-asset-v1p4beta1 + + + com.google.guava + guava + + + com.google.api.grpc + proto-google-common-protos + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + \ No newline at end of file diff --git a/grpc-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceGrpc.java b/grpc-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceGrpc.java new file mode 100644 index 000000000..5d3117917 --- /dev/null +++ b/grpc-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceGrpc.java @@ -0,0 +1,488 @@ +/* + * 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. + */ +package com.google.cloud.asset.v1p4beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * Asset service definition.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/asset/v1p4beta1/asset_service.proto") +public final class AssetServiceGrpc { + + private AssetServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.asset.v1p4beta1.AssetService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse> + getAnalyzeIamPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "AnalyzeIamPolicy", + requestType = com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.class, + responseType = com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse> + getAnalyzeIamPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new AssetServiceMethodDescriptorSupplier("AnalyzeIamPolicy")) + .build(); + } + } + } + return getAnalyzeIamPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest, + com.google.longrunning.Operation> + getExportIamPolicyAnalysisMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ExportIamPolicyAnalysis", + requestType = com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest, + com.google.longrunning.Operation> + getExportIamPolicyAnalysisMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest, + com.google.longrunning.Operation> + getExportIamPolicyAnalysisMethod; + if ((getExportIamPolicyAnalysisMethod = AssetServiceGrpc.getExportIamPolicyAnalysisMethod) + == null) { + synchronized (AssetServiceGrpc.class) { + if ((getExportIamPolicyAnalysisMethod = AssetServiceGrpc.getExportIamPolicyAnalysisMethod) + == null) { + AssetServiceGrpc.getExportIamPolicyAnalysisMethod = + getExportIamPolicyAnalysisMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ExportIamPolicyAnalysis")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new AssetServiceMethodDescriptorSupplier("ExportIamPolicyAnalysis")) + .build(); + } + } + } + return getExportIamPolicyAnalysisMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static AssetServiceStub newStub(io.grpc.Channel channel) { + return new AssetServiceStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static AssetServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + return new AssetServiceBlockingStub(channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static AssetServiceFutureStub newFutureStub(io.grpc.Channel channel) { + return new AssetServiceFutureStub(channel); + } + + /** + * + * + *
+   * Asset service definition.
+   * 
+ */ + public abstract static class AssetServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Analyzes IAM policies based on the specified request. Returns
+     * a list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] matching the request.
+     * 
+ */ + public void analyzeIamPolicy( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getAnalyzeIamPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Exports IAM policy analysis based on the specified request. This API
+     * implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep
+     * track of the export. The metadata contains the request to help callers to
+     * map responses to requests.
+     * 
+ */ + public void exportIamPolicyAnalysis( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getExportIamPolicyAnalysisMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getAnalyzeIamPolicyMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse>( + this, METHODID_ANALYZE_IAM_POLICY))) + .addMethod( + getExportIamPolicyAnalysisMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest, + com.google.longrunning.Operation>(this, METHODID_EXPORT_IAM_POLICY_ANALYSIS))) + .build(); + } + } + + /** + * + * + *
+   * Asset service definition.
+   * 
+ */ + public static final class AssetServiceStub extends io.grpc.stub.AbstractStub { + private AssetServiceStub(io.grpc.Channel channel) { + super(channel); + } + + private AssetServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AssetServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Analyzes IAM policies based on the specified request. Returns
+     * a list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] matching the request.
+     * 
+ */ + public void analyzeIamPolicy( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getAnalyzeIamPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Exports IAM policy analysis based on the specified request. This API
+     * implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep
+     * track of the export. The metadata contains the request to help callers to
+     * map responses to requests.
+     * 
+ */ + public void exportIamPolicyAnalysis( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getExportIamPolicyAnalysisMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Asset service definition.
+   * 
+ */ + public static final class AssetServiceBlockingStub + extends io.grpc.stub.AbstractStub { + private AssetServiceBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private AssetServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AssetServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Analyzes IAM policies based on the specified request. Returns
+     * a list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] matching the request.
+     * 
+ */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse analyzeIamPolicy( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest request) { + return blockingUnaryCall( + getChannel(), getAnalyzeIamPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Exports IAM policy analysis based on the specified request. This API
+     * implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep
+     * track of the export. The metadata contains the request to help callers to
+     * map responses to requests.
+     * 
+ */ + public com.google.longrunning.Operation exportIamPolicyAnalysis( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest request) { + return blockingUnaryCall( + getChannel(), getExportIamPolicyAnalysisMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Asset service definition.
+   * 
+ */ + public static final class AssetServiceFutureStub + extends io.grpc.stub.AbstractStub { + private AssetServiceFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private AssetServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected AssetServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new AssetServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Analyzes IAM policies based on the specified request. Returns
+     * a list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] matching the request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse> + analyzeIamPolicy(com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest request) { + return futureUnaryCall( + getChannel().newCall(getAnalyzeIamPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Exports IAM policy analysis based on the specified request. This API
+     * implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep
+     * track of the export. The metadata contains the request to help callers to
+     * map responses to requests.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + exportIamPolicyAnalysis( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest request) { + return futureUnaryCall( + getChannel().newCall(getExportIamPolicyAnalysisMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_ANALYZE_IAM_POLICY = 0; + private static final int METHODID_EXPORT_IAM_POLICY_ANALYSIS = 1; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AssetServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(AssetServiceImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_ANALYZE_IAM_POLICY: + serviceImpl.analyzeIamPolicy( + (com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse>) + responseObserver); + break; + case METHODID_EXPORT_IAM_POLICY_ANALYSIS: + serviceImpl.exportIamPolicyAnalysis( + (com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class AssetServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + AssetServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("AssetService"); + } + } + + private static final class AssetServiceFileDescriptorSupplier + extends AssetServiceBaseDescriptorSupplier { + AssetServiceFileDescriptorSupplier() {} + } + + private static final class AssetServiceMethodDescriptorSupplier + extends AssetServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + AssetServiceMethodDescriptorSupplier(String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (AssetServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new AssetServiceFileDescriptorSupplier()) + .addMethod(getAnalyzeIamPolicyMethod()) + .addMethod(getExportIamPolicyAnalysisMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/pom.xml b/pom.xml index d743417f1..163fa8ad7 100644 --- a/pom.xml +++ b/pom.xml @@ -99,6 +99,11 @@ proto-google-cloud-asset-v1beta1 0.85.0 + + com.google.api.grpc + proto-google-cloud-asset-v1p4beta1 + 0.85.0 + com.google.api.grpc grpc-google-cloud-asset-v1 @@ -119,6 +124,11 @@ grpc-google-cloud-asset-v1p2beta1 0.85.0 + + com.google.api.grpc + grpc-google-cloud-asset-v1p4beta1 + 0.85.0 + com.google.cloud google-cloud-asset @@ -241,10 +251,12 @@ proto-google-cloud-asset-v1p1beta1 proto-google-cloud-asset-v1p2beta1 proto-google-cloud-asset-v1beta1 + proto-google-cloud-asset-v1p4beta1 grpc-google-cloud-asset-v1 grpc-google-cloud-asset-v1beta1 grpc-google-cloud-asset-v1p1beta1 grpc-google-cloud-asset-v1p2beta1 + grpc-google-cloud-asset-v1p4beta1 google-cloud-asset google-cloud-asset-bom diff --git a/proto-google-cloud-asset-v1p4beta1/pom.xml b/proto-google-cloud-asset-v1p4beta1/pom.xml new file mode 100644 index 000000000..d20d2502b --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/pom.xml @@ -0,0 +1,29 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-asset-v1p4beta1 + 0.85.0 + proto-google-cloud-asset-v1p4beta1 + PROTO library for proto-google-cloud-asset-v1p4beta1 + + com.google.cloud + google-cloud-asset-parent + 1.0.0 + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api.grpc + proto-google-iam-v1 + + + \ No newline at end of file diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyRequest.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyRequest.java new file mode 100644 index 000000000..fe2f39554 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyRequest.java @@ -0,0 +1,2785 @@ +/* + * 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/v1p4beta1/asset_service.proto + +package com.google.cloud.asset.v1p4beta1; + +/** + * + * + *
+ * A request message for [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1p4beta1.AssetService.AnalyzeIamPolicy].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest} + */ +public final class AnalyzeIamPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.Builder subBuilder = null; + if (analysisQuery_ != null) { + subBuilder = analysisQuery_.toBuilder(); + } + analysisQuery_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisQuery_); + analysisQuery_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.Builder subBuilder = + null; + if (options_ != null) { + subBuilder = options_.toBuilder(); + } + options_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.class, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Builder.class); + } + + public interface OptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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 [identity_selector][] is specified, the identity in the result will
+     * be determined by the selector, and this flag will have no effect.
+     * 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 [access_selector][] is specified, the access section of the result
+     * will be determined by the selector, and this flag will have no effect.
+     * Default is false.
+     * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandRoles. + */ + boolean getExpandRoles(); + + /** + * + * + *
+     * Optional. If true, 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 [resource_selector][] is specified, the resource section of the result
+     * will be determined by the selector, and this flag will have no effect.
+     * 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 ExportIamPolicyAnalysis rpc instead.
+     * For example, if the request analyzes for which resources user A has
+     * permission P, and there's an IAM policy states user A has
+     * iam.serviceAccounts.getAccessToken permission to a service account SA,
+     * and there's another IAM policy states service account SA has permission P
+     * to a GCP folder F, then user A potentially has access to the GCP folder
+     * F. And those advanced analysis results will be included in
+     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+     * Default is false.
+     * 
+ * + * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The analyzeServiceAccountImpersonation. + */ + boolean getAnalyzeServiceAccountImpersonation(); + + /** + * + * + *
+     * 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 = 7 [(.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 = 7 [(.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 = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.DurationOrBuilder getExecutionTimeoutOrBuilder(); + } + /** + * + * + *
+   * Contains request options.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options} + */ + public static final class Options extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options) + OptionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Options.newBuilder() to construct. + private Options(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Options() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Options(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Options( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + expandGroups_ = input.readBool(); + break; + } + case 16: + { + expandRoles_ = input.readBool(); + break; + } + case 24: + { + expandResources_ = input.readBool(); + break; + } + case 32: + { + outputResourceEdges_ = input.readBool(); + break; + } + case 40: + { + outputGroupEdges_ = input.readBool(); + break; + } + case 48: + { + analyzeServiceAccountImpersonation_ = input.readBool(); + break; + } + case 58: + { + 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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_Options_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_Options_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.class, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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 [identity_selector][] is specified, the identity in the result will
+     * be determined by the selector, and this flag will have no effect.
+     * Default is false.
+     * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandGroups. + */ + 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 [access_selector][] is specified, the access section of the result
+     * will be determined by the selector, and this flag will have no effect.
+     * Default is false.
+     * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandRoles. + */ + public boolean getExpandRoles() { + return expandRoles_; + } + + public static final int EXPAND_RESOURCES_FIELD_NUMBER = 3; + private boolean expandResources_; + /** + * + * + *
+     * Optional. If true, 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 [resource_selector][] is specified, the resource section of the result
+     * will be determined by the selector, and this flag will have no effect.
+     * Default is false.
+     * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandResources. + */ + 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. + */ + 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. + */ + 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 ExportIamPolicyAnalysis rpc instead.
+     * For example, if the request analyzes for which resources user A has
+     * permission P, and there's an IAM policy states user A has
+     * iam.serviceAccounts.getAccessToken permission to a service account SA,
+     * and there's another IAM policy states service account SA has permission P
+     * to a GCP folder F, then user A potentially has access to the GCP folder
+     * F. And those advanced analysis results will be included in
+     * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+     * Default is false.
+     * 
+ * + * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The analyzeServiceAccountImpersonation. + */ + public boolean getAnalyzeServiceAccountImpersonation() { + return analyzeServiceAccountImpersonation_; + } + + public static final int EXECUTION_TIMEOUT_FIELD_NUMBER = 7; + 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 = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the executionTimeout field is set. + */ + 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 = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The executionTimeout. + */ + 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 = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + 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 (expandGroups_ != false) { + output.writeBool(1, expandGroups_); + } + if (expandRoles_ != false) { + output.writeBool(2, expandRoles_); + } + if (expandResources_ != false) { + output.writeBool(3, expandResources_); + } + if (outputResourceEdges_ != false) { + output.writeBool(4, outputResourceEdges_); + } + if (outputGroupEdges_ != false) { + output.writeBool(5, outputGroupEdges_); + } + if (analyzeServiceAccountImpersonation_ != false) { + output.writeBool(6, analyzeServiceAccountImpersonation_); + } + if (executionTimeout_ != null) { + output.writeMessage(7, getExecutionTimeout()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (expandGroups_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, expandGroups_); + } + if (expandRoles_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, expandRoles_); + } + if (expandResources_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, expandResources_); + } + if (outputResourceEdges_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, outputResourceEdges_); + } + if (outputGroupEdges_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, outputGroupEdges_); + } + if (analyzeServiceAccountImpersonation_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize( + 6, analyzeServiceAccountImpersonation_); + } + if (executionTimeout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, 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.v1p4beta1.AnalyzeIamPolicyRequest.Options)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options other = + (com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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 (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(); + 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()); + 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.v1p4beta1.AnalyzeIamPolicyRequest.Options parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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.v1p4beta1.AnalyzeIamPolicyRequest.Options parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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.v1p4beta1.AnalyzeIamPolicyRequest.Options parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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.v1p4beta1.AnalyzeIamPolicyRequest.Options parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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.v1p4beta1.AnalyzeIamPolicyRequest.Options + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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.v1p4beta1.AnalyzeIamPolicyRequest.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.v1p4beta1.AnalyzeIamPolicyRequest.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.v1p4beta1.AnalyzeIamPolicyRequest.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 request options.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options) + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.OptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_Options_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_Options_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.class, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.Builder.class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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; + + 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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_Options_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options build() { + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options buildPartial() { + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options result = + new com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options(this); + result.expandGroups_ = expandGroups_; + result.expandRoles_ = expandRoles_; + result.expandResources_ = expandResources_; + result.outputResourceEdges_ = outputResourceEdges_; + result.outputGroupEdges_ = outputGroupEdges_; + result.analyzeServiceAccountImpersonation_ = analyzeServiceAccountImpersonation_; + 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.v1p4beta1.AnalyzeIamPolicyRequest.Options) { + return mergeFrom( + (com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options other) { + if (other + == com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options + .getDefaultInstance()) return this; + if (other.getExpandGroups() != false) { + setExpandGroups(other.getExpandGroups()); + } + if (other.getExpandRoles() != false) { + setExpandRoles(other.getExpandRoles()); + } + if (other.getExpandResources() != false) { + setExpandResources(other.getExpandResources()); + } + if (other.getOutputResourceEdges() != false) { + setOutputResourceEdges(other.getOutputResourceEdges()); + } + if (other.getOutputGroupEdges() != false) { + setOutputGroupEdges(other.getOutputGroupEdges()); + } + if (other.getAnalyzeServiceAccountImpersonation() != false) { + setAnalyzeServiceAccountImpersonation(other.getAnalyzeServiceAccountImpersonation()); + } + if (other.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.v1p4beta1.AnalyzeIamPolicyRequest.Options parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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 [identity_selector][] is specified, the identity in the result will
+       * be determined by the selector, and this flag will have no effect.
+       * Default is false.
+       * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandGroups. + */ + 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 [identity_selector][] is specified, the identity in the result will
+       * be determined by the selector, and this flag will have no effect.
+       * 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 [identity_selector][] is specified, the identity in the result will
+       * be determined by the selector, and this flag will have no effect.
+       * 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 [access_selector][] is specified, the access section of the result
+       * will be determined by the selector, and this flag will have no effect.
+       * Default is false.
+       * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandRoles. + */ + 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 [access_selector][] is specified, the access section of the result
+       * will be determined by the selector, and this flag will have no effect.
+       * 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 [access_selector][] is specified, the access section of the result
+       * will be determined by the selector, and this flag will have no effect.
+       * 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, 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 [resource_selector][] is specified, the resource section of the result
+       * will be determined by the selector, and this flag will have no effect.
+       * Default is false.
+       * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandResources. + */ + public boolean getExpandResources() { + return expandResources_; + } + /** + * + * + *
+       * Optional. If true, 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 [resource_selector][] is specified, the resource section of the result
+       * will be determined by the selector, and this flag will have no effect.
+       * 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, 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 [resource_selector][] is specified, the resource section of the result
+       * will be determined by the selector, and this flag will have no effect.
+       * 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. + */ + 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. + */ + 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 ExportIamPolicyAnalysis rpc instead.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and there's an IAM policy states user A has
+       * iam.serviceAccounts.getAccessToken permission to a service account SA,
+       * and there's another IAM policy states service account SA has permission P
+       * to a GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Default is false.
+       * 
+ * + * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The analyzeServiceAccountImpersonation. + */ + 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 ExportIamPolicyAnalysis rpc instead.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and there's an IAM policy states user A has
+       * iam.serviceAccounts.getAccessToken permission to a service account SA,
+       * and there's another IAM policy states service account SA has permission P
+       * to a GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.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.v1p4beta1.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 ExportIamPolicyAnalysis rpc instead.
+       * For example, if the request analyzes for which resources user A has
+       * permission P, and there's an IAM policy states user A has
+       * iam.serviceAccounts.getAccessToken permission to a service account SA,
+       * and there's another IAM policy states service account SA has permission P
+       * to a GCP folder F, then user A potentially has access to the GCP folder
+       * F. And those advanced analysis results will be included in
+       * [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Default is false.
+       * 
+ * + * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearAnalyzeServiceAccountImpersonation() { + + analyzeServiceAccountImpersonation_ = false; + onChanged(); + return this; + } + + private 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 = 7 [(.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 = 7 [(.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 = 7 [(.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 = 7 [(.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 = 7 [(.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 = 7 [(.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 = 7 [(.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 = 7 [(.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 = 7 [(.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.v1p4beta1.AnalyzeIamPolicyRequest.Options) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options) + private static final com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options(); + } + + public static com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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.v1p4beta1.AnalyzeIamPolicyRequest.Options + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysisQuery_; + /** + * + * + *
+   * Required. The request query.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the analysisQuery field is set. + */ + public boolean hasAnalysisQuery() { + return analysisQuery_ != null; + } + /** + * + * + *
+   * Required. The request query.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysisQuery. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery getAnalysisQuery() { + return analysisQuery_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } + /** + * + * + *
+   * Required. The request query.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder + getAnalysisQueryOrBuilder() { + return getAnalysisQuery(); + } + + public static final int OPTIONS_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options_; + /** + * + * + *
+   * Optional. The request options.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + public boolean hasOptions() { + return options_ != null; + } + /** + * + * + *
+   * Optional. The request options.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options getOptions() { + return options_ == null + ? com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.getDefaultInstance() + : options_; + } + /** + * + * + *
+   * Optional. The request options.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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 (analysisQuery_ != null) { + output.writeMessage(1, getAnalysisQuery()); + } + if (options_ != null) { + output.writeMessage(2, getOptions()); + } + 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 (options_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, 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.v1p4beta1.AnalyzeIamPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest other = + (com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest) obj; + + if (hasAnalysisQuery() != other.hasAnalysisQuery()) return false; + if (hasAnalysisQuery()) { + if (!getAnalysisQuery().equals(other.getAnalysisQuery())) 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(); + if (hasAnalysisQuery()) { + hash = (37 * hash) + ANALYSIS_QUERY_FIELD_NUMBER; + hash = (53 * hash) + getAnalysisQuery().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.v1p4beta1.AnalyzeIamPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.AssetService.AnalyzeIamPolicy].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest) + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.class, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p4beta1.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 (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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest build() { + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest buildPartial() { + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest result = + new com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest(this); + if (analysisQueryBuilder_ == null) { + result.analysisQuery_ = analysisQuery_; + } else { + result.analysisQuery_ = analysisQueryBuilder_.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.v1p4beta1.AnalyzeIamPolicyRequest) { + return mergeFrom((com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest other) { + if (other == com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.getDefaultInstance()) + return this; + if (other.hasAnalysisQuery()) { + mergeAnalysisQuery(other.getAnalysisQuery()); + } + 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.v1p4beta1.AnalyzeIamPolicyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysisQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder> + analysisQueryBuilder_; + /** + * + * + *
+     * Required. The request query.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysisQuery. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery getAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + return analysisQuery_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } else { + return analysisQueryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The request query.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnalysisQuery(com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnalysisQuery( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder builderForValue) { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = builderForValue.build(); + onChanged(); + } else { + analysisQueryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The request query.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAnalysisQuery( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (analysisQuery_ != null) { + analysisQuery_ = + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.newBuilder(analysisQuery_) + .mergeFrom(value) + .buildPartial(); + } else { + analysisQuery_ = value; + } + onChanged(); + } else { + analysisQueryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The request query.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder + getAnalysisQueryBuilder() { + + onChanged(); + return getAnalysisQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The request query.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder + getAnalysisQueryOrBuilder() { + if (analysisQueryBuilder_ != null) { + return analysisQueryBuilder_.getMessageOrBuilder(); + } else { + return analysisQuery_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } + } + /** + * + * + *
+     * Required. The request query.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder> + getAnalysisQueryFieldBuilder() { + if (analysisQueryBuilder_ == null) { + analysisQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder>( + getAnalysisQuery(), getParentForChildren(), isClean()); + analysisQuery_ = null; + } + return analysisQueryBuilder_; + } + + private com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.Builder, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.OptionsOrBuilder> + optionsBuilder_; + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + public boolean hasOptions() { + return optionsBuilder_ != null || options_ != null; + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options getOptions() { + if (optionsBuilder_ == null) { + return options_ == null + ? com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.getDefaultInstance() + : options_; + } else { + return optionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOptions( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + onChanged(); + } else { + optionsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOptions( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.Builder builderForValue) { + if (optionsBuilder_ == null) { + options_ = builderForValue.build(); + onChanged(); + } else { + optionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOptions( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options value) { + if (optionsBuilder_ == null) { + if (options_ != null) { + options_ = + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.newBuilder(options_) + .mergeFrom(value) + .buildPartial(); + } else { + options_ = value; + } + onChanged(); + } else { + optionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = null; + onChanged(); + } else { + options_ = null; + optionsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.Builder + getOptionsBuilder() { + + onChanged(); + return getOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.OptionsOrBuilder + getOptionsOrBuilder() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilder(); + } else { + return options_ == null + ? com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.getDefaultInstance() + : options_; + } + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.Builder, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.OptionsOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options.Builder, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.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.v1p4beta1.AnalyzeIamPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest) + private static final com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyRequestOrBuilder.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyRequestOrBuilder.java new file mode 100644 index 000000000..64076113a --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyRequestOrBuilder.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/v1p4beta1/asset_service.proto + +package com.google.cloud.asset.v1p4beta1; + +public interface AnalyzeIamPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The request query.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysisQuery. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery getAnalysisQuery(); + /** + * + * + *
+   * Required. The request query.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); + + /** + * + * + *
+   * Optional. The request options.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + boolean hasOptions(); + /** + * + * + *
+   * Optional. The request options.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options getOptions(); + /** + * + * + *
+   * Optional. The request options.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyRequest.OptionsOrBuilder getOptionsOrBuilder(); +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyResponse.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyResponse.java new file mode 100644 index 000000000..f8bba1e87 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyResponse.java @@ -0,0 +1,3622 @@ +/* + * 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/v1p4beta1/asset_service.proto + +package com.google.cloud.asset.v1p4beta1; + +/** + * + * + *
+ * A response message for [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1p4beta1.AssetService.AnalyzeIamPolicy].
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse} + */ +public final class AnalyzeIamPolicyResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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(); + nonCriticalErrors_ = 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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + subBuilder = null; + if (mainAnalysis_ != null) { + subBuilder = mainAnalysis_.toBuilder(); + } + mainAnalysis_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse + .IamPolicyAnalysis>(); + mutable_bitField0_ |= 0x00000001; + } + serviceAccountImpersonationAnalysis_.add( + input.readMessage( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .parser(), + extensionRegistry)); + break; + } + case 24: + { + fullyExplored_ = input.readBool(); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + nonCriticalErrors_ = + new java.util.ArrayList< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState>(); + mutable_bitField0_ |= 0x00000002; + } + nonCriticalErrors_.add( + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .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)) { + serviceAccountImpersonationAnalysis_ = + java.util.Collections.unmodifiableList(serviceAccountImpersonationAnalysis_); + } + 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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.class, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.Builder.class); + } + + public interface IamPolicyAnalysisOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + * + * @return Whether the analysisQuery field is set. + */ + boolean hasAnalysisQuery(); + /** + * + * + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + * + * @return The analysisQuery. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery getAnalysisQuery(); + /** + * + * + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); + + /** + * + * + *
+     * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+     * empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + java.util.List + getAnalysisResultsList(); + /** + * + * + *
+     * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+     * empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult getAnalysisResults(int index); + /** + * + * + *
+     * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+     * empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + int getAnalysisResultsCount(); + /** + * + * + *
+     * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+     * empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + java.util.List + getAnalysisResultsOrBuilderList(); + /** + * + * + *
+     * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+     * empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResultOrBuilder getAnalysisResultsOrBuilder( + int index); + + /** + * + * + *
+     * Represents whether all entries in the [analysis_results][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results] have been
+     * fully explored to answer the query.
+     * 
+ * + * bool fully_explored = 3; + * + * @return The fullyExplored. + */ + boolean getFullyExplored(); + } + /** + * + * + *
+   * An analysis message to group the query and results.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis} + */ + public static final class IamPolicyAnalysis extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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(); + } + + @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.v1p4beta1.IamPolicyAnalysisQuery.Builder subBuilder = null; + if (analysisQuery_ != null) { + subBuilder = analysisQuery_.toBuilder(); + } + analysisQuery_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.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< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult>(); + mutable_bitField0_ |= 0x00000001; + } + analysisResults_.add( + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.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)) { + analysisResults_ = java.util.Collections.unmodifiableList(analysisResults_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.class, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + .class); + } + + public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysisQuery_; + /** + * + * + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + * + * @return Whether the analysisQuery field is set. + */ + public boolean hasAnalysisQuery() { + return analysisQuery_ != null; + } + /** + * + * + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + * + * @return The analysisQuery. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery getAnalysisQuery() { + return analysisQuery_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } + /** + * + * + *
+     * The analysis query.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+     * empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public java.util.List + getAnalysisResultsList() { + return analysisResults_; + } + /** + * + * + *
+     * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+     * empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResultOrBuilder> + getAnalysisResultsOrBuilderList() { + return analysisResults_; + } + /** + * + * + *
+     * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+     * empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public int getAnalysisResultsCount() { + return analysisResults_.size(); + } + /** + * + * + *
+     * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+     * empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult getAnalysisResults(int index) { + return analysisResults_.get(index); + } + /** + * + * + *
+     * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+     * empty if no result is found.
+     * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results] have been
+     * fully explored to answer the query.
+     * 
+ * + * bool fully_explored = 3; + * + * @return The fullyExplored. + */ + 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 (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_); + } + 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_); + } + 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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis other = + (com.google.cloud.asset.v1p4beta1.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 (!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()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.class, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + .class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.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(); + } + } + + @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; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis build() { + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + buildPartial() { + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis result = + new com.google.cloud.asset.v1p4beta1.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_; + 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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) { + return mergeFrom( + (com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis other) { + if (other + == com.google.cloud.asset.v1p4beta1.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()); + } + 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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysisQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder> + analysisQueryBuilder_; + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + * + * @return The analysisQuery. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery getAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + return analysisQuery_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } else { + return analysisQueryBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public Builder setAnalysisQuery( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public Builder setAnalysisQuery( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder builderForValue) { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = builderForValue.build(); + onChanged(); + } else { + analysisQueryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public Builder mergeAnalysisQuery( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (analysisQuery_ != null) { + analysisQuery_ = + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.newBuilder(analysisQuery_) + .mergeFrom(value) + .buildPartial(); + } else { + analysisQuery_ = value; + } + onChanged(); + } else { + analysisQueryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder + getAnalysisQueryBuilder() { + + onChanged(); + return getAnalysisQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder + getAnalysisQueryOrBuilder() { + if (analysisQueryBuilder_ != null) { + return analysisQueryBuilder_.getMessageOrBuilder(); + } else { + return analysisQuery_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } + } + /** + * + * + *
+       * The analysis query.
+       * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder> + getAnalysisQueryFieldBuilder() { + if (analysisQueryBuilder_ == null) { + analysisQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResultOrBuilder> + analysisResultsBuilder_; + + /** + * + * + *
+       * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public int getAnalysisResultsCount() { + if (analysisResultsBuilder_ == null) { + return analysisResults_.size(); + } else { + return analysisResultsBuilder_.getCount(); + } + } + /** + * + * + *
+       * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult getAnalysisResults( + int index) { + if (analysisResultsBuilder_ == null) { + return analysisResults_.get(index); + } else { + return analysisResultsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public Builder setAnalysisResults( + int index, com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public Builder setAnalysisResults( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public Builder addAnalysisResults( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public Builder addAnalysisResults( + int index, com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public Builder addAnalysisResults( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public Builder addAnalysisResults( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Builder + getAnalysisResultsBuilder(int index) { + return getAnalysisResultsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResultOrBuilder + getAnalysisResultsOrBuilder(int index) { + if (analysisResultsBuilder_ == null) { + return analysisResults_.get(index); + } else { + return analysisResultsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResultOrBuilder> + getAnalysisResultsOrBuilderList() { + if (analysisResultsBuilder_ != null) { + return analysisResultsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(analysisResults_); + } + } + /** + * + * + *
+       * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Builder + addAnalysisResultsBuilder() { + return getAnalysisResultsFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.getDefaultInstance()); + } + /** + * + * + *
+       * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Builder + addAnalysisResultsBuilder(int index) { + return getAnalysisResultsFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.getDefaultInstance()); + } + /** + * + * + *
+       * A list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] that matches the analysis query, or
+       * empty if no result is found.
+       * 
+ * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult analysis_results = 2; + * + */ + public java.util.List + getAnalysisResultsBuilderList() { + return getAnalysisResultsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResultOrBuilder> + getAnalysisResultsFieldBuilder() { + if (analysisResultsBuilder_ == null) { + analysisResultsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Builder, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results] have been
+       * fully explored to answer the query.
+       * 
+ * + * bool fully_explored = 3; + * + * @return The fullyExplored. + */ + public boolean getFullyExplored() { + return fullyExplored_; + } + /** + * + * + *
+       * Represents whether all entries in the [analysis_results][google.cloud.asset.v1p4beta1.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.v1p4beta1.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; + } + + @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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis) + private static final com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int MAIN_ANALYSIS_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis mainAnalysis_; + /** + * + * + *
+   * The main analysis that matches the original request.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + * + * @return Whether the mainAnalysis field is set. + */ + public boolean hasMainAnalysis() { + return mainAnalysis_ != null; + } + /** + * + * + *
+   * The main analysis that matches the original request.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + * + * @return The mainAnalysis. + */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + getMainAnalysis() { + return mainAnalysis_ == null + ? com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .getDefaultInstance() + : mainAnalysis_; + } + /** + * + * + *
+   * The main analysis that matches the original request.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder + getMainAnalysisOrBuilder() { + return getMainAnalysis(); + } + + public static final int SERVICE_ACCOUNT_IMPERSONATION_ANALYSIS_FIELD_NUMBER = 2; + private java.util.List< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis> + serviceAccountImpersonationAnalysis_; + /** + * + * + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public java.util.List + getServiceAccountImpersonationAnalysisList() { + return serviceAccountImpersonationAnalysis_; + } + /** + * + * + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + getServiceAccountImpersonationAnalysisOrBuilderList() { + return serviceAccountImpersonationAnalysis_; + } + /** + * + * + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public int getServiceAccountImpersonationAnalysisCount() { + return serviceAccountImpersonationAnalysis_.size(); + } + /** + * + * + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.main_analysis] and
+   * [service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis] have been fully explored to
+   * answer the query in the request.
+   * 
+ * + * bool fully_explored = 3; + * + * @return The fullyExplored. + */ + public boolean getFullyExplored() { + return fullyExplored_; + } + + public static final int NON_CRITICAL_ERRORS_FIELD_NUMBER = 4; + private java.util.List + nonCriticalErrors_; + /** + * + * + *
+   * A list of non-critical errors happened during the request handling to
+   * explain why `fully_explored` is false, or empty if no error happened.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public java.util.List + getNonCriticalErrorsList() { + return nonCriticalErrors_; + } + /** + * + * + *
+   * A list of non-critical errors happened during the request handling to
+   * explain why `fully_explored` is false, or empty if no error happened.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder> + getNonCriticalErrorsOrBuilderList() { + return nonCriticalErrors_; + } + /** + * + * + *
+   * A list of non-critical errors happened during the request handling to
+   * explain why `fully_explored` is false, or empty if no error happened.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public int getNonCriticalErrorsCount() { + return nonCriticalErrors_.size(); + } + /** + * + * + *
+   * A list of non-critical errors happened during the request handling to
+   * explain why `fully_explored` is false, or empty if no error happened.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + getNonCriticalErrors(int index) { + return nonCriticalErrors_.get(index); + } + /** + * + * + *
+   * A list of non-critical errors happened during the request handling to
+   * explain why `fully_explored` is false, or empty if no error happened.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder + 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 (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_); + } + for (int i = 0; i < nonCriticalErrors_.size(); i++) { + output.writeMessage(4, nonCriticalErrors_.get(i)); + } + 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_); + } + for (int i = 0; i < nonCriticalErrors_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, 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.v1p4beta1.AnalyzeIamPolicyResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse other = + (com.google.cloud.asset.v1p4beta1.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 (!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 (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()); + 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.v1p4beta1.AnalyzeIamPolicyResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.AssetService.AnalyzeIamPolicy].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse) + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.class, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p4beta1.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(); + getNonCriticalErrorsFieldBuilder(); + } + } + + @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; + + 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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse build() { + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse buildPartial() { + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse result = + new com.google.cloud.asset.v1p4beta1.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_; + 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.v1p4beta1.AnalyzeIamPolicyResponse) { + return mergeFrom((com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse other) { + if (other == com.google.cloud.asset.v1p4beta1.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()); + } + 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.v1p4beta1.AnalyzeIamPolicyResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + mainAnalysis_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + mainAnalysisBuilder_; + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + * + * @return The mainAnalysis. + */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + getMainAnalysis() { + if (mainAnalysisBuilder_ == null) { + return mainAnalysis_ == null + ? com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .getDefaultInstance() + : mainAnalysis_; + } else { + return mainAnalysisBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + public Builder setMainAnalysis( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + public Builder setMainAnalysis( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + public Builder mergeMainAnalysis( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis value) { + if (mainAnalysisBuilder_ == null) { + if (mainAnalysis_ != null) { + mainAnalysis_ = + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + getMainAnalysisBuilder() { + + onChanged(); + return getMainAnalysisFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder + getMainAnalysisOrBuilder() { + if (mainAnalysisBuilder_ != null) { + return mainAnalysisBuilder_.getMessageOrBuilder(); + } else { + return mainAnalysis_ == null + ? com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .getDefaultInstance() + : mainAnalysis_; + } + } + /** + * + * + *
+     * The main analysis that matches the original request.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + getMainAnalysisFieldBuilder() { + if (mainAnalysisBuilder_ == null) { + mainAnalysisBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse + .IamPolicyAnalysisOrBuilder>( + getMainAnalysis(), getParentForChildren(), isClean()); + mainAnalysis_ = null; + } + return mainAnalysisBuilder_; + } + + private java.util.List< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis> + serviceAccountImpersonationAnalysis_ = java.util.Collections.emptyList(); + + private void ensureServiceAccountImpersonationAnalysisIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + serviceAccountImpersonationAnalysis_ = + new java.util.ArrayList< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis>( + serviceAccountImpersonationAnalysis_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + serviceAccountImpersonationAnalysisBuilder_; + + /** + * + * + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public java.util.List< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis> + 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.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder setServiceAccountImpersonationAnalysis( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder setServiceAccountImpersonationAnalysis( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder addServiceAccountImpersonationAnalysis( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder addServiceAccountImpersonationAnalysis( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder addServiceAccountImpersonationAnalysis( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder addServiceAccountImpersonationAnalysis( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public Builder addAllServiceAccountImpersonationAnalysis( + java.lang.Iterable< + ? extends + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public java.util.List< + ? extends + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + addServiceAccountImpersonationAnalysisBuilder() { + return getServiceAccountImpersonationAnalysisFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .getDefaultInstance()); + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder + addServiceAccountImpersonationAnalysisBuilder(int index) { + return getServiceAccountImpersonationAnalysisFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + .getDefaultInstance()); + } + /** + * + * + *
+     * The service account impersonation analysis if
+     * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+     * enabled.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + public java.util.List< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder> + getServiceAccountImpersonationAnalysisBuilderList() { + return getServiceAccountImpersonationAnalysisFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + getServiceAccountImpersonationAnalysisFieldBuilder() { + if (serviceAccountImpersonationAnalysisBuilder_ == null) { + serviceAccountImpersonationAnalysisBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis, + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.Builder, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.main_analysis] and
+     * [service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis] have been fully explored to
+     * answer the query in the request.
+     * 
+ * + * bool fully_explored = 3; + * + * @return The fullyExplored. + */ + public boolean getFullyExplored() { + return fullyExplored_; + } + /** + * + * + *
+     * Represents whether all entries in the [main_analysis][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.main_analysis] and
+     * [service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.main_analysis] and
+     * [service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.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; + } + + private java.util.List + nonCriticalErrors_ = java.util.Collections.emptyList(); + + private void ensureNonCriticalErrorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + nonCriticalErrors_ = + new java.util.ArrayList< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState>( + nonCriticalErrors_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder> + nonCriticalErrorsBuilder_; + + /** + * + * + *
+     * A list of non-critical errors happened during the request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + 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 request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public int getNonCriticalErrorsCount() { + if (nonCriticalErrorsBuilder_ == null) { + return nonCriticalErrors_.size(); + } else { + return nonCriticalErrorsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of non-critical errors happened during the request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + getNonCriticalErrors(int index) { + if (nonCriticalErrorsBuilder_ == null) { + return nonCriticalErrors_.get(index); + } else { + return nonCriticalErrorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of non-critical errors happened during the request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public Builder setNonCriticalErrors( + int index, com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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 request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public Builder setNonCriticalErrors( + int index, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.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 request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public Builder addNonCriticalErrors( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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 request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public Builder addNonCriticalErrors( + int index, com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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 request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public Builder addNonCriticalErrors( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.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 request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public Builder addNonCriticalErrors( + int index, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.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 request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public Builder addAllNonCriticalErrors( + java.lang.Iterable< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState> + 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 request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + 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 request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + 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 request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + getNonCriticalErrorsBuilder(int index) { + return getNonCriticalErrorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of non-critical errors happened during the request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder + getNonCriticalErrorsOrBuilder(int index) { + if (nonCriticalErrorsBuilder_ == null) { + return nonCriticalErrors_.get(index); + } else { + return nonCriticalErrorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of non-critical errors happened during the request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder> + getNonCriticalErrorsOrBuilderList() { + if (nonCriticalErrorsBuilder_ != null) { + return nonCriticalErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(nonCriticalErrors_); + } + } + /** + * + * + *
+     * A list of non-critical errors happened during the request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + addNonCriticalErrorsBuilder() { + return getNonCriticalErrorsFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of non-critical errors happened during the request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + addNonCriticalErrorsBuilder(int index) { + return getNonCriticalErrorsFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .getDefaultInstance()); + } + /** + * + * + *
+     * A list of non-critical errors happened during the request handling to
+     * explain why `fully_explored` is false, or empty if no error happened.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + public java.util.List< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder> + getNonCriticalErrorsBuilderList() { + return getNonCriticalErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder> + getNonCriticalErrorsFieldBuilder() { + if (nonCriticalErrorsBuilder_ == null) { + nonCriticalErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder>( + 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.v1p4beta1.AnalyzeIamPolicyResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse) + private static final com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyResponseOrBuilder.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyResponseOrBuilder.java new file mode 100644 index 000000000..86daf478d --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AnalyzeIamPolicyResponseOrBuilder.java @@ -0,0 +1,230 @@ +/* + * 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/v1p4beta1/asset_service.proto + +package com.google.cloud.asset.v1p4beta1; + +public interface AnalyzeIamPolicyResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The main analysis that matches the original request.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + * + * @return The mainAnalysis. + */ + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis getMainAnalysis(); + /** + * + * + *
+   * The main analysis that matches the original request.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis main_analysis = 1; + * + */ + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder + getMainAnalysisOrBuilder(); + + /** + * + * + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis + getServiceAccountImpersonationAnalysis(int index); + /** + * + * + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + java.util.List< + ? extends + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder> + getServiceAccountImpersonationAnalysisOrBuilderList(); + /** + * + * + *
+   * The service account impersonation analysis if
+   * [AnalyzeIamPolicyRequest.analyze_service_account_impersonation][] is
+   * enabled.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis service_account_impersonation_analysis = 2; + * + */ + com.google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysisOrBuilder + getServiceAccountImpersonationAnalysisOrBuilder(int index); + + /** + * + * + *
+   * Represents whether all entries in the [main_analysis][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.main_analysis] and
+   * [service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.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(); + + /** + * + * + *
+   * A list of non-critical errors happened during the request handling to
+   * explain why `fully_explored` is false, or empty if no error happened.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + java.util.List + getNonCriticalErrorsList(); + /** + * + * + *
+   * A list of non-critical errors happened during the request handling to
+   * explain why `fully_explored` is false, or empty if no error happened.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState getNonCriticalErrors( + int index); + /** + * + * + *
+   * A list of non-critical errors happened during the request handling to
+   * explain why `fully_explored` is false, or empty if no error happened.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + int getNonCriticalErrorsCount(); + /** + * + * + *
+   * A list of non-critical errors happened during the request handling to
+   * explain why `fully_explored` is false, or empty if no error happened.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder> + getNonCriticalErrorsOrBuilderList(); + /** + * + * + *
+   * A list of non-critical errors happened during the request handling to
+   * explain why `fully_explored` is false, or empty if no error happened.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder + getNonCriticalErrorsOrBuilder(int index); +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetProto.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetProto.java new file mode 100644 index 000000000..487881890 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetProto.java @@ -0,0 +1,210 @@ +/* + * 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/v1p4beta1/assets.proto + +package com.google.cloud.asset.v1p4beta1; + +public final class AssetProto { + private AssetProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AnalysisState_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AnalysisState_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Resource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Resource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Access_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Access_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Edge_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Edge_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Identity_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Identity_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AccessControlList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_IdentityList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n)google/cloud/asset/v1p4beta1/assets.pr" + + "oto\022\034google.cloud.asset.v1p4beta1\032\032googl" + + "e/iam/v1/policy.proto\032\025google/rpc/code.p" + + "roto\032\034google/api/annotations.proto\"\225\n\n\027I" + + "amPolicyAnalysisResult\022#\n\033attached_resou" + + "rce_full_name\030\001 \001(\t\022+\n\013iam_binding\030\002 \001(\013" + + "2\026.google.iam.v1.Binding\022e\n\024access_contr" + + "ol_lists\030\003 \003(\0132G.google.cloud.asset.v1p4" + + "beta1.IamPolicyAnalysisResult.AccessCont" + + "rolList\022Y\n\ridentity_list\030\004 \001(\0132B.google." + + "cloud.asset.v1p4beta1.IamPolicyAnalysisR" + + "esult.IdentityList\022\026\n\016fully_explored\030\005 \001" + + "(\010\032>\n\rAnalysisState\022\036\n\004code\030\001 \001(\0162\020.goog" + + "le.rpc.Code\022\r\n\005cause\030\002 \001(\t\032\203\001\n\010Resource\022" + + "\032\n\022full_resource_name\030\001 \001(\t\022[\n\016analysis_" + + "state\030\002 \001(\0132C.google.cloud.asset.v1p4bet" + + "a1.IamPolicyAnalysisResult.AnalysisState" + + "\032\233\001\n\006Access\022\016\n\004role\030\001 \001(\tH\000\022\024\n\npermissio" + + "n\030\002 \001(\tH\000\022[\n\016analysis_state\030\003 \001(\0132C.goog" + + "le.cloud.asset.v1p4beta1.IamPolicyAnalys" + + "isResult.AnalysisStateB\016\n\014oneof_access\0320" + + "\n\004Edge\022\023\n\013source_node\030\001 \001(\t\022\023\n\013target_no" + + "de\030\002 \001(\t\032u\n\010Identity\022\014\n\004name\030\001 \001(\t\022[\n\016an" + + "alysis_state\030\002 \001(\0132C.google.cloud.asset." + + "v1p4beta1.IamPolicyAnalysisResult.Analys" + + "isState\032\212\002\n\021AccessControlList\022Q\n\tresourc" + + "es\030\001 \003(\0132>.google.cloud.asset.v1p4beta1." + + "IamPolicyAnalysisResult.Resource\022N\n\010acce" + + "sses\030\002 \003(\0132<.google.cloud.asset.v1p4beta" + + "1.IamPolicyAnalysisResult.Access\022R\n\016reso" + + "urce_edges\030\003 \003(\0132:.google.cloud.asset.v1" + + "p4beta1.IamPolicyAnalysisResult.Edge\032\263\001\n" + + "\014IdentityList\022R\n\nidentities\030\001 \003(\0132>.goog" + + "le.cloud.asset.v1p4beta1.IamPolicyAnalys" + + "isResult.Identity\022O\n\013group_edges\030\002 \003(\0132:" + + ".google.cloud.asset.v1p4beta1.IamPolicyA" + + "nalysisResult.EdgeB\264\001\n com.google.cloud." + + "asset.v1p4beta1B\nAssetProtoP\001ZAgoogle.go" + + "lang.org/genproto/googleapis/cloud/asset" + + "/v1p4beta1;asset\370\001\001\252\002\034Google.Cloud.Asset" + + ".V1P4Beta1\312\002\034Google\\Cloud\\Asset\\V1p4beta" + + "1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.iam.v1.PolicyProto.getDescriptor(), + com.google.rpc.CodeProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor, + new java.lang.String[] { + "AttachedResourceFullName", + "IamBinding", + "AccessControlLists", + "IdentityList", + "FullyExplored", + }); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AnalysisState_descriptor = + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AnalysisState_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AnalysisState_descriptor, + new java.lang.String[] { + "Code", "Cause", + }); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Resource_descriptor = + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Resource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Resource_descriptor, + new java.lang.String[] { + "FullResourceName", "AnalysisState", + }); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Access_descriptor = + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Access_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Access_descriptor, + new java.lang.String[] { + "Role", "Permission", "AnalysisState", "OneofAccess", + }); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Edge_descriptor = + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Edge_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Edge_descriptor, + new java.lang.String[] { + "SourceNode", "TargetNode", + }); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Identity_descriptor = + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(4); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Identity_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Identity_descriptor, + new java.lang.String[] { + "Name", "AnalysisState", + }); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AccessControlList_descriptor = + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(5); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AccessControlList_descriptor, + new java.lang.String[] { + "Resources", "Accesses", "ResourceEdges", + }); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_IdentityList_descriptor = + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor + .getNestedTypes() + .get(6); + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_IdentityList_descriptor, + new java.lang.String[] { + "Identities", "GroupEdges", + }); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.rpc.CodeProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceProto.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceProto.java new file mode 100644 index 000000000..9ee955198 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/AssetServiceProto.java @@ -0,0 +1,343 @@ +/* + * 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/v1p4beta1/asset_service.proto + +package com.google.cloud.asset.v1p4beta1; + +public final class AssetServiceProto { + private AssetServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_AccessSelector_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_Options_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyRequest_Options_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_AnalyzeIamPolicyResponse_IamPolicyAnalysis_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_Options_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_Options_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n0google/cloud/asset/v1p4beta1/asset_ser" + + "vice.proto\022\034google.cloud.asset.v1p4beta1" + + "\032\034google/api/annotations.proto\032\037google/a" + + "pi/field_behavior.proto\032)google/cloud/as" + + "set/v1p4beta1/assets.proto\032\032google/iam/v" + + "1/policy.proto\032#google/longrunning/opera" + + "tions.proto\032\036google/protobuf/duration.pr" + + "oto\032\027google/api/client.proto\"\376\003\n\026IamPoli" + + "cyAnalysisQuery\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022e\n\021" + + "resource_selector\030\002 \001(\0132E.google.cloud.a" + + "sset.v1p4beta1.IamPolicyAnalysisQuery.Re" + + "sourceSelectorB\003\340A\001\022e\n\021identity_selector" + + "\030\003 \001(\0132E.google.cloud.asset.v1p4beta1.Ia" + + "mPolicyAnalysisQuery.IdentitySelectorB\003\340" + + "A\001\022a\n\017access_selector\030\004 \001(\0132C.google.clo" + + "ud.asset.v1p4beta1.IamPolicyAnalysisQuer" + + "y.AccessSelectorB\003\340A\001\0323\n\020ResourceSelecto" + + "r\022\037\n\022full_resource_name\030\001 \001(\tB\003\340A\002\032)\n\020Id" + + "entitySelector\022\025\n\010identity\030\001 \001(\tB\003\340A\002\032>\n" + + "\016AccessSelector\022\022\n\005roles\030\001 \003(\tB\003\340A\001\022\030\n\013p" + + "ermissions\030\002 \003(\tB\003\340A\001\"\327\003\n\027AnalyzeIamPoli" + + "cyRequest\022Q\n\016analysis_query\030\001 \001(\01324.goog" + + "le.cloud.asset.v1p4beta1.IamPolicyAnalys" + + "isQueryB\003\340A\002\022S\n\007options\030\002 \001(\0132=.google.c" + + "loud.asset.v1p4beta1.AnalyzeIamPolicyReq" + + "uest.OptionsB\003\340A\001\032\223\002\n\007Options\022\032\n\rexpand_" + + "groups\030\001 \001(\010B\003\340A\001\022\031\n\014expand_roles\030\002 \001(\010B" + + "\003\340A\001\022\035\n\020expand_resources\030\003 \001(\010B\003\340A\001\022\"\n\025o" + + "utput_resource_edges\030\004 \001(\010B\003\340A\001\022\037\n\022outpu" + + "t_group_edges\030\005 \001(\010B\003\340A\001\0222\n%analyze_serv" + + "ice_account_impersonation\030\006 \001(\010B\003\340A\001\0229\n\021" + + "execution_timeout\030\007 \001(\0132\031.google.protobu" + + "f.DurationB\003\340A\001\"\274\004\n\030AnalyzeIamPolicyResp" + + "onse\022_\n\rmain_analysis\030\001 \001(\0132H.google.clo" + + "ud.asset.v1p4beta1.AnalyzeIamPolicyRespo" + + "nse.IamPolicyAnalysis\022x\n&service_account" + + "_impersonation_analysis\030\002 \003(\0132H.google.c" + + "loud.asset.v1p4beta1.AnalyzeIamPolicyRes" + + "ponse.IamPolicyAnalysis\022\026\n\016fully_explore" + + "d\030\003 \001(\010\022`\n\023non_critical_errors\030\004 \003(\0132C.g" + + "oogle.cloud.asset.v1p4beta1.IamPolicyAna" + + "lysisResult.AnalysisState\032\312\001\n\021IamPolicyA" + + "nalysis\022L\n\016analysis_query\030\001 \001(\01324.google" + + ".cloud.asset.v1p4beta1.IamPolicyAnalysis" + + "Query\022O\n\020analysis_results\030\002 \003(\01325.google" + + ".cloud.asset.v1p4beta1.IamPolicyAnalysis" + + "Result\022\026\n\016fully_explored\030\003 \001(\010\"\271\001\n\035IamPo" + + "licyAnalysisOutputConfig\022e\n\017gcs_destinat" + + "ion\030\001 \001(\0132J.google.cloud.asset.v1p4beta1" + + ".IamPolicyAnalysisOutputConfig.GcsDestin" + + "ationH\000\032\"\n\016GcsDestination\022\020\n\003uri\030\001 \001(\tB\003" + + "\340A\002B\r\n\013destination\"\203\004\n\036ExportIamPolicyAn" + + "alysisRequest\022Q\n\016analysis_query\030\001 \001(\01324." + + "google.cloud.asset.v1p4beta1.IamPolicyAn" + + "alysisQueryB\003\340A\002\022Z\n\007options\030\002 \001(\0132D.goog" + + "le.cloud.asset.v1p4beta1.ExportIamPolicy" + + "AnalysisRequest.OptionsB\003\340A\001\022W\n\routput_c" + + "onfig\030\003 \001(\0132;.google.cloud.asset.v1p4bet" + + "a1.IamPolicyAnalysisOutputConfigB\003\340A\002\032\330\001" + + "\n\007Options\022\032\n\rexpand_groups\030\001 \001(\010B\003\340A\001\022\031\n" + + "\014expand_roles\030\002 \001(\010B\003\340A\001\022\035\n\020expand_resou" + + "rces\030\003 \001(\010B\003\340A\001\022\"\n\025output_resource_edges" + + "\030\004 \001(\010B\003\340A\001\022\037\n\022output_group_edges\030\005 \001(\010B" + + "\003\340A\001\0222\n%analyze_service_account_imperson" + + "ation\030\006 \001(\010B\003\340A\001\"u\n\037ExportIamPolicyAnaly" + + "sisResponse\022R\n\routput_config\030\001 \001(\0132;.goo" + + "gle.cloud.asset.v1p4beta1.IamPolicyAnaly" + + "sisOutputConfig2\345\004\n\014AssetService\022\302\001\n\020Ana" + + "lyzeIamPolicy\0225.google.cloud.asset.v1p4b" + + "eta1.AnalyzeIamPolicyRequest\0326.google.cl" + + "oud.asset.v1p4beta1.AnalyzeIamPolicyResp" + + "onse\"?\202\323\344\223\0029\0227/v1p4beta1/{analysis_query" + + ".parent=*/*}:analyzeIamPolicy\022\300\002\n\027Export" + + "IamPolicyAnalysis\022<.google.cloud.asset.v" + + "1p4beta1.ExportIamPolicyAnalysisRequest\032" + + "\035.google.longrunning.Operation\"\307\001\202\323\344\223\002C\"" + + ">/v1p4beta1/{analysis_query.parent=*/*}:" + + "exportIamPolicyAnalysis:\001*\312A{\n + * A request message for [AssetService.ExportIamPolicyAnalysis][google.cloud.asset.v1p4beta1.AssetService.ExportIamPolicyAnalysis]. + * + * + * Protobuf type {@code google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest} + */ +public final class ExportIamPolicyAnalysisRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest) + ExportIamPolicyAnalysisRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportIamPolicyAnalysisRequest.newBuilder() to construct. + private ExportIamPolicyAnalysisRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportIamPolicyAnalysisRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportIamPolicyAnalysisRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportIamPolicyAnalysisRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder subBuilder = null; + if (analysisQuery_ != null) { + subBuilder = analysisQuery_.toBuilder(); + } + analysisQuery_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(analysisQuery_); + analysisQuery_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options.Builder + subBuilder = null; + if (options_ != null) { + subBuilder = options_.toBuilder(); + } + options_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(options_); + options_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder subBuilder = + null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.class, + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Builder.class); + } + + public interface OptionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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 [identity_selector][] is specified, the identity in the result will
+     * be determined by the selector, and this flag will have no effect.
+     * 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 [access_selector][] is specified, the access section of the result
+     * will be determined by the selector, and this flag will have no effect.
+     * Default is false.
+     * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandRoles. + */ + boolean getExpandRoles(); + + /** + * + * + *
+     * Optional. If true, 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 [resource_selector][] is specified, the resource section of the result
+     * will be determined by the selector, and this flag will have no effect.
+     * 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.
+     * 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.v1p4beta1.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.v1p4beta1.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 request options.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options} + */ + public static final class Options extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_Options_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_Options_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options.class, + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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 [identity_selector][] is specified, the identity in the result will
+     * be determined by the selector, and this flag will have no effect.
+     * Default is false.
+     * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandGroups. + */ + 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 [access_selector][] is specified, the access section of the result
+     * will be determined by the selector, and this flag will have no effect.
+     * Default is false.
+     * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandRoles. + */ + public boolean getExpandRoles() { + return expandRoles_; + } + + public static final int EXPAND_RESOURCES_FIELD_NUMBER = 3; + private boolean expandResources_; + /** + * + * + *
+     * Optional. If true, 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 [resource_selector][] is specified, the resource section of the result
+     * will be determined by the selector, and this flag will have no effect.
+     * Default is false.
+     * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandResources. + */ + 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. + */ + 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. + */ + 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.
+     * 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.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+     * Default is false.
+     * 
+ * + * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The analyzeServiceAccountImpersonation. + */ + 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.v1p4beta1.ExportIamPolicyAnalysisRequest.Options)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options other = + (com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.ExportIamPolicyAnalysisRequest.Options parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.ExportIamPolicyAnalysisRequest.Options parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.ExportIamPolicyAnalysisRequest.Options parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.ExportIamPolicyAnalysisRequest.Options parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.ExportIamPolicyAnalysisRequest.Options + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.ExportIamPolicyAnalysisRequest.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 request options.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options) + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.OptionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_Options_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_Options_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options.class, + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options.Builder + .class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_Options_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options build() { + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options + buildPartial() { + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options result = + new com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.ExportIamPolicyAnalysisRequest.Options) { + return mergeFrom( + (com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options other) { + if (other + == com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.ExportIamPolicyAnalysisRequest.Options parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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 [identity_selector][] is specified, the identity in the result will
+       * be determined by the selector, and this flag will have no effect.
+       * Default is false.
+       * 
+ * + * bool expand_groups = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandGroups. + */ + 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 [identity_selector][] is specified, the identity in the result will
+       * be determined by the selector, and this flag will have no effect.
+       * 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 [identity_selector][] is specified, the identity in the result will
+       * be determined by the selector, and this flag will have no effect.
+       * 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 [access_selector][] is specified, the access section of the result
+       * will be determined by the selector, and this flag will have no effect.
+       * Default is false.
+       * 
+ * + * bool expand_roles = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandRoles. + */ + 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 [access_selector][] is specified, the access section of the result
+       * will be determined by the selector, and this flag will have no effect.
+       * 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 [access_selector][] is specified, the access section of the result
+       * will be determined by the selector, and this flag will have no effect.
+       * 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, 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 [resource_selector][] is specified, the resource section of the result
+       * will be determined by the selector, and this flag will have no effect.
+       * Default is false.
+       * 
+ * + * bool expand_resources = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The expandResources. + */ + public boolean getExpandResources() { + return expandResources_; + } + /** + * + * + *
+       * Optional. If true, 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 [resource_selector][] is specified, the resource section of the result
+       * will be determined by the selector, and this flag will have no effect.
+       * 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, 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 [resource_selector][] is specified, the resource section of the result
+       * will be determined by the selector, and this flag will have no effect.
+       * 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. + */ + 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. + */ + 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.
+       * 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.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis].
+       * Default is false.
+       * 
+ * + * + * bool analyze_service_account_impersonation = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The analyzeServiceAccountImpersonation. + */ + 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.
+       * 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.v1p4beta1.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.v1p4beta1.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.
+       * 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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.ExportIamPolicyAnalysisRequest.Options) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options) + private static final com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options(); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.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.v1p4beta1.ExportIamPolicyAnalysisRequest.Options + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ANALYSIS_QUERY_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysisQuery_; + /** + * + * + *
+   * Required. The request query.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the analysisQuery field is set. + */ + public boolean hasAnalysisQuery() { + return analysisQuery_ != null; + } + /** + * + * + *
+   * Required. The request query.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysisQuery. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery getAnalysisQuery() { + return analysisQuery_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } + /** + * + * + *
+   * Required. The request query.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder + getAnalysisQueryOrBuilder() { + return getAnalysisQuery(); + } + + public static final int OPTIONS_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options_; + /** + * + * + *
+   * Optional. The request options.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + public boolean hasOptions() { + return options_ != null; + } + /** + * + * + *
+   * Optional. The request options.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options getOptions() { + return options_ == null + ? com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options + .getDefaultInstance() + : options_; + } + /** + * + * + *
+   * Optional. The request options.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.OptionsOrBuilder + getOptionsOrBuilder() { + return getOptions(); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig outputConfig_; + /** + * + * + *
+   * Required. Output configuration indicating where the results will be output to.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + * + * + *
+   * Required. Output configuration indicating where the results will be output to.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig getOutputConfig() { + return outputConfig_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.getDefaultInstance() + : outputConfig_; + } + /** + * + * + *
+   * Required. Output configuration indicating where the results will be output to.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1p4beta1.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 (options_ != null) { + output.writeMessage(2, getOptions()); + } + if (outputConfig_ != null) { + output.writeMessage(3, 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 (options_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOptions()); + } + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, 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.v1p4beta1.ExportIamPolicyAnalysisRequest)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest other = + (com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest) obj; + + if (hasAnalysisQuery() != other.hasAnalysisQuery()) return false; + if (hasAnalysisQuery()) { + if (!getAnalysisQuery().equals(other.getAnalysisQuery())) return false; + } + if (hasOptions() != other.hasOptions()) return false; + if (hasOptions()) { + if (!getOptions().equals(other.getOptions())) 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 (hasOptions()) { + hash = (37 * hash) + OPTIONS_FIELD_NUMBER; + hash = (53 * hash) + getOptions().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.v1p4beta1.ExportIamPolicyAnalysisRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A request message for [AssetService.ExportIamPolicyAnalysis][google.cloud.asset.v1p4beta1.AssetService.ExportIamPolicyAnalysis].
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest) + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.class, + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (analysisQueryBuilder_ == null) { + analysisQuery_ = null; + } else { + analysisQuery_ = null; + analysisQueryBuilder_ = null; + } + if (optionsBuilder_ == null) { + options_ = null; + } else { + options_ = null; + optionsBuilder_ = 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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest build() { + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest buildPartial() { + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest result = + new com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest(this); + if (analysisQueryBuilder_ == null) { + result.analysisQuery_ = analysisQuery_; + } else { + result.analysisQuery_ = analysisQueryBuilder_.build(); + } + if (optionsBuilder_ == null) { + result.options_ = options_; + } else { + result.options_ = optionsBuilder_.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.v1p4beta1.ExportIamPolicyAnalysisRequest) { + return mergeFrom((com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest other) { + if (other + == com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.getDefaultInstance()) + return this; + if (other.hasAnalysisQuery()) { + mergeAnalysisQuery(other.getAnalysisQuery()); + } + if (other.hasOptions()) { + mergeOptions(other.getOptions()); + } + 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.v1p4beta1.ExportIamPolicyAnalysisRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysisQuery_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder> + analysisQueryBuilder_; + /** + * + * + *
+     * Required. The request query.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysisQuery. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery getAnalysisQuery() { + if (analysisQueryBuilder_ == null) { + return analysisQuery_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } else { + return analysisQueryBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The request query.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnalysisQuery(com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAnalysisQuery( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder builderForValue) { + if (analysisQueryBuilder_ == null) { + analysisQuery_ = builderForValue.build(); + onChanged(); + } else { + analysisQueryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The request query.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAnalysisQuery( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery value) { + if (analysisQueryBuilder_ == null) { + if (analysisQuery_ != null) { + analysisQuery_ = + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.newBuilder(analysisQuery_) + .mergeFrom(value) + .buildPartial(); + } else { + analysisQuery_ = value; + } + onChanged(); + } else { + analysisQueryBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The request query.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder + getAnalysisQueryBuilder() { + + onChanged(); + return getAnalysisQueryFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The request query.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder + getAnalysisQueryOrBuilder() { + if (analysisQueryBuilder_ != null) { + return analysisQueryBuilder_.getMessageOrBuilder(); + } else { + return analysisQuery_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.getDefaultInstance() + : analysisQuery_; + } + } + /** + * + * + *
+     * Required. The request query.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder> + getAnalysisQueryFieldBuilder() { + if (analysisQueryBuilder_ == null) { + analysisQueryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder>( + getAnalysisQuery(), getParentForChildren(), isClean()); + analysisQuery_ = null; + } + return analysisQueryBuilder_; + } + + private com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options, + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options.Builder, + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.OptionsOrBuilder> + optionsBuilder_; + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + public boolean hasOptions() { + return optionsBuilder_ != null || options_ != null; + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options getOptions() { + if (optionsBuilder_ == null) { + return options_ == null + ? com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options + .getDefaultInstance() + : options_; + } else { + return optionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOptions( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options value) { + if (optionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + options_ = value; + onChanged(); + } else { + optionsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setOptions( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options.Builder + builderForValue) { + if (optionsBuilder_ == null) { + options_ = builderForValue.build(); + onChanged(); + } else { + optionsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeOptions( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options value) { + if (optionsBuilder_ == null) { + if (options_ != null) { + options_ = + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options.newBuilder( + options_) + .mergeFrom(value) + .buildPartial(); + } else { + options_ = value; + } + onChanged(); + } else { + optionsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearOptions() { + if (optionsBuilder_ == null) { + options_ = null; + onChanged(); + } else { + options_ = null; + optionsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options.Builder + getOptionsBuilder() { + + onChanged(); + return getOptionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.OptionsOrBuilder + getOptionsOrBuilder() { + if (optionsBuilder_ != null) { + return optionsBuilder_.getMessageOrBuilder(); + } else { + return options_ == null + ? com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options + .getDefaultInstance() + : options_; + } + } + /** + * + * + *
+     * Optional. The request options.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options, + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options.Builder, + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.OptionsOrBuilder> + getOptionsFieldBuilder() { + if (optionsBuilder_ == null) { + optionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options, + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options.Builder, + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.OptionsOrBuilder>( + getOptions(), getParentForChildren(), isClean()); + options_ = null; + } + return optionsBuilder_; + } + + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfigOrBuilder> + outputConfigBuilder_; + /** + * + * + *
+     * Required. Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.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.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.getDefaultInstance() + : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOutputConfig( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOutputConfig( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOutputConfig( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.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.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder + getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfigOrBuilder + getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.getDefaultInstance() + : outputConfig_; + } + } + /** + * + * + *
+     * Required. Output configuration indicating where the results will be output to.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.ExportIamPolicyAnalysisRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest) + private static final com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest(); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportIamPolicyAnalysisRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportIamPolicyAnalysisRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisRequestOrBuilder.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisRequestOrBuilder.java new file mode 100644 index 000000000..e629aa1b8 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisRequestOrBuilder.java @@ -0,0 +1,150 @@ +/* + * 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/v1p4beta1/asset_service.proto + +package com.google.cloud.asset.v1p4beta1; + +public interface ExportIamPolicyAnalysisRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The request query.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The analysisQuery. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery getAnalysisQuery(); + /** + * + * + *
+   * Required. The request query.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery analysis_query = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder getAnalysisQueryOrBuilder(); + + /** + * + * + *
+   * Optional. The request options.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the options field is set. + */ + boolean hasOptions(); + /** + * + * + *
+   * Optional. The request options.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The options. + */ + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options getOptions(); + /** + * + * + *
+   * Optional. The request options.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.Options options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest.OptionsOrBuilder + getOptionsOrBuilder(); + + /** + * + * + *
+   * Required. Output configuration indicating where the results will be output to.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.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.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The outputConfig. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig getOutputConfig(); + /** + * + * + *
+   * Required. Output configuration indicating where the results will be output to.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfigOrBuilder + getOutputConfigOrBuilder(); +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisResponse.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisResponse.java new file mode 100644 index 000000000..16c41a50b --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisResponse.java @@ -0,0 +1,752 @@ +/* + * 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/v1p4beta1/asset_service.proto + +package com.google.cloud.asset.v1p4beta1; + +/** + * + * + *
+ * The export IAM policy analysis response. This message is returned by the
+ * [google.longrunning.Operations.GetOperation][] method in the returned
+ * [google.longrunning.Operation.response][] field.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse} + */ +public final class ExportIamPolicyAnalysisResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse) + ExportIamPolicyAnalysisResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ExportIamPolicyAnalysisResponse.newBuilder() to construct. + private ExportIamPolicyAnalysisResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ExportIamPolicyAnalysisResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ExportIamPolicyAnalysisResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ExportIamPolicyAnalysisResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder subBuilder = + null; + if (outputConfig_ != null) { + subBuilder = outputConfig_.toBuilder(); + } + outputConfig_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse.class, + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse.Builder.class); + } + + public static final int OUTPUT_CONFIG_FIELD_NUMBER = 1; + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig outputConfig_; + /** + * + * + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + * + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfig_ != null; + } + /** + * + * + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + * + * @return The outputConfig. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig getOutputConfig() { + return outputConfig_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.getDefaultInstance() + : outputConfig_; + } + /** + * + * + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + */ + public com.google.cloud.asset.v1p4beta1.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 (outputConfig_ != null) { + output.writeMessage(1, getOutputConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (outputConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, 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.v1p4beta1.ExportIamPolicyAnalysisResponse)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse other = + (com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse) obj; + + 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 (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.v1p4beta1.ExportIamPolicyAnalysisResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The export IAM policy analysis response. This message is returned by the
+   * [google.longrunning.Operations.GetOperation][] method in the returned
+   * [google.longrunning.Operation.response][] field.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse) + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse.class, + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + 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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_ExportIamPolicyAnalysisResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse build() { + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse buildPartial() { + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse result = + new com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse(this); + 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.v1p4beta1.ExportIamPolicyAnalysisResponse) { + return mergeFrom((com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse other) { + if (other + == com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse.getDefaultInstance()) + return this; + 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.v1p4beta1.ExportIamPolicyAnalysisResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig outputConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfigOrBuilder> + outputConfigBuilder_; + /** + * + * + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + * + * @return Whether the outputConfig field is set. + */ + public boolean hasOutputConfig() { + return outputConfigBuilder_ != null || outputConfig_ != null; + } + /** + * + * + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + * + * @return The outputConfig. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig getOutputConfig() { + if (outputConfigBuilder_ == null) { + return outputConfig_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.getDefaultInstance() + : outputConfig_; + } else { + return outputConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + */ + public Builder setOutputConfig( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig value) { + if (outputConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + outputConfig_ = value; + onChanged(); + } else { + outputConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + */ + public Builder setOutputConfig( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder builderForValue) { + if (outputConfigBuilder_ == null) { + outputConfig_ = builderForValue.build(); + onChanged(); + } else { + outputConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + */ + public Builder mergeOutputConfig( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig value) { + if (outputConfigBuilder_ == null) { + if (outputConfig_ != null) { + outputConfig_ = + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.newBuilder( + outputConfig_) + .mergeFrom(value) + .buildPartial(); + } else { + outputConfig_ = value; + } + onChanged(); + } else { + outputConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + */ + public Builder clearOutputConfig() { + if (outputConfigBuilder_ == null) { + outputConfig_ = null; + onChanged(); + } else { + outputConfig_ = null; + outputConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder + getOutputConfigBuilder() { + + onChanged(); + return getOutputConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfigOrBuilder + getOutputConfigOrBuilder() { + if (outputConfigBuilder_ != null) { + return outputConfigBuilder_.getMessageOrBuilder(); + } else { + return outputConfig_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.getDefaultInstance() + : outputConfig_; + } + } + /** + * + * + *
+     * Output configuration indicating where the results were output to.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfigOrBuilder> + getOutputConfigFieldBuilder() { + if (outputConfigBuilder_ == null) { + outputConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.ExportIamPolicyAnalysisResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse) + private static final com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse(); + } + + public static com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ExportIamPolicyAnalysisResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ExportIamPolicyAnalysisResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisResponseOrBuilder.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisResponseOrBuilder.java new file mode 100644 index 000000000..612b86db0 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/ExportIamPolicyAnalysisResponseOrBuilder.java @@ -0,0 +1,61 @@ +/* + * 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/v1p4beta1/asset_service.proto + +package com.google.cloud.asset.v1p4beta1; + +public interface ExportIamPolicyAnalysisResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + * + * @return Whether the outputConfig field is set. + */ + boolean hasOutputConfig(); + /** + * + * + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + * + * @return The outputConfig. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig getOutputConfig(); + /** + * + * + *
+   * Output configuration indicating where the results were output to.
+   * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig output_config = 1; + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfigOrBuilder + getOutputConfigOrBuilder(); +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisOutputConfig.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisOutputConfig.java new file mode 100644 index 000000000..a8a534211 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisOutputConfig.java @@ -0,0 +1,1616 @@ +/* + * 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/v1p4beta1/asset_service.proto + +package com.google.cloud.asset.v1p4beta1; + +/** + * + * + *
+ * Output configuration for export IAM policy analysis destination.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig} + */ +public final class IamPolicyAnalysisOutputConfig extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder + subBuilder = null; + if (destinationCase_ == 1) { + subBuilder = + ((com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_) + .toBuilder(); + } + destination_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_); + destination_ = subBuilder.buildPartial(); + } + destinationCase_ = 1; + 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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder.class); + } + + public interface GcsDestinationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.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 [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + java.lang.String getUri(); + /** + * + * + *
+     * 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 [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + com.google.protobuf.ByteString getUriBytes(); + } + /** + * + * + *
+   * A Cloud Storage location.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination} + */ + public static final class GcsDestination extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination.class, + com.google.cloud.asset.v1p4beta1.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 [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (ref instanceof java.lang.String) { + 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 [Viewing and
+     * Editing Object
+     * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+     * for more information.
+     * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof 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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination other = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_GcsDestination_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + .Builder.class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_GcsDestination_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination result = + new com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) { + return mergeFrom( + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination other) { + if (other + == com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.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 [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The uri. + */ + public java.lang.String getUri() { + java.lang.Object ref = uri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * 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 [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for uri. + */ + public com.google.protobuf.ByteString getUriBytes() { + java.lang.Object ref = uri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * 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 [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The uri to set. + * @return This builder for chaining. + */ + public Builder setUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + uri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * 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 [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearUri() { + + uri_ = getDefaultInstance().getUri(); + onChanged(); + return this; + } + /** + * + * + *
+       * 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 [Viewing and
+       * Editing Object
+       * Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata)
+       * for more information.
+       * 
+ * + * string uri = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for uri to set. + * @return This builder for chaining. + */ + public Builder setUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + uri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig + .GcsDestination + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + 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), + 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 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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + * + * @return Whether the gcsDestination field is set. + */ + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + * + * + *
+   * Destination on Cloud Storage.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + * + * @return The gcsDestination. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + getGcsDestination() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_; + } + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } + /** + * + * + *
+   * Destination on Cloud Storage.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder + getGcsDestinationOrBuilder() { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_; + } + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + .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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + 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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + 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.v1p4beta1.IamPolicyAnalysisOutputConfig)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig other = + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig) obj; + + if (!getDestinationCase().equals(other.getDestinationCase())) return false; + switch (destinationCase_) { + case 1: + if (!getGcsDestination().equals(other.getGcsDestination())) 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 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisOutputConfig_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig result = + new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig(this); + if (destinationCase_ == 1) { + if (gcsDestinationBuilder_ == null) { + result.destination_ = destination_; + } else { + result.destination_ = gcsDestinationBuilder_.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.v1p4beta1.IamPolicyAnalysisOutputConfig) { + return mergeFrom((com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig other) { + if (other + == com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.getDefaultInstance()) + return this; + switch (other.getDestinationCase()) { + case GCS_DESTINATION: + { + mergeGcsDestination(other.getGcsDestination()); + 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.v1p4beta1.IamPolicyAnalysisOutputConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder> + gcsDestinationBuilder_; + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + * + * @return Whether the gcsDestination field is set. + */ + public boolean hasGcsDestination() { + return destinationCase_ == 1; + } + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + * + * @return The gcsDestination. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + getGcsDestination() { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_; + } + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } else { + if (destinationCase_ == 1) { + return gcsDestinationBuilder_.getMessage(); + } + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + public Builder setGcsDestination( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + public Builder setGcsDestination( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + public Builder mergeGcsDestination( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination value) { + if (gcsDestinationBuilder_ == null) { + if (destinationCase_ == 1 + && destination_ + != com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance()) { + destination_ = + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + .newBuilder( + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder + getGcsDestinationBuilder() { + return getGcsDestinationFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder + getGcsDestinationOrBuilder() { + if ((destinationCase_ == 1) && (gcsDestinationBuilder_ != null)) { + return gcsDestinationBuilder_.getMessageOrBuilder(); + } else { + if (destinationCase_ == 1) { + return (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_; + } + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Destination on Cloud Storage.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder> + getGcsDestinationFieldBuilder() { + if (gcsDestinationBuilder_ == null) { + if (!(destinationCase_ == 1)) { + destination_ = + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + .getDefaultInstance(); + } + gcsDestinationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination + .Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig + .GcsDestinationOrBuilder>( + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination) + destination_, + getParentForChildren(), + isClean()); + destination_ = null; + } + destinationCase_ = 1; + onChanged(); + ; + return gcsDestinationBuilder_; + } + + @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.v1p4beta1.IamPolicyAnalysisOutputConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisOutputConfig + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisOutputConfigOrBuilder.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisOutputConfigOrBuilder.java new file mode 100644 index 000000000..edc8507e0 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisOutputConfigOrBuilder.java @@ -0,0 +1,70 @@ +/* + * 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/v1p4beta1/asset_service.proto + +package com.google.cloud.asset.v1p4beta1; + +public interface IamPolicyAnalysisOutputConfigOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Destination on Cloud Storage.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + * + * @return Whether the gcsDestination field is set. + */ + boolean hasGcsDestination(); + /** + * + * + *
+   * Destination on Cloud Storage.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + * + * @return The gcsDestination. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination getGcsDestination(); + /** + * + * + *
+   * Destination on Cloud Storage.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestination gcs_destination = 1; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.GcsDestinationOrBuilder + getGcsDestinationOrBuilder(); + + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisOutputConfig.DestinationCase + getDestinationCase(); +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisQuery.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisQuery.java new file mode 100644 index 000000000..525a9a8d2 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisQuery.java @@ -0,0 +1,4132 @@ +/* + * 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/v1p4beta1/asset_service.proto + +package com.google.cloud.asset.v1p4beta1; + +/** + * + * + *
+ * IAM policy analysis query message.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery} + */ +public final class IamPolicyAnalysisQuery extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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() { + parent_ = ""; + } + + @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(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector.Builder + subBuilder = null; + if (resourceSelector_ != null) { + subBuilder = resourceSelector_.toBuilder(); + } + resourceSelector_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(resourceSelector_); + resourceSelector_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector.Builder + subBuilder = null; + if (identitySelector_ != null) { + subBuilder = identitySelector_.toBuilder(); + } + identitySelector_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(identitySelector_); + identitySelector_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector.Builder + subBuilder = null; + if (accessSelector_ != null) { + subBuilder = accessSelector_.toBuilder(); + } + accessSelector_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(accessSelector_); + accessSelector_ = 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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder.class); + } + + public interface ResourceSelectorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The [full resource
+     * name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+     * .
+     * 
+ * + * 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/apis/design/resource_names#full_resource_name)
+     * .
+     * 
+ * + * 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. At least one of [ResourceSelector][google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector], [IdentitySelector][google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector] or
+   * [AccessSelector][google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector] must be specified in a request.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector} + */ + public static final class ResourceSelector extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector.class, + com.google.cloud.asset.v1p4beta1.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/apis/design/resource_names#full_resource_name)
+     * .
+     * 
+ * + * 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) { + 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/apis/design/resource_names#full_resource_name)
+     * .
+     * 
+ * + * 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 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.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector other = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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. At least one of [ResourceSelector][google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector], [IdentitySelector][google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector] or
+     * [AccessSelector][google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector] must be specified in a request.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_ResourceSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector.Builder + .class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_ResourceSelector_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector result = + new com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector) { + return mergeFrom( + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector other) { + if (other + == com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.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/apis/design/resource_names#full_resource_name)
+       * .
+       * 
+ * + * 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/apis/design/resource_names#full_resource_name)
+       * .
+       * 
+ * + * 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/apis/design/resource_names#full_resource_name)
+       * .
+       * 
+ * + * 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/apis/design/resource_names#full_resource_name)
+       * .
+       * 
+ * + * 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/apis/design/resource_names#full_resource_name)
+       * .
+       * 
+ * + * 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.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface IdentitySelectorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.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).
+     * 
+ * + * 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).
+     * 
+ * + * 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.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector} + */ + public static final class IdentitySelector extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector.class, + com.google.cloud.asset.v1p4beta1.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).
+     * 
+ * + * 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) { + 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).
+     * 
+ * + * 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 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.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector other = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_IdentitySelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector.Builder + .class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_IdentitySelector_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector result = + new com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector) { + return mergeFrom( + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector other) { + if (other + == com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.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).
+       * 
+ * + * 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).
+       * 
+ * + * 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).
+       * 
+ * + * 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).
+       * 
+ * + * 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).
+       * 
+ * + * 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.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AccessSelectorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.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 identities and resources
+   * matching any of them.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector} + */ + public static final class AccessSelector extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_AccessSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector.class, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector other = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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 identities and resources
+     * matching any of them.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_AccessSelector_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_AccessSelector_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector.Builder + .class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_AccessSelector_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector result = + new com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector) { + return mergeFrom( + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector other) { + if (other + == com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The relative name of the root asset. Only resources and IAM policies within
+   * the parent will be analyzed. This can only be an organization number (such
+   * as "organizations/123") or a folder number (such as "folders/123").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The relative name of the root asset. Only resources and IAM policies within
+   * the parent will be analyzed. This can only be an organization number (such
+   * as "organizations/123") or a folder number (such as "folders/123").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_SELECTOR_FIELD_NUMBER = 2; + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + resourceSelector_; + /** + * + * + *
+   * Optional. Specifies a resource for analysis. Leaving it empty means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceSelector field is set. + */ + public boolean hasResourceSelector() { + return resourceSelector_ != null; + } + /** + * + * + *
+   * Optional. Specifies a resource for analysis. Leaving it empty means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceSelector. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + getResourceSelector() { + return resourceSelector_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + .getDefaultInstance() + : resourceSelector_; + } + /** + * + * + *
+   * Optional. Specifies a resource for analysis. Leaving it empty means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder + getResourceSelectorOrBuilder() { + return getResourceSelector(); + } + + public static final int IDENTITY_SELECTOR_FIELD_NUMBER = 3; + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + identitySelector_; + /** + * + * + *
+   * Optional. Specifies an identity for analysis. Leaving it empty means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the identitySelector field is set. + */ + public boolean hasIdentitySelector() { + return identitySelector_ != null; + } + /** + * + * + *
+   * Optional. Specifies an identity for analysis. Leaving it empty means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The identitySelector. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + getIdentitySelector() { + return identitySelector_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + .getDefaultInstance() + : identitySelector_; + } + /** + * + * + *
+   * Optional. Specifies an identity for analysis. Leaving it empty means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder + getIdentitySelectorOrBuilder() { + return getIdentitySelector(); + } + + public static final int ACCESS_SELECTOR_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector accessSelector_; + /** + * + * + *
+   * Optional. Specifies roles or permissions for analysis. Leaving it empty
+   * means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the accessSelector field is set. + */ + public boolean hasAccessSelector() { + return accessSelector_ != null; + } + /** + * + * + *
+   * Optional. Specifies roles or permissions for analysis. Leaving it empty
+   * means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessSelector. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector + getAccessSelector() { + return accessSelector_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector + .getDefaultInstance() + : accessSelector_; + } + /** + * + * + *
+   * Optional. Specifies roles or permissions for analysis. Leaving it empty
+   * means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder + getAccessSelectorOrBuilder() { + return getAccessSelector(); + } + + 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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (resourceSelector_ != null) { + output.writeMessage(2, getResourceSelector()); + } + if (identitySelector_ != null) { + output.writeMessage(3, getIdentitySelector()); + } + if (accessSelector_ != null) { + output.writeMessage(4, getAccessSelector()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + 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()); + } + 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.v1p4beta1.IamPolicyAnalysisQuery)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery other = + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery) obj; + + if (!getParent().equals(other.getParent())) 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 (!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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().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(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQueryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p4beta1.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(); + parent_ = ""; + + 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; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.asset.v1p4beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisQuery_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery result = + new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery(this); + result.parent_ = parent_; + 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(); + } + 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.v1p4beta1.IamPolicyAnalysisQuery) { + return mergeFrom((com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery other) { + if (other == com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasResourceSelector()) { + mergeResourceSelector(other.getResourceSelector()); + } + if (other.hasIdentitySelector()) { + mergeIdentitySelector(other.getIdentitySelector()); + } + if (other.hasAccessSelector()) { + mergeAccessSelector(other.getAccessSelector()); + } + 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.v1p4beta1.IamPolicyAnalysisQuery parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The relative name of the root asset. Only resources and IAM policies within
+     * the parent will be analyzed. This can only be an organization number (such
+     * as "organizations/123") or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The relative name of the root asset. Only resources and IAM policies within
+     * the parent will be analyzed. This can only be an organization number (such
+     * as "organizations/123") or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = 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 parent will be analyzed. This can only be an organization number (such
+     * as "organizations/123") or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The relative name of the root asset. Only resources and IAM policies within
+     * the parent will be analyzed. This can only be an organization number (such
+     * as "organizations/123") or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The relative name of the root asset. Only resources and IAM policies within
+     * the parent will be analyzed. This can only be an organization number (such
+     * as "organizations/123") or a folder number (such as "folders/123").
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + resourceSelector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder> + resourceSelectorBuilder_; + /** + * + * + *
+     * Optional. Specifies a resource for analysis. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.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. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceSelector. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + getResourceSelector() { + if (resourceSelectorBuilder_ == null) { + return resourceSelector_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + .getDefaultInstance() + : resourceSelector_; + } else { + return resourceSelectorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Specifies a resource for analysis. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setResourceSelector( + com.google.cloud.asset.v1p4beta1.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. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setResourceSelector( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector.Builder + builderForValue) { + if (resourceSelectorBuilder_ == null) { + resourceSelector_ = builderForValue.build(); + onChanged(); + } else { + resourceSelectorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Specifies a resource for analysis. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeResourceSelector( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector value) { + if (resourceSelectorBuilder_ == null) { + if (resourceSelector_ != null) { + resourceSelector_ = + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector.newBuilder( + resourceSelector_) + .mergeFrom(value) + .buildPartial(); + } else { + resourceSelector_ = value; + } + onChanged(); + } else { + resourceSelectorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Specifies a resource for analysis. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.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. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector.Builder + getResourceSelectorBuilder() { + + onChanged(); + return getResourceSelectorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Specifies a resource for analysis. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder + getResourceSelectorOrBuilder() { + if (resourceSelectorBuilder_ != null) { + return resourceSelectorBuilder_.getMessageOrBuilder(); + } else { + return resourceSelector_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector + .getDefaultInstance() + : resourceSelector_; + } + } + /** + * + * + *
+     * Optional. Specifies a resource for analysis. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder> + getResourceSelectorFieldBuilder() { + if (resourceSelectorBuilder_ == null) { + resourceSelectorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder>( + getResourceSelector(), getParentForChildren(), isClean()); + resourceSelector_ = null; + } + return resourceSelectorBuilder_; + } + + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + identitySelector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder> + identitySelectorBuilder_; + /** + * + * + *
+     * Optional. Specifies an identity for analysis. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.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. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The identitySelector. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + getIdentitySelector() { + if (identitySelectorBuilder_ == null) { + return identitySelector_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + .getDefaultInstance() + : identitySelector_; + } else { + return identitySelectorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Specifies an identity for analysis. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIdentitySelector( + com.google.cloud.asset.v1p4beta1.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. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIdentitySelector( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector.Builder + builderForValue) { + if (identitySelectorBuilder_ == null) { + identitySelector_ = builderForValue.build(); + onChanged(); + } else { + identitySelectorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Specifies an identity for analysis. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeIdentitySelector( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector value) { + if (identitySelectorBuilder_ == null) { + if (identitySelector_ != null) { + identitySelector_ = + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector.newBuilder( + identitySelector_) + .mergeFrom(value) + .buildPartial(); + } else { + identitySelector_ = value; + } + onChanged(); + } else { + identitySelectorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Specifies an identity for analysis. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.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. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector.Builder + getIdentitySelectorBuilder() { + + onChanged(); + return getIdentitySelectorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Specifies an identity for analysis. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder + getIdentitySelectorOrBuilder() { + if (identitySelectorBuilder_ != null) { + return identitySelectorBuilder_.getMessageOrBuilder(); + } else { + return identitySelector_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector + .getDefaultInstance() + : identitySelector_; + } + } + /** + * + * + *
+     * Optional. Specifies an identity for analysis. Leaving it empty means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder> + getIdentitySelectorFieldBuilder() { + if (identitySelectorBuilder_ == null) { + identitySelectorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder>( + getIdentitySelector(), getParentForChildren(), isClean()); + identitySelector_ = null; + } + return identitySelectorBuilder_; + } + + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector accessSelector_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder> + accessSelectorBuilder_; + /** + * + * + *
+     * Optional. Specifies roles or permissions for analysis. Leaving it empty
+     * means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.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. Leaving it empty
+     * means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessSelector. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector + getAccessSelector() { + if (accessSelectorBuilder_ == null) { + return accessSelector_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector + .getDefaultInstance() + : accessSelector_; + } else { + return accessSelectorBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Specifies roles or permissions for analysis. Leaving it empty
+     * means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAccessSelector( + com.google.cloud.asset.v1p4beta1.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. Leaving it empty
+     * means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAccessSelector( + com.google.cloud.asset.v1p4beta1.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. Leaving it empty
+     * means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeAccessSelector( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector value) { + if (accessSelectorBuilder_ == null) { + if (accessSelector_ != null) { + accessSelector_ = + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector.newBuilder( + accessSelector_) + .mergeFrom(value) + .buildPartial(); + } else { + accessSelector_ = value; + } + onChanged(); + } else { + accessSelectorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Specifies roles or permissions for analysis. Leaving it empty
+     * means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.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. Leaving it empty
+     * means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector.Builder + getAccessSelectorBuilder() { + + onChanged(); + return getAccessSelectorFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Specifies roles or permissions for analysis. Leaving it empty
+     * means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder + getAccessSelectorOrBuilder() { + if (accessSelectorBuilder_ != null) { + return accessSelectorBuilder_.getMessageOrBuilder(); + } else { + return accessSelector_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector + .getDefaultInstance() + : accessSelector_; + } + } + /** + * + * + *
+     * Optional. Specifies roles or permissions for analysis. Leaving it empty
+     * means ANY.
+     * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder> + getAccessSelectorFieldBuilder() { + if (accessSelectorBuilder_ == null) { + accessSelectorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder>( + getAccessSelector(), getParentForChildren(), isClean()); + accessSelector_ = null; + } + return accessSelectorBuilder_; + } + + @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.v1p4beta1.IamPolicyAnalysisQuery) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisQuery getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisQueryOrBuilder.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisQueryOrBuilder.java new file mode 100644 index 000000000..837649001 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisQueryOrBuilder.java @@ -0,0 +1,183 @@ +/* + * 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/v1p4beta1/asset_service.proto + +package com.google.cloud.asset.v1p4beta1; + +public interface IamPolicyAnalysisQueryOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The relative name of the root asset. Only resources and IAM policies within
+   * the parent will be analyzed. This can only be an organization number (such
+   * as "organizations/123") or a folder number (such as "folders/123").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The relative name of the root asset. Only resources and IAM policies within
+   * the parent will be analyzed. This can only be an organization number (such
+   * as "organizations/123") or a folder number (such as "folders/123").
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Specifies a resource for analysis. Leaving it empty means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.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. Leaving it empty means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceSelector. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector getResourceSelector(); + /** + * + * + *
+   * Optional. Specifies a resource for analysis. Leaving it empty means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector resource_selector = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelectorOrBuilder + getResourceSelectorOrBuilder(); + + /** + * + * + *
+   * Optional. Specifies an identity for analysis. Leaving it empty means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.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. Leaving it empty means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The identitySelector. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector getIdentitySelector(); + /** + * + * + *
+   * Optional. Specifies an identity for analysis. Leaving it empty means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector identity_selector = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelectorOrBuilder + getIdentitySelectorOrBuilder(); + + /** + * + * + *
+   * Optional. Specifies roles or permissions for analysis. Leaving it empty
+   * means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.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. Leaving it empty
+   * means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The accessSelector. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector getAccessSelector(); + /** + * + * + *
+   * Optional. Specifies roles or permissions for analysis. Leaving it empty
+   * means ANY.
+   * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector access_selector = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelectorOrBuilder + getAccessSelectorOrBuilder(); +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisResult.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisResult.java new file mode 100644 index 000000000..abe06bb77 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisResult.java @@ -0,0 +1,11564 @@ +/* + * 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/v1p4beta1/assets.proto + +package com.google.cloud.asset.v1p4beta1; + +/** + * + * + *
+ * IAM Policy analysis result, consisting of one IAM policy binding and derived
+ * access control lists.
+ * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult} + */ +public final class IamPolicyAnalysisResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult + .AccessControlList>(); + mutable_bitField0_ |= 0x00000001; + } + accessControlLists_.add( + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList + .parser(), + extensionRegistry)); + break; + } + case 34: + { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList.Builder + subBuilder = null; + if (identityList_ != null) { + subBuilder = identityList_.toBuilder(); + } + identityList_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Builder.class); + } + + public interface AnalysisStateOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The Google standard error code that best describes the state.
+     * For example:
+     * - OK means the node has been successfully explored;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the node hasn't been explored 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 node has been successfully explored;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the node hasn't been explored 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(); + } + /** + * + * + *
+   * Represents analysis state of each node in the result graph or non-critical
+   * errors in the response.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState} + */ + public static final class AnalysisState extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState) + AnalysisStateOrBuilder { + private static final long serialVersionUID = 0L; + // Use AnalysisState.newBuilder() to construct. + private AnalysisState(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AnalysisState() { + code_ = 0; + cause_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AnalysisState(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AnalysisState( + 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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AnalysisState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AnalysisState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.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 node has been successfully explored;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the node hasn't been explored in time;
+     * 
+ * + * .google.rpc.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + public int getCodeValue() { + return code_; + } + /** + * + * + *
+     * The Google standard error code that best describes the state.
+     * For example:
+     * - OK means the node has been successfully explored;
+     * - PERMISSION_DENIED means an access denied error is encountered;
+     * - DEADLINE_EXCEEDED means the node hasn't been explored in time;
+     * 
+ * + * .google.rpc.Code code = 1; + * + * @return The code. + */ + 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. + */ + 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. + */ + 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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState other = + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState) 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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + 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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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 analysis state of each node in the result graph or non-critical
+     * errors in the response.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AnalysisState_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AnalysisState_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + .class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AnalysisState_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState result = + new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState(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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState) { + return mergeFrom( + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState other) { + if (other + == com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState) + 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 node has been successfully explored;
+       * - PERMISSION_DENIED means an access denied error is encountered;
+       * - DEADLINE_EXCEEDED means the node hasn't been explored in time;
+       * 
+ * + * .google.rpc.Code code = 1; + * + * @return The enum numeric value on the wire for code. + */ + public int getCodeValue() { + return code_; + } + /** + * + * + *
+       * The Google standard error code that best describes the state.
+       * For example:
+       * - OK means the node has been successfully explored;
+       * - PERMISSION_DENIED means an access denied error is encountered;
+       * - DEADLINE_EXCEEDED means the node hasn't been explored 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 node has been successfully explored;
+       * - PERMISSION_DENIED means an access denied error is encountered;
+       * - DEADLINE_EXCEEDED means the node hasn't been explored in time;
+       * 
+ * + * .google.rpc.Code code = 1; + * + * @return The code. + */ + 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 node has been successfully explored;
+       * - PERMISSION_DENIED means an access denied error is encountered;
+       * - DEADLINE_EXCEEDED means the node hasn't been explored 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 node has been successfully explored;
+       * - PERMISSION_DENIED means an access denied error is encountered;
+       * - DEADLINE_EXCEEDED means the node hasn't been explored 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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState(); + } + + public static com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AnalysisState parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AnalysisState(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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The [full resource name](https://aip.dev/122#full-resource-names).
+     * 
+ * + * string full_resource_name = 1; + * + * @return The fullResourceName. + */ + java.lang.String getFullResourceName(); + /** + * + * + *
+     * The [full resource name](https://aip.dev/122#full-resource-names).
+     * 
+ * + * string full_resource_name = 1; + * + * @return The bytes for fullResourceName. + */ + com.google.protobuf.ByteString getFullResourceNameBytes(); + + /** + * + * + *
+     * The analysis state of this resource node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + * + * @return Whether the analysisState field is set. + */ + boolean hasAnalysisState(); + /** + * + * + *
+     * The analysis state of this resource node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + * + * @return The analysisState. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState getAnalysisState(); + /** + * + * + *
+     * The analysis state of this resource node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder + getAnalysisStateOrBuilder(); + } + /** + * + * + *
+   * A GCP resource that appears in an access control list.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource} + */ + public static final class Resource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + subBuilder = null; + if (analysisState_ != null) { + subBuilder = analysisState_.toBuilder(); + } + analysisState_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource.class, + com.google.cloud.asset.v1p4beta1.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://aip.dev/122#full-resource-names).
+     * 
+ * + * string full_resource_name = 1; + * + * @return The fullResourceName. + */ + 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://aip.dev/122#full-resource-names).
+     * 
+ * + * string full_resource_name = 1; + * + * @return The bytes for fullResourceName. + */ + 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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysisState_; + /** + * + * + *
+     * The analysis state of this resource node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + * + * @return Whether the analysisState field is set. + */ + public boolean hasAnalysisState() { + return analysisState_ != null; + } + /** + * + * + *
+     * The analysis state of this resource node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + * + * @return The analysisState. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + getAnalysisState() { + return analysisState_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .getDefaultInstance() + : analysisState_; + } + /** + * + * + *
+     * The analysis state of this resource node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder + 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.v1p4beta1.IamPolicyAnalysisResult.Resource)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource other = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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 GCP resource that appears in an access control list.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.ResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Resource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Resource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource.Builder.class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Resource_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource result = + new com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource) { + return mergeFrom( + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource other) { + if (other + == com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.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://aip.dev/122#full-resource-names).
+       * 
+ * + * 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://aip.dev/122#full-resource-names).
+       * 
+ * + * 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://aip.dev/122#full-resource-names).
+       * 
+ * + * 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://aip.dev/122#full-resource-names).
+       * 
+ * + * string full_resource_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearFullResourceName() { + + fullResourceName_ = getDefaultInstance().getFullResourceName(); + onChanged(); + return this; + } + /** + * + * + *
+       * The [full resource name](https://aip.dev/122#full-resource-names).
+       * 
+ * + * 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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysisState_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder> + analysisStateBuilder_; + /** + * + * + *
+       * The analysis state of this resource node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + * + * @return Whether the analysisState field is set. + */ + public boolean hasAnalysisState() { + return analysisStateBuilder_ != null || analysisState_ != null; + } + /** + * + * + *
+       * The analysis state of this resource node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + * + * @return The analysisState. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + getAnalysisState() { + if (analysisStateBuilder_ == null) { + return analysisState_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .getDefaultInstance() + : analysisState_; + } else { + return analysisStateBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The analysis state of this resource node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + public Builder setAnalysisState( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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 node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + public Builder setAnalysisState( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + builderForValue) { + if (analysisStateBuilder_ == null) { + analysisState_ = builderForValue.build(); + onChanged(); + } else { + analysisStateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this resource node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + public Builder mergeAnalysisState( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState value) { + if (analysisStateBuilder_ == null) { + if (analysisState_ != null) { + analysisState_ = + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.newBuilder( + analysisState_) + .mergeFrom(value) + .buildPartial(); + } else { + analysisState_ = value; + } + onChanged(); + } else { + analysisStateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this resource node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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 node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + getAnalysisStateBuilder() { + + onChanged(); + return getAnalysisStateFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The analysis state of this resource node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder + getAnalysisStateOrBuilder() { + if (analysisStateBuilder_ != null) { + return analysisStateBuilder_.getMessageOrBuilder(); + } else { + return analysisState_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .getDefaultInstance() + : analysisState_; + } + } + /** + * + * + *
+       * The analysis state of this resource node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder> + getAnalysisStateFieldBuilder() { + if (analysisStateBuilder_ == null) { + analysisStateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder>( + 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.v1p4beta1.IamPolicyAnalysisResult.Resource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AccessOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.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 node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + * + * @return Whether the analysisState field is set. + */ + boolean hasAnalysisState(); + /** + * + * + *
+     * The analysis state of this access node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + * + * @return The analysisState. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState getAnalysisState(); + /** + * + * + *
+     * The analysis state of this access node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder + getAnalysisStateOrBuilder(); + + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access.OneofAccessCase + getOneofAccessCase(); + } + /** + * + * + *
+   * A role or permission that appears in an access control list.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access} + */ + public static final class Access extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + subBuilder = null; + if (analysisState_ != null) { + subBuilder = analysisState_.toBuilder(); + } + analysisState_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Access_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Access_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access.class, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysisState_; + /** + * + * + *
+     * The analysis state of this access node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + * + * @return Whether the analysisState field is set. + */ + public boolean hasAnalysisState() { + return analysisState_ != null; + } + /** + * + * + *
+     * The analysis state of this access node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + * + * @return The analysisState. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + getAnalysisState() { + return analysisState_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .getDefaultInstance() + : analysisState_; + } + /** + * + * + *
+     * The analysis state of this access node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder + 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.v1p4beta1.IamPolicyAnalysisResult.Access)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access other = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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; + } + /** + * + * + *
+     * A role or permission that appears in an access control list.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Access_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Access_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access.Builder.class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Access_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access result = + new com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access) { + return mergeFrom((com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access other) { + if (other + == com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.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. + */ + 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. + */ + 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. + */ + 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. + */ + 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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysisState_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder> + analysisStateBuilder_; + /** + * + * + *
+       * The analysis state of this access node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + * + * @return Whether the analysisState field is set. + */ + public boolean hasAnalysisState() { + return analysisStateBuilder_ != null || analysisState_ != null; + } + /** + * + * + *
+       * The analysis state of this access node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + * + * @return The analysisState. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + getAnalysisState() { + if (analysisStateBuilder_ == null) { + return analysisState_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .getDefaultInstance() + : analysisState_; + } else { + return analysisStateBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The analysis state of this access node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + */ + public Builder setAnalysisState( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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 node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + */ + public Builder setAnalysisState( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + builderForValue) { + if (analysisStateBuilder_ == null) { + analysisState_ = builderForValue.build(); + onChanged(); + } else { + analysisStateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this access node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + */ + public Builder mergeAnalysisState( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState value) { + if (analysisStateBuilder_ == null) { + if (analysisState_ != null) { + analysisState_ = + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.newBuilder( + analysisState_) + .mergeFrom(value) + .buildPartial(); + } else { + analysisState_ = value; + } + onChanged(); + } else { + analysisStateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this access node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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 node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + getAnalysisStateBuilder() { + + onChanged(); + return getAnalysisStateFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The analysis state of this access node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder + getAnalysisStateOrBuilder() { + if (analysisStateBuilder_ != null) { + return analysisStateBuilder_.getMessageOrBuilder(); + } else { + return analysisState_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .getDefaultInstance() + : analysisState_; + } + } + /** + * + * + *
+       * The analysis state of this access node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder> + getAnalysisStateFieldBuilder() { + if (analysisStateBuilder_ == null) { + analysisStateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder>( + 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.v1p4beta1.IamPolicyAnalysisResult.Access) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface EdgeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The source node of the edge.
+     * 
+ * + * string source_node = 1; + * + * @return The sourceNode. + */ + java.lang.String getSourceNode(); + /** + * + * + *
+     * The source node of the edge.
+     * 
+ * + * string source_node = 1; + * + * @return The bytes for sourceNode. + */ + com.google.protobuf.ByteString getSourceNodeBytes(); + + /** + * + * + *
+     * The target node of the edge.
+     * 
+ * + * string target_node = 2; + * + * @return The targetNode. + */ + java.lang.String getTargetNode(); + /** + * + * + *
+     * The target node of the edge.
+     * 
+ * + * string target_node = 2; + * + * @return The bytes for targetNode. + */ + com.google.protobuf.ByteString getTargetNodeBytes(); + } + /** + * + * + *
+   * A directional edge.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge} + */ + public static final class Edge extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Edge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Edge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.class, + com.google.cloud.asset.v1p4beta1.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.
+     * 
+ * + * string source_node = 1; + * + * @return The sourceNode. + */ + 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.
+     * 
+ * + * string source_node = 1; + * + * @return The bytes for sourceNode. + */ + 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.
+     * 
+ * + * string target_node = 2; + * + * @return The targetNode. + */ + 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.
+     * 
+ * + * string target_node = 2; + * + * @return The bytes for targetNode. + */ + 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.v1p4beta1.IamPolicyAnalysisResult.Edge)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge other = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.EdgeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Edge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Edge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Edge_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge result = + new com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge) { + return mergeFrom((com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge other) { + if (other + == com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.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.
+       * 
+ * + * 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.
+       * 
+ * + * 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.
+       * 
+ * + * 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.
+       * 
+ * + * string source_node = 1; + * + * @return This builder for chaining. + */ + public Builder clearSourceNode() { + + sourceNode_ = getDefaultInstance().getSourceNode(); + onChanged(); + return this; + } + /** + * + * + *
+       * The source node of the edge.
+       * 
+ * + * 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.
+       * 
+ * + * 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.
+       * 
+ * + * 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.
+       * 
+ * + * 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.
+       * 
+ * + * string target_node = 2; + * + * @return This builder for chaining. + */ + public Builder clearTargetNode() { + + targetNode_ = getDefaultInstance().getTargetNode(); + onChanged(); + return this; + } + /** + * + * + *
+       * The target node of the edge.
+       * 
+ * + * 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.v1p4beta1.IamPolicyAnalysisResult.Edge) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface IdentityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.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 node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + * + * @return Whether the analysisState field is set. + */ + boolean hasAnalysisState(); + /** + * + * + *
+     * The analysis state of this identity node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + * + * @return The analysisState. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState getAnalysisState(); + /** + * + * + *
+     * The analysis state of this identity node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder + getAnalysisStateOrBuilder(); + } + /** + * + * + *
+   * An identity that appears in an access control list.
+   * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity} + */ + public static final class Identity extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + subBuilder = null; + if (analysisState_ != null) { + subBuilder = analysisState_.toBuilder(); + } + analysisState_ = + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity.class, + com.google.cloud.asset.v1p4beta1.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. + */ + 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. + */ + 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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysisState_; + /** + * + * + *
+     * The analysis state of this identity node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + * + * @return Whether the analysisState field is set. + */ + public boolean hasAnalysisState() { + return analysisState_ != null; + } + /** + * + * + *
+     * The analysis state of this identity node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + * + * @return The analysisState. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + getAnalysisState() { + return analysisState_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .getDefaultInstance() + : analysisState_; + } + /** + * + * + *
+     * The analysis state of this identity node.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder + 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.v1p4beta1.IamPolicyAnalysisResult.Identity)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity other = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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 that appears in an access control list.
+     * 
+ * + * Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Identity_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Identity_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity.Builder.class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_Identity_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity result = + new com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity) { + return mergeFrom( + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity other) { + if (other + == com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysisState_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder> + analysisStateBuilder_; + /** + * + * + *
+       * The analysis state of this identity node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + * + * @return Whether the analysisState field is set. + */ + public boolean hasAnalysisState() { + return analysisStateBuilder_ != null || analysisState_ != null; + } + /** + * + * + *
+       * The analysis state of this identity node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + * + * @return The analysisState. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + getAnalysisState() { + if (analysisStateBuilder_ == null) { + return analysisState_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .getDefaultInstance() + : analysisState_; + } else { + return analysisStateBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The analysis state of this identity node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + public Builder setAnalysisState( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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 node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + public Builder setAnalysisState( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + builderForValue) { + if (analysisStateBuilder_ == null) { + analysisState_ = builderForValue.build(); + onChanged(); + } else { + analysisStateBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this identity node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + public Builder mergeAnalysisState( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState value) { + if (analysisStateBuilder_ == null) { + if (analysisState_ != null) { + analysisState_ = + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.newBuilder( + analysisState_) + .mergeFrom(value) + .buildPartial(); + } else { + analysisState_ = value; + } + onChanged(); + } else { + analysisStateBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The analysis state of this identity node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState 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 node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder + getAnalysisStateBuilder() { + + onChanged(); + return getAnalysisStateFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The analysis state of this identity node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder + getAnalysisStateOrBuilder() { + if (analysisStateBuilder_ != null) { + return analysisStateBuilder_.getMessageOrBuilder(); + } else { + return analysisState_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState + .getDefaultInstance() + : analysisState_; + } + } + /** + * + * + *
+       * The analysis state of this identity node.
+       * 
+ * + * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState analysis_state = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder> + getAnalysisStateFieldBuilder() { + if (analysisStateBuilder_ == null) { + analysisStateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisState.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AnalysisStateOrBuilder>( + 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.v1p4beta1.IamPolicyAnalysisResult.Identity) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AccessControlListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.ResourceOrBuilder> + 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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessOrBuilder> + 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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AccessControlList} + */ + public static final class AccessControlList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource>(); + mutable_bitField0_ |= 0x00000001; + } + resources_.add( + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource.parser(), + extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + accesses_ = + new java.util.ArrayList< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access>(); + mutable_bitField0_ |= 0x00000002; + } + accesses_.add( + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access.parser(), + extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + resourceEdges_ = + new java.util.ArrayList< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge>(); + mutable_bitField0_ |= 0x00000004; + } + resourceEdges_.add( + input.readMessage( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AccessControlList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList.class, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + 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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + 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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + 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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + 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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + 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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.EdgeOrBuilder> + 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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + 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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+     * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AccessControlList)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList other = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AccessControlList + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AccessControlList + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AccessControlList + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AccessControlList} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AccessControlList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AccessControlList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList.Builder + .class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_AccessControlList_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList + buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList result = + new com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AccessControlList) { + return mergeFrom( + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList other) { + if (other + == com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AccessControlList parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.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< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource>(resources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource.Builder, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder setResources( + int index, com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder setResources( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder addResources( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder addResources( + int index, com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder addResources( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder addResources( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public Builder addAllResources( + java.lang.Iterable< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource> + 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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource.Builder + addResourcesBuilder() { + return getResourcesFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource.Builder + addResourcesBuilder(int index) { + return getResourcesFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Resource resources = 1; + * + */ + public java.util.List< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource.Builder> + getResourcesBuilderList() { + return getResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.ResourceOrBuilder> + getResourcesFieldBuilder() { + if (resourcesBuilder_ == null) { + resourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Resource.Builder, + com.google.cloud.asset.v1p4beta1.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< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access>(accesses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access.Builder, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public Builder setAccesses( + int index, com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public Builder setAccesses( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public Builder addAccesses( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public Builder addAccesses( + int index, com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public Builder addAccesses( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public Builder addAccesses( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public Builder addAllAccesses( + java.lang.Iterable< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access> + 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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access.Builder + addAccessesBuilder() { + return getAccessesFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access.Builder + addAccessesBuilder(int index) { + return getAccessesFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Access accesses = 2; + * + */ + public java.util.List + getAccessesBuilderList() { + return getAccessesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessOrBuilder> + getAccessesFieldBuilder() { + if (accessesBuilder_ == null) { + accessesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Access.Builder, + com.google.cloud.asset.v1p4beta1.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< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge>(resourceEdges_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.Builder, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder setResourceEdges( + int index, com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder setResourceEdges( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder addResourceEdges( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder addResourceEdges( + int index, com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder addResourceEdges( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder addResourceEdges( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public Builder addAllResourceEdges( + java.lang.Iterable< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge> + 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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.Builder + addResourceEdgesBuilder() { + return getResourceEdgesFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.Builder + addResourceEdgesBuilder(int index) { + return getResourceEdgesFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains
+       * the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge resource_edges = 3; + * + */ + public java.util.List + getResourceEdgesBuilderList() { + return getResourceEdgesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.EdgeOrBuilder> + getResourceEdgesFieldBuilder() { + if (resourceEdgesBuilder_ == null) { + resourceEdgesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.Builder, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AccessControlList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.AccessControlList + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface IdentityListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityOrBuilder> + 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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as "group:parent@google.com". The
+     * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as "group:parent@google.com". The
+     * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as "group:parent@google.com". The
+     * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as "group:parent@google.com". The
+     * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as "group:parent@google.com". The
+     * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.EdgeOrBuilder getGroupEdgesOrBuilder( + int index); + } + /** Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList} */ + public static final class IdentityList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity>(); + mutable_bitField0_ |= 0x00000001; + } + identities_.add( + input.readMessage( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity.parser(), + extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + groupEdges_ = + new java.util.ArrayList< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge>(); + mutable_bitField0_ |= 0x00000002; + } + groupEdges_.add( + input.readMessage( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_IdentityList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList.class, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + 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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + 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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as "group:parent@google.com". The
+     * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + 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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as "group:parent@google.com". The
+     * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.EdgeOrBuilder> + 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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as "group:parent@google.com". The
+     * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + 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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as "group:parent@google.com". The
+     * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+     * contains a group, such as "group:parent@google.com". The
+     * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList other = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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; + } + /** Protobuf type {@code google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_IdentityList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_IdentityList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList.Builder + .class); + } + + // Construct using + // com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_IdentityList_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList + getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList result = + new com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList) { + return mergeFrom( + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList other) { + if (other + == com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.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< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity>(identities_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity.Builder, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder setIdentities( + int index, com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder setIdentities( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder addIdentities( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder addIdentities( + int index, com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder addIdentities( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder addIdentities( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public Builder addAllIdentities( + java.lang.Iterable< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity> + 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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity.Builder + addIdentitiesBuilder() { + return getIdentitiesFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity.Builder + addIdentitiesBuilder(int index) { + return getIdentitiesFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Identity identities = 1; + * + */ + public java.util.List< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity.Builder> + getIdentitiesBuilderList() { + return getIdentitiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityOrBuilder> + getIdentitiesFieldBuilder() { + if (identitiesBuilder_ == null) { + identitiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Identity.Builder, + com.google.cloud.asset.v1p4beta1.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< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge>(groupEdges_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.Builder, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public Builder setGroupEdges( + int index, com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public Builder setGroupEdges( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public Builder addGroupEdges( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public Builder addGroupEdges( + int index, com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public Builder addGroupEdges( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public Builder addGroupEdges( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public Builder addAllGroupEdges( + java.lang.Iterable< + ? extends com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge> + 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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public java.util.List< + ? extends com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.Builder + addGroupEdgesBuilder() { + return getGroupEdgesFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.Builder + addGroupEdgesBuilder(int index) { + return getGroupEdgesFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node]
+       * contains a group, such as "group:parent@google.com". The
+       * [Edge.target_node][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.Edge group_edges = 2; + * + */ + public java.util.List + getGroupEdgesBuilderList() { + return getGroupEdgesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.EdgeOrBuilder> + getGroupEdgesFieldBuilder() { + if (groupEdgesBuilder_ == null) { + groupEdgesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.Builder, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.IdentityList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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 name of the resource to which the [iam_binding][google.cloud.asset.v1p4beta1.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) { + 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 name of the resource to which the [iam_binding][google.cloud.asset.v1p4beta1.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 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. + */ + public boolean hasIamBinding() { + return 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() { + return iamBinding_ == null ? com.google.iam.v1.Binding.getDefaultInstance() : iamBinding_; + } + /** + * + * + *
+   * The Cloud IAM policy binding under analysis.
+   * 
+ * + * .google.iam.v1.Binding iam_binding = 2; + */ + 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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match resource and access selectors specified in the request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public java.util.List + getAccessControlListsList() { + return accessControlLists_; + } + /** + * + * + *
+   * The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match resource and access selectors specified in the request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlListOrBuilder> + getAccessControlListsOrBuilderList() { + return accessControlLists_; + } + /** + * + * + *
+   * The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match resource and access selectors specified in the request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public int getAccessControlListsCount() { + return accessControlLists_.size(); + } + /** + * + * + *
+   * The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match resource and access selectors specified in the request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList + getAccessControlLists(int index) { + return accessControlLists_.get(index); + } + /** + * + * + *
+   * The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match resource and access selectors specified in the request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlListOrBuilder + getAccessControlListsOrBuilder(int index) { + return accessControlLists_.get(index); + } + + public static final int IDENTITY_LIST_FIELD_NUMBER = 4; + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identityList_; + /** + * + * + *
+   * The identity list derived from members of the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + * + * @return Whether the identityList field is set. + */ + public boolean hasIdentityList() { + return identityList_ != null; + } + /** + * + * + *
+   * The identity list derived from members of the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + * + * @return The identityList. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList getIdentityList() { + return identityList_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList.getDefaultInstance() + : identityList_; + } + /** + * + * + *
+   * The identity list derived from members of the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityListOrBuilder + getIdentityListOrBuilder() { + return getIdentityList(); + } + + public static final int FULLY_EXPLORED_FIELD_NUMBER = 5; + private boolean fullyExplored_; + /** + * + * + *
+   * Represents whether all nodes in the transitive closure of the
+   * [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] node have been explored.
+   * 
+ * + * bool fully_explored = 5; + * + * @return The fullyExplored. + */ + 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.v1p4beta1.IamPolicyAnalysisResult)) { + return super.equals(obj); + } + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult other = + (com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult) + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.class, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Builder.class); + } + + // Construct using com.google.cloud.asset.v1p4beta1.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.v1p4beta1.AssetProto + .internal_static_google_cloud_asset_v1p4beta1_IamPolicyAnalysisResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult getDefaultInstanceForType() { + return com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult build() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult buildPartial() { + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult result = + new com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult) { + return mergeFrom((com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult other) { + if (other == com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object attachedResourceFullName_ = ""; + /** + * + * + *
+     * The full name of the resource to which the [iam_binding][google.cloud.asset.v1p4beta1.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 name of the resource to which the [iam_binding][google.cloud.asset.v1p4beta1.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 name of the resource to which the [iam_binding][google.cloud.asset.v1p4beta1.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 name of the resource to which the [iam_binding][google.cloud.asset.v1p4beta1.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 name of the resource to which the [iam_binding][google.cloud.asset.v1p4beta1.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< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList> + accessControlLists_ = java.util.Collections.emptyList(); + + private void ensureAccessControlListsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + accessControlLists_ = + new java.util.ArrayList< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList>( + accessControlLists_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlListOrBuilder> + accessControlListsBuilder_; + + /** + * + * + *
+     * The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public java.util.List< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList> + 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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder setAccessControlLists( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder setAccessControlLists( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder addAccessControlLists( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder addAccessControlLists( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder addAccessControlLists( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder addAccessControlLists( + int index, + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public Builder addAllAccessControlLists( + java.lang.Iterable< + ? extends + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList.Builder + getAccessControlListsBuilder(int index) { + return getAccessControlListsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public java.util.List< + ? extends + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList.Builder + addAccessControlListsBuilder() { + return getAccessControlListsFieldBuilder() + .addBuilder( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList + .getDefaultInstance()); + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList.Builder + addAccessControlListsBuilder(int index) { + return getAccessControlListsFieldBuilder() + .addBuilder( + index, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList + .getDefaultInstance()); + } + /** + * + * + *
+     * The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match resource and access selectors specified in the request.
+     * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + public java.util.List< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList.Builder> + getAccessControlListsBuilderList() { + return getAccessControlListsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlListOrBuilder> + getAccessControlListsFieldBuilder() { + if (accessControlListsBuilder_ == null) { + accessControlListsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult + .AccessControlListOrBuilder>( + accessControlLists_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + accessControlLists_ = null; + } + return accessControlListsBuilder_; + } + + private com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identityList_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityListOrBuilder> + identityListBuilder_; + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + * + * @return The identityList. + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList getIdentityList() { + if (identityListBuilder_ == null) { + return identityList_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList + .getDefaultInstance() + : identityList_; + } else { + return identityListBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + */ + public Builder setIdentityList( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + */ + public Builder setIdentityList( + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + */ + public Builder mergeIdentityList( + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList value) { + if (identityListBuilder_ == null) { + if (identityList_ != null) { + identityList_ = + com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList.Builder + getIdentityListBuilder() { + + onChanged(); + return getIdentityListFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + */ + public com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityListOrBuilder + getIdentityListOrBuilder() { + if (identityListBuilder_ != null) { + return identityListBuilder_.getMessageOrBuilder(); + } else { + return identityList_ == null + ? com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList + .getDefaultInstance() + : identityList_; + } + } + /** + * + * + *
+     * The identity list derived from members of the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+     * potentially match identity selector specified in the request.
+     * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityListOrBuilder> + getIdentityListFieldBuilder() { + if (identityListBuilder_ == null) { + identityListBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList.Builder, + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityListOrBuilder>( + getIdentityList(), getParentForChildren(), isClean()); + identityList_ = null; + } + return identityListBuilder_; + } + + private boolean fullyExplored_; + /** + * + * + *
+     * Represents whether all nodes in the transitive closure of the
+     * [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] node have been explored.
+     * 
+ * + * bool fully_explored = 5; + * + * @return The fullyExplored. + */ + public boolean getFullyExplored() { + return fullyExplored_; + } + /** + * + * + *
+     * Represents whether all nodes in the transitive closure of the
+     * [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] node have been explored.
+     * 
+ * + * 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 nodes in the transitive closure of the
+     * [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] node have been explored.
+     * 
+ * + * 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.v1p4beta1.IamPolicyAnalysisResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult) + private static final com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult(); + } + + public static com.google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisResultOrBuilder.java b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/IamPolicyAnalysisResultOrBuilder.java new file mode 100644 index 000000000..6f6947fd1 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/java/com/google/cloud/asset/v1p4beta1/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/v1p4beta1/assets.proto + +package com.google.cloud.asset.v1p4beta1; + +public interface IamPolicyAnalysisResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The full name of the resource to which the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] policy attaches.
+   * 
+ * + * string attached_resource_full_name = 1; + * + * @return The attachedResourceFullName. + */ + java.lang.String getAttachedResourceFullName(); + /** + * + * + *
+   * The full name of the resource to which the [iam_binding][google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match resource and access selectors specified in the request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + java.util.List + getAccessControlListsList(); + /** + * + * + *
+   * The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match resource and access selectors specified in the request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList getAccessControlLists( + int index); + /** + * + * + *
+   * The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match resource and access selectors specified in the request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + int getAccessControlListsCount(); + /** + * + * + *
+   * The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match resource and access selectors specified in the request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + java.util.List< + ? extends + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlListOrBuilder> + getAccessControlListsOrBuilderList(); + /** + * + * + *
+   * The access control lists derived from the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match resource and access selectors specified in the request.
+   * 
+ * + * + * repeated .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlList access_control_lists = 3; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.AccessControlListOrBuilder + getAccessControlListsOrBuilder(int index); + + /** + * + * + *
+   * The identity list derived from members of the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + * + * @return The identityList. + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList getIdentityList(); + /** + * + * + *
+   * The identity list derived from members of the [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or
+   * potentially match identity selector specified in the request.
+   * 
+ * + * .google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityList identity_list = 4; + * + */ + com.google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.IdentityListOrBuilder + getIdentityListOrBuilder(); + + /** + * + * + *
+   * Represents whether all nodes in the transitive closure of the
+   * [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] node have been explored.
+   * 
+ * + * bool fully_explored = 5; + * + * @return The fullyExplored. + */ + boolean getFullyExplored(); +} diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/proto/google/cloud/asset/v1p4beta1/asset_service.proto b/proto-google-cloud-asset-v1p4beta1/src/main/proto/google/cloud/asset/v1p4beta1/asset_service.proto new file mode 100644 index 000000000..e32ef0575 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/proto/google/cloud/asset/v1p4beta1/asset_service.proto @@ -0,0 +1,343 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.asset.v1p4beta1; + +import "google/api/annotations.proto"; +import "google/api/field_behavior.proto"; +import "google/cloud/asset/v1p4beta1/assets.proto"; +import "google/iam/v1/policy.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/api/client.proto"; + +option csharp_namespace = "Google.Cloud.Asset.V1P4Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p4beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetServiceProto"; +option java_package = "com.google.cloud.asset.v1p4beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p4beta1"; + +// Asset service definition. +service AssetService { + option (google.api.default_host) = "cloudasset.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Analyzes IAM policies based on the specified request. Returns + // a list of [IamPolicyAnalysisResult][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult] matching the request. + rpc AnalyzeIamPolicy(AnalyzeIamPolicyRequest) returns (AnalyzeIamPolicyResponse) { + option (google.api.http) = { + get: "/v1p4beta1/{analysis_query.parent=*/*}:analyzeIamPolicy" + }; + } + + // Exports IAM policy analysis based on the specified request. This API + // implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing you to keep + // track of the export. The metadata contains the request to help callers to + // map responses to requests. + rpc ExportIamPolicyAnalysis(ExportIamPolicyAnalysisRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1p4beta1/{analysis_query.parent=*/*}:exportIamPolicyAnalysis" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisResponse" + metadata_type: "google.cloud.asset.v1p4beta1.ExportIamPolicyAnalysisRequest" + }; + } +} + +// 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. At least one of [ResourceSelector][google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.ResourceSelector], [IdentitySelector][google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.IdentitySelector] or + // [AccessSelector][google.cloud.asset.v1p4beta1.IamPolicyAnalysisQuery.AccessSelector] must be specified in a request. + message ResourceSelector { + // Required. The [full resource + // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // . + 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). + 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 identities and resources + // matching any of them. + 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]; + } + + // Required. The relative name of the root asset. Only resources and IAM policies within + // the parent will be analyzed. This can only be an organization number (such + // as "organizations/123") or a folder number (such as "folders/123"). + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Specifies a resource for analysis. Leaving it empty means ANY. + ResourceSelector resource_selector = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies an identity for analysis. Leaving it empty means ANY. + IdentitySelector identity_selector = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies roles or permissions for analysis. Leaving it empty + // means ANY. + AccessSelector access_selector = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request message for [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1p4beta1.AssetService.AnalyzeIamPolicy]. +message AnalyzeIamPolicyRequest { + // Contains request options. + message Options { + // Optional. If true, the identities section of the result will expand any + // Google groups appearing in an IAM policy binding. + // + // If [identity_selector][] is specified, the identity in the result will + // be determined by the selector, and this flag will have no effect. + // + // 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 [access_selector][] is specified, the access section of the result + // will be determined by the selector, and this flag will have no effect. + // + // Default is false. + bool expand_roles = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, 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 [resource_selector][] is specified, the resource section of the result + // will be determined by the selector, and this flag will have no effect. + // 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 ExportIamPolicyAnalysis rpc instead. + // + // For example, if the request analyzes for which resources user A has + // permission P, and there's an IAM policy states user A has + // iam.serviceAccounts.getAccessToken permission to a service account SA, + // and there's another IAM policy states service account SA has permission P + // to a GCP folder F, then user A potentially has access to the GCP folder + // F. And those advanced analysis results will be included in + // [AnalyzeIamPolicyResponse.service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. + // + // Default is false. + bool analyze_service_account_impersonation = 6 [(google.api.field_behavior) = OPTIONAL]; + + // 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 = 7 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The request query. + IamPolicyAnalysisQuery analysis_query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The request options. + Options options = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response message for [AssetService.AnalyzeIamPolicy][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.IamPolicyAnalysis.analysis_results] have been + // fully explored to answer the query. + bool fully_explored = 3; + } + + // 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.v1p4beta1.AnalyzeIamPolicyResponse.main_analysis] and + // [service_account_impersonation_analysis][google.cloud.asset.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis] have been fully explored to + // answer the query in the request. + bool fully_explored = 3; + + // A list of non-critical errors happened during the request handling to + // explain why `fully_explored` is false, or empty if no error happened. + repeated IamPolicyAnalysisResult.AnalysisState non_critical_errors = 4; +} + +// 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 [Viewing and + // Editing Object + // Metadata](https://cloud.google.com/storage/docs/viewing-editing-metadata) + // for more information. + string uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // IAM policy analysis export destination. + oneof destination { + // Destination on Cloud Storage. + GcsDestination gcs_destination = 1; + } +} + +// A request message for [AssetService.ExportIamPolicyAnalysis][google.cloud.asset.v1p4beta1.AssetService.ExportIamPolicyAnalysis]. +message ExportIamPolicyAnalysisRequest { + // Contains request options. + message Options { + // Optional. If true, the identities section of the result will expand any + // Google groups appearing in an IAM policy binding. + // + // If [identity_selector][] is specified, the identity in the result will + // be determined by the selector, and this flag will have no effect. + // + // 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 [access_selector][] is specified, the access section of the result + // will be determined by the selector, and this flag will have no effect. + // + // Default is false. + bool expand_roles = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, 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 [resource_selector][] is specified, the resource section of the result + // will be determined by the selector, and this flag will have no effect. + // 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. + // + // 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.v1p4beta1.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.v1p4beta1.AnalyzeIamPolicyResponse.service_account_impersonation_analysis]. + // + // Default is false. + bool analyze_service_account_impersonation = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The request query. + IamPolicyAnalysisQuery analysis_query = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The request options. + Options options = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Output configuration indicating where the results will be output to. + IamPolicyAnalysisOutputConfig output_config = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The export IAM policy analysis response. This message is returned by the +// [google.longrunning.Operations.GetOperation][] method in the returned +// [google.longrunning.Operation.response][] field. +message ExportIamPolicyAnalysisResponse { + // Output configuration indicating where the results were output to. + IamPolicyAnalysisOutputConfig output_config = 1; +} \ No newline at end of file diff --git a/proto-google-cloud-asset-v1p4beta1/src/main/proto/google/cloud/asset/v1p4beta1/assets.proto b/proto-google-cloud-asset-v1p4beta1/src/main/proto/google/cloud/asset/v1p4beta1/assets.proto new file mode 100644 index 000000000..0d7c5e055 --- /dev/null +++ b/proto-google-cloud-asset-v1p4beta1/src/main/proto/google/cloud/asset/v1p4beta1/assets.proto @@ -0,0 +1,167 @@ +// 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.asset.v1p4beta1; + +import "google/iam/v1/policy.proto"; +import "google/rpc/code.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Asset.V1P4Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p4beta1;asset"; +option java_multiple_files = true; +option java_outer_classname = "AssetProto"; +option java_package = "com.google.cloud.asset.v1p4beta1"; +option php_namespace = "Google\\Cloud\\Asset\\V1p4beta1"; + +// IAM Policy analysis result, consisting of one IAM policy binding and derived +// access control lists. +message IamPolicyAnalysisResult { + // Represents analysis state of each node in the result graph or non-critical + // errors in the response. + message AnalysisState { + // The Google standard error code that best describes the state. + // For example: + // - OK means the node has been successfully explored; + // - PERMISSION_DENIED means an access denied error is encountered; + // - DEADLINE_EXCEEDED means the node hasn't been explored in time; + google.rpc.Code code = 1; + + // The human-readable description of the cause of failure. + string cause = 2; + } + + // A GCP resource that appears in an access control list. + message Resource { + // The [full resource name](https://aip.dev/122#full-resource-names). + string full_resource_name = 1; + + // The analysis state of this resource node. + AnalysisState analysis_state = 2; + } + + // A role or permission that appears in an access control list. + message Access { + oneof oneof_access { + // The role. + string role = 1; + + // The permission. + string permission = 2; + } + + // The analysis state of this access node. + AnalysisState analysis_state = 3; + } + + // A directional edge. + message Edge { + // The source node of the edge. + string source_node = 1; + + // The target node of the edge. + string target_node = 2; + } + + // An identity that appears in an access control list. + 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 node. + AnalysisState analysis_state = 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.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] contains + // the full resource name of a parent resource and [Edge.target_node][google.cloud.asset.v1p4beta1.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; + } + + 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.v1p4beta1.IamPolicyAnalysisResult.IdentityList.identities]. The [Edge.source_node][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.Edge.source_node] + // contains a group, such as "group:parent@google.com". The + // [Edge.target_node][google.cloud.asset.v1p4beta1.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 name of the resource to which the [iam_binding][google.cloud.asset.v1p4beta1.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.v1p4beta1.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.v1p4beta1.IamPolicyAnalysisResult.iam_binding] that match or + // potentially match identity selector specified in the request. + IdentityList identity_list = 4; + + // Represents whether all nodes in the transitive closure of the + // [iam_binding][google.cloud.asset.v1p4beta1.IamPolicyAnalysisResult.iam_binding] node have been explored. + bool fully_explored = 5; +} diff --git a/synth.metadata b/synth.metadata index f9868bb44..5eac827fd 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,26 +1,18 @@ { - "updateTime": "2020-01-31T21:46:32.951616Z", + "updateTime": "2020-03-12T14:29:32.219731Z", "sources": [ { "generator": { "name": "artman", - "version": "0.44.4", - "dockerImage": "googleapis/artman@sha256:19e945954fc960a4bdfee6cb34695898ab21a8cf0bac063ee39b91f00a1faec8" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "60bb5a294a604fd1778c7ec87b265d13a7106171", - "internalRef": "292604980" + "version": "1.1.0", + "dockerImage": "googleapis/artman@sha256:f54b7644a1d2e7a37b23f5c0dfe9bba473e41c675002a507a244389e27487ca9" } }, { "template": { "name": "java_library", "origin": "synthtool.gcp", - "version": "2019.10.17" + "version": "2020.2.4" } } ], @@ -64,6 +56,15 @@ "generator": "gapic", "config": "google/cloud/asset/v1p1beta1/artman_cloudasset_v1p1beta1.yaml" } + }, + { + "client": { + "source": "googleapis", + "apiName": "asset", + "apiVersion": "v1p4beta1", + "language": "java", + "generator": "bazel" + } } ] } \ No newline at end of file diff --git a/synth.py b/synth.py index 67a5ad508..1005005ab 100644 --- a/synth.py +++ b/synth.py @@ -43,4 +43,9 @@ gapic=gapic, ) +java.bazel_library( + service=service, + version='v1p4beta1', +) + java.common_templates() \ No newline at end of file diff --git a/versions.txt b/versions.txt index 062d9bde9..985b5c582 100644 --- a/versions.txt +++ b/versions.txt @@ -5,8 +5,10 @@ proto-google-cloud-asset-v1:1.0.0:1.0.0 proto-google-cloud-asset-v1p1beta1:0.85.0:0.85.0 proto-google-cloud-asset-v1p2beta1:0.85.0:0.85.0 proto-google-cloud-asset-v1beta1:0.85.0:0.85.0 +proto-google-cloud-asset-v1p4beta1:0.85.0:0.85.0 grpc-google-cloud-asset-v1:1.0.0:1.0.0 grpc-google-cloud-asset-v1beta1:0.85.0:0.85.0 grpc-google-cloud-asset-v1p1beta1:0.85.0:0.85.0 grpc-google-cloud-asset-v1p2beta1:0.85.0:0.85.0 +grpc-google-cloud-asset-v1p4beta1:0.85.0:0.85.0 google-cloud-asset:1.0.0:1.0.0