diff --git a/google-cloud-asset-bom/pom.xml b/google-cloud-asset-bom/pom.xml
index b24609654..8493023d5 100644
--- a/google-cloud-asset-bom/pom.xml
+++ b/google-cloud-asset-bom/pom.xml
@@ -76,11 +76,21 @@
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:
+ *
+ * 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:
+ *
+ * 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:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The default instance has everything set to sensible defaults:
+ *
+ * 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 searchResources to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ================== AssetServiceClient ==================
+ *
+ * Service Description: Asset service definition.
+ *
+ * Sample for AssetServiceClient:
+ *
+ * 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 {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * 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 searchResources to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction 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 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
+ *
+ *
+ *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * String query = "";
+ * List<String> assetTypes = new ArrayList<>();
+ * for (StandardResourceMetadata element : assetServiceClient.searchResources(scope, query, assetTypes).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ * To customize the endpoint:
+ *
+ *
+ * AssetServiceSettings assetServiceSettings =
+ * AssetServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * AssetServiceClient assetServiceClient =
+ * AssetServiceClient.create(assetServiceSettings);
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class AssetServiceClient implements BackgroundResource {
+ private final AssetServiceSettings settings;
+ private final AssetServiceStub stub;
+
+ /** 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();
+ }
+
+ @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;
+ }
+
+ 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;
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Searches resources which are accessible with .get permission.
+ *
+ *
+ * AssetServiceSettings assetServiceSettings =
+ * AssetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * AssetServiceClient assetServiceClient =
+ * AssetServiceClient.create(assetServiceSettings);
+ *
+ *
+ *
+ * @param scope Required. The relative name of an asset. The search is limited to the resources
+ * within the `scope`. The allowed value must be: * Organization number (such as
+ * "organizations/123") * Folder number(such as "folders/1234") * Project number (such
+ * as "projects/12345")
+ * @param query Optional. The query statement.
+ * @param assetTypes Optional. A list of asset types that this request searches for. If empty, it
+ * will search all the supported asset types.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchResourcesPagedResponse searchResources(
+ String scope, String query, List
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * String query = "";
+ * List<String> assetTypes = new ArrayList<>();
+ * for (StandardResourceMetadata element : assetServiceClient.searchResources(scope, query, assetTypes).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @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 SearchResourcesPagedResponse searchResources(SearchResourcesRequest request) {
+ return searchResourcesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Searches resources which are accessible with .get permission.
+ *
+ *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * SearchResourcesRequest request = SearchResourcesRequest.newBuilder()
+ * .setScope(scope)
+ * .build();
+ * for (StandardResourceMetadata element : assetServiceClient.searchResources(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * SearchResourcesRequest request = SearchResourcesRequest.newBuilder()
+ * .setScope(scope)
+ * .build();
+ * ApiFuture<SearchResourcesPagedResponse> future = assetServiceClient.searchResourcesPagedCallable().futureCall(request);
+ * // Do something
+ * for (StandardResourceMetadata element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * SearchResourcesRequest request = SearchResourcesRequest.newBuilder()
+ * .setScope(scope)
+ * .build();
+ * while (true) {
+ * SearchResourcesResponse response = assetServiceClient.searchResourcesCallable().call(request);
+ * for (StandardResourceMetadata element : response.getResultsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ *
+ * @param scope Required. The relative name of an asset. The search is limited to the resources
+ * within the `scope`. The allowed value must be: * Organization number (such as
+ * "organizations/123") * Folder number(such as "folders/1234") * Project number (such
+ * as "projects/12345")
+ * @param query Optional. The query statement. Examples: *
+ * "policy:myuser{@literal @}mydomain.com" * "policy:(myuser{@literal @}mydomain.com
+ * viewer)"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchIamPoliciesPagedResponse searchIamPolicies(String scope, String query) {
+ SearchIamPoliciesRequest request =
+ SearchIamPoliciesRequest.newBuilder().setScope(scope).setQuery(query).build();
+ return searchIamPolicies(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Searches IAM policies which are accessible with .getIamPolicy permission.
+ *
+ *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * String query = "";
+ * for (IamPolicySearchResult element : assetServiceClient.searchIamPolicies(scope, query).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @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 SearchIamPoliciesPagedResponse searchIamPolicies(SearchIamPoliciesRequest request) {
+ return searchIamPoliciesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Searches IAM policies which are accessible with .getIamPolicy permission.
+ *
+ *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * SearchIamPoliciesRequest request = SearchIamPoliciesRequest.newBuilder()
+ * .setScope(scope)
+ * .build();
+ * for (IamPolicySearchResult element : assetServiceClient.searchIamPolicies(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * SearchIamPoliciesRequest request = SearchIamPoliciesRequest.newBuilder()
+ * .setScope(scope)
+ * .build();
+ * ApiFuture<SearchIamPoliciesPagedResponse> future = assetServiceClient.searchIamPoliciesPagedCallable().futureCall(request);
+ * // Do something
+ * for (IamPolicySearchResult element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * SearchIamPoliciesRequest request = SearchIamPoliciesRequest.newBuilder()
+ * .setScope(scope)
+ * .build();
+ * while (true) {
+ * SearchIamPoliciesResponse response = assetServiceClient.searchIamPoliciesCallable().call(request);
+ * for (IamPolicySearchResult element : response.getResultsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ *
+ * @param scope Required. The relative name of an asset. The search is limited to the resources
+ * within the `scope`. The allowed value must be: * Organization number (such as
+ * "organizations/123") * Folder number(such as "folders/1234") * Project number (such
+ * as "projects/12345")
+ * @param query Optional. The query statement.
+ * @param assetTypes Optional. A list of asset types that this request searches for. If empty, it
+ * will search all the supported asset types.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchAllResourcesPagedResponse searchAllResources(
+ String scope, String query, List
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * String query = "";
+ * List<String> assetTypes = new ArrayList<>();
+ * for (StandardResourceMetadata element : assetServiceClient.searchAllResources(scope, query, assetTypes).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @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 SearchAllResourcesPagedResponse searchAllResources(
+ SearchAllResourcesRequest request) {
+ return searchAllResourcesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Searches all the resources under a given accessible CRM scope (project/folder/organization).
+ * This RPC gives callers especially admins the ability to search all the resources under a scope,
+ * even if they don't have .get permission of all the resources. Callers should have
+ * cloud.assets.SearchAllResources permission on the requested scope, otherwise it will be
+ * rejected.
+ *
+ *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * SearchAllResourcesRequest request = SearchAllResourcesRequest.newBuilder()
+ * .setScope(scope)
+ * .build();
+ * for (StandardResourceMetadata element : assetServiceClient.searchAllResources(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * SearchAllResourcesRequest request = SearchAllResourcesRequest.newBuilder()
+ * .setScope(scope)
+ * .build();
+ * ApiFuture<SearchAllResourcesPagedResponse> future = assetServiceClient.searchAllResourcesPagedCallable().futureCall(request);
+ * // Do something
+ * for (StandardResourceMetadata element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * SearchAllResourcesRequest request = SearchAllResourcesRequest.newBuilder()
+ * .setScope(scope)
+ * .build();
+ * while (true) {
+ * SearchAllResourcesResponse response = assetServiceClient.searchAllResourcesCallable().call(request);
+ * for (StandardResourceMetadata element : response.getResultsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ *
+ * @param scope Required. The relative name of an asset. The search is limited to the resources
+ * within the `scope`. The allowed value must be: * Organization number (such as
+ * "organizations/123") * Folder number(such as "folders/1234") * Project number (such
+ * as "projects/12345")
+ * @param query Optional. The query statement. Examples: *
+ * "policy:myuser{@literal @}mydomain.com" * "policy:(myuser{@literal @}mydomain.com
+ * viewer)"
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchAllIamPoliciesPagedResponse searchAllIamPolicies(String scope, String query) {
+ SearchAllIamPoliciesRequest request =
+ SearchAllIamPoliciesRequest.newBuilder().setScope(scope).setQuery(query).build();
+ return searchAllIamPolicies(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Searches all the IAM policies under a given accessible CRM scope (project/folder/organization).
+ * This RPC gives callers especially admins the ability to search all the IAM policies under a
+ * scope, even if they don't have .getIamPolicy permission of all the IAM policies. Callers should
+ * have cloud.assets.SearchAllIamPolicies permission on the requested scope, otherwise it will be
+ * rejected.
+ *
+ *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * String query = "";
+ * for (IamPolicySearchResult element : assetServiceClient.searchAllIamPolicies(scope, query).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @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 SearchAllIamPoliciesPagedResponse searchAllIamPolicies(
+ SearchAllIamPoliciesRequest request) {
+ return searchAllIamPoliciesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Searches all the IAM policies under a given accessible CRM scope (project/folder/organization).
+ * This RPC gives callers especially admins the ability to search all the IAM policies under a
+ * scope, even if they don't have .getIamPolicy permission of all the IAM policies. Callers should
+ * have cloud.assets.SearchAllIamPolicies permission on the requested scope, otherwise it will be
+ * rejected.
+ *
+ *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * SearchAllIamPoliciesRequest request = SearchAllIamPoliciesRequest.newBuilder()
+ * .setScope(scope)
+ * .build();
+ * for (IamPolicySearchResult element : assetServiceClient.searchAllIamPolicies(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * SearchAllIamPoliciesRequest request = SearchAllIamPoliciesRequest.newBuilder()
+ * .setScope(scope)
+ * .build();
+ * ApiFuture<SearchAllIamPoliciesPagedResponse> future = assetServiceClient.searchAllIamPoliciesPagedCallable().futureCall(request);
+ * // Do something
+ * for (IamPolicySearchResult element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallable
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * SearchAllIamPoliciesRequest request = SearchAllIamPoliciesRequest.newBuilder()
+ * .setScope(scope)
+ * .build();
+ * while (true) {
+ * SearchAllIamPoliciesResponse response = assetServiceClient.searchAllIamPoliciesCallable().call(request);
+ * for (IamPolicySearchResult element : response.getResultsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class AssetServiceSettings extends ClientSettings
+ * AssetServiceSettings.Builder assetServiceSettingsBuilder =
+ * AssetServiceSettings.newBuilder();
+ * assetServiceSettingsBuilder.searchResourcesSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30));
+ * AssetServiceSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+package com.google.cloud.asset.v1p1beta1;
+
+import javax.annotation.Generated;
diff --git a/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java
new file mode 100644
index 000000000..0ea88fbf2
--- /dev/null
+++ b/google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java
@@ -0,0 +1,87 @@
+/*
+ * 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.v1p1beta1.stub;
+
+import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllIamPoliciesPagedResponse;
+import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchAllResourcesPagedResponse;
+import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchIamPoliciesPagedResponse;
+import static com.google.cloud.asset.v1p1beta1.AssetServiceClient.SearchResourcesPagedResponse;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest;
+import com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse;
+import com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest;
+import com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse;
+import com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest;
+import com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse;
+import com.google.cloud.asset.v1p1beta1.SearchResourcesRequest;
+import com.google.cloud.asset.v1p1beta1.SearchResourcesResponse;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS
+/**
+ * Base stub class for Cloud Asset API.
+ *
+ *
+ * try (AssetServiceClient assetServiceClient = AssetServiceClient.create()) {
+ * String scope = "";
+ * String query = "";
+ * List<String> assetTypes = new ArrayList<>();
+ * SearchResourcesPagedResponse response = assetServiceClient.searchResources(scope, query, assetTypes);
+ * }
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+@Generated("by gapic-generator")
+@BetaApi
+public class AssetServiceStubSettings extends StubSettings
+ * AssetServiceStubSettings.Builder assetServiceSettingsBuilder =
+ * AssetServiceStubSettings.newBuilder();
+ * assetServiceSettingsBuilder.searchResourcesSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30));
+ * AssetServiceStubSettings assetServiceSettings = assetServiceSettingsBuilder.build();
+ *
+ *
+ * The result for a IAM Policy search. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.IamPolicySearchResult} + */ +public final class IamPolicySearchResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.IamPolicySearchResult) + IamPolicySearchResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use IamPolicySearchResult.newBuilder() to construct. + private IamPolicySearchResult(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private IamPolicySearchResult() { + resource_ = ""; + project_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new IamPolicySearchResult(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private IamPolicySearchResult( + 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(); + + resource_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + project_ = s; + break; + } + case 34: + { + com.google.iam.v1.Policy.Builder subBuilder = null; + if (policy_ != null) { + subBuilder = policy_.toBuilder(); + } + policy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(policy_); + policy_ = 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.v1p1beta1.AssetProto + .internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetProto + .internal_static_google_cloud_asset_v1p1beta1_IamPolicySearchResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.class, + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder.class); + } + + public static final int RESOURCE_FIELD_NUMBER = 1; + private volatile java.lang.Object resource_; + /** + * + * + *
+ * The [full resource + * name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * of the resource associated with this IAM policy. + *+ * + *
string resource = 1;
+ *
+ * @return The resource.
+ */
+ public java.lang.String getResource() {
+ java.lang.Object ref = resource_;
+ 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();
+ resource_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The [full resource + * name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * of the resource associated with this IAM policy. + *+ * + *
string resource = 1;
+ *
+ * @return The bytes for resource.
+ */
+ public com.google.protobuf.ByteString getResourceBytes() {
+ java.lang.Object ref = resource_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ resource_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROJECT_FIELD_NUMBER = 3;
+ private volatile java.lang.Object project_;
+ /**
+ *
+ *
+ * + * The project that the associated GCP resource belongs to, in the form of + * `projects/{project_number}`. If an IAM policy is set on a resource (like VM + * instance, Cloud Storage bucket), the project field will indicate the + * project that contains the resource. If an IAM policy is set on a folder or + * orgnization, the project field will be empty. + *+ * + *
string project = 3;
+ *
+ * @return The project.
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ 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();
+ project_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The project that the associated GCP resource belongs to, in the form of + * `projects/{project_number}`. If an IAM policy is set on a resource (like VM + * instance, Cloud Storage bucket), the project field will indicate the + * project that contains the resource. If an IAM policy is set on a folder or + * orgnization, the project field will be empty. + *+ * + *
string project = 3;
+ *
+ * @return The bytes for project.
+ */
+ public com.google.protobuf.ByteString getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int POLICY_FIELD_NUMBER = 4;
+ private com.google.iam.v1.Policy policy_;
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ *
+ * @return Whether the policy field is set.
+ */
+ public boolean hasPolicy() {
+ return policy_ != null;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ *
+ * @return The policy.
+ */
+ public com.google.iam.v1.Policy getPolicy() {
+ return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ */
+ public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() {
+ return getPolicy();
+ }
+
+ 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 (!getResourceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resource_);
+ }
+ if (!getProjectBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_);
+ }
+ if (policy_ != null) {
+ output.writeMessage(4, getPolicy());
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getResourceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resource_);
+ }
+ if (!getProjectBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, project_);
+ }
+ if (policy_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPolicy());
+ }
+ 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.v1p1beta1.IamPolicySearchResult)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p1beta1.IamPolicySearchResult other =
+ (com.google.cloud.asset.v1p1beta1.IamPolicySearchResult) obj;
+
+ if (!getResource().equals(other.getResource())) return false;
+ if (!getProject().equals(other.getProject())) return false;
+ if (hasPolicy() != other.hasPolicy()) return false;
+ if (hasPolicy()) {
+ if (!getPolicy().equals(other.getPolicy())) 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) + RESOURCE_FIELD_NUMBER;
+ hash = (53 * hash) + getResource().hashCode();
+ hash = (37 * hash) + PROJECT_FIELD_NUMBER;
+ hash = (53 * hash) + getProject().hashCode();
+ if (hasPolicy()) {
+ hash = (37 * hash) + POLICY_FIELD_NUMBER;
+ hash = (53 * hash) + getPolicy().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult 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.v1p1beta1.IamPolicySearchResult parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult 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.v1p1beta1.IamPolicySearchResult parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult 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.v1p1beta1.IamPolicySearchResult parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult 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.v1p1beta1.IamPolicySearchResult parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult 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.v1p1beta1.IamPolicySearchResult 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 result for a IAM Policy search. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.IamPolicySearchResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The [full resource + * name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * of the resource associated with this IAM policy. + *+ * + *
string resource = 1;
+ *
+ * @return The resource.
+ */
+ public java.lang.String getResource() {
+ java.lang.Object ref = resource_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ resource_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The [full resource + * name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * of the resource associated with this IAM policy. + *+ * + *
string resource = 1;
+ *
+ * @return The bytes for resource.
+ */
+ public com.google.protobuf.ByteString getResourceBytes() {
+ java.lang.Object ref = resource_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ resource_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The [full resource + * name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * of the resource associated with this IAM policy. + *+ * + *
string resource = 1;
+ *
+ * @param value The resource to set.
+ * @return This builder for chaining.
+ */
+ public Builder setResource(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ resource_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The [full resource + * name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * of the resource associated with this IAM policy. + *+ * + *
string resource = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearResource() {
+
+ resource_ = getDefaultInstance().getResource();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The [full resource + * name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * of the resource associated with this IAM policy. + *+ * + *
string resource = 1;
+ *
+ * @param value The bytes for resource to set.
+ * @return This builder for chaining.
+ */
+ public Builder setResourceBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ resource_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object project_ = "";
+ /**
+ *
+ *
+ * + * The project that the associated GCP resource belongs to, in the form of + * `projects/{project_number}`. If an IAM policy is set on a resource (like VM + * instance, Cloud Storage bucket), the project field will indicate the + * project that contains the resource. If an IAM policy is set on a folder or + * orgnization, the project field will be empty. + *+ * + *
string project = 3;
+ *
+ * @return The project.
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ project_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The project that the associated GCP resource belongs to, in the form of + * `projects/{project_number}`. If an IAM policy is set on a resource (like VM + * instance, Cloud Storage bucket), the project field will indicate the + * project that contains the resource. If an IAM policy is set on a folder or + * orgnization, the project field will be empty. + *+ * + *
string project = 3;
+ *
+ * @return The bytes for project.
+ */
+ public com.google.protobuf.ByteString getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The project that the associated GCP resource belongs to, in the form of + * `projects/{project_number}`. If an IAM policy is set on a resource (like VM + * instance, Cloud Storage bucket), the project field will indicate the + * project that contains the resource. If an IAM policy is set on a folder or + * orgnization, the project field will be empty. + *+ * + *
string project = 3;
+ *
+ * @param value The project to set.
+ * @return This builder for chaining.
+ */
+ public Builder setProject(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The project that the associated GCP resource belongs to, in the form of + * `projects/{project_number}`. If an IAM policy is set on a resource (like VM + * instance, Cloud Storage bucket), the project field will indicate the + * project that contains the resource. If an IAM policy is set on a folder or + * orgnization, the project field will be empty. + *+ * + *
string project = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearProject() {
+
+ project_ = getDefaultInstance().getProject();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The project that the associated GCP resource belongs to, in the form of + * `projects/{project_number}`. If an IAM policy is set on a resource (like VM + * instance, Cloud Storage bucket), the project field will indicate the + * project that contains the resource. If an IAM policy is set on a folder or + * orgnization, the project field will be empty. + *+ * + *
string project = 3;
+ *
+ * @param value The bytes for project to set.
+ * @return This builder for chaining.
+ */
+ public Builder setProjectBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.iam.v1.Policy policy_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.iam.v1.Policy,
+ com.google.iam.v1.Policy.Builder,
+ com.google.iam.v1.PolicyOrBuilder>
+ policyBuilder_;
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ *
+ * @return Whether the policy field is set.
+ */
+ public boolean hasPolicy() {
+ return policyBuilder_ != null || policy_ != null;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ *
+ * @return The policy.
+ */
+ public com.google.iam.v1.Policy getPolicy() {
+ if (policyBuilder_ == null) {
+ return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_;
+ } else {
+ return policyBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ */
+ public Builder setPolicy(com.google.iam.v1.Policy value) {
+ if (policyBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ policy_ = value;
+ onChanged();
+ } else {
+ policyBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ */
+ public Builder setPolicy(com.google.iam.v1.Policy.Builder builderForValue) {
+ if (policyBuilder_ == null) {
+ policy_ = builderForValue.build();
+ onChanged();
+ } else {
+ policyBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ */
+ public Builder mergePolicy(com.google.iam.v1.Policy value) {
+ if (policyBuilder_ == null) {
+ if (policy_ != null) {
+ policy_ = com.google.iam.v1.Policy.newBuilder(policy_).mergeFrom(value).buildPartial();
+ } else {
+ policy_ = value;
+ }
+ onChanged();
+ } else {
+ policyBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ */
+ public Builder clearPolicy() {
+ if (policyBuilder_ == null) {
+ policy_ = null;
+ onChanged();
+ } else {
+ policy_ = null;
+ policyBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ */
+ public com.google.iam.v1.Policy.Builder getPolicyBuilder() {
+
+ onChanged();
+ return getPolicyFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ */
+ public com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder() {
+ if (policyBuilder_ != null) {
+ return policyBuilder_.getMessageOrBuilder();
+ } else {
+ return policy_ == null ? com.google.iam.v1.Policy.getDefaultInstance() : policy_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.iam.v1.Policy,
+ com.google.iam.v1.Policy.Builder,
+ com.google.iam.v1.PolicyOrBuilder>
+ getPolicyFieldBuilder() {
+ if (policyBuilder_ == null) {
+ policyBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.iam.v1.Policy,
+ com.google.iam.v1.Policy.Builder,
+ com.google.iam.v1.PolicyOrBuilder>(getPolicy(), getParentForChildren(), isClean());
+ policy_ = null;
+ }
+ return policyBuilder_;
+ }
+
+ @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.v1p1beta1.IamPolicySearchResult)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.IamPolicySearchResult)
+ private static final com.google.cloud.asset.v1p1beta1.IamPolicySearchResult DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.IamPolicySearchResult();
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The [full resource + * name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * of the resource associated with this IAM policy. + *+ * + *
string resource = 1;
+ *
+ * @return The resource.
+ */
+ java.lang.String getResource();
+ /**
+ *
+ *
+ * + * The [full resource + * name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * of the resource associated with this IAM policy. + *+ * + *
string resource = 1;
+ *
+ * @return The bytes for resource.
+ */
+ com.google.protobuf.ByteString getResourceBytes();
+
+ /**
+ *
+ *
+ * + * The project that the associated GCP resource belongs to, in the form of + * `projects/{project_number}`. If an IAM policy is set on a resource (like VM + * instance, Cloud Storage bucket), the project field will indicate the + * project that contains the resource. If an IAM policy is set on a folder or + * orgnization, the project field will be empty. + *+ * + *
string project = 3;
+ *
+ * @return The project.
+ */
+ java.lang.String getProject();
+ /**
+ *
+ *
+ * + * The project that the associated GCP resource belongs to, in the form of + * `projects/{project_number}`. If an IAM policy is set on a resource (like VM + * instance, Cloud Storage bucket), the project field will indicate the + * project that contains the resource. If an IAM policy is set on a folder or + * orgnization, the project field will be empty. + *+ * + *
string project = 3;
+ *
+ * @return The bytes for project.
+ */
+ com.google.protobuf.ByteString getProjectBytes();
+
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ *
+ * @return Whether the policy field is set.
+ */
+ boolean hasPolicy();
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ *
+ * @return The policy.
+ */
+ com.google.iam.v1.Policy getPolicy();
+ /**
+ *
+ *
+ * + * Representation of the actual Cloud IAM policy set on a cloud resource. For + * each resource, there must be at most one Cloud IAM policy set on it. + *+ * + *
.google.iam.v1.Policy policy = 4;
+ */
+ com.google.iam.v1.PolicyOrBuilder getPolicyOrBuilder();
+}
diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java
new file mode 100644
index 000000000..711fd4208
--- /dev/null
+++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java
@@ -0,0 +1,1158 @@
+/*
+ * 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/v1p1beta1/asset_service.proto
+
+package com.google.cloud.asset.v1p1beta1;
+
+/**
+ *
+ *
+ * + * Search all IAM policies request. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} + */ +public final class SearchAllIamPoliciesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) + SearchAllIamPoliciesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchAllIamPoliciesRequest.newBuilder() to construct. + private SearchAllIamPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SearchAllIamPoliciesRequest() { + scope_ = ""; + query_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchAllIamPoliciesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchAllIamPoliciesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + scope_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + query_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = 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.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.class, + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private volatile java.lang.Object scope_; + /** + * + * + *
+ * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The scope.
+ */
+ public java.lang.String getScope() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ scope_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for scope.
+ */
+ public com.google.protobuf.ByteString getScopeBytes() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ scope_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int QUERY_FIELD_NUMBER = 2;
+ private volatile java.lang.Object query_;
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The query.
+ */
+ public java.lang.String getQuery() {
+ java.lang.Object ref = query_;
+ 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();
+ query_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for query.
+ */
+ public com.google.protobuf.ByteString getQueryBytes() {
+ java.lang.Object ref = query_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ query_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PAGE_SIZE_FIELD_NUMBER = 3;
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The maximum is 2000. If set to the zero value, the server + * will pick an appropriate default. + *+ * + *
int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ public int getPageSize() {
+ return pageSize_;
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 4;
+ private volatile java.lang.Object pageToken_;
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ 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();
+ pageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = 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 (!getScopeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_);
+ }
+ if (!getQueryBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_);
+ }
+ if (pageSize_ != 0) {
+ output.writeInt32(3, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getScopeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_);
+ }
+ if (!getQueryBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_);
+ }
+ if (pageSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_);
+ }
+ 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.v1p1beta1.SearchAllIamPoliciesRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest other =
+ (com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest) obj;
+
+ if (!getScope().equals(other.getScope())) return false;
+ if (!getQuery().equals(other.getQuery())) return false;
+ if (getPageSize() != other.getPageSize()) return false;
+ if (!getPageToken().equals(other.getPageToken())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SCOPE_FIELD_NUMBER;
+ hash = (53 * hash) + getScope().hashCode();
+ hash = (37 * hash) + QUERY_FIELD_NUMBER;
+ hash = (53 * hash) + getQuery().hashCode();
+ hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getPageSize();
+ hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest 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.v1p1beta1.SearchAllIamPoliciesRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest 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.v1p1beta1.SearchAllIamPoliciesRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest 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.v1p1beta1.SearchAllIamPoliciesRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest 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.v1p1beta1.SearchAllIamPoliciesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest 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.v1p1beta1.SearchAllIamPoliciesRequest 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;
+ }
+ /**
+ *
+ *
+ * + * Search all IAM policies request. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The scope.
+ */
+ public java.lang.String getScope() {
+ java.lang.Object ref = scope_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ scope_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for scope.
+ */
+ public com.google.protobuf.ByteString getScopeBytes() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ scope_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The scope to set.
+ * @return This builder for chaining.
+ */
+ public Builder setScope(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ scope_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearScope() {
+
+ scope_ = getDefaultInstance().getScope();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for scope to set.
+ * @return This builder for chaining.
+ */
+ public Builder setScopeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ scope_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object query_ = "";
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The query.
+ */
+ public java.lang.String getQuery() {
+ java.lang.Object ref = query_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ query_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for query.
+ */
+ public com.google.protobuf.ByteString getQueryBytes() {
+ java.lang.Object ref = query_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ query_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The query to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQuery(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ query_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearQuery() {
+
+ query_ = getDefaultInstance().getQuery();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for query to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQueryBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ query_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The maximum is 2000. If set to the zero value, the server + * will pick an appropriate default. + *+ * + *
int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ public int getPageSize() {
+ return pageSize_;
+ }
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The maximum is 2000. If set to the zero value, the server + * will pick an appropriate default. + *+ * + *
int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The pageSize to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageSize(int value) {
+
+ pageSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The maximum is 2000. If set to the zero value, the server + * will pick an appropriate default. + *+ * + *
int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageSize() {
+
+ pageSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = 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.v1p1beta1.SearchAllIamPoliciesRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest)
+ private static final com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest();
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The scope.
+ */
+ java.lang.String getScope();
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for scope.
+ */
+ com.google.protobuf.ByteString getScopeBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The query.
+ */
+ java.lang.String getQuery();
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for query.
+ */
+ com.google.protobuf.ByteString getQueryBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The maximum is 2000. If set to the zero value, the server + * will pick an appropriate default. + *+ * + *
int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ int getPageSize();
+
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ java.lang.String getPageToken();
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ com.google.protobuf.ByteString getPageTokenBytes();
+}
diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java
new file mode 100644
index 000000000..dea403cf0
--- /dev/null
+++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java
@@ -0,0 +1,1177 @@
+/*
+ * 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/v1p1beta1/asset_service.proto
+
+package com.google.cloud.asset.v1p1beta1;
+
+/**
+ *
+ *
+ * + * Search all IAM policies response. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} + */ +public final class SearchAllIamPoliciesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) + SearchAllIamPoliciesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchAllIamPoliciesResponse.newBuilder() to construct. + private SearchAllIamPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SearchAllIamPoliciesResponse() { + results_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchAllIamPoliciesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchAllIamPoliciesResponse( + 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)) { + results_ = + new java.util.ArrayList< + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult>(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage( + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchAllIamPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.class, + com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + private java.util.List
+ * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public java.util.List+ * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public java.util.List extends com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder>
+ getResultsOrBuilderList() {
+ return results_;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public int getResultsCount() {
+ return results_.size();
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getResults(int index) {
+ return results_.get(index);
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder getResultsOrBuilder(
+ int index) {
+ return results_.get(index);
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
+ private volatile java.lang.Object nextPageToken_;
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ 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();
+ nextPageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = 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 {
+ for (int i = 0; i < results_.size(); i++) {
+ output.writeMessage(1, results_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < results_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
+ }
+ 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.v1p1beta1.SearchAllIamPoliciesResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse other =
+ (com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse) obj;
+
+ if (!getResultsList().equals(other.getResultsList())) return false;
+ if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getResultsCount() > 0) {
+ hash = (37 * hash) + RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getResultsList().hashCode();
+ }
+ hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getNextPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse 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.v1p1beta1.SearchAllIamPoliciesResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse 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.v1p1beta1.SearchAllIamPoliciesResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse 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.v1p1beta1.SearchAllIamPoliciesResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse 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.v1p1beta1.SearchAllIamPoliciesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse 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.v1p1beta1.SearchAllIamPoliciesResponse 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;
+ }
+ /**
+ *
+ *
+ * + * Search all IAM policies response. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public java.util.List+ * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public int getResultsCount() {
+ if (resultsBuilder_ == null) {
+ return results_.size();
+ } else {
+ return resultsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getResults(int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder setResults(
+ int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.set(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder setResults(
+ int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder addResults(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder addResults(
+ int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder addResults(
+ com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder addResults(
+ int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder addAllResults(
+ java.lang.Iterable extends com.google.cloud.asset.v1p1beta1.IamPolicySearchResult>
+ values) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_);
+ onChanged();
+ } else {
+ resultsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder clearResults() {
+ if (resultsBuilder_ == null) {
+ results_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ resultsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder removeResults(int index) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.remove(index);
+ onChanged();
+ } else {
+ resultsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder getResultsBuilder(
+ int index) {
+ return getResultsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder getResultsOrBuilder(
+ int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public java.util.List extends com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder>
+ getResultsOrBuilderList() {
+ if (resultsBuilder_ != null) {
+ return resultsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(results_);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder addResultsBuilder() {
+ return getResultsFieldBuilder()
+ .addBuilder(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder addResultsBuilder(
+ int index) {
+ return getResultsFieldBuilder()
+ .addBuilder(
+ index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public java.util.List+ * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @param value The nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @param value The bytes for nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = 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.v1p1beta1.SearchAllIamPoliciesResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse)
+ private static final com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse();
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllIamPoliciesResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ java.util.List+ * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getResults(int index);
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ int getResultsCount();
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ java.util.List extends com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder>
+ getResultsOrBuilderList();
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder getResultsOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ java.lang.String getNextPageToken();
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ com.google.protobuf.ByteString getNextPageTokenBytes();
+}
diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java
new file mode 100644
index 000000000..8acdc7cee
--- /dev/null
+++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java
@@ -0,0 +1,1427 @@
+/*
+ * 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/v1p1beta1/asset_service.proto
+
+package com.google.cloud.asset.v1p1beta1;
+
+/**
+ *
+ *
+ * + * Search all resources request. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} + */ +public final class SearchAllResourcesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) + SearchAllResourcesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchAllResourcesRequest.newBuilder() to construct. + private SearchAllResourcesRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SearchAllResourcesRequest() { + scope_ = ""; + query_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchAllResourcesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchAllResourcesRequest( + 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(); + + scope_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + query_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetTypes_.add(s); + break; + } + case 32: + { + pageSize_ = input.readInt32(); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = 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)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.class, + com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private volatile java.lang.Object scope_; + /** + * + * + *
+ * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The scope.
+ */
+ public java.lang.String getScope() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ scope_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for scope.
+ */
+ public com.google.protobuf.ByteString getScopeBytes() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ scope_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int QUERY_FIELD_NUMBER = 2;
+ private volatile java.lang.Object query_;
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The query.
+ */
+ public java.lang.String getQuery() {
+ java.lang.Object ref = query_;
+ 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();
+ query_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for query.
+ */
+ public com.google.protobuf.ByteString getQueryBytes() {
+ java.lang.Object ref = query_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ query_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ASSET_TYPES_FIELD_NUMBER = 3;
+ private com.google.protobuf.LazyStringList assetTypes_;
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return A list containing the assetTypes.
+ */
+ public com.google.protobuf.ProtocolStringList getAssetTypesList() {
+ return assetTypes_;
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The count of assetTypes.
+ */
+ public int getAssetTypesCount() {
+ return assetTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the element to return.
+ * @return The assetTypes at the given index.
+ */
+ public java.lang.String getAssetTypes(int index) {
+ return assetTypes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the assetTypes at the given index.
+ */
+ public com.google.protobuf.ByteString getAssetTypesBytes(int index) {
+ return assetTypes_.getByteString(index);
+ }
+
+ public static final int PAGE_SIZE_FIELD_NUMBER = 4;
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The value of this field is capped at 2000. If set to the + * zero value, server will pick an appropriate default. + *+ * + *
int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ public int getPageSize() {
+ return pageSize_;
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 5;
+ private volatile java.lang.Object pageToken_;
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ 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();
+ pageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = 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 (!getScopeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_);
+ }
+ if (!getQueryBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_);
+ }
+ for (int i = 0; i < assetTypes_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i));
+ }
+ if (pageSize_ != 0) {
+ output.writeInt32(4, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getScopeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_);
+ }
+ if (!getQueryBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < assetTypes_.size(); i++) {
+ dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getAssetTypesList().size();
+ }
+ if (pageSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_);
+ }
+ 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.v1p1beta1.SearchAllResourcesRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest other =
+ (com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest) obj;
+
+ if (!getScope().equals(other.getScope())) return false;
+ if (!getQuery().equals(other.getQuery())) return false;
+ if (!getAssetTypesList().equals(other.getAssetTypesList())) return false;
+ if (getPageSize() != other.getPageSize()) return false;
+ if (!getPageToken().equals(other.getPageToken())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SCOPE_FIELD_NUMBER;
+ hash = (53 * hash) + getScope().hashCode();
+ hash = (37 * hash) + QUERY_FIELD_NUMBER;
+ hash = (53 * hash) + getQuery().hashCode();
+ if (getAssetTypesCount() > 0) {
+ hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER;
+ hash = (53 * hash) + getAssetTypesList().hashCode();
+ }
+ hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getPageSize();
+ hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest 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.v1p1beta1.SearchAllResourcesRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest 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.v1p1beta1.SearchAllResourcesRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest 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.v1p1beta1.SearchAllResourcesRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest 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.v1p1beta1.SearchAllResourcesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest 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.v1p1beta1.SearchAllResourcesRequest 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;
+ }
+ /**
+ *
+ *
+ * + * Search all resources request. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllResourcesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The scope.
+ */
+ public java.lang.String getScope() {
+ java.lang.Object ref = scope_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ scope_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for scope.
+ */
+ public com.google.protobuf.ByteString getScopeBytes() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ scope_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The scope to set.
+ * @return This builder for chaining.
+ */
+ public Builder setScope(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ scope_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearScope() {
+
+ scope_ = getDefaultInstance().getScope();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for scope to set.
+ * @return This builder for chaining.
+ */
+ public Builder setScopeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ scope_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object query_ = "";
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The query.
+ */
+ public java.lang.String getQuery() {
+ java.lang.Object ref = query_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ query_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for query.
+ */
+ public com.google.protobuf.ByteString getQueryBytes() {
+ java.lang.Object ref = query_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ query_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The query to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQuery(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ query_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearQuery() {
+
+ query_ = getDefaultInstance().getQuery();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for query to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQueryBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ query_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringList assetTypes_ =
+ com.google.protobuf.LazyStringArrayList.EMPTY;
+
+ private void ensureAssetTypesIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return A list containing the assetTypes.
+ */
+ public com.google.protobuf.ProtocolStringList getAssetTypesList() {
+ return assetTypes_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The count of assetTypes.
+ */
+ public int getAssetTypesCount() {
+ return assetTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the element to return.
+ * @return The assetTypes at the given index.
+ */
+ public java.lang.String getAssetTypes(int index) {
+ return assetTypes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the assetTypes at the given index.
+ */
+ public com.google.protobuf.ByteString getAssetTypesBytes(int index) {
+ return assetTypes_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index to set the value at.
+ * @param value The assetTypes to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAssetTypes(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAssetTypesIsMutable();
+ assetTypes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The assetTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAssetTypes(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAssetTypesIsMutable();
+ assetTypes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param values The assetTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllAssetTypes(java.lang.Iterable+ * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearAssetTypes() {
+ assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes of the assetTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAssetTypesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureAssetTypesIsMutable();
+ assetTypes_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The value of this field is capped at 2000. If set to the + * zero value, server will pick an appropriate default. + *+ * + *
int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ public int getPageSize() {
+ return pageSize_;
+ }
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The value of this field is capped at 2000. If set to the + * zero value, server will pick an appropriate default. + *+ * + *
int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The pageSize to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageSize(int value) {
+
+ pageSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The value of this field is capped at 2000. If set to the + * zero value, server will pick an appropriate default. + *+ * + *
int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageSize() {
+
+ pageSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = 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.v1p1beta1.SearchAllResourcesRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchAllResourcesRequest)
+ private static final com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest();
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The scope.
+ */
+ java.lang.String getScope();
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for scope.
+ */
+ com.google.protobuf.ByteString getScopeBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The query.
+ */
+ java.lang.String getQuery();
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for query.
+ */
+ com.google.protobuf.ByteString getQueryBytes();
+
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return A list containing the assetTypes.
+ */
+ java.util.List+ * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The count of assetTypes.
+ */
+ int getAssetTypesCount();
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the element to return.
+ * @return The assetTypes at the given index.
+ */
+ java.lang.String getAssetTypes(int index);
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the assetTypes at the given index.
+ */
+ com.google.protobuf.ByteString getAssetTypesBytes(int index);
+
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The value of this field is capped at 2000. If set to the + * zero value, server will pick an appropriate default. + *+ * + *
int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ int getPageSize();
+
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ java.lang.String getPageToken();
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ com.google.protobuf.ByteString getPageTokenBytes();
+}
diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java
new file mode 100644
index 000000000..3361999c2
--- /dev/null
+++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java
@@ -0,0 +1,1158 @@
+/*
+ * 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/v1p1beta1/asset_service.proto
+
+package com.google.cloud.asset.v1p1beta1;
+
+/**
+ *
+ *
+ * + * Search all resources response. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} + */ +public final class SearchAllResourcesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) + SearchAllResourcesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchAllResourcesResponse.newBuilder() to construct. + private SearchAllResourcesResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SearchAllResourcesResponse() { + results_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchAllResourcesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchAllResourcesResponse( + 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)) { + results_ = + new java.util.ArrayList< + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata>(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage( + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchAllResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.class, + com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + private java.util.List
+ * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public java.util.List+ * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public java.util.List<
+ ? extends com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder>
+ getResultsOrBuilderList() {
+ return results_;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public int getResultsCount() {
+ return results_.size();
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getResults(int index) {
+ return results_.get(index);
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder getResultsOrBuilder(
+ int index) {
+ return results_.get(index);
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
+ private volatile java.lang.Object nextPageToken_;
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ 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();
+ nextPageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = 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 {
+ for (int i = 0; i < results_.size(); i++) {
+ output.writeMessage(1, results_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < results_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
+ }
+ 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.v1p1beta1.SearchAllResourcesResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse other =
+ (com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse) obj;
+
+ if (!getResultsList().equals(other.getResultsList())) return false;
+ if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getResultsCount() > 0) {
+ hash = (37 * hash) + RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getResultsList().hashCode();
+ }
+ hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getNextPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse 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.v1p1beta1.SearchAllResourcesResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse 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.v1p1beta1.SearchAllResourcesResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse 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.v1p1beta1.SearchAllResourcesResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse 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.v1p1beta1.SearchAllResourcesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse 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.v1p1beta1.SearchAllResourcesResponse 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;
+ }
+ /**
+ *
+ *
+ * + * Search all resources response. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchAllResourcesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public java.util.List+ * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public int getResultsCount() {
+ if (resultsBuilder_ == null) {
+ return results_.size();
+ } else {
+ return resultsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getResults(int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder setResults(
+ int index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.set(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder setResults(
+ int index,
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder addResults(com.google.cloud.asset.v1p1beta1.StandardResourceMetadata value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder addResults(
+ int index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder addResults(
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder addResults(
+ int index,
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder addAllResults(
+ java.lang.Iterable extends com.google.cloud.asset.v1p1beta1.StandardResourceMetadata>
+ values) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_);
+ onChanged();
+ } else {
+ resultsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder clearResults() {
+ if (resultsBuilder_ == null) {
+ results_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ resultsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder removeResults(int index) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.remove(index);
+ onChanged();
+ } else {
+ resultsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder getResultsBuilder(
+ int index) {
+ return getResultsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder getResultsOrBuilder(
+ int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public java.util.List<
+ ? extends com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder>
+ getResultsOrBuilderList() {
+ if (resultsBuilder_ != null) {
+ return resultsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(results_);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder addResultsBuilder() {
+ return getResultsFieldBuilder()
+ .addBuilder(
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder addResultsBuilder(
+ int index) {
+ return getResultsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public java.util.List+ * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @param value The nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @param value The bytes for nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = 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.v1p1beta1.SearchAllResourcesResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchAllResourcesResponse)
+ private static final com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse();
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchAllResourcesResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ java.util.List+ * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getResults(int index);
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ int getResultsCount();
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ java.util.List extends com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder>
+ getResultsOrBuilderList();
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder getResultsOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ java.lang.String getNextPageToken();
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ com.google.protobuf.ByteString getNextPageTokenBytes();
+}
diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesRequest.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesRequest.java
new file mode 100644
index 000000000..277089bfd
--- /dev/null
+++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesRequest.java
@@ -0,0 +1,1155 @@
+/*
+ * 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/v1p1beta1/asset_service.proto
+
+package com.google.cloud.asset.v1p1beta1;
+
+/**
+ *
+ *
+ * + * Search IAM policies request. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest} + */ +public final class SearchIamPoliciesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest) + SearchIamPoliciesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchIamPoliciesRequest.newBuilder() to construct. + private SearchIamPoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SearchIamPoliciesRequest() { + scope_ = ""; + query_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchIamPoliciesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchIamPoliciesRequest( + 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(); + + query_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + scope_ = 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.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest.class, + com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 4; + private volatile java.lang.Object scope_; + /** + * + * + *
+ * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The scope.
+ */
+ public java.lang.String getScope() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ scope_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for scope.
+ */
+ public com.google.protobuf.ByteString getScopeBytes() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ scope_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int QUERY_FIELD_NUMBER = 1;
+ private volatile java.lang.Object query_;
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The query.
+ */
+ public java.lang.String getQuery() {
+ java.lang.Object ref = query_;
+ 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();
+ query_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for query.
+ */
+ public com.google.protobuf.ByteString getQueryBytes() {
+ java.lang.Object ref = query_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ query_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PAGE_SIZE_FIELD_NUMBER = 2;
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The maximum is 2000. If set to the zero value, the server + * will pick an appropriate default. + *+ * + *
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ public int getPageSize() {
+ return pageSize_;
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 3;
+ private volatile java.lang.Object pageToken_;
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ 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();
+ pageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = 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 (!getQueryBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_);
+ }
+ if (pageSize_ != 0) {
+ output.writeInt32(2, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
+ }
+ if (!getScopeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, scope_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getQueryBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, query_);
+ }
+ if (pageSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
+ }
+ if (!getScopeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, scope_);
+ }
+ 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.v1p1beta1.SearchIamPoliciesRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest other =
+ (com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest) obj;
+
+ if (!getScope().equals(other.getScope())) return false;
+ if (!getQuery().equals(other.getQuery())) return false;
+ if (getPageSize() != other.getPageSize()) return false;
+ if (!getPageToken().equals(other.getPageToken())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SCOPE_FIELD_NUMBER;
+ hash = (53 * hash) + getScope().hashCode();
+ hash = (37 * hash) + QUERY_FIELD_NUMBER;
+ hash = (53 * hash) + getQuery().hashCode();
+ hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getPageSize();
+ hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest 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.v1p1beta1.SearchIamPoliciesRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest 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.v1p1beta1.SearchIamPoliciesRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest 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.v1p1beta1.SearchIamPoliciesRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest 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.v1p1beta1.SearchIamPoliciesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest 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.v1p1beta1.SearchIamPoliciesRequest 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;
+ }
+ /**
+ *
+ *
+ * + * Search IAM policies request. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The scope.
+ */
+ public java.lang.String getScope() {
+ java.lang.Object ref = scope_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ scope_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for scope.
+ */
+ public com.google.protobuf.ByteString getScopeBytes() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ scope_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The scope to set.
+ * @return This builder for chaining.
+ */
+ public Builder setScope(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ scope_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearScope() {
+
+ scope_ = getDefaultInstance().getScope();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for scope to set.
+ * @return This builder for chaining.
+ */
+ public Builder setScopeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ scope_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object query_ = "";
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The query.
+ */
+ public java.lang.String getQuery() {
+ java.lang.Object ref = query_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ query_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for query.
+ */
+ public com.google.protobuf.ByteString getQueryBytes() {
+ java.lang.Object ref = query_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ query_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The query to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQuery(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ query_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearQuery() {
+
+ query_ = getDefaultInstance().getQuery();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for query to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQueryBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ query_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The maximum is 2000. If set to the zero value, the server + * will pick an appropriate default. + *+ * + *
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ public int getPageSize() {
+ return pageSize_;
+ }
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The maximum is 2000. If set to the zero value, the server + * will pick an appropriate default. + *+ * + *
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The pageSize to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageSize(int value) {
+
+ pageSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The maximum is 2000. If set to the zero value, the server + * will pick an appropriate default. + *+ * + *
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageSize() {
+
+ pageSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = 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.v1p1beta1.SearchIamPoliciesRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest)
+ private static final com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest();
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The scope.
+ */
+ java.lang.String getScope();
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 4 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for scope.
+ */
+ com.google.protobuf.ByteString getScopeBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The query.
+ */
+ java.lang.String getQuery();
+ /**
+ *
+ *
+ * + * Optional. The query statement. + * Examples: + * * "policy:myuser@mydomain.com" + * * "policy:(myuser@mydomain.com viewer)" + *+ * + *
string query = 1 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for query.
+ */
+ com.google.protobuf.ByteString getQueryBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The maximum is 2000. If set to the zero value, the server + * will pick an appropriate default. + *+ * + *
int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ int getPageSize();
+
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ java.lang.String getPageToken();
+ /**
+ *
+ *
+ * + * Optional. If present, retrieve the next batch of results from the preceding call to + * this method. `page_token` must be the value of `next_page_token` from the + * previous response. The values of all other method parameters must be + * identical to those in the previous call. + *+ * + *
string page_token = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ com.google.protobuf.ByteString getPageTokenBytes();
+}
diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesResponse.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesResponse.java
new file mode 100644
index 000000000..85dda83eb
--- /dev/null
+++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesResponse.java
@@ -0,0 +1,1173 @@
+/*
+ * 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/v1p1beta1/asset_service.proto
+
+package com.google.cloud.asset.v1p1beta1;
+
+/**
+ *
+ *
+ * + * Search IAM policies response. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} + */ +public final class SearchIamPoliciesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse) + SearchIamPoliciesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchIamPoliciesResponse.newBuilder() to construct. + private SearchIamPoliciesResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SearchIamPoliciesResponse() { + results_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchIamPoliciesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchIamPoliciesResponse( + 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)) { + results_ = + new java.util.ArrayList< + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult>(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage( + com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchIamPoliciesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.class, + com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + private java.util.List
+ * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public java.util.List+ * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public java.util.List extends com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder>
+ getResultsOrBuilderList() {
+ return results_;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public int getResultsCount() {
+ return results_.size();
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getResults(int index) {
+ return results_.get(index);
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder getResultsOrBuilder(
+ int index) {
+ return results_.get(index);
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
+ private volatile java.lang.Object nextPageToken_;
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ 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();
+ nextPageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = 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 {
+ for (int i = 0; i < results_.size(); i++) {
+ output.writeMessage(1, results_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < results_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
+ }
+ 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.v1p1beta1.SearchIamPoliciesResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse other =
+ (com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse) obj;
+
+ if (!getResultsList().equals(other.getResultsList())) return false;
+ if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getResultsCount() > 0) {
+ hash = (37 * hash) + RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getResultsList().hashCode();
+ }
+ hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getNextPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse 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.v1p1beta1.SearchIamPoliciesResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse 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.v1p1beta1.SearchIamPoliciesResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse 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.v1p1beta1.SearchIamPoliciesResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse 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.v1p1beta1.SearchIamPoliciesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse 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.v1p1beta1.SearchIamPoliciesResponse 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;
+ }
+ /**
+ *
+ *
+ * + * Search IAM policies response. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public java.util.List+ * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public int getResultsCount() {
+ if (resultsBuilder_ == null) {
+ return results_.size();
+ } else {
+ return resultsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getResults(int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder setResults(
+ int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.set(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder setResults(
+ int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder addResults(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder addResults(
+ int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder addResults(
+ com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder addResults(
+ int index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder addAllResults(
+ java.lang.Iterable extends com.google.cloud.asset.v1p1beta1.IamPolicySearchResult>
+ values) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_);
+ onChanged();
+ } else {
+ resultsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder clearResults() {
+ if (resultsBuilder_ == null) {
+ results_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ resultsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public Builder removeResults(int index) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.remove(index);
+ onChanged();
+ } else {
+ resultsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder getResultsBuilder(
+ int index) {
+ return getResultsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder getResultsOrBuilder(
+ int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public java.util.List extends com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder>
+ getResultsOrBuilderList() {
+ if (resultsBuilder_ != null) {
+ return resultsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(results_);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder addResultsBuilder() {
+ return getResultsFieldBuilder()
+ .addBuilder(com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.Builder addResultsBuilder(
+ int index) {
+ return getResultsFieldBuilder()
+ .addBuilder(
+ index, com.google.cloud.asset.v1p1beta1.IamPolicySearchResult.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ public java.util.List+ * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @param value The nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @param value The bytes for nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = 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.v1p1beta1.SearchIamPoliciesResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse)
+ private static final com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse();
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchIamPoliciesResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ java.util.List+ * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ com.google.cloud.asset.v1p1beta1.IamPolicySearchResult getResults(int index);
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ int getResultsCount();
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ java.util.List extends com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder>
+ getResultsOrBuilderList();
+ /**
+ *
+ *
+ * + * A list of IamPolicy that match the search query. Related information such + * as the associated resource is returned along with the policy. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.IamPolicySearchResult results = 1;
+ */
+ com.google.cloud.asset.v1p1beta1.IamPolicySearchResultOrBuilder getResultsOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ java.lang.String getNextPageToken();
+ /**
+ *
+ *
+ * + * Set if there are more results than those appearing in this response; to get + * the next set of results, call this method again, using this value as the + * `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ com.google.protobuf.ByteString getNextPageTokenBytes();
+}
diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesRequest.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesRequest.java
new file mode 100644
index 000000000..8ce052689
--- /dev/null
+++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesRequest.java
@@ -0,0 +1,1427 @@
+/*
+ * 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/v1p1beta1/asset_service.proto
+
+package com.google.cloud.asset.v1p1beta1;
+
+/**
+ *
+ *
+ * + * Search resource request. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchResourcesRequest} + */ +public final class SearchResourcesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchResourcesRequest) + SearchResourcesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchResourcesRequest.newBuilder() to construct. + private SearchResourcesRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SearchResourcesRequest() { + scope_ = ""; + query_ = ""; + assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchResourcesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchResourcesRequest( + 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(); + + scope_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + query_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + assetTypes_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + assetTypes_.add(s); + break; + } + case 32: + { + pageSize_ = input.readInt32(); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = 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)) { + assetTypes_ = assetTypes_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchResourcesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchResourcesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchResourcesRequest.class, + com.google.cloud.asset.v1p1beta1.SearchResourcesRequest.Builder.class); + } + + public static final int SCOPE_FIELD_NUMBER = 1; + private volatile java.lang.Object scope_; + /** + * + * + *
+ * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The scope.
+ */
+ public java.lang.String getScope() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ scope_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for scope.
+ */
+ public com.google.protobuf.ByteString getScopeBytes() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ scope_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int QUERY_FIELD_NUMBER = 2;
+ private volatile java.lang.Object query_;
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The query.
+ */
+ public java.lang.String getQuery() {
+ java.lang.Object ref = query_;
+ 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();
+ query_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for query.
+ */
+ public com.google.protobuf.ByteString getQueryBytes() {
+ java.lang.Object ref = query_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ query_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ASSET_TYPES_FIELD_NUMBER = 3;
+ private com.google.protobuf.LazyStringList assetTypes_;
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return A list containing the assetTypes.
+ */
+ public com.google.protobuf.ProtocolStringList getAssetTypesList() {
+ return assetTypes_;
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The count of assetTypes.
+ */
+ public int getAssetTypesCount() {
+ return assetTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the element to return.
+ * @return The assetTypes at the given index.
+ */
+ public java.lang.String getAssetTypes(int index) {
+ return assetTypes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the assetTypes at the given index.
+ */
+ public com.google.protobuf.ByteString getAssetTypesBytes(int index) {
+ return assetTypes_.getByteString(index);
+ }
+
+ public static final int PAGE_SIZE_FIELD_NUMBER = 4;
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The value of this field is capped at 2000. If set to the + * zero value, server will pick an appropriate default. + *+ * + *
int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ public int getPageSize() {
+ return pageSize_;
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 5;
+ private volatile java.lang.Object pageToken_;
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ 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();
+ pageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = 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 (!getScopeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, scope_);
+ }
+ if (!getQueryBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_);
+ }
+ for (int i = 0; i < assetTypes_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, assetTypes_.getRaw(i));
+ }
+ if (pageSize_ != 0) {
+ output.writeInt32(4, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getScopeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, scope_);
+ }
+ if (!getQueryBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < assetTypes_.size(); i++) {
+ dataSize += computeStringSizeNoTag(assetTypes_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getAssetTypesList().size();
+ }
+ if (pageSize_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_);
+ }
+ 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.v1p1beta1.SearchResourcesRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p1beta1.SearchResourcesRequest other =
+ (com.google.cloud.asset.v1p1beta1.SearchResourcesRequest) obj;
+
+ if (!getScope().equals(other.getScope())) return false;
+ if (!getQuery().equals(other.getQuery())) return false;
+ if (!getAssetTypesList().equals(other.getAssetTypesList())) return false;
+ if (getPageSize() != other.getPageSize()) return false;
+ if (!getPageToken().equals(other.getPageToken())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SCOPE_FIELD_NUMBER;
+ hash = (53 * hash) + getScope().hashCode();
+ hash = (37 * hash) + QUERY_FIELD_NUMBER;
+ hash = (53 * hash) + getQuery().hashCode();
+ if (getAssetTypesCount() > 0) {
+ hash = (37 * hash) + ASSET_TYPES_FIELD_NUMBER;
+ hash = (53 * hash) + getAssetTypesList().hashCode();
+ }
+ hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
+ hash = (53 * hash) + getPageSize();
+ hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesRequest 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.v1p1beta1.SearchResourcesRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesRequest 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.v1p1beta1.SearchResourcesRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesRequest 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.v1p1beta1.SearchResourcesRequest parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesRequest 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.v1p1beta1.SearchResourcesRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesRequest 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.v1p1beta1.SearchResourcesRequest 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;
+ }
+ /**
+ *
+ *
+ * + * Search resource request. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchResourcesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The scope.
+ */
+ public java.lang.String getScope() {
+ java.lang.Object ref = scope_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ scope_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for scope.
+ */
+ public com.google.protobuf.ByteString getScopeBytes() {
+ java.lang.Object ref = scope_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ scope_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The scope to set.
+ * @return This builder for chaining.
+ */
+ public Builder setScope(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ scope_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearScope() {
+
+ scope_ = getDefaultInstance().getScope();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @param value The bytes for scope to set.
+ * @return This builder for chaining.
+ */
+ public Builder setScopeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ scope_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object query_ = "";
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The query.
+ */
+ public java.lang.String getQuery() {
+ java.lang.Object ref = query_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ query_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for query.
+ */
+ public com.google.protobuf.ByteString getQueryBytes() {
+ java.lang.Object ref = query_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ query_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The query to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQuery(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ query_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearQuery() {
+
+ query_ = getDefaultInstance().getQuery();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for query to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQueryBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ query_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringList assetTypes_ =
+ com.google.protobuf.LazyStringArrayList.EMPTY;
+
+ private void ensureAssetTypesIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ assetTypes_ = new com.google.protobuf.LazyStringArrayList(assetTypes_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return A list containing the assetTypes.
+ */
+ public com.google.protobuf.ProtocolStringList getAssetTypesList() {
+ return assetTypes_.getUnmodifiableView();
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The count of assetTypes.
+ */
+ public int getAssetTypesCount() {
+ return assetTypes_.size();
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the element to return.
+ * @return The assetTypes at the given index.
+ */
+ public java.lang.String getAssetTypes(int index) {
+ return assetTypes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the assetTypes at the given index.
+ */
+ public com.google.protobuf.ByteString getAssetTypesBytes(int index) {
+ return assetTypes_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index to set the value at.
+ * @param value The assetTypes to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAssetTypes(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAssetTypesIsMutable();
+ assetTypes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The assetTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAssetTypes(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAssetTypesIsMutable();
+ assetTypes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param values The assetTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllAssetTypes(java.lang.Iterable+ * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearAssetTypes() {
+ assetTypes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes of the assetTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAssetTypesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureAssetTypesIsMutable();
+ assetTypes_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private int pageSize_;
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The value of this field is capped at 2000. If set to the + * zero value, server will pick an appropriate default. + *+ * + *
int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ public int getPageSize() {
+ return pageSize_;
+ }
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The value of this field is capped at 2000. If set to the + * zero value, server will pick an appropriate default. + *+ * + *
int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The pageSize to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageSize(int value) {
+
+ pageSize_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The value of this field is capped at 2000. If set to the + * zero value, server will pick an appropriate default. + *+ * + *
int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageSize() {
+
+ pageSize_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ public com.google.protobuf.ByteString getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param value The bytes for pageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = 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.v1p1beta1.SearchResourcesRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchResourcesRequest)
+ private static final com.google.cloud.asset.v1p1beta1.SearchResourcesRequest DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchResourcesRequest();
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The scope.
+ */
+ java.lang.String getScope();
+ /**
+ *
+ *
+ * + * Required. The relative name of an asset. The search is limited to the resources + * within the `scope`. The allowed value must be: + * * Organization number (such as "organizations/123") + * * Folder number(such as "folders/1234") + * * Project number (such as "projects/12345") + *+ * + *
string scope = 1 [(.google.api.field_behavior) = REQUIRED];
+ *
+ * @return The bytes for scope.
+ */
+ com.google.protobuf.ByteString getScopeBytes();
+
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The query.
+ */
+ java.lang.String getQuery();
+ /**
+ *
+ *
+ * + * Optional. The query statement. + *+ * + *
string query = 2 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for query.
+ */
+ com.google.protobuf.ByteString getQueryBytes();
+
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return A list containing the assetTypes.
+ */
+ java.util.List+ * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The count of assetTypes.
+ */
+ int getAssetTypesCount();
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the element to return.
+ * @return The assetTypes at the given index.
+ */
+ java.lang.String getAssetTypes(int index);
+ /**
+ *
+ *
+ * + * Optional. A list of asset types that this request searches for. If empty, it will + * search all the supported asset types. + *+ * + *
repeated string asset_types = 3 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the assetTypes at the given index.
+ */
+ com.google.protobuf.ByteString getAssetTypesBytes(int index);
+
+ /**
+ *
+ *
+ * + * Optional. The page size for search result pagination. Returned results may be fewer + * than requested. The value of this field is capped at 2000. If set to the + * zero value, server will pick an appropriate default. + *+ * + *
int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageSize.
+ */
+ int getPageSize();
+
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The pageToken.
+ */
+ java.lang.String getPageToken();
+ /**
+ *
+ *
+ * + * Optional. If present, then retrieve the next batch of results from the preceding call + * to this method. `page_token` must be the value of `next_page_token` from + * the previous response. The values of all other method parameters, must be + * identical to those in the previous call. + *+ * + *
string page_token = 5 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ * @return The bytes for pageToken.
+ */
+ com.google.protobuf.ByteString getPageTokenBytes();
+}
diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesResponse.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesResponse.java
new file mode 100644
index 000000000..2b646d60c
--- /dev/null
+++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesResponse.java
@@ -0,0 +1,1158 @@
+/*
+ * 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/v1p1beta1/asset_service.proto
+
+package com.google.cloud.asset.v1p1beta1;
+
+/**
+ *
+ *
+ * + * Search resource response. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchResourcesResponse} + */ +public final class SearchResourcesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.SearchResourcesResponse) + SearchResourcesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SearchResourcesResponse.newBuilder() to construct. + private SearchResourcesResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private SearchResourcesResponse() { + results_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SearchResourcesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SearchResourcesResponse( + 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)) { + results_ = + new java.util.ArrayList< + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata>(); + mutable_bitField0_ |= 0x00000001; + } + results_.add( + input.readMessage( + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = 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)) { + results_ = java.util.Collections.unmodifiableList(results_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchResourcesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetServiceProto + .internal_static_google_cloud_asset_v1p1beta1_SearchResourcesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.SearchResourcesResponse.class, + com.google.cloud.asset.v1p1beta1.SearchResourcesResponse.Builder.class); + } + + public static final int RESULTS_FIELD_NUMBER = 1; + private java.util.List
+ * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public java.util.List+ * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public java.util.List<
+ ? extends com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder>
+ getResultsOrBuilderList() {
+ return results_;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public int getResultsCount() {
+ return results_.size();
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getResults(int index) {
+ return results_.get(index);
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder getResultsOrBuilder(
+ int index) {
+ return results_.get(index);
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
+ private volatile java.lang.Object nextPageToken_;
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ 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();
+ nextPageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = 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 {
+ for (int i = 0; i < results_.size(); i++) {
+ output.writeMessage(1, results_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < results_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, results_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
+ }
+ 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.v1p1beta1.SearchResourcesResponse)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p1beta1.SearchResourcesResponse other =
+ (com.google.cloud.asset.v1p1beta1.SearchResourcesResponse) obj;
+
+ if (!getResultsList().equals(other.getResultsList())) return false;
+ if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getResultsCount() > 0) {
+ hash = (37 * hash) + RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getResultsList().hashCode();
+ }
+ hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getNextPageToken().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesResponse parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesResponse 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.v1p1beta1.SearchResourcesResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesResponse 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.v1p1beta1.SearchResourcesResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesResponse parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesResponse 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.v1p1beta1.SearchResourcesResponse parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesResponse 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.v1p1beta1.SearchResourcesResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesResponse 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.v1p1beta1.SearchResourcesResponse 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;
+ }
+ /**
+ *
+ *
+ * + * Search resource response. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.SearchResourcesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public java.util.List+ * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public int getResultsCount() {
+ if (resultsBuilder_ == null) {
+ return results_.size();
+ } else {
+ return resultsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getResults(int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder setResults(
+ int index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.set(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder setResults(
+ int index,
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder addResults(com.google.cloud.asset.v1p1beta1.StandardResourceMetadata value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder addResults(
+ int index, com.google.cloud.asset.v1p1beta1.StandardResourceMetadata value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder addResults(
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder addResults(
+ int index,
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder addAllResults(
+ java.lang.Iterable extends com.google.cloud.asset.v1p1beta1.StandardResourceMetadata>
+ values) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_);
+ onChanged();
+ } else {
+ resultsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder clearResults() {
+ if (resultsBuilder_ == null) {
+ results_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ resultsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public Builder removeResults(int index) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.remove(index);
+ onChanged();
+ } else {
+ resultsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder getResultsBuilder(
+ int index) {
+ return getResultsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder getResultsOrBuilder(
+ int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public java.util.List<
+ ? extends com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder>
+ getResultsOrBuilderList() {
+ if (resultsBuilder_ != null) {
+ return resultsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(results_);
+ }
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder addResultsBuilder() {
+ return getResultsFieldBuilder()
+ .addBuilder(
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder addResultsBuilder(
+ int index) {
+ return getResultsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.getDefaultInstance());
+ }
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ public java.util.List+ * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ public com.google.protobuf.ByteString getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @param value The nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @param value The bytes for nextPageToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = 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.v1p1beta1.SearchResourcesResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.SearchResourcesResponse)
+ private static final com.google.cloud.asset.v1p1beta1.SearchResourcesResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.SearchResourcesResponse();
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.SearchResourcesResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ java.util.List+ * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getResults(int index);
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ int getResultsCount();
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ java.util.List extends com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder>
+ getResultsOrBuilderList();
+ /**
+ *
+ *
+ * + * A list of resource that match the search query. + *+ * + *
repeated .google.cloud.asset.v1p1beta1.StandardResourceMetadata results = 1;
+ */
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadataOrBuilder getResultsOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The nextPageToken.
+ */
+ java.lang.String getNextPageToken();
+ /**
+ *
+ *
+ * + * If there are more results than those appearing in this response, then + * `next_page_token` is included. To get the next set of results, call this + * method again using the value of `next_page_token` as `page_token`. + *+ * + *
string next_page_token = 2;
+ *
+ * @return The bytes for nextPageToken.
+ */
+ com.google.protobuf.ByteString getNextPageTokenBytes();
+}
diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java
new file mode 100644
index 000000000..a9532b812
--- /dev/null
+++ b/proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java
@@ -0,0 +1,1392 @@
+/*
+ * 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/v1p1beta1/assets.proto
+
+package com.google.cloud.asset.v1p1beta1;
+
+/**
+ *
+ *
+ * + * The standard metadata of a cloud resource. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.StandardResourceMetadata} + */ +public final class StandardResourceMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.asset.v1p1beta1.StandardResourceMetadata) + StandardResourceMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use StandardResourceMetadata.newBuilder() to construct. + private StandardResourceMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private StandardResourceMetadata() { + name_ = ""; + assetType_ = ""; + project_ = ""; + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StandardResourceMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StandardResourceMetadata( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + + assetType_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + project_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = 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.v1p1beta1.AssetProto + .internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.asset.v1p1beta1.AssetProto + .internal_static_google_cloud_asset_v1p1beta1_StandardResourceMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.class, + com.google.cloud.asset.v1p1beta1.StandardResourceMetadata.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+ * The full resource name. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string 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 full resource name. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string 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 ASSET_TYPE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object assetType_;
+ /**
+ *
+ *
+ * + * The type of this resource. + * For example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @return The assetType.
+ */
+ public java.lang.String getAssetType() {
+ java.lang.Object ref = assetType_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ assetType_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The type of this resource. + * For example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @return The bytes for assetType.
+ */
+ public com.google.protobuf.ByteString getAssetTypeBytes() {
+ java.lang.Object ref = assetType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ assetType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROJECT_FIELD_NUMBER = 3;
+ private volatile java.lang.Object project_;
+ /**
+ *
+ *
+ * + * The project that this resource belongs to, in the form of + * `projects/{project_number}`. + *+ * + *
string project = 3;
+ *
+ * @return The project.
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ 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();
+ project_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The project that this resource belongs to, in the form of + * `projects/{project_number}`. + *+ * + *
string project = 3;
+ *
+ * @return The bytes for project.
+ */
+ public com.google.protobuf.ByteString getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DISPLAY_NAME_FIELD_NUMBER = 4;
+ private volatile java.lang.Object displayName_;
+ /**
+ *
+ *
+ * + * The display name of this resource. + *+ * + *
string display_name = 4;
+ *
+ * @return The displayName.
+ */
+ public java.lang.String getDisplayName() {
+ java.lang.Object ref = displayName_;
+ 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();
+ displayName_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The display name of this resource. + *+ * + *
string display_name = 4;
+ *
+ * @return The bytes for displayName.
+ */
+ public com.google.protobuf.ByteString getDisplayNameBytes() {
+ java.lang.Object ref = displayName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ displayName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DESCRIPTION_FIELD_NUMBER = 5;
+ private volatile java.lang.Object description_;
+ /**
+ *
+ *
+ * + * One or more paragraphs of text description of this resource. Maximum length + * could be up to 1M bytes. + *+ * + *
string description = 5;
+ *
+ * @return The description.
+ */
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ 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();
+ description_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * One or more paragraphs of text description of this resource. Maximum length + * could be up to 1M bytes. + *+ * + *
string description = 5;
+ *
+ * @return The bytes for description.
+ */
+ public com.google.protobuf.ByteString getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ description_ = 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 (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (!getAssetTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, assetType_);
+ }
+ if (!getProjectBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, project_);
+ }
+ if (!getDisplayNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_);
+ }
+ if (!getDescriptionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_);
+ }
+ 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 (!getAssetTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, assetType_);
+ }
+ if (!getProjectBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, project_);
+ }
+ if (!getDisplayNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_);
+ }
+ if (!getDescriptionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_);
+ }
+ 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.v1p1beta1.StandardResourceMetadata)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.asset.v1p1beta1.StandardResourceMetadata other =
+ (com.google.cloud.asset.v1p1beta1.StandardResourceMetadata) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (!getAssetType().equals(other.getAssetType())) return false;
+ if (!getProject().equals(other.getProject())) return false;
+ if (!getDisplayName().equals(other.getDisplayName())) return false;
+ if (!getDescription().equals(other.getDescription())) 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();
+ hash = (37 * hash) + ASSET_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getAssetType().hashCode();
+ hash = (37 * hash) + PROJECT_FIELD_NUMBER;
+ hash = (53 * hash) + getProject().hashCode();
+ hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getDisplayName().hashCode();
+ hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
+ hash = (53 * hash) + getDescription().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata 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.v1p1beta1.StandardResourceMetadata parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata 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.v1p1beta1.StandardResourceMetadata parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata 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.v1p1beta1.StandardResourceMetadata parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata 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.v1p1beta1.StandardResourceMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata 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.v1p1beta1.StandardResourceMetadata 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 standard metadata of a cloud resource. + *+ * + * Protobuf type {@code google.cloud.asset.v1p1beta1.StandardResourceMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The full resource name. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string 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 full resource name. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string 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 full resource name. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string 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 full resource name. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string name = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The full resource name. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string 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 java.lang.Object assetType_ = "";
+ /**
+ *
+ *
+ * + * The type of this resource. + * For example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @return The assetType.
+ */
+ public java.lang.String getAssetType() {
+ java.lang.Object ref = assetType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ assetType_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The type of this resource. + * For example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @return The bytes for assetType.
+ */
+ public com.google.protobuf.ByteString getAssetTypeBytes() {
+ java.lang.Object ref = assetType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ assetType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The type of this resource. + * For example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @param value The assetType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAssetType(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ assetType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The type of this resource. + * For example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearAssetType() {
+
+ assetType_ = getDefaultInstance().getAssetType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The type of this resource. + * For example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @param value The bytes for assetType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAssetTypeBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ assetType_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object project_ = "";
+ /**
+ *
+ *
+ * + * The project that this resource belongs to, in the form of + * `projects/{project_number}`. + *+ * + *
string project = 3;
+ *
+ * @return The project.
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ project_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The project that this resource belongs to, in the form of + * `projects/{project_number}`. + *+ * + *
string project = 3;
+ *
+ * @return The bytes for project.
+ */
+ public com.google.protobuf.ByteString getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The project that this resource belongs to, in the form of + * `projects/{project_number}`. + *+ * + *
string project = 3;
+ *
+ * @param value The project to set.
+ * @return This builder for chaining.
+ */
+ public Builder setProject(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The project that this resource belongs to, in the form of + * `projects/{project_number}`. + *+ * + *
string project = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearProject() {
+
+ project_ = getDefaultInstance().getProject();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The project that this resource belongs to, in the form of + * `projects/{project_number}`. + *+ * + *
string project = 3;
+ *
+ * @param value The bytes for project to set.
+ * @return This builder for chaining.
+ */
+ public Builder setProjectBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object displayName_ = "";
+ /**
+ *
+ *
+ * + * The display name of this resource. + *+ * + *
string display_name = 4;
+ *
+ * @return The displayName.
+ */
+ public java.lang.String getDisplayName() {
+ java.lang.Object ref = displayName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ displayName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The display name of this resource. + *+ * + *
string display_name = 4;
+ *
+ * @return The bytes for displayName.
+ */
+ public com.google.protobuf.ByteString getDisplayNameBytes() {
+ java.lang.Object ref = displayName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ displayName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The display name of this resource. + *+ * + *
string display_name = 4;
+ *
+ * @param value The displayName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDisplayName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ displayName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The display name of this resource. + *+ * + *
string display_name = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDisplayName() {
+
+ displayName_ = getDefaultInstance().getDisplayName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The display name of this resource. + *+ * + *
string display_name = 4;
+ *
+ * @param value The bytes for displayName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ displayName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object description_ = "";
+ /**
+ *
+ *
+ * + * One or more paragraphs of text description of this resource. Maximum length + * could be up to 1M bytes. + *+ * + *
string description = 5;
+ *
+ * @return The description.
+ */
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ description_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * One or more paragraphs of text description of this resource. Maximum length + * could be up to 1M bytes. + *+ * + *
string description = 5;
+ *
+ * @return The bytes for description.
+ */
+ public com.google.protobuf.ByteString getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * One or more paragraphs of text description of this resource. Maximum length + * could be up to 1M bytes. + *+ * + *
string description = 5;
+ *
+ * @param value The description to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDescription(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ description_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * One or more paragraphs of text description of this resource. Maximum length + * could be up to 1M bytes. + *+ * + *
string description = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDescription() {
+
+ description_ = getDefaultInstance().getDescription();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * One or more paragraphs of text description of this resource. Maximum length + * could be up to 1M bytes. + *+ * + *
string description = 5;
+ *
+ * @param value The bytes for description to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ description_ = 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.v1p1beta1.StandardResourceMetadata)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.cloud.asset.v1p1beta1.StandardResourceMetadata)
+ private static final com.google.cloud.asset.v1p1beta1.StandardResourceMetadata DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.asset.v1p1beta1.StandardResourceMetadata();
+ }
+
+ public static com.google.cloud.asset.v1p1beta1.StandardResourceMetadata getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The full resource name. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string name = 1;
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+ /**
+ *
+ *
+ * + * The full resource name. For example: + * `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`. + * See [Resource + * Names](https://cloud.google.com/apis/design/resource_names#full_resource_name) + * for more information. + *+ * + *
string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * The type of this resource. + * For example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @return The assetType.
+ */
+ java.lang.String getAssetType();
+ /**
+ *
+ *
+ * + * The type of this resource. + * For example: "compute.googleapis.com/Disk". + *+ * + *
string asset_type = 2;
+ *
+ * @return The bytes for assetType.
+ */
+ com.google.protobuf.ByteString getAssetTypeBytes();
+
+ /**
+ *
+ *
+ * + * The project that this resource belongs to, in the form of + * `projects/{project_number}`. + *+ * + *
string project = 3;
+ *
+ * @return The project.
+ */
+ java.lang.String getProject();
+ /**
+ *
+ *
+ * + * The project that this resource belongs to, in the form of + * `projects/{project_number}`. + *+ * + *
string project = 3;
+ *
+ * @return The bytes for project.
+ */
+ com.google.protobuf.ByteString getProjectBytes();
+
+ /**
+ *
+ *
+ * + * The display name of this resource. + *+ * + *
string display_name = 4;
+ *
+ * @return The displayName.
+ */
+ java.lang.String getDisplayName();
+ /**
+ *
+ *
+ * + * The display name of this resource. + *+ * + *
string display_name = 4;
+ *
+ * @return The bytes for displayName.
+ */
+ com.google.protobuf.ByteString getDisplayNameBytes();
+
+ /**
+ *
+ *
+ * + * One or more paragraphs of text description of this resource. Maximum length + * could be up to 1M bytes. + *+ * + *
string description = 5;
+ *
+ * @return The description.
+ */
+ java.lang.String getDescription();
+ /**
+ *
+ *
+ * + * One or more paragraphs of text description of this resource. Maximum length + * could be up to 1M bytes. + *+ * + *
string description = 5;
+ *
+ * @return The bytes for description.
+ */
+ com.google.protobuf.ByteString getDescriptionBytes();
+}
diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto b/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto
new file mode 100644
index 000000000..f8f42dab9
--- /dev/null
+++ b/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto
@@ -0,0 +1,230 @@
+// Copyright 2019 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.v1p1beta1;
+
+import "google/api/annotations.proto";
+import "google/api/field_behavior.proto";
+import "google/cloud/asset/v1p1beta1/assets.proto";
+import "google/api/client.proto";
+
+option csharp_namespace = "Google.Cloud.Asset.V1P1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset";
+option java_multiple_files = true;
+option java_outer_classname = "AssetServiceProto";
+option java_package = "com.google.cloud.asset.v1p1beta1";
+option php_namespace = "Google\\Cloud\\Asset\\V1p1beta1";
+
+// 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";
+
+ // Searches resources which are accessible with .get permission.
+ rpc SearchResources(SearchResourcesRequest) returns (SearchResourcesResponse) {
+ option (google.api.http) = {
+ get: "/v1p1beta1/resources:search"
+ };
+ }
+
+ // Searches IAM policies which are accessible with .getIamPolicy permission.
+ rpc SearchIamPolicies(SearchIamPoliciesRequest) returns (SearchIamPoliciesResponse) {
+ option (google.api.http) = {
+ get: "/v1p1beta1/iamPolicies:search"
+ };
+ }
+
+ // Searches all the resources under a given accessible CRM scope
+ // (project/folder/organization). This RPC gives callers
+ // especially admins the ability to search all the resources under a scope,
+ // even if they don't have .get permission of all the resources. Callers
+ // should have cloud.assets.SearchAllResources permission on the requested
+ // scope, otherwise it will be rejected.
+ rpc SearchAllResources(SearchAllResourcesRequest) returns (SearchAllResourcesResponse) {
+ option (google.api.http) = {
+ get: "/v1p1beta1/{scope=*/*}/resources:searchAll"
+ };
+ }
+
+ // Searches all the IAM policies under a given accessible CRM scope
+ // (project/folder/organization). This RPC gives callers
+ // especially admins the ability to search all the IAM policies under a scope,
+ // even if they don't have .getIamPolicy permission of all the IAM policies.
+ // Callers should have cloud.assets.SearchAllIamPolicies permission on the
+ // requested scope, otherwise it will be rejected.
+ rpc SearchAllIamPolicies(SearchAllIamPoliciesRequest) returns (SearchAllIamPoliciesResponse) {
+ option (google.api.http) = {
+ get: "/v1p1beta1/{scope=*/*}/iamPolicies:searchAll"
+ };
+ }
+}
+
+// Search resource request.
+message SearchResourcesRequest {
+ // Required. The relative name of an asset. The search is limited to the resources
+ // within the `scope`. The allowed value must be:
+ // * Organization number (such as "organizations/123")
+ // * Folder number(such as "folders/1234")
+ // * Project number (such as "projects/12345")
+ string scope = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. The query statement.
+ string query = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. A list of asset types that this request searches for. If empty, it will
+ // search all the supported asset types.
+ repeated string asset_types = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The page size for search result pagination. Returned results may be fewer
+ // than requested. The value of this field is capped at 2000. If set to the
+ // zero value, server will pick an appropriate default.
+ int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. If present, then retrieve the next batch of results from the preceding call
+ // to this method. `page_token` must be the value of `next_page_token` from
+ // the previous response. The values of all other method parameters, must be
+ // identical to those in the previous call.
+ string page_token = 5 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Search resource response.
+message SearchResourcesResponse {
+ // A list of resource that match the search query.
+ repeated StandardResourceMetadata results = 1;
+
+ // If there are more results than those appearing in this response, then
+ // `next_page_token` is included. To get the next set of results, call this
+ // method again using the value of `next_page_token` as `page_token`.
+ string next_page_token = 2;
+}
+
+// Search IAM policies request.
+message SearchIamPoliciesRequest {
+ // Required. The relative name of an asset. The search is limited to the resources
+ // within the `scope`. The allowed value must be:
+ // * Organization number (such as "organizations/123")
+ // * Folder number(such as "folders/1234")
+ // * Project number (such as "projects/12345")
+ string scope = 4 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. The query statement.
+ // Examples:
+ // * "policy:myuser@mydomain.com"
+ // * "policy:(myuser@mydomain.com viewer)"
+ string query = 1 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The page size for search result pagination. Returned results may be fewer
+ // than requested. The maximum is 2000. If set to the zero value, the server
+ // will pick an appropriate default.
+ int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. If present, retrieve the next batch of results from the preceding call to
+ // this method. `page_token` must be the value of `next_page_token` from the
+ // previous response. The values of all other method parameters must be
+ // identical to those in the previous call.
+ string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Search IAM policies response.
+message SearchIamPoliciesResponse {
+ // A list of IamPolicy that match the search query. Related information such
+ // as the associated resource is returned along with the policy.
+ repeated IamPolicySearchResult results = 1;
+
+ // Set if there are more results than those appearing in this response; to get
+ // the next set of results, call this method again, using this value as the
+ // `page_token`.
+ string next_page_token = 2;
+}
+
+// Search all resources request.
+message SearchAllResourcesRequest {
+ // Required. The relative name of an asset. The search is limited to the resources
+ // within the `scope`. The allowed value must be:
+ // * Organization number (such as "organizations/123")
+ // * Folder number(such as "folders/1234")
+ // * Project number (such as "projects/12345")
+ string scope = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. The query statement.
+ string query = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. A list of asset types that this request searches for. If empty, it will
+ // search all the supported asset types.
+ repeated string asset_types = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The page size for search result pagination. Returned results may be fewer
+ // than requested. The value of this field is capped at 2000. If set to the
+ // zero value, server will pick an appropriate default.
+ int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. If present, then retrieve the next batch of results from the preceding call
+ // to this method. `page_token` must be the value of `next_page_token` from
+ // the previous response. The values of all other method parameters, must be
+ // identical to those in the previous call.
+ string page_token = 5 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Search all resources response.
+message SearchAllResourcesResponse {
+ // A list of resource that match the search query.
+ repeated StandardResourceMetadata results = 1;
+
+ // If there are more results than those appearing in this response, then
+ // `next_page_token` is included. To get the next set of results, call this
+ // method again using the value of `next_page_token` as `page_token`.
+ string next_page_token = 2;
+}
+
+// Search all IAM policies request.
+message SearchAllIamPoliciesRequest {
+ // Required. The relative name of an asset. The search is limited to the resources
+ // within the `scope`. The allowed value must be:
+ // * Organization number (such as "organizations/123")
+ // * Folder number(such as "folders/1234")
+ // * Project number (such as "projects/12345")
+ string scope = 1 [(google.api.field_behavior) = REQUIRED];
+
+ // Optional. The query statement.
+ // Examples:
+ // * "policy:myuser@mydomain.com"
+ // * "policy:(myuser@mydomain.com viewer)"
+ string query = 2 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. The page size for search result pagination. Returned results may be fewer
+ // than requested. The maximum is 2000. If set to the zero value, the server
+ // will pick an appropriate default.
+ int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
+
+ // Optional. If present, retrieve the next batch of results from the preceding call to
+ // this method. `page_token` must be the value of `next_page_token` from the
+ // previous response. The values of all other method parameters must be
+ // identical to those in the previous call.
+ string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Search all IAM policies response.
+message SearchAllIamPoliciesResponse {
+ // A list of IamPolicy that match the search query. Related information such
+ // as the associated resource is returned along with the policy.
+ repeated IamPolicySearchResult results = 1;
+
+ // Set if there are more results than those appearing in this response; to get
+ // the next set of results, call this method again, using this value as the
+ // `page_token`.
+ string next_page_token = 2;
+}
diff --git a/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/assets.proto b/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/assets.proto
new file mode 100644
index 000000000..47ab0c278
--- /dev/null
+++ b/proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/assets.proto
@@ -0,0 +1,73 @@
+// Copyright 2019 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.v1p1beta1;
+
+import "google/iam/v1/policy.proto";
+import "google/api/annotations.proto";
+
+option cc_enable_arenas = true;
+option csharp_namespace = "Google.Cloud.Asset.V1P1Beta1";
+option go_package = "google.golang.org/genproto/googleapis/cloud/asset/v1p1beta1;asset";
+option java_multiple_files = true;
+option java_outer_classname = "AssetProto";
+option java_package = "com.google.cloud.asset.v1p1beta1";
+option php_namespace = "Google\\Cloud\\Asset\\V1p1beta1";
+
+// The standard metadata of a cloud resource.
+message StandardResourceMetadata {
+ // The full resource name. For example:
+ // `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1`.
+ // See [Resource
+ // Names](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ // for more information.
+ string name = 1;
+
+ // The type of this resource.
+ // For example: "compute.googleapis.com/Disk".
+ string asset_type = 2;
+
+ // The project that this resource belongs to, in the form of
+ // `projects/{project_number}`.
+ string project = 3;
+
+ // The display name of this resource.
+ string display_name = 4;
+
+ // One or more paragraphs of text description of this resource. Maximum length
+ // could be up to 1M bytes.
+ string description = 5;
+}
+
+// The result for a IAM Policy search.
+message IamPolicySearchResult {
+ // The [full resource
+ // name](https://cloud.google.com/apis/design/resource_names#full_resource_name)
+ // of the resource associated with this IAM policy.
+ string resource = 1;
+
+ // The project that the associated GCP resource belongs to, in the form of
+ // `projects/{project_number}`. If an IAM policy is set on a resource (like VM
+ // instance, Cloud Storage bucket), the project field will indicate the
+ // project that contains the resource. If an IAM policy is set on a folder or
+ // orgnization, the project field will be empty.
+ string project = 3;
+
+ // Representation of the actual Cloud IAM policy set on a cloud resource. For
+ // each resource, there must be at most one Cloud IAM policy set on it.
+ google.iam.v1.Policy policy = 4;
+}
diff --git a/synth.metadata b/synth.metadata
index 1839c8381..34e1951bd 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -12,9 +12,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "8d16f76de065f530d395a4c7eabbf766d6a120fd",
- "internalRef": "291008516",
- "log": "8d16f76de065f530d395a4c7eabbf766d6a120fd\nGenerate Memcache v1beta2 API protos and gRPC ServiceConfig files\n\nPiperOrigin-RevId: 291008516\n\n3af1dabd93df9a9f17bf3624d3b875c11235360b\ngrafeas: Add containeranalysis default_host to Grafeas service\n\nPiperOrigin-RevId: 290965849\n\nbe2663fa95e31cba67d0cd62611a6674db9f74b7\nfix(google/maps/roads): add missing opening bracket\n\nPiperOrigin-RevId: 290964086\n\nfacc26550a0af0696e0534bc9cae9df14275aa7c\nUpdating v2 protos with the latest inline documentation (in comments) and adding a per-service .yaml file.\n\nPiperOrigin-RevId: 290952261\n\ncda99c1f7dc5e4ca9b1caeae1dc330838cbc1461\nChange api_name to 'asset' for v1p1beta1\n\nPiperOrigin-RevId: 290800639\n\n94e9e90c303a820ce40643d9129e7f0d2054e8a1\nAdds Google Maps Road service\n\nPiperOrigin-RevId: 290795667\n\na3b23dcb2eaecce98c600c7d009451bdec52dbda\nrpc: new message ErrorInfo, other comment updates\n\nPiperOrigin-RevId: 290781668\n\n26420ef4e46c37f193c0fbe53d6ebac481de460e\nAdd proto definition for Org Policy v1.\n\nPiperOrigin-RevId: 290771923\n\n7f0dab8177cf371ae019a082e2512de7ac102888\nPublish Routes Preferred API v1 service definitions.\n\nPiperOrigin-RevId: 290326986\n\nad6e508d0728e1d1bca6e3f328cd562718cb772d\nFix: Qualify resource type references with \"jobs.googleapis.com/\"\n\nPiperOrigin-RevId: 290285762\n\n58e770d568a2b78168ddc19a874178fee8265a9d\ncts client library\n\nPiperOrigin-RevId: 290146169\n\naf9daa4c3b4c4a8b7133b81588dd9ffd37270af2\nAdd more programming language options to public proto\n\nPiperOrigin-RevId: 290144091\n\nd9f2bbf2df301ef84641d4cec7c828736a0bd907\ntalent: add missing resource.proto dep to Bazel build target\n\nPiperOrigin-RevId: 290143164\n\n3b3968237451d027b42471cd28884a5a1faed6c7\nAnnotate Talent API.\nAdd gRPC service config for retry.\nUpdate bazel file with google.api.resource dependency.\n\nPiperOrigin-RevId: 290125172\n\n"
+ "sha": "fead959b0dcc7b36c6ed74ebf905f5bcb3c0d521",
+ "log": "fead959b0dcc7b36c6ed74ebf905f5bcb3c0d521\nMerge branch 'master' of github.com:googleapis/googleapis\n\n8d16f76de065f530d395a4c7eabbf766d6a120fd\nGenerate Memcache v1beta2 API protos and gRPC ServiceConfig files\n\nPiperOrigin-RevId: 291008516\n\n3af1dabd93df9a9f17bf3624d3b875c11235360b\ngrafeas: Add containeranalysis default_host to Grafeas service\n\nPiperOrigin-RevId: 290965849\n\nbe2663fa95e31cba67d0cd62611a6674db9f74b7\nfix(google/maps/roads): add missing opening bracket\n\nPiperOrigin-RevId: 290964086\n\nfacc26550a0af0696e0534bc9cae9df14275aa7c\nUpdating v2 protos with the latest inline documentation (in comments) and adding a per-service .yaml file.\n\nPiperOrigin-RevId: 290952261\n\n"
}
},
{
@@ -55,6 +54,16 @@
"generator": "gapic",
"config": "google/cloud/asset/artman_cloudasset_v1p2beta1.yaml"
}
+ },
+ {
+ "client": {
+ "source": "googleapis",
+ "apiName": "asset",
+ "apiVersion": "v1p1beta1",
+ "language": "java",
+ "generator": "gapic",
+ "config": "google/cloud/asset/v1p1beta1/artman_cloudasset_v1p1beta1.yaml"
+ }
}
],
"newFiles": [
@@ -73,9 +82,6 @@
{
"path": ".github/release-please.yml"
},
- {
- "path": ".gitignore"
- },
{
"path": ".kokoro/build.bat"
},
@@ -241,12 +247,6 @@
{
"path": ".kokoro/trampoline.sh"
},
- {
- "path": ".repo-metadata.json"
- },
- {
- "path": "CHANGELOG.md"
- },
{
"path": "CODE_OF_CONDUCT.md"
},
@@ -256,18 +256,9 @@
{
"path": "LICENSE"
},
- {
- "path": "README.md"
- },
{
"path": "codecov.yaml"
},
- {
- "path": "google-cloud-asset-bom/pom.xml"
- },
- {
- "path": "google-cloud-asset/pom.xml"
- },
{
"path": "google-cloud-asset/src/main/java/com/google/cloud/asset/v1/AssetServiceClient.java"
},
@@ -310,6 +301,27 @@
{
"path": "google-cloud-asset/src/main/java/com/google/cloud/asset/v1beta1/stub/GrpcAssetServiceStub.java"
},
+ {
+ "path": "google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceClient.java"
+ },
+ {
+ "path": "google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceSettings.java"
+ },
+ {
+ "path": "google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/package-info.java"
+ },
+ {
+ "path": "google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStub.java"
+ },
+ {
+ "path": "google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/AssetServiceStubSettings.java"
+ },
+ {
+ "path": "google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceCallableFactory.java"
+ },
+ {
+ "path": "google-cloud-asset/src/main/java/com/google/cloud/asset/v1p1beta1/stub/GrpcAssetServiceStub.java"
+ },
{
"path": "google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceClient.java"
},
@@ -331,9 +343,6 @@
{
"path": "google-cloud-asset/src/main/java/com/google/cloud/asset/v1p2beta1/stub/GrpcAssetServiceStub.java"
},
- {
- "path": "google-cloud-asset/src/test/java/com/google/cloud/asset/it/ITSystemTest.java"
- },
{
"path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1/AssetServiceClientTest.java"
},
@@ -343,9 +352,6 @@
{
"path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1/MockAssetServiceImpl.java"
},
- {
- "path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1/VPCServiceControlTest.java"
- },
{
"path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/AssetServiceClientTest.java"
},
@@ -356,28 +362,31 @@
"path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1beta1/MockAssetServiceImpl.java"
},
{
- "path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java"
+ "path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/AssetServiceClientTest.java"
},
{
- "path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetService.java"
+ "path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetService.java"
},
{
- "path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java"
+ "path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1p1beta1/MockAssetServiceImpl.java"
},
{
- "path": "grpc-google-cloud-asset-v1/pom.xml"
+ "path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/AssetServiceClientTest.java"
},
{
- "path": "grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java"
+ "path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetService.java"
},
{
- "path": "grpc-google-cloud-asset-v1beta1/pom.xml"
+ "path": "google-cloud-asset/src/test/java/com/google/cloud/asset/v1p2beta1/MockAssetServiceImpl.java"
+ },
+ {
+ "path": "grpc-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/AssetServiceGrpc.java"
},
{
"path": "grpc-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetServiceGrpc.java"
},
{
- "path": "grpc-google-cloud-asset-v1p2beta1/pom.xml"
+ "path": "grpc-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceGrpc.java"
},
{
"path": "grpc-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceGrpc.java"
@@ -388,15 +397,6 @@
{
"path": "license-checks.xml"
},
- {
- "path": "pom.xml"
- },
- {
- "path": "proto-google-cloud-asset-v1/clirr-ignored-differences.xml"
- },
- {
- "path": "proto-google-cloud-asset-v1/pom.xml"
- },
{
"path": "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/Asset.java"
},
@@ -473,7 +473,7 @@
"path": "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestination.java"
},
{
- "path": "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GcsDestinationOrBuilder.java"
+ "path": "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ExportAssetsResponse.java"
},
{
"path": "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/GetFeedRequest.java"
@@ -516,9 +516,10 @@
},
{
"path": "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAsset.java"
+
},
{
- "path": "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TemporalAssetOrBuilder.java"
+ "path": "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/ListFeedsResponseOrBuilder.java"
},
{
"path": "proto-google-cloud-asset-v1/src/main/java/com/google/cloud/asset/v1/TimeWindow.java"
@@ -538,9 +539,6 @@
{
"path": "proto-google-cloud-asset-v1/src/main/proto/google/cloud/asset/v1/assets.proto"
},
- {
- "path": "proto-google-cloud-asset-v1beta1/pom.xml"
- },
{
"path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/Asset.java"
},
@@ -575,7 +573,7 @@
"path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsRequestOrBuilder.java"
},
{
- "path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsResponse.java"
+ "path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/AssetOrBuilder.java"
},
{
"path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsResponseOrBuilder.java"
@@ -596,7 +594,7 @@
"path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ProjectName.java"
},
{
- "path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/Resource.java"
+ "path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/BatchGetAssetsHistoryRequestOrBuilder.java"
},
{
"path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ResourceOrBuilder.java"
@@ -608,10 +606,10 @@
"path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TemporalAssetOrBuilder.java"
},
{
- "path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TimeWindow.java"
+ "path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ContentType.java"
},
{
- "path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/TimeWindowOrBuilder.java"
+ "path": "proto-google-cloud-asset-v1beta1/src/main/java/com/google/cloud/asset/v1beta1/ExportAssetsRequest.java"
},
{
"path": "proto-google-cloud-asset-v1beta1/src/main/proto/google/cloud/asset/v1beta1/asset_service.proto"
@@ -620,7 +618,76 @@
"path": "proto-google-cloud-asset-v1beta1/src/main/proto/google/cloud/asset/v1beta1/assets.proto"
},
{
- "path": "proto-google-cloud-asset-v1p2beta1/pom.xml"
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetProto.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/AssetServiceProto.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResult.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/IamPolicySearchResultOrBuilder.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequest.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesRequestOrBuilder.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponse.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllIamPoliciesResponseOrBuilder.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequest.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesRequestOrBuilder.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponse.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchAllResourcesResponseOrBuilder.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesRequest.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesRequestOrBuilder.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesResponse.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchIamPoliciesResponseOrBuilder.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesRequest.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesRequestOrBuilder.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesResponse.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/SearchResourcesResponseOrBuilder.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadata.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/java/com/google/cloud/asset/v1p1beta1/StandardResourceMetadataOrBuilder.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/asset_service.proto"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p1beta1/src/main/proto/google/cloud/asset/v1p1beta1/assets.proto"
},
{
"path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Asset.java"
@@ -629,7 +696,7 @@
"path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetOrBuilder.java"
},
{
- "path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetProto.java"
+ "path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryResponse.java"
},
{
"path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/AssetServiceProto.java"
@@ -647,7 +714,10 @@
"path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BatchGetAssetsHistoryResponseOrBuilder.java"
},
{
- "path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BigQueryDestination.java"
+ "path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ContentType.java"
+ },
+ {
+ "path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/CreateFeedRequest.java"
},
{
"path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/BigQueryDestinationOrBuilder.java"
@@ -680,7 +750,7 @@
"path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ExportAssetsResponseOrBuilder.java"
},
{
- "path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/Feed.java"
+ "path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedOutputConfig.java"
},
{
"path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/FeedName.java"
@@ -716,7 +786,7 @@
"path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponse.java"
},
{
- "path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/ListFeedsResponseOrBuilder.java"
+ "path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/PubsubDestinationOrBuilder.java"
},
{
"path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/OutputConfig.java"
@@ -755,22 +825,13 @@
"path": "proto-google-cloud-asset-v1p2beta1/src/main/java/com/google/cloud/asset/v1p2beta1/UpdateFeedRequestOrBuilder.java"
},
{
- "path": "proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/asset_service.proto"
+ "path": "synth.py"
},
{
"path": "proto-google-cloud-asset-v1p2beta1/src/main/proto/google/cloud/asset/v1p2beta1/assets.proto"
},
{
"path": "renovate.json"
- },
- {
- "path": "synth.metadata"
- },
- {
- "path": "synth.py"
- },
- {
- "path": "versions.txt"
}
]
}
\ No newline at end of file
diff --git a/synth.py b/synth.py
index 2f23e546b..eee92a90c 100644
--- a/synth.py
+++ b/synth.py
@@ -25,23 +25,22 @@
config_pattern = '/google/cloud/asset/artman_cloudasset_{version}.yaml'
for version in versions:
- library = gapic.java_library(
+ java.gapic_library(
service=service,
version=version,
- config_path=config_pattern.format(version=version),
- artman_output_name='')
+ config_pattern='/google/cloud/asset/artman_cloudasset_{version}.yaml',
+ package_pattern='com.google.cloud.{service}.{version}',
+ gapic=gapic,
+ )
+
+java.gapic_library(
+ service=service,
+ version='v1p1beta1',
+ config_pattern='/google/cloud/asset/{version}/artman_cloudasset_{version}.yaml',
+ package_pattern='com.google.cloud.{service}.{version}',
+ gapic=gapic,
+)
- package_name = f'com.google.cloud.{service}.{version}'
- java.fix_proto_headers(library / f'proto-google-cloud-{service}-{version}')
- java.fix_grpc_headers(library / f'grpc-google-cloud-{service}-{version}', package_name)
-
- s.copy(library / f'gapic-google-cloud-{service}-{version}/src', f'google-cloud-{service}/src')
- s.copy(library / f'grpc-google-cloud-{service}-{version}/src', f'grpc-google-cloud-{service}-{version}/src')
- s.copy(library / f'proto-google-cloud-{service}-{version}/src', f'proto-google-cloud-{service}-{version}/src')
-
- java.format_code(f'google-cloud-{service}/src')
- java.format_code(f'grpc-google-cloud-{service}-{version}/src')
- java.format_code(f'proto-google-cloud-{service}-{version}/src')
common_templates = gcp.CommonTemplates()
templates = common_templates.java_library()